GetSnapshot
Use this data source to access information about an existing Snapshot.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Azure.Compute.GetSnapshot.InvokeAsync(new Azure.Compute.GetSnapshotArgs
{
Name = "my-snapshot",
ResourceGroupName = "my-resource-group",
}));
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/compute"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.LookupSnapshot(ctx, &compute.LookupSnapshotArgs{
Name: "my-snapshot",
ResourceGroupName: "my-resource-group",
}, nil)
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_azure as azure
example = azure.compute.get_snapshot(name="my-snapshot",
resource_group_name="my-resource-group")import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = pulumi.output(azure.compute.getSnapshot({
name: "my-snapshot",
resourceGroupName: "my-resource-group",
}, { async: true }));Using GetSnapshot
function getSnapshot(args: GetSnapshotArgs, opts?: InvokeOptions): Promise<GetSnapshotResult>function get_snapshot(name=None, resource_group_name=None, opts=None)func LookupSnapshot(ctx *Context, args *LookupSnapshotArgs, opts ...InvokeOption) (*LookupSnapshotResult, error)Note: This function is named
LookupSnapshotin the Go SDK.
public static class GetSnapshot {
public static Task<GetSnapshotResult> InvokeAsync(GetSnapshotArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Name string
Specifies the name of the Snapshot.
- Resource
Group stringName Specifies the name of the resource group the Snapshot is located in.
- Name string
Specifies the name of the Snapshot.
- Resource
Group stringName Specifies the name of the resource group the Snapshot is located in.
- name string
Specifies the name of the Snapshot.
- resource
Group stringName Specifies the name of the resource group the Snapshot is located in.
- name str
Specifies the name of the Snapshot.
- resource_
group_ strname Specifies the name of the resource group the Snapshot is located in.
GetSnapshot Result
The following output properties are available:
- Creation
Option string - Disk
Size intGb The size of the Snapshotted Disk in GB.
- Encryption
Settings List<GetSnapshot Encryption Setting> - Id string
The provider-assigned unique ID for this managed resource.
- Name string
- Os
Type string - Resource
Group stringName - Source
Resource stringId The reference to an existing snapshot.
- Source
Uri string The URI to a Managed or Unmanaged Disk.
- Storage
Account stringId The ID of an storage account.
- Time
Created string
- Creation
Option string - Disk
Size intGb The size of the Snapshotted Disk in GB.
- Encryption
Settings []GetSnapshot Encryption Setting - Id string
The provider-assigned unique ID for this managed resource.
- Name string
- Os
Type string - Resource
Group stringName - Source
Resource stringId The reference to an existing snapshot.
- Source
Uri string The URI to a Managed or Unmanaged Disk.
- Storage
Account stringId The ID of an storage account.
- Time
Created string
- creation
Option string - disk
Size numberGb The size of the Snapshotted Disk in GB.
- encryption
Settings GetSnapshot Encryption Setting[] - id string
The provider-assigned unique ID for this managed resource.
- name string
- os
Type string - resource
Group stringName - source
Resource stringId The reference to an existing snapshot.
- source
Uri string The URI to a Managed or Unmanaged Disk.
- storage
Account stringId The ID of an storage account.
- time
Created string
- creation_
option str - disk_
size_ floatgb The size of the Snapshotted Disk in GB.
- encryption_
settings List[GetSnapshot Encryption Setting] - id str
The provider-assigned unique ID for this managed resource.
- name str
- os_
type str - resource_
group_ strname - source_
resource_ strid The reference to an existing snapshot.
- source_
uri str The URI to a Managed or Unmanaged Disk.
- storage_
account_ strid The ID of an storage account.
- time_
created str
Supporting Types
GetSnapshotEncryptionSetting
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
GetSnapshotEncryptionSettingDiskEncryptionKey
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
GetSnapshotEncryptionSettingKeyEncryptionKey
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.