get Volume Snapshot
Use this data source to access information about an existing Elastic SAN Volume Snapshot.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.elasticsan.get({
name: "existing",
resourceGroupName: "existing",
});
const exampleGetVolumeGroup = example.then(example => azure.elasticsan.getVolumeGroup({
name: "existing",
elasticSanId: example.id,
}));
const exampleGetVolumeSnapshot = exampleGetVolumeGroup.then(exampleGetVolumeGroup => azure.elasticsan.getVolumeSnapshot({
name: "existing",
volumeGroupId: exampleGetVolumeGroup.id,
}));
export const id = exampleGetVolumeSnapshot.then(exampleGetVolumeSnapshot => exampleGetVolumeSnapshot.id);
Content copied to clipboard
import pulumi
import pulumi_azure as azure
example = azure.elasticsan.get(name="existing",
resource_group_name="existing")
example_get_volume_group = azure.elasticsan.get_volume_group(name="existing",
elastic_san_id=example.id)
example_get_volume_snapshot = azure.elasticsan.get_volume_snapshot(name="existing",
volume_group_id=example_get_volume_group.id)
pulumi.export("id", example_get_volume_snapshot.id)
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.ElasticSan.Get.Invoke(new()
{
Name = "existing",
ResourceGroupName = "existing",
});
var exampleGetVolumeGroup = Azure.ElasticSan.GetVolumeGroup.Invoke(new()
{
Name = "existing",
ElasticSanId = example.Apply(getResult => getResult.Id),
});
var exampleGetVolumeSnapshot = Azure.ElasticSan.GetVolumeSnapshot.Invoke(new()
{
Name = "existing",
VolumeGroupId = exampleGetVolumeGroup.Apply(getVolumeGroupResult => getVolumeGroupResult.Id),
});
return new Dictionary<string, object?>
{
["id"] = exampleGetVolumeSnapshot.Apply(getVolumeSnapshotResult => getVolumeSnapshotResult.Id),
};
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/elasticsan"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := elasticsan.Get(ctx, &elasticsan.GetArgs{
Name: "existing",
ResourceGroupName: "existing",
}, nil)
if err != nil {
return err
}
exampleGetVolumeGroup, err := elasticsan.LookupVolumeGroup(ctx, &elasticsan.LookupVolumeGroupArgs{
Name: "existing",
ElasticSanId: example.Id,
}, nil)
if err != nil {
return err
}
exampleGetVolumeSnapshot, err := elasticsan.GetVolumeSnapshot(ctx, &elasticsan.GetVolumeSnapshotArgs{
Name: "existing",
VolumeGroupId: exampleGetVolumeGroup.Id,
}, nil)
if err != nil {
return err
}
ctx.Export("id", exampleGetVolumeSnapshot.Id)
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.elasticsan.ElasticsanFunctions;
import com.pulumi.azure.elasticsan.inputs.GetArgs;
import com.pulumi.azure.elasticsan.inputs.GetVolumeGroupArgs;
import com.pulumi.azure.elasticsan.inputs.GetVolumeSnapshotArgs;
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 = ElasticsanFunctions.get(GetArgs.builder()
.name("existing")
.resourceGroupName("existing")
.build());
final var exampleGetVolumeGroup = ElasticsanFunctions.getVolumeGroup(GetVolumeGroupArgs.builder()
.name("existing")
.elasticSanId(example.applyValue(getResult -> getResult.id()))
.build());
final var exampleGetVolumeSnapshot = ElasticsanFunctions.getVolumeSnapshot(GetVolumeSnapshotArgs.builder()
.name("existing")
.volumeGroupId(exampleGetVolumeGroup.applyValue(getVolumeGroupResult -> getVolumeGroupResult.id()))
.build());
ctx.export("id", exampleGetVolumeSnapshot.applyValue(getVolumeSnapshotResult -> getVolumeSnapshotResult.id()));
}
}
Content copied to clipboard
variables:
example:
fn::invoke:
function: azure:elasticsan:get
arguments:
name: existing
resourceGroupName: existing
exampleGetVolumeGroup:
fn::invoke:
function: azure:elasticsan:getVolumeGroup
arguments:
name: existing
elasticSanId: ${example.id}
exampleGetVolumeSnapshot:
fn::invoke:
function: azure:elasticsan:getVolumeSnapshot
arguments:
name: existing
volumeGroupId: ${exampleGetVolumeGroup.id}
outputs:
id: ${exampleGetVolumeSnapshot.id}
Content copied to clipboard
Return
A collection of values returned by getVolumeSnapshot.
Parameters
argument
A collection of arguments for invoking getVolumeSnapshot.
Return
A collection of values returned by getVolumeSnapshot.
Parameters
name
The name of the Elastic SAN Volume Snapshot.
volume Group Id
The Elastic SAN Volume Group ID within which the Elastic SAN Volume Snapshot exists.
See also
suspend fun getVolumeSnapshot(argument: suspend GetVolumeSnapshotPlainArgsBuilder.() -> Unit): GetVolumeSnapshotResult
Return
A collection of values returned by getVolumeSnapshot.
Parameters
argument
Builder for com.pulumi.azure.elasticsan.kotlin.inputs.GetVolumeSnapshotPlainArgs.