Help Center/ Cloud Operations Center/ API Reference/ API/ Application Resource Management/ Cloud Vendor Account/ Querying the Total Number of Resources of a User in a Cloud Vendor
Updated on 2025-10-24 GMT+08:00

Querying the Total Number of Resources of a User in a Cloud Vendor

Function

This API is used to query the total number of resources of a user in cloud vendors (like Alibaba Cloud, AWS, Azure, and Huawei Cloud Stack).

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    coc:instance:countResources

    List

    -

    -

    -

    -

URI

GET /v1/multicloud-resources/count

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

vendor

Yes

String

Definition:

Cloud vendor type.

Constraints:

N/A

Value range:

AWS: Amazon Web Services (AWS)

  • AZURE: Microsoft Azure

  • ALI: Alibaba Cloud

  • HCS: Huawei hybrid cloud solution Huawei Cloud Stack

Default value:

N/A

type

No

String

Definition:

Resource type.

Constraints:

N/A

Value range:

There are many resource types. Select a resource type based on the actual service. The common resource types are as follows:

  • cloudservers: Elastic Cloud Servers (ECSs)

  • servers: bare metal server (BMSs)

  • clusters: Cloud Container Engine (CCE) instances

  • instances: cloud database instances

Default value:

N/A

resource_id_list

No

Array of strings

Definition:

List of resource IDs selected by the user.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

name_list

No

Array of strings

Definition:

Resource name.

Constraints:

N/A

Value range:

List. For details, see BMS.

Default value:

N/A

region_id_list

No

Array of strings

Definition:

List of IDs of associated regions.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

data

Long

Definition:

Number of cloud resources.

Value range:

The value ranges from 0 to 65,535.

Status code: 400

Table 3 Response body parameters

Parameter

Type

Description

error_code

String

Definition:

Error code.

Value range:

The value contains 8 to 36 characters.

error_msg

String

Definition:

Error description.

Value range:

The value contains 2 to 512 characters.

Example Requests

This API is used to query the total number of resources of a user in a cloud vendor.

GET https://{Endpoint}/v1/multicloud-resources/count?vendor=ALI&type=ACS::ECS::Instance

Example Responses

Status code: 200

The total number of resources of the user in the cloud vendor is queried.

{
  "data" : 2
}

Status Codes

Status Code

Description

200

The total number of resources of the user in the cloud vendor is queried.

400

Failed to query the total number of resources of the user in the cloud vendor.

Error Codes

See Error Codes.