GetCloudResourceData
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
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cms:GetCloudResourceData |
get |
*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.