Queries detailed information about trails.

Debugging

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 return the information about shadow trails. Valid values:

  • false: Do not return the information about shadow trails. It is the default value.
  • true: Return the information about shadow trails.
NameList String No abc,def

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

Response parameters

Parameter Type Example Description
TrailList Array

The information about the 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: write events. It is the default value.
  • Read: read events.
  • All: read and write events.
HomeRegion String cn-hangzhou

The home region of the trail.

IsOrganizationTrail Boolean true

Indicates whether the trail was created as a multi-account trail.

  • false: It is not a multi-account trail. It is the default value.
  • true: It is a multi-account trail.
MnsTopicArn String acs:mns:cn-hangzhou:1111:/topics/your-topic-name

The Alibaba Cloud Resource Name (ARN) of the Message Service (MNS) topic to which ActionTrail sends messages. The ARN is in the format of acs:mns:<Region>:<Account ID>:/topics/<topicName>.

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 prefix of log files stored in 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 ARN of the Log Service project to which events are delivered.

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

The ARN of the RAM 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: The trail is disabled.
  • Enable: The trail is enabled.
  • Fresh: The trail is not enabled after creation.
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: tracks events in all regions. It is the default value.
  • cn-hangzhou: tracks only events that occur in the China (Hangzhou) region.
  • cn-beijing: tracks only events that occur in the China (Beijing) region.
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.

Examples

Sample requests

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

Sample success responses

XML format

<TrailList>
    <Name>default</Name>
    <OssBucketName>secloud</OssBucketName>
    <OssKeyPrefix>trail1</OssKeyPrefix>
    <RoleName>aliyunactiontraildefaultrole</RoleName>
    <SlsProjectArn>acs:log:cn-shanghai::project/***</SlsProjectArn>
    <SlsWriteRoleArn>acs:ram::***:role/aliyunactiontraildefaultrole</SlsWriteRoleArn>
</TrailList>
<RequestId>145318BE-DEE1-4C57-AA7C-5BE7D34A6AE0</RequestId>

JSON format

{
  "TrailList": [
    {
      "Name": "default",
      "OssBucketName": "secloud",
      "OssKeyPrefix": "trail1",
      "RoleName": "aliyunactiontraildefaultrole",
      "SlsProjectArn":"acs:log:cn-shanghai::project/***",
      "SlsWriteRoleArn":"acs:ram::***:role/aliyunactiontraildefaultrole"
    }
  ],
  "RequestId":"145318BE-DEE1-4C57-AA7C-5BE7D34A6AE0"
}

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 is 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.