Skip to content

CloudTrail  >  Operations  >  list_trails

list_trails

Operation

list_trails async

list_trails(input: ListTrailsInput, plugins: list[Plugin] | None = None) -> ListTrailsOutput

Lists trails that are in the current account.

Parameters:

Name Type Description Default
input ListTrailsInput

An instance of ListTrailsInput.

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
ListTrailsOutput

An instance of ListTrailsOutput.

Input

ListTrailsInput dataclass

Dataclass for ListTrailsInput structure.

Attributes

next_token class-attribute instance-attribute
next_token: str | None = None

The token to use to get the next page of results after a previous API call. This token must be passed in with the same parameters that were specified in the original call. For example, if the original call specified an AttributeKey of 'Username' with a value of 'root', the call with NextToken should include those same parameters.

Output

ListTrailsOutput dataclass

Dataclass for ListTrailsOutput structure.

Attributes

next_token class-attribute instance-attribute
next_token: str | None = None

The token to use to get the next page of results after a previous API call. If the token does not appear, there are no more results to return. The token must be passed in with the same parameters as the previous call. For example, if the original call specified an AttributeKey of 'Username' with a value of 'root', the call with NextToken should include those same parameters.

trails class-attribute instance-attribute
trails: list[TrailInfo] | None = None

Returns the name, ARN, and home Region of trails in the current account.