All Products
Search
Document Center

ActionTrail:DescribeTrails

更新時間:Jul 24, 2024

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.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
IncludeShadowTrailsbooleanNo

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
NameListstringNo

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

abc,def
IncludeOrganizationTrailbooleanNo

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 parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

ED8BC689-69DA-42AC-855E-3B06C1271194
TrailListarray<object>

A list of returned trails.

object
TrailRegionstring

The region of the trail.

All
Statusstring

The status of the trail. Valid values:

  • Disable: disabled.
  • Enable: enabled.
  • Fresh: The trail is created but is not enabled.
Enable
UpdateTimestring

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

2021-04-06T02:16:24Z
HomeRegionstring

The home region of the trail.

cn-hangzhou
CreateTimestring

The time when the trail was created.

2021-03-01T06:27:28Z
OssKeyPrefixstring

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

trail1
EventRWstring

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
StartLoggingTimestring

The time when the trail was last enabled.

2021-04-06T02:08:38Z
OssWriteRoleArnstring

The Alibaba Cloud Resource Name (ARN) of the RAM role that is assumed by ActionTrail to deliver events to the OSS bucket.

acs:ram::***:role/aliyunserviceroleforactiontrail
SlsProjectArnstring

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

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

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

  • false (default)
  • true
false
SlsWriteRoleArnstring

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

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

The time when the trail was last disabled.

2021-04-06T02:09:04Z
Namestring

The name of the trail.

test-4
OssBucketNamestring

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

secloud
Regionstring

The region where the trail resides.

cn-hangzhou
OrganizationIdstring

The ID of the resource directory.

Note This parameter is returned only when the trail is a multi-account trail.
rd-EV****
OssBucketLocationstring

The region where the OSS bucket resides.

oss-cn-hangzhou
TrailArnstring

The ARN of the trail.

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

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError messageDescription
400InvalidTrailNameExceptionThe specified Trail name is invalid.The specified Trail name is not valid.
400InvalidQueryParameterThe specified query parameter is invalid.The specified query parameter is not valid.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-01-09The Error code has changed. The response structure of the API has changedView Change Details
2021-08-18The Error code has changed. The response structure of the API has changedView Change Details