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 LookupSnapshot in 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.

ResourceGroupName string

Specifies the name of the resource group the Snapshot is located in.

Name string

Specifies the name of the Snapshot.

ResourceGroupName string

Specifies the name of the resource group the Snapshot is located in.

name string

Specifies the name of the Snapshot.

resourceGroupName string

Specifies the name of the resource group the Snapshot is located in.

name str

Specifies the name of the Snapshot.

resource_group_name str

Specifies the name of the resource group the Snapshot is located in.

GetSnapshot Result

The following output properties are available:

CreationOption string
DiskSizeGb int

The size of the Snapshotted Disk in GB.

EncryptionSettings List<GetSnapshotEncryptionSetting>
Id string

The provider-assigned unique ID for this managed resource.

Name string
OsType string
ResourceGroupName string
SourceResourceId string

The reference to an existing snapshot.

SourceUri string

The URI to a Managed or Unmanaged Disk.

StorageAccountId string

The ID of an storage account.

TimeCreated string
CreationOption string
DiskSizeGb int

The size of the Snapshotted Disk in GB.

EncryptionSettings []GetSnapshotEncryptionSetting
Id string

The provider-assigned unique ID for this managed resource.

Name string
OsType string
ResourceGroupName string
SourceResourceId string

The reference to an existing snapshot.

SourceUri string

The URI to a Managed or Unmanaged Disk.

StorageAccountId string

The ID of an storage account.

TimeCreated string
creationOption string
diskSizeGb number

The size of the Snapshotted Disk in GB.

encryptionSettings GetSnapshotEncryptionSetting[]
id string

The provider-assigned unique ID for this managed resource.

name string
osType string
resourceGroupName string
sourceResourceId string

The reference to an existing snapshot.

sourceUri string

The URI to a Managed or Unmanaged Disk.

storageAccountId string

The ID of an storage account.

timeCreated string
creation_option str
disk_size_gb float

The size of the Snapshotted Disk in GB.

encryption_settings List[GetSnapshotEncryptionSetting]
id str

The provider-assigned unique ID for this managed resource.

name str
os_type str
resource_group_name str
source_resource_id str

The reference to an existing snapshot.

source_uri str

The URI to a Managed or Unmanaged Disk.

storage_account_id str

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.

DiskEncryptionKeys List<GetSnapshotEncryptionSettingDiskEncryptionKeyArgs>
Enabled bool
KeyEncryptionKeys List<GetSnapshotEncryptionSettingKeyEncryptionKeyArgs>
DiskEncryptionKeys []GetSnapshotEncryptionSettingDiskEncryptionKey
Enabled bool
KeyEncryptionKeys []GetSnapshotEncryptionSettingKeyEncryptionKey
diskEncryptionKeys GetSnapshotEncryptionSettingDiskEncryptionKey[]
enabled boolean
keyEncryptionKeys GetSnapshotEncryptionSettingKeyEncryptionKey[]
diskEncryptionKeys List[GetSnapshotEncryptionSettingDiskEncryptionKey]
enabled bool
keyEncryptionKeys List[GetSnapshotEncryptionSettingKeyEncryptionKey]

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.

SecretUrl string
SourceVaultId string
SecretUrl string
SourceVaultId string
secretUrl string
sourceVaultId string
secretUrl str
sourceVaultId str

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.

KeyUrl string
SourceVaultId string
KeyUrl string
SourceVaultId string
keyUrl string
sourceVaultId string
keyUrl str
sourceVaultId str

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.