Azure Classic
getAccount
Uses this data source to access information about an existing NetApp Account.
NetApp Account Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.netapp.getAccount({
resourceGroupName: "acctestRG",
name: "acctestnetappaccount",
});
export const netappAccountId = example.then(example => example.id);
import pulumi
import pulumi_azure as azure
example = azure.netapp.get_account(resource_group_name="acctestRG",
name="acctestnetappaccount")
pulumi.export("netappAccountId", example.id)
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Azure.NetApp.GetAccount.InvokeAsync(new Azure.NetApp.GetAccountArgs
{
ResourceGroupName = "acctestRG",
Name = "acctestnetappaccount",
}));
this.NetappAccountId = example.Apply(example => example.Id);
}
[Output("netappAccountId")]
public Output<string> NetappAccountId { get; set; }
}
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 {
example, err := netapp.LookupAccount(ctx, &netapp.LookupAccountArgs{
ResourceGroupName: "acctestRG",
Name: "acctestnetappaccount",
}, nil)
if err != nil {
return err
}
ctx.Export("netappAccountId", example.Id)
return nil
})
}
package generated_program;
import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = Output.of(NetappFunctions.getAccount(GetAccountArgs.builder()
.resourceGroupName("acctestRG")
.name("acctestnetappaccount")
.build()));
ctx.export("netappAccountId", example.apply(getAccountResult -> getAccountResult.id()));
}
}
variables:
example:
Fn::Invoke:
Function: azure:netapp:getAccount
Arguments:
resourceGroupName: acctestRG
name: acctestnetappaccount
outputs:
netappAccountId: ${example.id}
Using getAccount
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 getAccount(args: GetAccountArgs, opts?: InvokeOptions): Promise<GetAccountResult>
function getAccountOutput(args: GetAccountOutputArgs, opts?: InvokeOptions): Output<GetAccountResult>
def get_account(name: Optional[str] = None,
resource_group_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAccountResult
def get_account_output(name: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAccountResult]
func LookupAccount(ctx *Context, args *LookupAccountArgs, opts ...InvokeOption) (*LookupAccountResult, error)
func LookupAccountOutput(ctx *Context, args *LookupAccountOutputArgs, opts ...InvokeOption) LookupAccountResultOutput
> Note: This function is named LookupAccount
in the Go SDK.
public static class GetAccount
{
public static Task<GetAccountResult> InvokeAsync(GetAccountArgs args, InvokeOptions? opts = null)
public static Output<GetAccountResult> Invoke(GetAccountInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAccountResult> getAccount(GetAccountArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
Function: azure:netapp/getAccount:getAccount
Arguments:
# Arguments dictionary
The following arguments are supported:
- Name string
The name of the NetApp Account.
- Resource
Group stringName The Name of the Resource Group where the NetApp Account exists.
- Name string
The name of the NetApp Account.
- Resource
Group stringName The Name of the Resource Group where the NetApp Account exists.
- name String
The name of the NetApp Account.
- resource
Group StringName The Name of the Resource Group where the NetApp Account exists.
- name string
The name of the NetApp Account.
- resource
Group stringName The Name of the Resource Group where the NetApp Account exists.
- name str
The name of the NetApp Account.
- resource_
group_ strname The Name of the Resource Group where the NetApp Account exists.
- name String
The name of the NetApp Account.
- resource
Group StringName The Name of the Resource Group where the NetApp Account exists.
getAccount Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Location string
The Azure Region where the NetApp Account exists.
- Name string
- Resource
Group stringName
- Id string
The provider-assigned unique ID for this managed resource.
- Location string
The Azure Region where the NetApp Account exists.
- Name string
- Resource
Group stringName
- id String
The provider-assigned unique ID for this managed resource.
- location String
The Azure Region where the NetApp Account exists.
- name String
- resource
Group StringName
- id string
The provider-assigned unique ID for this managed resource.
- location string
The Azure Region where the NetApp Account exists.
- name string
- resource
Group stringName
- id str
The provider-assigned unique ID for this managed resource.
- location str
The Azure Region where the NetApp Account exists.
- name str
- resource_
group_ strname
- id String
The provider-assigned unique ID for this managed resource.
- location String
The Azure Region where the NetApp Account exists.
- name String
- resource
Group StringName
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.