All Products
Search
Document Center

:GetSavedQuery

Last Updated:Jun 28, 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 template ID.

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

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

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

The information about the template.

QueryIdstring

The template ID.

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. The time is displayed in UTC.

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

The time when the template was updated. The time is displayed in UTC.

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.