Creates an advanced query record. It lets you save custom conditional statements for reuse.
Operation description
This topic provides an example of how to save a conditional statement as an advanced query record. The statement queries logs for all AccessKey access events.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
actiontrail:CreateAdvancedQueryHistory |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| QuerySql |
string |
No |
The conditional statement for the query. For more information, see SQL syntax for advanced queries. |
event.userIdentity.accessKeyId: * |
| SimpleQuery |
boolean |
Yes |
Specifies whether to enable simple query mode. |
false |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| QueryId |
string |
The ID of the advanced query record. |
query-uIkIvLiVSuCKqg0yoa**** |
| QuerySql |
string |
The conditional statement for the query. |
event.userIdentity.accessKeyId: * |
| RequestId |
string |
The request ID. |
D0227506-AA8C-5998-8A62-74769106**** |
| SimpleQuery |
boolean |
Indicates whether simple query mode is enabled. |
false |
Examples
Success response
JSON format
{
"QueryId": "query-uIkIvLiVSuCKqg0yoa****",
"QuerySql": "event.userIdentity.accessKeyId: *",
"RequestId": "D0227506-AA8C-5998-8A62-74769106****",
"SimpleQuery": false
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.