CloudTrail / Client / list_channels

list_channels#

CloudTrail.Client.list_channels(**kwargs)#

Lists the channels in the current account, and their source names.

See also: AWS API Documentation

Request Syntax

response = client.list_channels(
    MaxResults=123,
    NextToken='string'
)
Parameters:
  • MaxResults (integer) – The maximum number of CloudTrail channels to display on a single page.

  • NextToken (string) – 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.

Return type:

dict

Returns:

Response Syntax

{
    'Channels': [
        {
            'ChannelArn': 'string',
            'Name': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • Channels (list) –

      The list of channels in the account.

      • (dict) –

        Contains information about a returned CloudTrail channel.

        • ChannelArn (string) –

          The Amazon Resource Name (ARN) of a channel.

        • Name (string) –

          The name of the CloudTrail channel. For service-linked channels, the name is aws-service-channel/service-name/custom-suffix where service-name represents the name of the Amazon Web Services service that created the channel and custom-suffix represents the suffix created by the Amazon Web Services service.

    • NextToken (string) –

      The token to use to get the next page of results after a previous API call.

Exceptions

  • CloudTrail.Client.exceptions.InvalidNextTokenException

  • CloudTrail.Client.exceptions.OperationNotPermittedException

  • CloudTrail.Client.exceptions.UnsupportedOperationException