All Products
Search
Document Center

ActionTrail:DescribeTrails

Last Updated:Mar 26, 2026

Queries created trails.

Operation description

This topic shows you how to query the information about the single-account trails within an Alibaba Cloud account. In this example, the information about a trail named test-4 is returned.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

actiontrail:DescribeTrails

get

*Trail

acs:actiontrail:{#regionId}:{#accountId}:trail/*

None None

Request parameters

Parameter

Type

Required

Description

Example

IncludeShadowTrails

boolean

No

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.

false

NameList

string

No

The names of the trails whose information you want to query. Separate multiple trail names with commas (,).

abc,def

IncludeOrganizationTrail

boolean

No

Specifies whether to query the information about multi-account trails. Valid values:

  • true

  • false (default)

false

For more information about common request parameters, see Common parameters.

Response elements

Element

Type

Description

Example

object

RequestId

string

The ID of the request.

ED8BC689-69DA-42AC-855E-3B06C1271194

TrailList

array<object>

The trails.

object

CreateTime

string

The time when the trail was created.

2021-03-01T06:27:28Z

EventRW

string

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

  • Write: write events. This is the default value.

  • Read: read events.

  • All: read and write events.

All

HomeRegion

string

The home region of the trail.

cn-hangzhou

IsOrganizationTrail

boolean

Indicates whether the trail is a multi-account trail. Valid values:

  • false (default)

  • true

false

MaxComputeProjectArn

string

The ARN of the MaxCompute project.

acs:odps:cn-hangzhou:141266687691****:project/actiontrail_****

MaxComputeWriteRoleArn

string

The ARN of the role that is assumed by ActionTrail to deliver events to the MaxCompute project.

acs:ram::141266687691****:role/aliyunserviceroleforactiontrail

Name

string

The name of the trail.

test-4

OrganizationId

string

The ID of the resource directory.

Note

This parameter is returned only when the trail is a multi-account trail.

rd-EV****

OssBucketLocation

string

The region where the OSS bucket resides.

oss-cn-hangzhou

OssBucketName

string

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

secloud

OssKeyPrefix

string

The prefix of the files that are stored in the Object Storage Service (OSS) bucket.

trail1

OssWriteRoleArn

string

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

Region

string

The region where the trail resides.

cn-hangzhou

SlsProjectArn

string

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

acs:log:cn-qingdao:159498693826****:project/zhengze-audit-log

SlsWriteRoleArn

string

The ARN of the RAM role that is assumed by ActionTrail to deliver events to the Log Service project.

acs:ram::159498693826****:role/aliyunserviceroleforactiontrail

StartLoggingTime

string

The time when the trail was last enabled.

2021-04-06T02:08:38Z

Status

string

The status of the trail. Valid values:

  • Disable: disabled.

  • Enable: enabled.

  • Fresh: The trail is created but is not enabled.

Enable

StopLoggingTime

string

The time when the trail was last disabled.

2021-04-06T02:09:04Z

TrailArn

string

The ARN of the trail.

acs:actiontrail:cn-hangzhou:159498693826****:trail/test-delivery-other

TrailRegion

string

The region of the trail.

All

UpdateTime

string

The time when the configurations of the trail were last updated.

2021-04-06T02:16:24Z

Examples

Success response

JSON format

{
  "RequestId": "ED8BC689-69DA-42AC-855E-3B06C1271194",
  "TrailList": [
    {
      "CreateTime": "2021-03-01T06:27:28Z",
      "EventRW": "All",
      "HomeRegion": "cn-hangzhou",
      "IsOrganizationTrail": false,
      "MaxComputeProjectArn": "acs:odps:cn-hangzhou:141266687691****:project/actiontrail_****",
      "MaxComputeWriteRoleArn": "acs:ram::141266687691****:role/aliyunserviceroleforactiontrail",
      "Name": "test-4",
      "OrganizationId": "rd-EV****",
      "OssBucketLocation": "oss-cn-hangzhou",
      "OssBucketName": "secloud",
      "OssKeyPrefix": "trail1",
      "OssWriteRoleArn": "acs:ram::151266687691****:role/aliyunserviceroleforactiontrail",
      "Region": "cn-hangzhou",
      "SlsProjectArn": "acs:log:cn-qingdao:159498693826****:project/zhengze-audit-log",
      "SlsWriteRoleArn": "acs:ram::159498693826****:role/aliyunserviceroleforactiontrail",
      "StartLoggingTime": "2021-04-06T02:08:38Z",
      "Status": "Enable",
      "StopLoggingTime": "2021-04-06T02:09:04Z",
      "TrailArn": "acs:actiontrail:cn-hangzhou:159498693826****:trail/test-delivery-other",
      "TrailRegion": "All",
      "UpdateTime": "2021-04-06T02:16:24Z"
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidTrailNameException The specified Trail name is invalid. The specified Trail name is not valid.
400 InvalidQueryParameter The specified query parameter is invalid. The specified query parameter is not valid.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.