ChimeSDKMessaging / Client / list_channel_memberships
list_channel_memberships#
- ChimeSDKMessaging.Client.list_channel_memberships(**kwargs)#
Lists all channel memberships in a channel.
Note
The
x-amz-chime-bearer
request header is mandatory. Use the ARN of theAppInstanceUser
orAppInstanceBot
that makes the API call as the value in the header.If you want to list the channels to which a specific app instance user belongs, see the ListChannelMembershipsForAppInstanceUser API.
See also: AWS API Documentation
Request Syntax
response = client.list_channel_memberships( ChannelArn='string', Type='DEFAULT'|'HIDDEN', MaxResults=123, NextToken='string', ChimeBearer='string', SubChannelId='string' )
- Parameters:
ChannelArn (string) –
[REQUIRED]
The maximum number of channel memberships that you want returned.
Type (string) – The membership type of a user,
DEFAULT
orHIDDEN
. Default members are returned as part ofListChannelMemberships
if no type is specified. Hidden members are only returned if the type filter inListChannelMemberships
equalsHIDDEN
.MaxResults (integer) – The maximum number of channel memberships that you want returned.
NextToken (string) – The token passed by previous API calls until all requested channel memberships are returned.
ChimeBearer (string) –
[REQUIRED]
The ARN of the
AppInstanceUser
orAppInstanceBot
that makes the API call.SubChannelId (string) –
The ID of the SubChannel in the request.
Note
Only required when listing a user’s memberships in a particular sub-channel of an elastic channel.
- Return type:
dict
- Returns:
Response Syntax
{ 'ChannelArn': 'string', 'ChannelMemberships': [ { 'Member': { 'Arn': 'string', 'Name': 'string' } }, ], 'NextToken': 'string' }
Response Structure
(dict) –
ChannelArn (string) –
The ARN of the channel.
ChannelMemberships (list) –
The information for the requested channel memberships.
(dict) –
Summary of the details of a
ChannelMembership
.Member (dict) –
A member’s summary data.
Arn (string) –
The ARN in an Identity.
Name (string) –
The name in an Identity.
NextToken (string) –
The token passed by previous API calls until all requested channel memberships are returned.
Exceptions
ChimeSDKMessaging.Client.exceptions.BadRequestException
ChimeSDKMessaging.Client.exceptions.ForbiddenException
ChimeSDKMessaging.Client.exceptions.UnauthorizedClientException
ChimeSDKMessaging.Client.exceptions.ThrottledClientException
ChimeSDKMessaging.Client.exceptions.ServiceUnavailableException
ChimeSDKMessaging.Client.exceptions.ServiceFailureException