Chime / Client / list_channels
list_channels#
- Chime.Client.list_channels(**kwargs)#
Lists all Channels created under a single Chime App as a paginated list. You can specify filters to narrow results.
Functionality & restrictions
Use privacy =
PUBLIC
to retrieve all public channels in the account.Only an
AppInstanceAdmin
can set privacy =PRIVATE
to list the private channels in an account.
Note
The
x-amz-chime-bearer
request header is mandatory. Use theAppInstanceUserArn
of the user that makes the API call as the value in the header.Warning
This API is is no longer supported and will not be updated. We recommend using the latest version, ListChannels, in the Amazon Chime SDK.
Using the latest version requires migrating to a dedicated namespace. For more information, refer to Migrating from the Amazon Chime namespace in the Amazon Chime SDK Developer Guide.
Danger
This operation is deprecated and may not function as expected. This operation should not be used going forward and is only kept for the purpose of backwards compatiblity.
See also: AWS API Documentation
Request Syntax
response = client.list_channels( AppInstanceArn='string', Privacy='PUBLIC'|'PRIVATE', MaxResults=123, NextToken='string', ChimeBearer='string' )
- Parameters:
AppInstanceArn (string) –
[REQUIRED]
The ARN of the
AppInstance
.Privacy (string) – The privacy setting.
PUBLIC
retrieves all the public channels.PRIVATE
retrieves private channels. Only anAppInstanceAdmin
can retrieve private channels.MaxResults (integer) – The maximum number of channels that you want to return.
NextToken (string) – The token passed by previous API calls until all requested channels are returned.
ChimeBearer (string) – The
AppInstanceUserArn
of the user that makes the API call.
- Return type:
dict
- Returns:
Response Syntax
{ 'Channels': [ { 'Name': 'string', 'ChannelArn': 'string', 'Mode': 'UNRESTRICTED'|'RESTRICTED', 'Privacy': 'PUBLIC'|'PRIVATE', 'Metadata': 'string', 'LastMessageTimestamp': datetime(2015, 1, 1) }, ], 'NextToken': 'string' }
Response Structure
(dict) –
Channels (list) –
The information about each channel.
(dict) –
Summary of the details of a
Channel
.Name (string) –
The name of the channel.
ChannelArn (string) –
The ARN of the channel.
Mode (string) –
The mode of the channel.
Privacy (string) –
The privacy setting of the channel.
Metadata (string) –
The metadata of the channel.
LastMessageTimestamp (datetime) –
The time at which the last message in a channel was sent.
NextToken (string) –
The token returned from previous API requests until the number of channels is reached.
Exceptions
Chime.Client.exceptions.BadRequestException
Chime.Client.exceptions.ForbiddenException
Chime.Client.exceptions.UnauthorizedClientException
Chime.Client.exceptions.ThrottledClientException
Chime.Client.exceptions.ServiceUnavailableException
Chime.Client.exceptions.ServiceFailureException