Menu
AWS CloudTrail
API Reference (API Version 2013-11-01)

DescribeTrails

Retrieves settings for the trail associated with the current region for your account.

Request Syntax

Copy
{ "includeShadowTrails": boolean, "trailNameList": [ "string" ] }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

includeShadowTrails

Specifies whether to include shadow trails in the response. A shadow trail is the replication in a region of a trail that was created in a different region. The default is true.

Type: Boolean

Required: No

trailNameList

Specifies a list of trail names, trail ARNs, or both, of the trails to describe. The format of a trail ARN is:

arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail

If an empty list is specified, information for the trail in the current region is returned.

  • If an empty list is specified and IncludeShadowTrails is false, then information for all trails in the current region is returned.

  • If an empty list is specified and IncludeShadowTrails is null or true, then information for all trails in the current region and any associated shadow trails in other regions is returned.

Note

If one or more trail names are specified, information is returned only if the names match the names of trails belonging only to the current region. To return information about a trail in another region, you must specify its trail ARN.

Type: array of Strings

Required: No

Response Syntax

Copy
{ "trailList": [ { "CloudWatchLogsLogGroupArn": "string", "CloudWatchLogsRoleArn": "string", "HasCustomEventSelectors": boolean, "HomeRegion": "string", "IncludeGlobalServiceEvents": boolean, "IsMultiRegionTrail": boolean, "KmsKeyId": "string", "LogFileValidationEnabled": boolean, "Name": "string", "S3BucketName": "string", "S3KeyPrefix": "string", "SnsTopicARN": "string", "SnsTopicName": "string", "TrailARN": "string" } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

trailList

The list of trail objects.

Type: array of Trail objects

Errors

For information about the errors that are common to all actions, see Common Errors.

OperationNotPermittedException

This exception is thrown when the requested operation is not permitted.

HTTP Status Code: 400

UnsupportedOperationException

This exception is thrown when the requested operation is not supported.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: