GetCloudResourceData

Updated at:

Queries all entities of a specific cloud service within a specified time range.

Operation description

Request description

  • This operation queries all entities of a specific cloud service within a specified time range.

  • The from and to parameters specify the time range for the query, represented by timestamps in seconds.

  • The spl parameter supports filtering or selecting required entities and their properties by using entityStore query statements.

  • If you need only specific fields, you can use the project clause in spl to filter them.

  • The response contains the specific property values of each entity and the corresponding list of property names for easy parsing and processing.

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

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

cms:GetCloudResourceData

get

*CloudResource

acs:cms:{#regionId}:{#accountId}:cloudresource

None None

Request syntax

POST /cloudresource/data HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

from

integer

Yes

The start time of the query.

The UNIX timestamp format, which represents the number of seconds that have elapsed since 00:00:00 UTC on January 1, 1970.

1721767203

to

integer

Yes

The end time of the query.

The UNIX timestamp format, which represents the number of seconds that have elapsed since 00:00:00 UTC on January 1, 1970.

1721767203

query

string

Yes

The query statement.

.entity with(domain='acs', type='acs.k8s.node') | limit 0, 10

Response elements

Element

Type

Description

Example

object

The response body, which contains information such as the request status and data.

data

array

The total count of returned data items.

array

The data list corresponding to the request header.

string

The data corresponding to the request headers.

data1

header

array

The list of request headers.

string

The request header.

headerKey

requestId

string

The request ID.

264C3E89-XXXX-XXXX-XXXX-CE9C2196C7DC

responseStatus

object

The result status.

result

string

The execution result.

Success,PartialSuccess,Error

retryPolicy

string

The retry policy.

None,Once,Continuous

level

string

The status level.

Info,Warn,Error

statusItem

array<object>

The detailed status information.

object

The detailed status information.

code

string

The status code.

Success,ExecuteTimeout,UModelNotExist

level

string

The status level.

Info,Warn,Error

message

string

The message content.

successful

suggestion

string

The suggestions provided when an execution error occurs.

Try to reduce the query scope or increase timeout limit, then retry

executionStates

string

The information generated during execution.

{}

Examples

Success response

JSON format

{
  "data": [
    [
      "data1"
    ]
  ],
  "header": [
    "headerKey"
  ],
  "requestId": "264C3E89-XXXX-XXXX-XXXX-CE9C2196C7DC",
  "responseStatus": {
    "result": "Success,PartialSuccess,Error",
    "retryPolicy": "None,Once,Continuous",
    "level": "Info,Warn,Error",
    "statusItem": [
      {
        "code": "Success,ExecuteTimeout,UModelNotExist",
        "level": "Info,Warn,Error",
        "message": "successful",
        "suggestion": "Try to reduce the query scope or increase timeout limit, then retry"
      }
    ],
    "executionStates": "{}"
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.