All Products
Search
Document Center

Cloud Control API:GetResources

Last Updated:Mar 06, 2025

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

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request syntax

GET /api/v1/providers/{provider}/products/{product}/resources/* HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
requestPathstringYes

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****
regionIdstringNo

The ID of the region. This parameter is required if the cloud product is deployed in a region.

cn-beijing
filterobjectNo

The filter condition. The JSON format. You can use some resource properties as filter conditions.

nextTokenstringNo

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****
maxResultsintegerNo

The number of entries per page. Maximum value: 100.

10

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

maxResultsinteger

The maximum number of entries returned. Return result of the List operation.

10
nextTokenstring

The pagination token. It can be used in the next request to retrieve a new page of results. If NextToken is empty, no next page exists. Return result of the List operation.

AAAAAdDWBF2****
requestIdstring

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3****
resourceobject

The specified resource. Return result of the Get operation.

resourceAttributesobject

The resource properties in the JSON format.

{"Status":"Available","Description":"","AccountPrivilege":"RoleReadWrite","InstanceId":"r-8vbf5abe31c9c4d4","RegionId":"cn-zhangjiakou","AccountType":"Normal","TypeInfo":{},"AccountName":"cctest"}
resourceIdstring

The ID of the resource.

cctest
resourcesarray<object>

The resource list. Return result of the List operation.

resourceobject

The resources.

resourceAttributesobject

The resource properties in the JSON format.

{"Status":"Available","Description":"","AccountPrivilege":"RoleReadWrite","InstanceId":"r-8vbf5abe31c9c4d4","RegionId":"cn-zhangjiakou","AccountType":"Normal","TypeInfo":{},"AccountName":"cctest"}
resourceIdstring

The ID of the resource.

cctest
totalCountinteger

The total number of entries returned. Return result of the List operation.

20

Examples

Sample success responses

JSONformat

{
  "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 timeSummary of changesOperation
No change history