Querying a Resource Summary¶
Function¶
This API is used to query a resource summary.
Calling Method¶
For details, see Calling APIs.
URI¶
GET /v1/resource-manager/domains/{domain_id}/all-resources/summary
Parameter  | Mandatory  | Type  | Description  | 
|---|---|---|---|
domain_id  | Yes  | String  | Specifies tags. Maximum: 36  | 
Parameter  | Mandatory  | Type  | Description  | 
|---|---|---|---|
name  | No  | String  | Specifies the resource name. Maximum: 256  | 
type  | No  | Array  | Specifies resource types in the format of provider.type. Array Length: 1 - 100  | 
region_id  | No  | Array  | Specifies the regions. Array Length: 1 - 10  | 
ep_id  | No  | Array  | Specifies enterprise project IDs. Array Length: 1 - 10  | 
project_id  | No  | Array  | Specifies the project ID. Array Length: 1 - 10  | 
tags  | No  | Array  | Specifies tags. The format is key or key=value. Array Length: 1 - 5  | 
Request Parameters¶
Parameter  | Mandatory  | Type  | Description  | 
|---|---|---|---|
X-Security-Token  | No  | String  | Security token (session token) for temporary security credentials. This parameter is mandatory when you make an API call using temporary security credentials.  | 
Response Parameters¶
Status code: 200
Parameter  | Type  | Description  | 
|---|---|---|
[items]  | Array of ResourceSummaryResponseItem objects  | Specifies the list of resource summary information.  | 
Parameter  | Type  | Description  | 
|---|---|---|
provider  | String  | Specifies the cloud service name.  | 
types  | Array of types objects  | Specifies the resource type list.  | 
Parameter  | Type  | Description  | 
|---|---|---|
type  | String  | Specifies the resource type.  | 
regions  | Array of regions objects  | Specifies the regions.  | 
Parameter  | Type  | Description  | 
|---|---|---|
region_id  | String  | Specifies the region ID.  | 
count  | Long  | Specifies the number of resources of this type in the current region.  | 
Status code: 400
Parameter  | Type  | Description  | 
|---|---|---|
error_code  | String  | Specifies the error code.  | 
error_msg  | String  | Specifies the error message.  | 
Status code: 403
Parameter  | Type  | Description  | 
|---|---|---|
error_code  | String  | Specifies the error code.  | 
error_msg  | String  | Specifies the error message.  | 
Status code: 500
Parameter  | Type  | Description  | 
|---|---|---|
error_code  | String  | Specifies the error code.  | 
error_msg  | String  | Specifies the error message.  | 
Example Requests¶
GET https://{endpoint}/v1/resource-manager/domains/059b5c937100d3e40ff0c00a7675a0a0/all-resources/summary
Example Responses¶
Status code: 200
Operation succeeded.
[ {
  "provider" : "obs",
  "types" : [ {
    "type" : "buckets",
    "regions" : [ {
      "region_id" : "regionid1",
      "count" : 5
    } ]
  } ]
}, {
  "provider" : "ecs",
  "types" : [ {
    "type" : "cloudservers",
    "regions" : [ {
      "region_id" : "regionid2",
      "count" : 1
    } ]
  } ]
} ]
Status Codes¶
Status Code  | Description  | 
|---|---|
200  | Operation succeeded.  | 
400  | Invalid parameters.  | 
403  | User authentication failed.  | 
500  | Server error.  | 
Error Codes¶
See Error Codes.