You can this operation to query trails applied to a region.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeTrails

The operation that you want to perform. Set the value to DescribeTrails.

IncludeShadowTrails Boolean No true

Specifies whether to display shadow trails. Valid values:

  • false(Default): do not display
  • true: Display
NameList string No abc,def

The trails to query. Separate multiple trails with commas (,).

Response parameters

Prameter Type Sample response Description
TrailList Array

The returned trails.

CreateTime String 1581490216000

The time when the trail was created.

EventRW String Write

The read/write type of the delivered events. Valid values:

  • Write(Default)
  • Read
  • All
HomeRegion Boolean cn-hangzhou

The home region of the trail.

MnsTopicArn String acs:mns:cn-hangzhou:1111:/topics/your-topic-name

The ARN of the Message Service topic to which ActionTrail sends messages. The ARN is in the acs:mns:<Region>:<Account ID>:/topics/<topicName> format. After you specify this parameter, a message is generated and delivered to the MNS Topic when an event is delivered to OSS.

Name String default

The name of the trail.

OssBucketName String secloud

The name of the OSS bucket to which events are delivered.

OssKeyPrefix String trail1

The name prefix of objects to be written to the OSS bucket.

RoleName String aliyunactiontraildefaultrole

The name of the Resource Access Management (RAM) role that ActionTrail is allowed to assume.

SlsProjectArn String acs:log:cn-shanghai::project/***

The unique ARN of the Log Service project to which events are delivered.

SlsWriteRoleArn String acs:ram::***:role/aliyunactiontraildefaultrole

The unique ARN of the role assumed by ActionTrail for delivering logs to the destination Log Service project.

StartLoggingTime String Wed Dec 02 15:41:06 CST 2015

The most recent date and time when logging was enabled for the trail.

Status String Enable

The status of the trail. Valid values:

  • Stopped(Default)
  • Enable
StopLoggingTime String Wed Dec 03 15:41:06 CST 2015

The most recent date and time when logging was disabled for the trail.

TrailRegion String All

The regions to which the trail is applied. Valid values:

  • All(Default): tracks events in all regions
  • cn-hangzhou : tracks events only in China (Hangzhou).
  • cn-beijing: only events in Beijing are tracked.
UpdateTime String 1581490242000

The most recent time when the configuration of the trail was updated.

RequestId String 145318BE-DEE1-4C57-AA7C-5BE7D34A6AE0

The ID of the request.


Sample requests

http(s)://[Endpoint]/? Action=DescribeTrails
&<Common request parameters>

Sample success responses

XML format


JSON format

  "TrailList": [
      "Name": "default",
      "OssBucketName": "secloud",
      "OssKeyPrefix": "trail1",
      "RoleName": "aliyunactiontraildefaultrole",

Error codes

HTTP status code Error code Error message Description 
400 InvalidTrailNameException The specified Trail name is invalid. The error message returned because the specified trail name was invalid. Modify the name based on the correct format.
400 InvalidQueryParameter The specified query parameter is invalid. The error message returned because the specified query parameter is invalid.

For a list of error codes, visit the API Error Center.