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-12-05 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).

URI

GET /v1/multicloud-resources/count

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

vendor

Yes

String

Definition

Cloud vendor type.

Constraints

N/A

Range

AWS: Amazon Web Services

  • AZURE: Microsoft Azure

  • ALI: Alibaba Cloud

  • HCS: Huawei Cloud Stack (HCS), a hybrid cloud solution of Huawei.

Default value

N/A

type

No

String

Definition

Resource type.

Constraints

N/A

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 Servers (BMSs)

  • clusters: Cloud Container Engine (CCE)

  • 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

Range

N/A

Default value

N/A

name_list

No

Array of strings

Definition

Resource name.

Constraints

N/A

Range

List. For details, see Bare Metal Server (BMS).

Default value

N/A

region_id_list

No

Array of strings

Definition

List of IDs of associated regions.

Constraints

N/A

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.

Range

The value range is 0 to 65,535.

Status code: 400

Table 3 Response body parameters

Parameter

Type

Description

error_code

String

Definition

Error code.

Range

The value is a string. It contains 8 to 36 characters.

error_msg

String

Definition

Error description.

Range

The value is a string. It contains 2 to 512 characters.

Example Requests

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.