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
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
vendor |
Yes |
String |
Definition: Cloud vendor type. Constraints: N/A Value range: AWS: Amazon Web Services (AWS) 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: 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
|
Parameter |
Type |
Description |
|---|---|---|
|
data |
Long |
Definition: Number of cloud resources. Value range: The value ranges from 0 to 65,535. |
Status code: 400
|
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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot