We recommend using Azure Native.
Azure v6.28.0 published on Friday, Oct 3, 2025 by Pulumi
azure.elasticsan.getVolumeSnapshot
Start a Neo task
Explain and create an azure.elasticsan.getVolumeSnapshot resource
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);
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)
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
})
}
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),
};
});
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.id())
.build());
final var exampleGetVolumeSnapshot = ElasticsanFunctions.getVolumeSnapshot(GetVolumeSnapshotArgs.builder()
.name("existing")
.volumeGroupId(exampleGetVolumeGroup.id())
.build());
ctx.export("id", exampleGetVolumeSnapshot.id());
}
}
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}
API Providers
This data source uses the following Azure API Providers:
Microsoft.ElasticSan- 2023-01-01
Using getVolumeSnapshot
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getVolumeSnapshot(args: GetVolumeSnapshotArgs, opts?: InvokeOptions): Promise<GetVolumeSnapshotResult>
function getVolumeSnapshotOutput(args: GetVolumeSnapshotOutputArgs, opts?: InvokeOptions): Output<GetVolumeSnapshotResult>def get_volume_snapshot(name: Optional[str] = None,
volume_group_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetVolumeSnapshotResult
def get_volume_snapshot_output(name: Optional[pulumi.Input[str]] = None,
volume_group_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetVolumeSnapshotResult]func GetVolumeSnapshot(ctx *Context, args *GetVolumeSnapshotArgs, opts ...InvokeOption) (*GetVolumeSnapshotResult, error)
func GetVolumeSnapshotOutput(ctx *Context, args *GetVolumeSnapshotOutputArgs, opts ...InvokeOption) GetVolumeSnapshotResultOutput> Note: This function is named GetVolumeSnapshot in the Go SDK.
public static class GetVolumeSnapshot
{
public static Task<GetVolumeSnapshotResult> InvokeAsync(GetVolumeSnapshotArgs args, InvokeOptions? opts = null)
public static Output<GetVolumeSnapshotResult> Invoke(GetVolumeSnapshotInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetVolumeSnapshotResult> getVolumeSnapshot(GetVolumeSnapshotArgs args, InvokeOptions options)
public static Output<GetVolumeSnapshotResult> getVolumeSnapshot(GetVolumeSnapshotArgs args, InvokeOptions options)
fn::invoke:
function: azure:elasticsan/getVolumeSnapshot:getVolumeSnapshot
arguments:
# arguments dictionaryThe following arguments are supported:
- Name string
- The name of the Elastic SAN Volume Snapshot.
- Volume
Group stringId - The Elastic SAN Volume Group ID within which the Elastic SAN Volume Snapshot exists.
- Name string
- The name of the Elastic SAN Volume Snapshot.
- Volume
Group stringId - The Elastic SAN Volume Group ID within which the Elastic SAN Volume Snapshot exists.
- name String
- The name of the Elastic SAN Volume Snapshot.
- volume
Group StringId - The Elastic SAN Volume Group ID within which the Elastic SAN Volume Snapshot exists.
- name string
- The name of the Elastic SAN Volume Snapshot.
- volume
Group stringId - The Elastic SAN Volume Group ID within which the Elastic SAN Volume Snapshot exists.
- name str
- The name of the Elastic SAN Volume Snapshot.
- volume_
group_ strid - The Elastic SAN Volume Group ID within which the Elastic SAN Volume Snapshot exists.
- name String
- The name of the Elastic SAN Volume Snapshot.
- volume
Group StringId - The Elastic SAN Volume Group ID within which the Elastic SAN Volume Snapshot exists.
getVolumeSnapshot Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Source
Id string - The resource ID from which the Snapshot is created.
- Source
Volume intSize In Gib - The size of source volume.
- Volume
Group stringId - Volume
Name string - The source volume name of the Snapshot.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Source
Id string - The resource ID from which the Snapshot is created.
- Source
Volume intSize In Gib - The size of source volume.
- Volume
Group stringId - Volume
Name string - The source volume name of the Snapshot.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- source
Id String - The resource ID from which the Snapshot is created.
- source
Volume IntegerSize In Gib - The size of source volume.
- volume
Group StringId - volume
Name String - The source volume name of the Snapshot.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- source
Id string - The resource ID from which the Snapshot is created.
- source
Volume numberSize In Gib - The size of source volume.
- volume
Group stringId - volume
Name string - The source volume name of the Snapshot.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- source_
id str - The resource ID from which the Snapshot is created.
- source_
volume_ intsize_ in_ gib - The size of source volume.
- volume_
group_ strid - volume_
name str - The source volume name of the Snapshot.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- source
Id String - The resource ID from which the Snapshot is created.
- source
Volume NumberSize In Gib - The size of source volume.
- volume
Group StringId - volume
Name String - The source volume name of the Snapshot.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.
