getSnapshot

Use this data source to access information about an existing Snapshot.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.compute.getSnapshot({
name: "my-snapshot",
resourceGroupName: "my-resource-group",
});
import pulumi
import pulumi_azure as azure
example = azure.compute.get_snapshot(name="my-snapshot",
resource_group_name="my-resource-group")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.Compute.GetSnapshot.Invoke(new()
{
Name = "my-snapshot",
ResourceGroupName = "my-resource-group",
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute"
"github.com/pulumi/pulumi/sdk/v3/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
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.compute.ComputeFunctions;
import com.pulumi.azure.compute.inputs.GetSnapshotArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = ComputeFunctions.getSnapshot(GetSnapshotArgs.builder()
.name("my-snapshot")
.resourceGroupName("my-resource-group")
.build());
}
}
variables:
example:
fn::invoke:
function: azure:compute:getSnapshot
arguments:
name: my-snapshot
resourceGroupName: my-resource-group

Return

A collection of values returned by getSnapshot.

Parameters

argument

A collection of arguments for invoking getSnapshot.


suspend fun getSnapshot(name: String, resourceGroupName: String): GetSnapshotResult

Return

A collection of values returned by getSnapshot.

Parameters

name

Specifies the name of the Snapshot.

resourceGroupName

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

See also


suspend fun getSnapshot(argument: suspend GetSnapshotPlainArgsBuilder.() -> Unit): GetSnapshotResult

Return

A collection of values returned by getSnapshot.

Parameters

argument

Builder for com.pulumi.azure.compute.kotlin.inputs.GetSnapshotPlainArgs.

See also