Mengkueri event historis secara mendetail.
Deskripsi operasi
Do not call this operation frequently. To query events in near-real time, you can create a trail to deliver events to Simple Log Service (SLS) and use its real-time consumption feature. For more information, see Create a single-account trail, Create a multi-account trail, and Real-time consumption.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
actiontrail:LookupEvents |
get |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| NextToken |
string |
No |
Token paginasi yang digunakan di permintaan berikutnya untuk mengambil halaman hasil baru. Catatan
Anda tidak perlu menentukan parameter ini untuk permintaan pertama. Anda harus menentukan token yang diperoleh dari kueri sebelumnya sebagai nilai NextToken. |
eyJhY2NvdW50IjoiMTQyNDM3OTU4NjM4NzE2MSIsImV2ZW50SWQiOiI3MkJDRTExRi02OTU3LTQ0NUItQjY0MC1CNEUyMkM4NUEwQzgiLCJsb2dJZCI6IjgyLTE0MjQzNzk1ODYzODcxNjEiLCJ0aW1lIjoxNjAyMzExNTQwMD**** |
| MaxResults |
string |
No |
Jumlah maksimum hasil yang dikembalikan. |
20 |
| StartTime |
string |
No |
Awal rentang pengatur waktu yang akan dikueri. Tentukan pengatur waktu dalam standar ISO 8601 dengan format Catatan
Anda harus menentukan |
2020-10-08T11:00:00Z |
| EndTime |
string |
No |
Akhir rentang pengatur waktu yang akan dikueri. Tentukan pengatur waktu dalam standar ISO 8601 dengan format yyyy-MM-ddTHH:mm:ssZ. Pengatur waktu harus dalam UTC. Catatan
Anda harus menentukan |
2020-10-15T11:00:00Z |
| Direction |
string |
No |
Pesanan pengambilan event. Nilai valid:
|
BACKWARD |
| LookupAttribute |
array<object> |
No |
Kondisi format. Catatan
Anda dapat menentukan satu atau dua kondisi format pada satu pengatur waktu. Untuk informasi selengkapnya, lihat Batasan. |
|
|
object |
No |
|||
| Key |
string |
No |
The attribute key. For information about valid values, see How do I configure the LookupAttribute parameter when calling LookupInsightEvents? |
ServiceName |
| Value |
string |
No |
The attribute value. For information about valid values, see How do I configure the LookupAttribute parameter when calling LookupInsightEvents? |
Ecs |
Untuk informasi tentang parameter permintaan umum, lihat Parameter umum.
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| EndTime |
string |
The end of the time range of the retrieved events. |
2020-07-22T14:00:00Z |
| Events |
array<object> |
The list of retrieved events. |
|
|
object |
The details about the retrieved event. For more information about the event fields in the list, see Management event structure. |
{ "eventId": "6EEC3A76-C207-5075-889D-A909E62F****", "eventVersion": 1, "eventName": "GetTemplate" } |
|
| NextToken |
string |
A pagination token. It can be used in the next request to retrieve a new page of results. Catatan
If NextToken is empty, no next page exists. |
eyJhY2NvdW50IjoiMTQyNDM3OTU4NjM4NzE2MSIsImV2ZW50SWQiOiI3MkJDRTExRi02OTU3LTQ0NUItQjY0MC1CNEUyMkM4NUEwQzgiLCJsb2dJZCI6IjgyLTE0MjQzNzk1ODYzODcxNjEiLCJ0aW1lIjoxNjAyMzExNTQwMD**** |
| RequestId |
string |
The request ID. |
FD79665A-CE8B-49D4-82E6-5EE2E0E7**** |
| StartTime |
string |
The start of the time range of the retrieved events. |
2020-07-15T14:00:00Z |
Contoh
Respons sukses
JSONformat
{
"EndTime": "2020-07-22T14:00:00Z",
"Events": [
{
"eventId": "6EEC3A76-C207-5075-889D-A909E62F****",
"eventVersion": 1,
"eventName": "GetTemplate"
}
],
"NextToken": "eyJhY2NvdW50IjoiMTQyNDM3OTU4NjM4NzE2MSIsImV2ZW50SWQiOiI3MkJDRTExRi02OTU3LTQ0NUItQjY0MC1CNEUyMkM4NUEwQzgiLCJsb2dJZCI6IjgyLTE0MjQzNzk1ODYzODcxNjEiLCJ0aW1lIjoxNjAyMzExNTQwMD****",
"RequestId": "FD79665A-CE8B-49D4-82E6-5EE2E0E7****",
"StartTime": "2020-07-15T14:00:00Z"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | IncompleteSignature | The request signature does not conform to Alibaba Cloud standards. | |
| 400 | InvalidParameterCombination | The end time must be later than the start time. | |
| 400 | InvalidQueryParameter | The specified query parameter is invalid. | |
| 400 | InvalidParameterEndTime | The specified EndTime is invalid. | |
| 400 | InvalidParameterStartTime | The specified StartTime is invalid. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.