Queries the information about a custom query template.
Try it now
Test
RAM authorization
Action | Access level | Resource type | Condition key | Dependent action |
resourcecenter:GetSavedQuery | get | *All Resource
| None | None |
Request parameters
Parameter | Type | Required | Description | Example |
QueryId | string | Yes | The ID of the template. Note You can call the ListSavedQueries operation to obtain the ID of the template. | sq-GeAck**** |
Response elements
Parameter | Type | Description | Example |
object | The response parameters. | ||
RequestId | string | The request ID. | 6D98D9B0-318D-56A4-910C-93B5F945AF2B |
| SavedQuery | object | The information about the template. | |
CreateTime | string | The time when the template was created. The time is displayed in UTC. | 2023-10-30T01:43:16Z |
Description | string | The description of the template. | Queries all resources on which you have permissions and sorts the resources by resource type and resource ID. |
Expression | string | The expression of the template. | SELECT * FROM resources; |
Name | string | The name of the template. | Query of All Alibaba Cloud Resources |
QueryId | string | The ID of the template. | sq-GeAck**** |
UpdateTime | string | The time when the template was last updated. The time is displayed in UTC. | 2023-10-30T01:43:16Z |
Examples
Success response
JSON format
{
"RequestId": "6D98D9B0-318D-56A4-910C-93B5F945AF2B",
"SavedQuery": {
"CreateTime": "2023-10-30T01:43:16Z",
"Description": "Queries all resources on which you have permissions and sorts the resources by resource type and resource ID. ",
"Expression": "SELECT * FROM resources;",
"Name": "Query of All Alibaba Cloud Resources",
"QueryId": "sq-GeAck****",
"UpdateTime": "2023-10-30T01:43:16Z"
}
}Error codes
HTTP status code | Error code | Error message | Description |
400 | NoPermission | You are not authorized to perform this operation. | |
409 | NotExists.QueryId | The QueryId does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.