1. Registry
  2. Packages
  3. AWS Cloud Control
  4. API Docs
  5. getAccountId

We recommend new projects start with resources from the AWS provider.

Viewing docs for AWS Cloud Control v1.79.0
published on Monday, Sep 14, 2026 by Pulumi
aws-native logo aws-native logo

We recommend new projects start with resources from the AWS provider.

Viewing docs for AWS Cloud Control v1.79.0
published on Monday, Sep 14, 2026 by Pulumi

    Using getAccountId

    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 getAccountId(opts?: InvokeOptions): Promise<GetAccountIdResult>
    function getAccountIdOutput(opts?: InvokeOutputOptions): Output<GetAccountIdResult>
    def get_account_id(opts: Optional[InvokeOptions] = None) -> GetAccountIdResult
    def get_account_id_output(opts: Optional[InvokeOutputOptions] = None) -> Output[GetAccountIdResult]
    func GetAccountId(ctx *Context, opts ...InvokeOption) (*GetAccountIdResult, error)
    func GetAccountIdOutput(ctx *Context, opts ...InvokeOption) GetAccountIdResultOutput

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

    public static class GetAccountId 
    {
        public static Task<GetAccountIdResult> InvokeAsync(InvokeOptions? opts = null)
        public static Output<GetAccountIdResult> Invoke(InvokeOptions? opts = null)
        public static Output<GetAccountIdResult> Invoke(InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetAccountIdResult> getAccountId(InvokeOptions options)
    public static Output<GetAccountIdResult> getAccountId(InvokeOptions options)
    public static Output<GetAccountIdResult> getAccountId(InvokeOutputOptions options)
    
    fn::invoke:
      function: aws-native:getAccountId
      arguments:
        # arguments dictionary
    data "aws-native_get_account_id" "name" {
        # arguments
    }

    getAccountId Result

    The following output properties are available:

    AccountId string
    AccountId string
    account_id string
    accountId String
    accountId string
    accountId String

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo aws-native logo

    We recommend new projects start with resources from the AWS provider.

    Viewing docs for AWS Cloud Control v1.79.0
    published on Monday, Sep 14, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial