Skip to content

CloudTrail  >  Operations  >  describe_trails

describe_trails

Operation

describe_trails async

describe_trails(input: DescribeTrailsInput, plugins: list[Plugin] | None = None) -> DescribeTrailsOutput

Retrieves settings for one or more trails associated with the current Region for your account.

Parameters:

Name Type Description Default
input DescribeTrailsInput

An instance of DescribeTrailsInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
DescribeTrailsOutput

An instance of DescribeTrailsOutput.

Input

DescribeTrailsInput dataclass

Returns information about the trail.

Attributes

include_shadow_trails class-attribute instance-attribute
include_shadow_trails: bool | None = None

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, or in the case of an organization trail, the replication of an organization trail in member accounts. If you do not include shadow trails, organization trails in a member account and Region replication trails will not be returned. The default is true.

trail_name_list class-attribute instance-attribute
trail_name_list: list[str] | None = None

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-2: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 and current account. To return information about a trail in another Region, you must specify its trail ARN.

Output

DescribeTrailsOutput dataclass

Returns the objects or data listed below if successful. Otherwise, returns an error.

Attributes

trail_list class-attribute instance-attribute
trail_list: list[Trail] | None = None

The list of trail objects. Trail objects with string values are only returned if values for the objects exist in a trail's configuration. For example, SNSTopicName and SNSTopicARN are only returned in results if a trail is configured to send SNS notifications. Similarly, KMSKeyId only appears in results if a trail's log files are encrypted with KMS customer managed keys.