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
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
actiontrail:DescribeTrails |
get |
*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 |
| 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:
|
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:
|
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 |
| 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:
|
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.