GetCloudAccount

Updated at:

Queries the resource information of a cloud account.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

eiam:GetCloudAccount

get

*CloudAccount

acs:eiam:{#regionId}:{#accountId}:instance/{#InstanceId}/cloudaccount/{#CloudAccountId}

None None

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The instance ID.

idaas_ue2jvisn35ea5lmthk267xxxxx

CloudAccountId

string

Yes

The cloud account ID.

ca_01kmegjc11qa1txxxxx

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

0441BD79-92F3-53AA-8657-F8CE4A2B912A

CloudAccount

object

The cloud account details.

InstanceId

string

The instance ID.

idaas_ue2jvisn35ea5lmthk267xxxxx

CloudAccountId

string

The cloud account ID.

ca_01kmegjc11qa1txxxxx

CloudAccountName

string

The cloud account name.

cloud_accout_xxxx

CloudAccountVendorType

string

The cloud account type. Valid values:

  • alibaba_cloud: Alibaba Cloud.

Valid values:

  • alibaba_cloud :

    alibaba_cloud

alibaba_cloud

CloudAccountExternalId

string

The external unique identifier of the cloud account.

1234567

CloudAccountProviderName

string

The identity provider name.

idaas-eiam-oidc-provider

CloudAccountHealth

string

The cloud account health status. Valid values:

  • healthy: Healthy.

  • unhealthy: Unhealthy.

  • unknown: Unknown.

Valid values:

  • healthy :

    healthy

  • unhealthy :

    unhealthy

  • unknown :

    unknown

healthy

CloudAccountHealthCheckResult

object

The cloud account health check result.

LastCheckTime

integer

The last check time in UNIX timestamp format. Unit: milliseconds.

1649830226000

Result

string

The cloud account health check result. Valid values:

  • success: Success.

  • failed: Failure.

Valid values:

  • success :

    success

  • failed :

    failed

success

ErrorReason

object

The error reason. This field returns a value when the health check status is unhealthy.

ErrorCode

string

The error code.

AuthenticationFail.NoPermission

ErrorMessage

string

The error message.

There is no permission.

PrivilegeHostingState

string

The cloud account hosting state. Default value: hosting_unmanaged. Valid values:

  • hosting_unmanaged: Unmanaged. The cloud account has not initiated hosting and is in the initial state.

  • hosting_pending: Hosting. The hosting task is submitted and being executed asynchronously. Wait for the hosting process to complete before entering the final state.

  • hosting_completed: Hosting completed. The cloud account hosting process is executed successfully, and the related permission templates and hosting bindings are in effect.

  • hosting_failed: Hosting failed. The hosting process encounters an exception. You can view the cause of the failure and initiate hosting again.

  • hosting_removing: Removing. The remove hosting task is submitted and being executed asynchronously. Wait for the removal process to complete before entering the final state.

  • hosting_remove_failed: Removal failed. The removal process encounters an exception. You can view the cause of the failure and initiate removal again.

hosting_unmanaged

PrivilegeStatus

string

The privilege status. Valid values:

  • enabled: Enabled. The resource is in effect and can be used normally.

  • disabled: Disabled. The resource is deactivated and no longer in effect. You can re-enable it to restore it.

enabled

PrivilegeApplicationIds

array

The list of associated privilege application IDs.

string

The list of associated privilege application IDs.

app_mkv7rgt4d7i4u7zqtzev2mxxxx

PrivilegeHostingError

object

The cause of the privilege hosting or removal failure.

ErrorCode

string

The error code of the failure.

Error

ErrorMessage

string

The failure message.

test message

Description

string

The cloud account description.

cloud_accout_description

CloudAccountProviderConfig

object

The identity provider configuration information.

AuthorizationServerId

string

The authorization server ID.

iauths_system

Issuer

string

The issuer.

https://xxxxx.aliyunidaas.com/api/v2/iauths_system/oauth2

Audience

string

The audience identifier.

urn:cloud:idaas:sts:xxx:xxx

OidcJwksEndpoint

string

The public key endpoint for signature verification.

https://xxxxx.aliyunidaas.com/api/v2/iauths_system/oauth2/jwks

CreateTime

integer

The creation time in UNIX timestamp format. Unit: milliseconds.

1649830225000

UpdateTime

integer

The last update time in UNIX timestamp format. Unit: milliseconds.

1649830227000

CloudAccountSite

string

The cloud account site. Valid values:

  • china_mainland: The Chinese mainland.

  • global: Global.

china_mainland

Examples

Success response

JSON format

{
  "RequestId": "0441BD79-92F3-53AA-8657-F8CE4A2B912A",
  "CloudAccount": {
    "InstanceId": "idaas_ue2jvisn35ea5lmthk267xxxxx",
    "CloudAccountId": "ca_01kmegjc11qa1txxxxx",
    "CloudAccountName": "cloud_accout_xxxx",
    "CloudAccountVendorType": "alibaba_cloud",
    "CloudAccountExternalId": "1234567",
    "CloudAccountProviderName": "idaas-eiam-oidc-provider",
    "CloudAccountHealth": "healthy",
    "CloudAccountHealthCheckResult": {
      "LastCheckTime": 1649830226000,
      "Result": "success",
      "ErrorReason": {
        "ErrorCode": "AuthenticationFail.NoPermission",
        "ErrorMessage": "There is no permission."
      }
    },
    "PrivilegeHostingState": "hosting_unmanaged",
    "PrivilegeStatus": "enabled",
    "PrivilegeApplicationIds": [
      "app_mkv7rgt4d7i4u7zqtzev2mxxxx"
    ],
    "PrivilegeHostingError": {
      "ErrorCode": "Error",
      "ErrorMessage": "test message"
    },
    "Description": "cloud_accout_description",
    "CloudAccountProviderConfig": {
      "AuthorizationServerId": "iauths_system",
      "Issuer": "https://xxxxx.aliyunidaas.com/api/v2/iauths_system/oauth2",
      "Audience": "urn:cloud:idaas:sts:xxx:xxx",
      "OidcJwksEndpoint": "https://xxxxx.aliyunidaas.com/api/v2/iauths_system/oauth2/jwks"
    },
    "CreateTime": 1649830225000,
    "UpdateTime": 1649830227000,
    "CloudAccountSite": "china_mainland"
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.