Skip to content

Query AWS Role Cloud Account



GET /api/v1/cloud_account/do/list

Query Request Parameters

Parameter Name Type Required Description
uuid string Cloud account UUID
Example: clac_example
Allow empty: False
area custom_enum Region ID
Example: cn
Allow empty: False
Allowed values: ['cn', 'intl']
accountId string Account ID
Example: string
Allow empty: False
accountName string Username
Example: string
Allow empty: False
pageSize integer Number of records returned per page
Allow empty: False
Example: 10
pageIndex integer Page number
Allow empty: False
Example: 1

Additional Parameter Notes

For end-to-end steps, see Connect an AWS Cloud Account via OpenAPI. The Endpoint in the examples is taken from the OpenAPI Site List.

Returns only AWS assume_role records in the current workspace; requires cloudAccount.accountManage. Management API access is not automatically granted merely because the caller has permission to read temporary credentials.

  • Use uuid for exact lookup; accountId/accountName still use fuzzy queries. When recovering a creation result, compare fields exactly and iterate through pagination. Page numbers start at 1, and the default is 10 records per page. Response pagination is at the top-level pageInfo; records are in content.data; content.declaration retains the workspace declaration.
  • Each record retains the existing list structure, with platformAccountId and platformAuthorizationStatus added at the top level. Use config.externalId to configure the trust policy.
  • The platform account ID is the current public configuration obtained based on the current workspace brand and the record's partition; it is not a historical identity snapshot. When unavailable, the record and External ID are retained, the platform ID is null, and the status is unavailable; when normal, the status is available, and it does not fall back to other brands.
  • isAvailable is a health status that may be stale; use the update API with dryRun=true to perform this validation, and use dryRun=false for the actual save. Subsequent retrieval of temporary credentials still performs real-time validation.
  • Does not accept provider/authType/workspace override parameters. If the creation response is lost, query to recover it first; do not regenerate the External ID.

Request Example

curl '<Endpoint>/api/v1/cloud_account/do/list?uuid=clac_example&pageIndex=1&pageSize=10' -H 'DF-API-KEY: <DF-API-KEY>'

Response

{
    "code": 200,
    "success": true,
    "errorCode": "",
    "message": "",
    "content": {
        "data": [
            {
                "uuid": "clac_example",
                "provider": "aws",
                "config": {
                    "authType": "assume_role",
                    "area": "intl",
                    "accountId": "123456789012",
                    "roleName": "collection/Guance",
                    "accountName": "example",
                    "externalId": "generated-external-id",
                    "extraTags": []
                },
                "isAvailable": false,
                "platformAccountId": "111111111111",
                "platformAuthorizationStatus": "available"
            }
        ],
        "declaration": {}
    },
    "traceId": "TRACE-example",
    "pageInfo": {
        "pageIndex": 1,
        "pageSize": 10,
        "count": 1,
        "totalCount": 1
    }
}