You can invoke this operation to query resources.
Operation description
You can go to the API Explorer to view the resource documentation and test the Cloud Control API.
This API provides Get and List operations for resources that you can invoke using different request URIs.
Try it now
Test
RAM authorization
Request syntax
GET /api/v1/providers/{provider}/products/{product}/resources/* HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| requestPath |
string |
No |
The URI of the request. The request URI determines whether the List or Get operation is invoked.
The request URI contains the following variables:
|
/api/v1/providers/Aliyun/products/Redis/resources/DBInstance/r-8vbf5abe31c9**** |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| regionId |
string |
No |
The region ID. This parameter is required if the cloud product is region-specific. |
cn-beijing |
| filter |
object |
No |
The filter conditions for resources. Specify multiple key-value pairs in JSON format to filter resources. If a List or Get operation for a cloud product supports filtering by specific properties, you can use those properties as filter conditions for this parameter. Note
The supported filter fields may vary for different resource types. For more information about the supported fields, see the OpenAPI documentation for the specific resource. For example, DBInstance resources support filtering by the |
{ "EditionType": "Community", "PaymentType": "PostPaid" } |
| nextToken |
string |
No |
The pagination token.
Note
If this parameter contains only digits, Cloud Control API treats it as the |
AAAAAdDWBF2**** |
| maxResults |
integer |
No |
The maximum number of records to return on each page for a paged query. Maximum value: 100. |
10 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response structure. |
||
| maxResults |
integer |
The maximum number of records returned for the current request. This parameter is returned by the List operation. |
10 |
| nextToken |
string |
The position where the current call finished reading. An empty value indicates that all data has been read. This parameter is returned by the List operation. |
AAAAAdDWBF2**** |
| requestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
| resource |
object |
The specified resource. This parameter is returned by the Get operation. |
|
| resourceAttributes |
object |
The resource properties in JSON format. |
{"Status":"Available","Description":"","AccountPrivilege":"RoleReadWrite","InstanceId":"r-8vbf5abe31c9c4d4","RegionId":"cn-zhangjiakou","AccountType":"Normal","TypeInfo":{},"AccountName":"cctest"} |
| resourceId |
string |
The resource ID. |
cctest |
| resources |
array<object> |
A list of resources. This parameter is returned by the List operation. |
|
|
array<object> |
A resource. |
||
| resourceAttributes |
object |
The resource properties in JSON format. |
{"Status":"Available","Description":"","AccountPrivilege":"RoleReadWrite","InstanceId":"r-8vbf5abe31c9c4d4","RegionId":"cn-zhangjiakou","AccountType":"Normal","TypeInfo":{},"AccountName":"cctest"} |
| resourceId |
string |
The resource ID. |
cctest |
| totalCount |
integer |
The total number of entries that match the query conditions. This parameter is returned by the List operation. |
20 |
Examples
Success response
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
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.