Executes an SQL statement to query the resources that can be accessed within the current account.
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Expression | string | Yes | The SQL statement to be executed. The number of characters in the SQL statement must be less than 2,000. For more information about the SQL syntax, see Basic SQL syntax. | SELECT * FROM resources LIMIT 100; |
Scope | string | No | The search scope. Set this parameter to the ID of a resource group. For information about how to obtain the ID of a resource group, see ListResourceGroups . | rg-acfmzawhxxc**** |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "D696E6EF-3A6D-5770-801E-4982081FE4D0",
"Columns": [
{
"Name": "resource_id",
"Type": "varchar"
}
],
"Rows": [
"[\n \"vsw-xxx\" \n]"
]
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
409 | ExceedLimit.ExecuteTime | The execution time has exceeded the limit. Please check for complex queries or large data volume, and optimize accordingly. | The time consumed for the query exceeds the limit. Check and optimize the complexity of or data size in the SQL statement. |
409 | SQLExecuteError | Failed to execute the SQL statement. | Failed to perform the query. Check whether the query statement is correct. |
409 | InvalidSearch.SQL | Error: %s | Error: %s |
409 | InvalidParameter.Scope | The Scope is invalid. | The Scope parameter is invalid |
409 | LengthExceedLimit.Expression | The length of parameter Expression exceed limit. | The length of the query expression exceeds the limit. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|
No change history