search_channels
(**kwargs)¶Allows ChimeBearer
to search channels by channel members. AppInstanceUsers can search across the channels that they belong to. AppInstanceAdmins can search across all channels.
See also: AWS API Documentation
Request Syntax
response = client.search_channels(
ChimeBearer='string',
Fields=[
{
'Key': 'MEMBERS',
'Values': [
'string',
],
'Operator': 'EQUALS'|'INCLUDES'
},
],
MaxResults=123,
NextToken='string'
)
AppInstanceUserArn
of the user making the API call.[REQUIRED]
A list of the Field
objects in the channel being searched.
A Field
of the channel that you want to search.
An enum
value that indicates the key to search the channel on. MEMBERS
allows you to search channels based on memberships. You can use it with the EQUALS
operator to get channels whose memberships are equal to the specified values, and with the INCLUDES
operator to get channels whose memberships include the specified values.
The values that you want to search for, a list of strings. The values must be AppInstanceUserArns
specified as a list of strings.
Note
This operation isn't supported for AppInstanceUsers
with large number of memberships.
The operator used to compare field values, currently EQUALS
or INCLUDES
. Use the EQUALS
operator to find channels whose memberships equal the specified values. Use the INCLUDES
operator to find channels whose memberships include the specified values.
dict
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) --
A list of the channels in the request.
(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 persistent message in a channel was sent.
NextToken (string) --
The token returned from previous API responses until the number of channels is reached.
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