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 = data.azurerm_netapp_snapshot.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", data["azurerm_netapp_snapshot"]["example"]["id"])using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var test = Output.Create(Azure.NetApp.GetSnapshot.InvokeAsync(new Azure.NetApp.GetSnapshotArgs
{
ResourceGroupName = "acctestRG",
Name = "acctestnetappsnapshot",
AccountName = "acctestnetappaccount",
PoolName = "acctestnetapppool",
VolumeName = "acctestnetappvolume",
}));
this.NetappSnapshotId = data.Azurerm_netapp_snapshot.Example.Id;
}
[Output("netappSnapshotId")]
public Output<string> NetappSnapshotId { get; set; }
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/netapp"
"github.com/pulumi/pulumi/sdk/v2/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", data.Azurerm_netapp_snapshot.Example.Id)
return nil
})
}Using GetSnapshot
function getSnapshot(args: GetSnapshotArgs, opts?: InvokeOptions): Promise<GetSnapshotResult>function get_snapshot(account_name=None, name=None, pool_name=None, resource_group_name=None, volume_name=None, opts=None)func LookupSnapshot(ctx *Context, args *LookupSnapshotArgs, opts ...InvokeOption) (*LookupSnapshotResult, error)Note: This function is named
LookupSnapshotin the Go SDK.
public static class GetSnapshot {
public static Task<GetSnapshotResult> InvokeAsync(GetSnapshotArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Account
Name string The name of the NetApp Account where the NetApp Pool exists.
- Name string
The name of the NetApp Snapshot.
- Pool
Name string The name of the NetApp Pool where the NetApp Volume exists.
- Resource
Group stringName The Name of the Resource Group where the NetApp Snapshot exists.
- Volume
Name string The name of the NetApp Volume where the NetApp Snapshot exists.
- Account
Name string The name of the NetApp Account where the NetApp Pool exists.
- Name string
The name of the NetApp Snapshot.
- Pool
Name string The name of the NetApp Pool where the NetApp Volume exists.
- Resource
Group stringName The Name of the Resource Group where the NetApp Snapshot exists.
- Volume
Name string The name of the NetApp Volume where the NetApp Snapshot exists.
- account
Name string The name of the NetApp Account where the NetApp Pool exists.
- name string
The name of the NetApp Snapshot.
- pool
Name string The name of the NetApp Pool where the NetApp Volume exists.
- resource
Group stringName The Name of the Resource Group where the NetApp Snapshot exists.
- volume
Name 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_ strname 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.
GetSnapshot Result
The following output properties are available:
- Account
Name string - Id string
The provider-assigned unique ID for this managed resource.
- Location string
The Azure Region where the NetApp Snapshot exists.
- Name string
- Pool
Name string - Resource
Group stringName - Volume
Name string
- Account
Name string - Id string
The provider-assigned unique ID for this managed resource.
- Location string
The Azure Region where the NetApp Snapshot exists.
- Name string
- Pool
Name string - Resource
Group stringName - Volume
Name string
- account
Name string - id string
The provider-assigned unique ID for this managed resource.
- location string
The Azure Region where the NetApp Snapshot exists.
- name string
- pool
Name string - resource
Group stringName - volume
Name 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_ strname - volume_
name str
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.