All Products
Search
Document Center

Cloud Control API:GetResources

Last Updated:Dec 11, 2025

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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

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.

  • List: /api/v1/providers/{provider}/products/{product}/resources/{resourceType}

  • Get: /api/v1/providers/{provider}/products/{product}/resources/{resourceType}/{resourceId}

The request URI contains the following variables:

  • provider: The cloud service provider. Currently, only Aliyun is supported.

  • product: The product code.

  • resourceType: The resource type. If a parent resource exists, the format is {parent resource type code}/{parent resource ID}/{resource type code}.

  • resourceId: The resource ID.

/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 and PaymentType fields.

{ "EditionType": "Community", "PaymentType": "PostPaid" }

nextToken

string

No

The pagination token.

  • You do not need to specify this parameter for the first query. The system returns data from the first page.

  • For subsequent queries, set this parameter to the nextToken value returned from the previous call.

Note

If this parameter contains only digits, Cloud Control API treats it as the PageNumber for paging.

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.