You can call the operation to query resources.
Operation description
You can go to OpenAPI Explorer to view the documentation and try out CloudControl API.
You can call this operation to query resources List and Get based on different request paths.
Debugging
Authorization information
Request syntax
GET /api/v1/providers/{provider}/products/{product}/resources/* HTTP/1.1
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
requestPath | string | Yes | The request path. You can call resources List and Get based on different request paths. 1.List: /api/v1/providers/{provider}/products/{product}/resources/{resourceType} 2.Get: /api/v1/providers/{provider}/products/{product}/resources/{resourceType}/{resourceId} Variables in the request path. Valid values: provider: the cloud service provider. Currently, only Aliyun is supported. product: the product code. resourceType: the type of the resource. If there is a parent resource, the format is {parent resource type code}/parent resource ID/{resource type code}. resourceId: the ID of the resource. | /api/v1/providers/Aliyun/products/Redis/resources/DBInstance/r-8vbf5abe31c9**** |
regionId | string | No | The ID of the region. This parameter is required if the cloud product is deployed in a region. | cn-beijing |
filter | object | No | The filter condition. The JSON format. You can use some resource properties as filter conditions. | |
nextToken | string | No | The pagination token that is used in the next request to retrieve a new page of results. If you leave this parameter empty, the query starts from the beginning. | AAAAAdDWBF2**** |
maxResults | integer | No | The number of entries per page. Maximum value: 100. | 10 |
Response parameters
Examples
Sample success responses
JSON
format
{
"maxResults": 10,
"nextToken": "AAAAAdDWBF2****\n",
"requestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****\n",
"resource": {
"resourceAttributes": {
"Status": "Available",
"Description": "",
"AccountPrivilege": "RoleReadWrite",
"InstanceId": "r-8vbf5abe31c9c4d4",
"RegionId": "cn-zhangjiakou",
"AccountType": "Normal",
"TypeInfo": {},
"AccountName": "cctest"
},
"resourceId": "cctest\n"
},
"resources": [
{
"resourceAttributes": {
"Status": "Available",
"Description": "",
"AccountPrivilege": "RoleReadWrite",
"InstanceId": "r-8vbf5abe31c9c4d4",
"RegionId": "cn-zhangjiakou",
"AccountType": "Normal",
"TypeInfo": {},
"AccountName": "cctest"
},
"resourceId": "cctest"
}
],
"totalCount": 20
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|