1. Packages
  2. Azure Classic
  3. API Docs
  4. netapp
  5. getSnapshot

We recommend using Azure Native.

Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi

azure.netapp.getSnapshot

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi

    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"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/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
    	})
    }
    
    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 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}
    

    Using getSnapshot

    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 getSnapshot(args: GetSnapshotArgs, opts?: InvokeOptions): Promise<GetSnapshotResult>
    function getSnapshotOutput(args: GetSnapshotOutputArgs, opts?: InvokeOptions): Output<GetSnapshotResult>
    def get_snapshot(account_name: Optional[str] = None,
                     name: Optional[str] = None,
                     pool_name: Optional[str] = None,
                     resource_group_name: Optional[str] = None,
                     volume_name: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetSnapshotResult
    def get_snapshot_output(account_name: Optional[pulumi.Input[str]] = None,
                     name: Optional[pulumi.Input[str]] = None,
                     pool_name: Optional[pulumi.Input[str]] = None,
                     resource_group_name: Optional[pulumi.Input[str]] = None,
                     volume_name: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetSnapshotResult]
    func LookupSnapshot(ctx *Context, args *LookupSnapshotArgs, opts ...InvokeOption) (*LookupSnapshotResult, error)
    func LookupSnapshotOutput(ctx *Context, args *LookupSnapshotOutputArgs, opts ...InvokeOption) LookupSnapshotResultOutput

    > Note: This function is named LookupSnapshot in the Go SDK.

    public static class GetSnapshot 
    {
        public static Task<GetSnapshotResult> InvokeAsync(GetSnapshotArgs args, InvokeOptions? opts = null)
        public static Output<GetSnapshotResult> Invoke(GetSnapshotInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSnapshotResult> getSnapshot(GetSnapshotArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:netapp/getSnapshot:getSnapshot
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AccountName string
    The name of the NetApp Account where the NetApp Pool exists.
    Name string
    The name of the NetApp Snapshot.
    PoolName string
    The name of the NetApp Pool where the NetApp Volume exists.
    ResourceGroupName string
    The Name of the Resource Group where the NetApp Snapshot exists.
    VolumeName string
    The name of the NetApp Volume where the NetApp Snapshot exists.
    AccountName string
    The name of the NetApp Account where the NetApp Pool exists.
    Name string
    The name of the NetApp Snapshot.
    PoolName string
    The name of the NetApp Pool where the NetApp Volume exists.
    ResourceGroupName string
    The Name of the Resource Group where the NetApp Snapshot exists.
    VolumeName string
    The name of the NetApp Volume where the NetApp Snapshot exists.
    accountName String
    The name of the NetApp Account where the NetApp Pool exists.
    name String
    The name of the NetApp Snapshot.
    poolName String
    The name of the NetApp Pool where the NetApp Volume exists.
    resourceGroupName String
    The Name of the Resource Group where the NetApp Snapshot exists.
    volumeName String
    The name of the NetApp Volume where the NetApp Snapshot exists.
    accountName string
    The name of the NetApp Account where the NetApp Pool exists.
    name string
    The name of the NetApp Snapshot.
    poolName string
    The name of the NetApp Pool where the NetApp Volume exists.
    resourceGroupName string
    The Name of the Resource Group where the NetApp Snapshot exists.
    volumeName string
    The name of the NetApp Volume where the NetApp Snapshot exists.
    account_name str
    The name of the NetApp Account where the NetApp Pool exists.
    name str
    The name of the NetApp Snapshot.
    pool_name str
    The name of the NetApp Pool where the NetApp Volume exists.
    resource_group_name str
    The Name of the Resource Group where the NetApp Snapshot exists.
    volume_name str
    The name of the NetApp Volume where the NetApp Snapshot exists.
    accountName String
    The name of the NetApp Account where the NetApp Pool exists.
    name String
    The name of the NetApp Snapshot.
    poolName String
    The name of the NetApp Pool where the NetApp Volume exists.
    resourceGroupName String
    The Name of the Resource Group where the NetApp Snapshot exists.
    volumeName String
    The name of the NetApp Volume where the NetApp Snapshot exists.

    getSnapshot Result

    The following output properties are available:

    AccountName string
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    The Azure Region where the NetApp Snapshot exists.
    Name string
    PoolName string
    ResourceGroupName string
    VolumeName string
    AccountName string
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    The Azure Region where the NetApp Snapshot exists.
    Name string
    PoolName string
    ResourceGroupName string
    VolumeName string
    accountName String
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    The Azure Region where the NetApp Snapshot exists.
    name String
    poolName String
    resourceGroupName String
    volumeName String
    accountName string
    id string
    The provider-assigned unique ID for this managed resource.
    location string
    The Azure Region where the NetApp Snapshot exists.
    name string
    poolName string
    resourceGroupName string
    volumeName string
    account_name str
    id str
    The provider-assigned unique ID for this managed resource.
    location str
    The Azure Region where the NetApp Snapshot exists.
    name str
    pool_name str
    resource_group_name str
    volume_name str
    accountName String
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    The Azure Region where the NetApp Snapshot exists.
    name String
    poolName String
    resourceGroupName String
    volumeName String

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi