Get information about an account in an organization.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.organizations.getAccount({
accountId: "AWS ACCOUNT ID",
});
import pulumi
import pulumi_aws as aws
example = aws.organizations.get_account(account_id="AWS ACCOUNT ID")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/organizations"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := organizations.LookupAccount(ctx, &organizations.LookupAccountArgs{
AccountId: "AWS ACCOUNT ID",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = Aws.Organizations.GetAccount.Invoke(new()
{
AccountId = "AWS ACCOUNT ID",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.organizations.OrganizationsFunctions;
import com.pulumi.aws.organizations.inputs.GetAccountArgs;
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 = OrganizationsFunctions.getAccount(GetAccountArgs.builder()
.accountId("AWS ACCOUNT ID")
.build());
}
}
variables:
example:
fn::invoke:
function: aws:organizations:getAccount
arguments:
accountId: AWS ACCOUNT 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(account_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
opts: Optional[InvokeOptions] = None) -> GetAccountResult
def get_account_output(account_id: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Mapping[str, 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)
public static Output<GetAccountResult> getAccount(GetAccountArgs args, InvokeOptions options)
fn::invoke:
function: aws:organizations/getAccount:getAccount
arguments:
# arguments dictionaryThe following arguments are supported:
- Account
Id string - Account ID number of a delegated administrator account in the organization.
- Dictionary<string, string>
- Map of tags for the resource.
- Account
Id string - Account ID number of a delegated administrator account in the organization.
- map[string]string
- Map of tags for the resource.
- account
Id String - Account ID number of a delegated administrator account in the organization.
- Map<String,String>
- Map of tags for the resource.
- account
Id string - Account ID number of a delegated administrator account in the organization.
- {[key: string]: string}
- Map of tags for the resource.
- account_
id str - Account ID number of a delegated administrator account in the organization.
- Mapping[str, str]
- Map of tags for the resource.
- account
Id String - Account ID number of a delegated administrator account in the organization.
- Map<String>
- Map of tags for the resource.
getAccount Result
The following output properties are available:
- Account
Id string - Arn string
- ARN of the organization.
- Email string
- Email address of the owner assigned to the new member account.
- Id string
- The provider-assigned unique ID for this managed resource.
- Joined
Method string - Method by which the account joined the organization.
- Joined
Timestamp string - Date the account became a part of the organization.
- Name string
- Friendly name for the member account.
- Parent
Id string - Parent Organizational Unit ID or Root ID for the account.
- State string
- State of the account in the organization.
- Dictionary<string, string>
- Map of tags for the resource.
- Account
Id string - Arn string
- ARN of the organization.
- Email string
- Email address of the owner assigned to the new member account.
- Id string
- The provider-assigned unique ID for this managed resource.
- Joined
Method string - Method by which the account joined the organization.
- Joined
Timestamp string - Date the account became a part of the organization.
- Name string
- Friendly name for the member account.
- Parent
Id string - Parent Organizational Unit ID or Root ID for the account.
- State string
- State of the account in the organization.
- map[string]string
- Map of tags for the resource.
- account
Id String - arn String
- ARN of the organization.
- email String
- Email address of the owner assigned to the new member account.
- id String
- The provider-assigned unique ID for this managed resource.
- joined
Method String - Method by which the account joined the organization.
- joined
Timestamp String - Date the account became a part of the organization.
- name String
- Friendly name for the member account.
- parent
Id String - Parent Organizational Unit ID or Root ID for the account.
- state String
- State of the account in the organization.
- Map<String,String>
- Map of tags for the resource.
- account
Id string - arn string
- ARN of the organization.
- email string
- Email address of the owner assigned to the new member account.
- id string
- The provider-assigned unique ID for this managed resource.
- joined
Method string - Method by which the account joined the organization.
- joined
Timestamp string - Date the account became a part of the organization.
- name string
- Friendly name for the member account.
- parent
Id string - Parent Organizational Unit ID or Root ID for the account.
- state string
- State of the account in the organization.
- {[key: string]: string}
- Map of tags for the resource.
- account_
id str - arn str
- ARN of the organization.
- email str
- Email address of the owner assigned to the new member account.
- id str
- The provider-assigned unique ID for this managed resource.
- joined_
method str - Method by which the account joined the organization.
- joined_
timestamp str - Date the account became a part of the organization.
- name str
- Friendly name for the member account.
- parent_
id str - Parent Organizational Unit ID or Root ID for the account.
- state str
- State of the account in the organization.
- Mapping[str, str]
- Map of tags for the resource.
- account
Id String - arn String
- ARN of the organization.
- email String
- Email address of the owner assigned to the new member account.
- id String
- The provider-assigned unique ID for this managed resource.
- joined
Method String - Method by which the account joined the organization.
- joined
Timestamp String - Date the account became a part of the organization.
- name String
- Friendly name for the member account.
- parent
Id String - Parent Organizational Unit ID or Root ID for the account.
- state String
- State of the account in the organization.
- Map<String>
- Map of tags for the resource.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.
