Creates or configures a data event selector. A trail must exist before you create a data event selector. If a trail does not exist, you can call the CreateTrail operation to create one.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
actiontrail:PutDataEventSelector |
create |
*Trail
|
None | None |
Request syntax
GET HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| TrailName |
string |
Yes |
The name of the trail. |
trail-name |
| EventSelectors |
string |
Yes |
The configuration of the data event selector. This parameter is a JSON array that can contain a maximum of 20 elements. Each element in the JSON array includes the following fields:
|
[{"EventName":{"Equals":["GetObject","CopyObject","AppendObject"]},"ReadWriteType":"All","ServiceName":"Oss"}] |
| IsTrailAllRegion |
boolean |
No |
Specifies whether the trail tracks data events in all regions. Default value: |
true |
| TrailRegionIds |
string |
No |
The regions where the trail tracks data events. Separate multiple region IDs with a comma ( |
cn-shanghai,cn-hangzhou |
-
The total number of values in the Equals and NotEquals subfields for
EventNamecannot exceed 10. The same limit applies toResourceArn. -
The
TrailRegionIdsparameter is required if you do not specifyIsTrailAllRegionor set it tofalse.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| DataEventSelectors |
string |
The configuration of the data event selector. This parameter is a JSON array that can contain a maximum of 20 elements. Each element in the JSON array includes the following fields:
|
[{"EventName":{"Equals":["GetObject","CopyObject","AppendObject"]},"ReadWriteType":"All","ServiceName":"Oss"}] |
| RequestId |
string |
The request ID. |
243E1250-32DA-493B-9347-3C7EEE07**** |
| TrailArn |
string |
The Alibaba Cloud Resource Name (ARN) of the trail. |
acs:actiontrail:cn-shanghai:159498693826****:trail/trail-name |
Examples
Success response
JSON format
{
"DataEventSelectors": "[{\"EventName\":{\"Equals\":[\"GetObject\",\"CopyObject\",\"AppendObject\"]},\"ReadWriteType\":\"All\",\"ServiceName\":\"Oss\"}]",
"RequestId": "243E1250-32DA-493B-9347-3C7EEE07****",
"TrailArn": "acs:actiontrail:cn-shanghai:159498693826****:trail/trail-name"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.