PutDataEventSelector
Creates or configures a data event selector. Note: To create a data event selector by using this operation, make sure that the trail name exists. If the trail does not exist, call the CreateTrail operation to create a trail first.
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. The configuration is represented as a JSON array, and the maximum number of elements in the array is 20. Field description for each element in the JSON array:
|
[{"EventName":{"Equals":["GetObject","CopyObject","AppendObject"]},"ReadWriteType":"All","ServiceName":"Oss"}] |
| IsTrailAllRegion |
boolean |
No |
Specifies whether to track events in all regions. Default value: |
true |
| TrailRegionIds |
string |
No |
The list of regions to track, separated by commas. |
cn-shanghai,cn-hangzhou |
In
EventName, the total number of data elements in Equals and NotEquals cannot exceed 10. The same applies toResourceArn.This parameter is required if the
IsTrailAllRegionparameter is omitted or set tofalse.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| DataEventSelectors |
string |
The configuration of the data event selector. The configuration is represented as a JSON array, and the maximum number of elements in the array is 20. Field description for each element in the JSON array:
|
[{"EventName":{"Equals":["GetObject","CopyObject","AppendObject"]},"ReadWriteType":"All","ServiceName":"Oss"}] |
| RequestId |
string |
The request ID. |
243E1250-32DA-493B-9347-3C7EEE07**** |
| TrailArn |
string |
The 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.