ListCloudAccounts

Updated at:

Queries the information about one or more cloud accounts by using paging.

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:ListCloudAccounts

list

*CloudAccount

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

None None

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The instance ID.

idaas_ue2jvisn35ea5lmthk267xxxxx

NextToken

string

No

The token that specifies the starting position of the next page.

  • If this parameter is not specified, the query starts from the first page by default.

NTxxxxxexample

MaxResults

integer

No

The maximum number of entries per page.

  • If this parameter is not specified, the default value is 20.

  • The maximum value is 100.

20

Filter

array<object>

No

The filter conditions.

object

No

The filter conditions.

Name

string

No

The name of the filter field. Valid values:

  • CloudAccountId: the ID of the cloud account.

  • CloudAccountExternalId: the external unique identifier of the cloud account.

  • CloudAccountVendorType: the type of the cloud account.

Valid values:

  • CloudAccountVendorType :

    CloudAccountVendorType

  • CloudAccountExternalId :

    CloudAccountExternalId

  • CloudAccountId :

    CloudAccountId

CloudAccountId

Value

array

No

The list of values for the filter field.

string

No

The value of the filter field.

ca_01kmegjc11qa1txxxxx

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

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

TotalCount

integer

The total number of entries.

100

NextToken

string

The token returned for the next query.

NTxxxexample

MaxResults

integer

The number of entries per page in paging.

20

CloudAccounts

array<object>

The list of cloud accounts.

array<object>

The details of the cloud account.

InstanceId

string

The instance ID.

idaas_ue2jvisn35ea5lmthk267xxxxx

CloudAccountId

string

The ID of the cloud account.

ca_01kmegjc11qa1txxxxx

CloudAccountName

string

The name of the cloud account.

cloud_accout_xxxx

CloudAccountVendorType

string

The type of the cloud account. Valid values:

  • alibaba_cloud: Alibaba Cloud.

alibaba_cloud

CloudAccountExternalId

string

The external unique identifier of the cloud account.

1234567

CloudAccountProviderName

string

The name of the identity provider.

idaas-eiam-oidc-provider

CloudAccountHealth

string

The health status of the cloud account. Valid values:

  • healthy: healthy

  • unhealthy: unhealthy

  • unknown: unknown

Valid values:

  • healthy :

    healthy

  • unhealthy :

    unhealthy

  • unknown :

    unknown

healthy

Description

string

The description of the cloud account.

cloud_accout_description

CreateTime

integer

The creation time. The value is a UNIX timestamp in milliseconds.

1649830225000

UpdateTime

integer

The last update time. The value is a UNIX timestamp in milliseconds.

1649830227000

CloudAccountHealthCheckResult

object

The health check result of the cloud account.

LastCheckTime

integer

The time of the last health check. The value is a UNIX timestamp in milliseconds.

1649830226000

Result

string

The health check result of the cloud account. Valid values:

  • success: success

  • failed: failed

Valid values:

  • success :

    success

  • failed :

    failed

success

ErrorReason

object

The error cause. This field is returned only when the health check status is unhealthy.

ErrorCode

string

The error code.

AuthenticationFail.NoPermission

ErrorMessage

string

The error message.

There is no permission.

CloudAccountSite

string

The site of the cloud account. Valid values:

  • china_mainland: the Chinese mainland

  • global: global

china_mainland

PrivilegeHostingState

string

The hosting status of the cloud account. 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 has been submitted and is being executed asynchronously. Wait for the hosting process to complete before it enters the final state.

  • hosting_completed: Hosting completed. The hosting process of the cloud account is executed successfully, and the relevant permission templates and hosting bindings have taken 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 task to remove hosting has been submitted and is being executed asynchronously. Wait for the removal process to complete before it enters 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 status of the privilege switch. Valid values:

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

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

enabled

PrivilegeApplicationIds

array

The list of IDs of the associated privilege applications.

string

The ID of the associated privilege application.

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 error message of the failure.

test message

Examples

Success response

JSON format

{
  "RequestId": "0441BD79-92F3-53AA-8657-F8CE4A2B912A",
  "TotalCount": 100,
  "NextToken": "NTxxxexample",
  "MaxResults": 20,
  "CloudAccounts": [
    {
      "InstanceId": "idaas_ue2jvisn35ea5lmthk267xxxxx",
      "CloudAccountId": "ca_01kmegjc11qa1txxxxx",
      "CloudAccountName": "cloud_accout_xxxx",
      "CloudAccountVendorType": "alibaba_cloud",
      "CloudAccountExternalId": "1234567",
      "CloudAccountProviderName": "idaas-eiam-oidc-provider",
      "CloudAccountHealth": "healthy",
      "Description": "cloud_accout_description",
      "CreateTime": 1649830225000,
      "UpdateTime": 1649830227000,
      "CloudAccountHealthCheckResult": {
        "LastCheckTime": 1649830226000,
        "Result": "success",
        "ErrorReason": {
          "ErrorCode": "AuthenticationFail.NoPermission",
          "ErrorMessage": "There is no permission."
        }
      },
      "CloudAccountSite": "china_mainland",
      "PrivilegeHostingState": "hosting_unmanaged",
      "PrivilegeStatus": "enabled",
      "PrivilegeApplicationIds": [
        "app_mkv7rgt4d7i4u7zqtzev2mxxxx"
      ],
      "PrivilegeHostingError": {
        "ErrorCode": "Error",
        "ErrorMessage": "test message"
      }
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.