Updates the configurations of a trail.
Operation description
This topic shows you how to change the destination Object Storage Service (OSS) bucket of a sample trail named trail-test to audit-log.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
actiontrail:UpdateTrail |
update |
*Trail
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Name |
string |
Yes |
The name of the trail whose configurations you want to update. The name must be 6 to 36 characters in length and can contain lowercase letters, digits, hyphens (-), and underscores (_). It must start with a lowercase letter. Note
The name must be unique within an Alibaba Cloud account. |
trail-test |
| OssBucketName |
string |
No |
The name of the Object Storage Service (OSS) bucket to which you want to deliver events. The name must be 3 to 63 characters in length. The name must start with a lowercase letter or a digit and can contain lowercase letters, digits, and hyphens (-). Note
Make sure that the bucket exists before you update the configuration of the trail. |
audit-log |
| OssKeyPrefix |
string |
No |
The prefix of the files that are stored in the OSS bucket. The prefix must be 6 to 32 characters in length. The prefix must start with a letter and can contain letters, digits, hyphens (-), forward slashes (/), and underscores (_). |
at-product-account-audit-B |
| OssWriteRoleArn |
string |
No |
The Alibaba Cloud Resource Name (ARN) of the RAM role that is assumed by ActionTrail to deliver events to the OSS bucket.
|
acs:ram::151266687691****:role/aliyunserviceroleforactiontrail |
| SlsProjectArn |
string |
No |
The ARN of the Log Service project to which you want to deliver events. |
acs:log:cn-shanghai:151266687691****:project/test-project |
| SlsWriteRoleArn |
string |
No |
The ARN of the RAM role that is assumed by ActionTrail to deliver events to the Log Service project.
|
acs:ram::151266687691****:role/aliyunserviceroleforactiontrail |
| EventRW |
string |
No |
The read/write type of the events to be delivered. Valid values:
|
All |
| TrailRegion |
string |
No |
The region of the trail.
You can also specify specific regions. You can call the DescribeRegions operation to query all the supported regions. |
All |
| MaxComputeProjectArn |
string |
No |
The ARN of the MaxCompute project to which you want to deliver events. Note
The name of the MaxCompute project must be prefixed with actiontrail_. |
acs:odps:cn-hangzhou:、151277687691****:project/actiontrail_**** |
| MaxComputeWriteRoleArn |
string |
No |
The ARN of the role that is assumed by ActionTrail to deliver events to the destination Simple Log Service project.
|
acs:ram::151277687691****:role/aliyunserviceroleforactiontrail |
For more information about common request parameters, see Common parameters.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| EventRW |
string |
The read/write type of the events to be delivered. |
Write |
| HomeRegion |
string |
The home region of the trail. |
cn-hangzhou |
| MaxComputeProjectArn |
string |
ARN of the Big Data Compute Service project for tracking delivery. |
acs:odps:cn-hangzhou:151266687691****:project/actiontrail_**** |
| MaxComputeWriteRoleArn |
string |
The ARN of the role that Operation Audit assumes when delivering operation events to the Big Data Compute Service project. |
acs:ram::151266687691****:role/aliyunserviceroleforactiontrail |
| Name |
string |
The name of the trail. |
trail-test |
| OssBucketName |
string |
The name of the OSS bucket. |
audit-log |
| OssKeyPrefix |
string |
The prefix of the log files to be stored in the destination OSS bucket. |
at-product-account-audit-B |
| OssWriteRoleArn |
string |
The ARN of the RAM role that is assumed by ActionTrail to deliver events to the OSS bucket. |
acs:ram::151266687691****:role/aliyunserviceroleforactiontrail |
| RequestId |
string |
The ID of the request. |
2599A180-5236-44D8-9490-50B6F4F8BA35 |
| SlsProjectArn |
string |
The ARN of the Log Service project to which events are to be delivered. |
acs:log:cn-hangzhou:151266687691****:project/test-project |
| SlsWriteRoleArn |
string |
The ARN of the RAM role that is assumed by ActionTrail is to deliver events to the Log Service project. |
acs:ram::151266687691****:role/aliyunserviceroleforactiontrail |
| TrailRegion |
string |
The one or more regions from which the trail delivers events. |
All |
Examples
Success response
JSON format
{
"EventRW": "Write",
"HomeRegion": "cn-hangzhou",
"MaxComputeProjectArn": "acs:odps:cn-hangzhou:151266687691****:project/actiontrail_****",
"MaxComputeWriteRoleArn": "acs:ram::151266687691****:role/aliyunserviceroleforactiontrail",
"Name": "trail-test",
"OssBucketName": "audit-log",
"OssKeyPrefix": "at-product-account-audit-B",
"OssWriteRoleArn": "acs:ram::151266687691****:role/aliyunserviceroleforactiontrail",
"RequestId": "2599A180-5236-44D8-9490-50B6F4F8BA35",
"SlsProjectArn": "acs:log:cn-hangzhou:151266687691****:project/test-project",
"SlsWriteRoleArn": "acs:ram::151266687691****:role/aliyunserviceroleforactiontrail",
"TrailRegion": "All"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | RepeatOssBucket | The specified OSS bucket is already in use. We recommend that you modify the existing Trail or specify another bucket. | |
| 400 | SlsProjectDoesNotExistException | The specified Log Service project does not exist. | |
| 400 | IncompleteSignature | The request signature does not conform to Alibaba Cloud standards. | The request signature does not conform to Alibaba Cloud standards. |
| 400 | InvalidDeliveryConfigurationException | You must specify at least one Log Service project or OSS bucket for a Trail. | |
| 400 | InvalidPrefixException | The specified OSS bucket prefix is invalid. | The specified OSS bucket prefix is not valid. |
| 403 | InsufficientBucketPolicyException | Access to the specified OSS bucket was denied. | |
| 403 | InsufficientSlsPolicyException | Access to the specified Log Service project was denied. | Access SLS Project denied. |
| 404 | TrailNotFoundException | The specified Trail does not exist. | The specified Trail is not existed. |
| 404 | BucketDoesNotExistException | The specified OSS bucket does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.