All Products
Search
Document Center

Resource Management:GetSavedQuery

Last Updated:Mar 03, 2024

Queries the information about a custom query template.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
QueryIdstringYes

The ID of the template.

Note You can call the ListSavedQueries operation to obtain the template ID.
sq-GeAck****

Response parameters

ParameterTypeDescriptionExample
object

The returned result.

RequestIdstring

The request ID.

6D98D9B0-318D-56A4-910C-93B5F945AF2B
SavedQueryobject

The information about the custom query template.

QueryIdstring

The ID of the template.

sq-GeAck****
Expressionstring

The query statement in the template.

SELECT * FROM resources;
Namestring

The name of the template.

Query of All Alibaba Cloud Resources
Descriptionstring

The description of the template.

Queries all resources on which you have permissions and sorts the resources by resource type and resource ID.
CreateTimestring

The time when the template was created.

2023-10-30T01:43:16Z
UpdateTimestring

The time when the template was last updated.

2023-10-30T01:43:16Z

Examples

Sample success responses

JSONformat

{
  "RequestId": "6D98D9B0-318D-56A4-910C-93B5F945AF2B",
  "SavedQuery": {
    "QueryId": "sq-GeAck****",
    "Expression": "SELECT * FROM resources;",
    "Name": "Query of All Alibaba Cloud Resources",
    "Description": "Queries all resources on which you have permissions and sorts the resources by resource type and resource ID. ",
    "CreateTime": "2023-10-30T01:43:16Z",
    "UpdateTime": "2023-10-30T01:43:16Z"
  }
}

Error codes

HTTP status codeError codeError messageDescription
400NoPermissionYou are not authorized to perform this operation.You are not authorized to perform the operation.
409NotExists.QueryIdThe QueryId does not exist.The specified query template ID does not exist.

For a list of error codes, visit the Service error codes.