1. Packages
  2. Packages
  3. Ibm Provider
  4. API Docs
  5. getAccountInfo
Viewing docs for ibm 2.0.2
published on Thursday, Apr 16, 2026 by ibm-cloud
Viewing docs for ibm 2.0.2
published on Thursday, Apr 16, 2026 by ibm-cloud

    Provides a read-only data source to retrieve information about an IBM Cloud account. You can then reference the fields of the data source in other resources within the same configuration by using interpolation syntax.

    For more information about IBM Cloud accounts, see Managing accounts.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const account = ibm.getAccountInfo({
        accountId: "your-account-id-here",
    });
    export const accountName = account.then(account => account.name);
    export const accountOwner = account.then(account => account.owner);
    export const accountType = account.then(account => account.type);
    
    import pulumi
    import pulumi_ibm as ibm
    
    account = ibm.get_account_info(account_id="your-account-id-here")
    pulumi.export("accountName", account.name)
    pulumi.export("accountOwner", account.owner)
    pulumi.export("accountType", account.type)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/v2/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		account, err := ibm.GetAccountInfo(ctx, &ibm.GetAccountInfoArgs{
    			AccountId: "your-account-id-here",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("accountName", account.Name)
    		ctx.Export("accountOwner", account.Owner)
    		ctx.Export("accountType", account.Type)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var account = Ibm.GetAccountInfo.Invoke(new()
        {
            AccountId = "your-account-id-here",
        });
    
        return new Dictionary<string, object?>
        {
            ["accountName"] = account.Apply(getAccountInfoResult => getAccountInfoResult.Name),
            ["accountOwner"] = account.Apply(getAccountInfoResult => getAccountInfoResult.Owner),
            ["accountType"] = account.Apply(getAccountInfoResult => getAccountInfoResult.Type),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.inputs.GetAccountInfoArgs;
    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 account = IbmFunctions.getAccountInfo(GetAccountInfoArgs.builder()
                .accountId("your-account-id-here")
                .build());
    
            ctx.export("accountName", account.name());
            ctx.export("accountOwner", account.owner());
            ctx.export("accountType", account.type());
        }
    }
    
    variables:
      account:
        fn::invoke:
          function: ibm:getAccountInfo
          arguments:
            accountId: your-account-id-here
    outputs:
      accountName: ${account.name}
      accountOwner: ${account.owner}
      accountType: ${account.type}
    

    Using getAccountInfo

    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 getAccountInfo(args: GetAccountInfoArgs, opts?: InvokeOptions): Promise<GetAccountInfoResult>
    function getAccountInfoOutput(args: GetAccountInfoOutputArgs, opts?: InvokeOptions): Output<GetAccountInfoResult>
    def get_account_info(account_id: Optional[str] = None,
                         id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetAccountInfoResult
    def get_account_info_output(account_id: Optional[pulumi.Input[str]] = None,
                         id: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetAccountInfoResult]
    func GetAccountInfo(ctx *Context, args *GetAccountInfoArgs, opts ...InvokeOption) (*GetAccountInfoResult, error)
    func GetAccountInfoOutput(ctx *Context, args *GetAccountInfoOutputArgs, opts ...InvokeOption) GetAccountInfoResultOutput

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

    public static class GetAccountInfo 
    {
        public static Task<GetAccountInfoResult> InvokeAsync(GetAccountInfoArgs args, InvokeOptions? opts = null)
        public static Output<GetAccountInfoResult> Invoke(GetAccountInfoInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAccountInfoResult> getAccountInfo(GetAccountInfoArgs args, InvokeOptions options)
    public static Output<GetAccountInfoResult> getAccountInfo(GetAccountInfoArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getAccountInfo:getAccountInfo
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AccountId string
    The unique identifier of the account you want to retrieve.
    Id string
    (String) The unique identifier of the account.
    AccountId string
    The unique identifier of the account you want to retrieve.
    Id string
    (String) The unique identifier of the account.
    accountId String
    The unique identifier of the account you want to retrieve.
    id String
    (String) The unique identifier of the account.
    accountId string
    The unique identifier of the account you want to retrieve.
    id string
    (String) The unique identifier of the account.
    account_id str
    The unique identifier of the account you want to retrieve.
    id str
    (String) The unique identifier of the account.
    accountId String
    The unique identifier of the account you want to retrieve.
    id String
    (String) The unique identifier of the account.

    getAccountInfo Result

    The following output properties are available:

    AccountId string
    Id string
    (String) The unique identifier of the account.
    LinkedSoftlayerAccount string
    (String) The linked SoftLayer account ID, if applicable.
    Name string
    (String) The name of the account.
    Owner string
    (String) The owner of the account.
    OwnerIamid string
    (String) The IAM ID of the account owner.
    OwnerUserid string
    (String) The user ID of the account owner.
    Status string
    (String) The status of the account.
    TeamDirectoryEnabled bool
    (Boolean) Indicates whether the team directory is enabled for the account.
    Traits List<GetAccountInfoTrait>
    (List) Account traits and characteristics.
    Type string
    (String) The type of the account.
    AccountId string
    Id string
    (String) The unique identifier of the account.
    LinkedSoftlayerAccount string
    (String) The linked SoftLayer account ID, if applicable.
    Name string
    (String) The name of the account.
    Owner string
    (String) The owner of the account.
    OwnerIamid string
    (String) The IAM ID of the account owner.
    OwnerUserid string
    (String) The user ID of the account owner.
    Status string
    (String) The status of the account.
    TeamDirectoryEnabled bool
    (Boolean) Indicates whether the team directory is enabled for the account.
    Traits []GetAccountInfoTrait
    (List) Account traits and characteristics.
    Type string
    (String) The type of the account.
    accountId String
    id String
    (String) The unique identifier of the account.
    linkedSoftlayerAccount String
    (String) The linked SoftLayer account ID, if applicable.
    name String
    (String) The name of the account.
    owner String
    (String) The owner of the account.
    ownerIamid String
    (String) The IAM ID of the account owner.
    ownerUserid String
    (String) The user ID of the account owner.
    status String
    (String) The status of the account.
    teamDirectoryEnabled Boolean
    (Boolean) Indicates whether the team directory is enabled for the account.
    traits List<GetAccountInfoTrait>
    (List) Account traits and characteristics.
    type String
    (String) The type of the account.
    accountId string
    id string
    (String) The unique identifier of the account.
    linkedSoftlayerAccount string
    (String) The linked SoftLayer account ID, if applicable.
    name string
    (String) The name of the account.
    owner string
    (String) The owner of the account.
    ownerIamid string
    (String) The IAM ID of the account owner.
    ownerUserid string
    (String) The user ID of the account owner.
    status string
    (String) The status of the account.
    teamDirectoryEnabled boolean
    (Boolean) Indicates whether the team directory is enabled for the account.
    traits GetAccountInfoTrait[]
    (List) Account traits and characteristics.
    type string
    (String) The type of the account.
    account_id str
    id str
    (String) The unique identifier of the account.
    linked_softlayer_account str
    (String) The linked SoftLayer account ID, if applicable.
    name str
    (String) The name of the account.
    owner str
    (String) The owner of the account.
    owner_iamid str
    (String) The IAM ID of the account owner.
    owner_userid str
    (String) The user ID of the account owner.
    status str
    (String) The status of the account.
    team_directory_enabled bool
    (Boolean) Indicates whether the team directory is enabled for the account.
    traits Sequence[GetAccountInfoTrait]
    (List) Account traits and characteristics.
    type str
    (String) The type of the account.
    accountId String
    id String
    (String) The unique identifier of the account.
    linkedSoftlayerAccount String
    (String) The linked SoftLayer account ID, if applicable.
    name String
    (String) The name of the account.
    owner String
    (String) The owner of the account.
    ownerIamid String
    (String) The IAM ID of the account owner.
    ownerUserid String
    (String) The user ID of the account owner.
    status String
    (String) The status of the account.
    teamDirectoryEnabled Boolean
    (Boolean) Indicates whether the team directory is enabled for the account.
    traits List<Property Map>
    (List) Account traits and characteristics.
    type String
    (String) The type of the account.

    Supporting Types

    GetAccountInfoTrait

    EuSupported bool
    (Boolean) Indicates if the account supports EU data residency.
    Hippa bool
    (Boolean) Indicates if the account is HIPAA compliant.
    Poc bool
    (Boolean) Indicates if this is a proof of concept account.
    EuSupported bool
    (Boolean) Indicates if the account supports EU data residency.
    Hippa bool
    (Boolean) Indicates if the account is HIPAA compliant.
    Poc bool
    (Boolean) Indicates if this is a proof of concept account.
    euSupported Boolean
    (Boolean) Indicates if the account supports EU data residency.
    hippa Boolean
    (Boolean) Indicates if the account is HIPAA compliant.
    poc Boolean
    (Boolean) Indicates if this is a proof of concept account.
    euSupported boolean
    (Boolean) Indicates if the account supports EU data residency.
    hippa boolean
    (Boolean) Indicates if the account is HIPAA compliant.
    poc boolean
    (Boolean) Indicates if this is a proof of concept account.
    eu_supported bool
    (Boolean) Indicates if the account supports EU data residency.
    hippa bool
    (Boolean) Indicates if the account is HIPAA compliant.
    poc bool
    (Boolean) Indicates if this is a proof of concept account.
    euSupported Boolean
    (Boolean) Indicates if the account supports EU data residency.
    hippa Boolean
    (Boolean) Indicates if the account is HIPAA compliant.
    poc Boolean
    (Boolean) Indicates if this is a proof of concept account.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    Viewing docs for ibm 2.0.2
    published on Thursday, Apr 16, 2026 by ibm-cloud
      Try Pulumi Cloud free. Your team will thank you.