getSnapshot

Uses this data source to access information about an existing NetApp Snapshot.

NetApp Snapshot Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const test = azure.netapp.getSnapshot({
resourceGroupName: "acctestRG",
name: "acctestnetappsnapshot",
accountName: "acctestnetappaccount",
poolName: "acctestnetapppool",
volumeName: "acctestnetappvolume",
});
export const netappSnapshotId = example.id;
import pulumi
import pulumi_azure as azure
test = azure.netapp.get_snapshot(resource_group_name="acctestRG",
name="acctestnetappsnapshot",
account_name="acctestnetappaccount",
pool_name="acctestnetapppool",
volume_name="acctestnetappvolume")
pulumi.export("netappSnapshotId", example["id"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var test = Azure.NetApp.GetSnapshot.Invoke(new()
{
ResourceGroupName = "acctestRG",
Name = "acctestnetappsnapshot",
AccountName = "acctestnetappaccount",
PoolName = "acctestnetapppool",
VolumeName = "acctestnetappvolume",
});
return new Dictionary<string, object?>
{
["netappSnapshotId"] = example.Id,
};
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/netapp"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := netapp.LookupSnapshot(ctx, &netapp.LookupSnapshotArgs{
ResourceGroupName: "acctestRG",
Name: "acctestnetappsnapshot",
AccountName: "acctestnetappaccount",
PoolName: "acctestnetapppool",
VolumeName: "acctestnetappvolume",
}, nil)
if err != nil {
return err
}
ctx.Export("netappSnapshotId", example.Id)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.netapp.NetappFunctions;
import com.pulumi.azure.netapp.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 test = NetappFunctions.getSnapshot(GetSnapshotArgs.builder()
.resourceGroupName("acctestRG")
.name("acctestnetappsnapshot")
.accountName("acctestnetappaccount")
.poolName("acctestnetapppool")
.volumeName("acctestnetappvolume")
.build());
ctx.export("netappSnapshotId", example.id());
}
}
variables:
test:
fn::invoke:
function: azure:netapp:getSnapshot
arguments:
resourceGroupName: acctestRG
name: acctestnetappsnapshot
accountName: acctestnetappaccount
poolName: acctestnetapppool
volumeName: acctestnetappvolume
outputs:
netappSnapshotId: ${example.id}

API Providers

This data source uses the following Azure API Providers:

  • Microsoft.NetApp: 2025-01-01

Return

A collection of values returned by getSnapshot.

Parameters

argument

A collection of arguments for invoking getSnapshot.


suspend fun getSnapshot(accountName: String, name: String, poolName: String, resourceGroupName: String, volumeName: String): GetSnapshotResult

Return

A collection of values returned by getSnapshot.

Parameters

accountName

The name of the NetApp Account where the NetApp Pool exists.

name

The name of the NetApp Snapshot.

poolName

The name of the NetApp Pool where the NetApp Volume exists.

resourceGroupName

The Name of the Resource Group where the NetApp Snapshot exists.

volumeName

The name of the NetApp Volume where the NetApp Snapshot exists.

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.netapp.kotlin.inputs.GetSnapshotPlainArgs.

See also