ListChannels - AWS CloudTrail

ListChannels

Lists the channels in the current account, and their source names. AWS services create service-linked channels to get information about CloudTrail events on your behalf. For more information about service-linked channels, see Viewing service-linked channels for CloudTrail by using the AWS CLI.

Request Syntax

{ "MaxResults": number, "NextToken": "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.

MaxResults

The maximum number of CloudTrail channels to display on a single page.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 1000.

Required: No

NextToken

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.

Type: String

Length Constraints: Minimum length of 4. Maximum length of 1000.

Pattern: .*

Required: No

Response Syntax

{ "Channels": [ { "ChannelArn": "string", "Name": "string" } ], "NextToken": "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.

Channels

The list of channels in the account.

Type: Array of Channel objects

NextToken

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

Type: String

Length Constraints: Minimum length of 4. Maximum length of 1000.

Pattern: .*

Errors

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

InvalidNextTokenException

A token that is not valid, or a token that was previously used in a request with different parameters. This exception is thrown if the token is not valid.

HTTP Status Code: 400

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: