edit-icon download-icon

Update a trail

Last Updated: Mar 21, 2018


Updates the OSS bucket of the specified trail. This operation must be called from the region in which the trail is created.

Request parameters

Name Type Required Description
Action String Yes The parameter of the operation to perform:
Name String Yes The name of the trail to be updated.
OssBucketName String No The OSS bucket to which the trail delivers the logs.
Make sure that this is an existed OSS bucket.
OssKeyPrefix String No The prefix of the specified OSS bucket name.
This is not required.
RoleName String No The RAM role of the ActionTrail service
permitted by the user.

Response parameters

Common response parameters. For more information, see Common parameters.

Name Type Description
Name String The trail name.
HomeRegion String The home region of the trail.
OssBucketName String The specified OSS bucket.
OssKeyPrefix String The Prefix of the OSS bucket name.
RoleName String The RAM role.

Required permissions





Error codes

Error code Description HTTP status code
InvalidBucketNameException Invalid bucket name. 400
InvalidPrefixException Invalid prefix. 400
InvalidTrailNameException Invalid trail name. 400
InsufficientBucketPolicyException No permission to access the specified OSS bucket. 403
BucketDoesNotExistException The specified bucket does not exist. 404
TrailNotFoundException The specified trail does not exist. 404


Request example

  1. http://actiontrail.cn-hangzhou.aliyuncs.com/actiontrail?
  2. &OssBucketName=yuanchuang
  3. &Name=trail-test
  4. &RoleName=aliyunactiontraildefaultrole
  5. &Action=UpdateTrail
  6. &OssKeyPrefix=
  7. &<公共请求参数>

Response example

JSON example

  1. {
  2. "Name": "trail-test",
  3. "OssBucketName": "yuanchuang",
  4. "OssKeyPrefix": "",
  5. "RoleName": "aliyunactiontraildefaultrole"
  6. }
Thank you! We've received your feedback.