ChimeSDKMessaging

Table of Contents

Client

class ChimeSDKMessaging.Client

A low-level client representing Amazon Chime SDK Messaging

The Amazon Chime SDK Messaging APIs in this section allow software developers to send and receive messages in custom messaging applications. These APIs depend on the frameworks provided by the Amazon Chime SDK Identity APIs. For more information about the messaging APIs, see .

import boto3

client = boto3.client('chime-sdk-messaging')

These are the available methods:

batch_create_channel_membership(**kwargs)

Adds a specified number of users to a channel.

See also: AWS API Documentation

Request Syntax

response = client.batch_create_channel_membership(
    ChannelArn='string',
    Type='DEFAULT'|'HIDDEN',
    MemberArns=[
        'string',
    ],
    ChimeBearer='string'
)
Parameters
  • ChannelArn (string) --

    [REQUIRED]

    The ARN of the channel to which you're adding users.

  • Type (string) -- The membership type of a user, DEFAULT or HIDDEN . Default members are always returned as part of ListChannelMemberships . Hidden members are only returned if the type filter in ListChannelMemberships equals HIDDEN . Otherwise hidden members are not returned. This is only supported by moderators.
  • MemberArns (list) --

    [REQUIRED]

    The ARNs of the members you want to add to the channel.

    • (string) --
  • ChimeBearer (string) --

    [REQUIRED]

    The AppInstanceUserArn of the user that makes the API call.

Return type

dict

Returns

Response Syntax

{
    'BatchChannelMemberships': {
        'InvitedBy': {
            'Arn': 'string',
            'Name': 'string'
        },
        'Type': 'DEFAULT'|'HIDDEN',
        'Members': [
            {
                'Arn': 'string',
                'Name': 'string'
            },
        ],
        'ChannelArn': 'string'
    },
    'Errors': [
        {
            'MemberArn': 'string',
            'ErrorCode': 'BadRequest'|'Conflict'|'Forbidden'|'NotFound'|'PreconditionFailed'|'ResourceLimitExceeded'|'ServiceFailure'|'AccessDenied'|'ServiceUnavailable'|'Throttled'|'Throttling'|'Unauthorized'|'Unprocessable'|'VoiceConnectorGroupAssociationsExist'|'PhoneNumberAssociationsExist',
            'ErrorMessage': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • BatchChannelMemberships (dict) --

      The list of channel memberships in the response.

      • InvitedBy (dict) --

        The identifier of the member who invited another member.

        • Arn (string) --

          The ARN in an Identity.

        • Name (string) --

          The name in an Identity.

      • Type (string) --

        The membership types set for the channel users.

      • Members (list) --

        The users successfully added to the request.

        • (dict) --

          The details of a user.

          • Arn (string) --

            The ARN in an Identity.

          • Name (string) --

            The name in an Identity.

      • ChannelArn (string) --

        The ARN of the channel to which you're adding users.

    • Errors (list) --

      If the action fails for one or more of the memberships in the request, a list of the memberships is returned, along with error codes and error messages.

      • (dict) --

        A list of failed member ARNs, error codes, and error messages.

        • MemberArn (string) --

          The ARN of the member that the service couldn't add.

        • ErrorCode (string) --

          The error code.

        • ErrorMessage (string) --

          The error message.

Exceptions

  • ChimeSDKMessaging.Client.exceptions.ServiceFailureException
  • ChimeSDKMessaging.Client.exceptions.ServiceUnavailableException
  • ChimeSDKMessaging.Client.exceptions.UnauthorizedClientException
  • ChimeSDKMessaging.Client.exceptions.BadRequestException
  • ChimeSDKMessaging.Client.exceptions.ForbiddenException
  • ChimeSDKMessaging.Client.exceptions.ThrottledClientException
can_paginate(operation_name)

Check if an operation can be paginated.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Returns
True if the operation can be paginated, False otherwise.
create_channel(**kwargs)

Creates a channel to which you can add users and send messages.

Restriction : You can't change a channel's privacy.

Note

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

See also: AWS API Documentation

Request Syntax

response = client.create_channel(
    AppInstanceArn='string',
    Name='string',
    Mode='UNRESTRICTED'|'RESTRICTED',
    Privacy='PUBLIC'|'PRIVATE',
    Metadata='string',
    ClientRequestToken='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    ChimeBearer='string'
)
Parameters
  • AppInstanceArn (string) --

    [REQUIRED]

    The ARN of the channel request.

  • Name (string) --

    [REQUIRED]

    The name of the channel.

  • Mode (string) -- The channel mode: UNRESTRICTED or RESTRICTED . Administrators, moderators, and channel members can add themselves and other members to unrestricted channels. Only administrators and moderators can add members to restricted channels.
  • Privacy (string) -- The channel's privacy level: PUBLIC or PRIVATE . Private channels aren't discoverable by users outside the channel. Public channels are discoverable by anyone in the AppInstance .
  • Metadata (string) -- The metadata of the creation request. Limited to 1KB and UTF-8.
  • ClientRequestToken (string) --

    [REQUIRED]

    The client token for the request. An Idempotency token.

    This field is autopopulated if not provided.

  • Tags (list) --

    The tags for the creation request.

    • (dict) --

      Describes a tag applied to a resource.

      • Key (string) -- [REQUIRED]

        The key of the tag.

      • Value (string) -- [REQUIRED]

        The value of the tag.

  • ChimeBearer (string) --

    [REQUIRED]

    The AppInstanceUserArn of the user that makes the API call.

Return type

dict

Returns

Response Syntax

{
    'ChannelArn': 'string'
}

Response Structure

  • (dict) --

    • ChannelArn (string) --

      The ARN of the channel.

Exceptions

  • ChimeSDKMessaging.Client.exceptions.BadRequestException
  • ChimeSDKMessaging.Client.exceptions.ForbiddenException
  • ChimeSDKMessaging.Client.exceptions.UnauthorizedClientException
  • ChimeSDKMessaging.Client.exceptions.ConflictException
  • ChimeSDKMessaging.Client.exceptions.ResourceLimitExceededException
  • ChimeSDKMessaging.Client.exceptions.ThrottledClientException
  • ChimeSDKMessaging.Client.exceptions.ServiceUnavailableException
  • ChimeSDKMessaging.Client.exceptions.ServiceFailureException
create_channel_ban(**kwargs)

Permanently bans a member from a channel. Moderators can't add banned members to a channel. To undo a ban, you first have to DeleteChannelBan , and then CreateChannelMembership . Bans are cleaned up when you delete users or channels.

If you ban a user who is already part of a channel, that user is automatically kicked from the channel.

Note

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

See also: AWS API Documentation

Request Syntax

response = client.create_channel_ban(
    ChannelArn='string',
    MemberArn='string',
    ChimeBearer='string'
)
Parameters
  • ChannelArn (string) --

    [REQUIRED]

    The ARN of the ban request.

  • MemberArn (string) --

    [REQUIRED]

    The ARN of the member being banned.

  • ChimeBearer (string) --

    [REQUIRED]

    The AppInstanceUserArn of the user that makes the API call.

Return type

dict

Returns

Response Syntax

{
    'ChannelArn': 'string',
    'Member': {
        'Arn': 'string',
        'Name': 'string'
    }
}

Response Structure

  • (dict) --

    • ChannelArn (string) --

      The ARN of the response to the ban request.

    • Member (dict) --

      The ChannelArn and BannedIdentity of the member in the ban response.

      • Arn (string) --

        The ARN in an Identity.

      • Name (string) --

        The name in an Identity.

Exceptions

  • ChimeSDKMessaging.Client.exceptions.BadRequestException
  • ChimeSDKMessaging.Client.exceptions.ForbiddenException
  • ChimeSDKMessaging.Client.exceptions.UnauthorizedClientException
  • ChimeSDKMessaging.Client.exceptions.ConflictException
  • ChimeSDKMessaging.Client.exceptions.ResourceLimitExceededException
  • ChimeSDKMessaging.Client.exceptions.ThrottledClientException
  • ChimeSDKMessaging.Client.exceptions.ServiceUnavailableException
  • ChimeSDKMessaging.Client.exceptions.ServiceFailureException
create_channel_membership(**kwargs)

Adds a user to a channel. The InvitedBy response field is derived from the request header. A channel member can:

  • List messages
  • Send messages
  • Receive messages
  • Edit their own messages
  • Leave the channel

Privacy settings impact this action as follows:

  • Public Channels: You do not need to be a member to list messages, but you must be a member to send messages.
  • Private Channels: You must be a member to list or send messages.

Note

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

See also: AWS API Documentation

Request Syntax

response = client.create_channel_membership(
    ChannelArn='string',
    MemberArn='string',
    Type='DEFAULT'|'HIDDEN',
    ChimeBearer='string'
)
Parameters
  • ChannelArn (string) --

    [REQUIRED]

    The ARN of the channel to which you're adding users.

  • MemberArn (string) --

    [REQUIRED]

    The ARN of the member you want to add to the channel.

  • Type (string) --

    [REQUIRED]

    The membership type of a user, DEFAULT or HIDDEN . Default members are always returned as part of ListChannelMemberships . Hidden members are only returned if the type filter in ListChannelMemberships equals HIDDEN . Otherwise hidden members are not returned. This is only supported by moderators.

  • ChimeBearer (string) --

    [REQUIRED]

    The AppInstanceUserArn of the user that makes the API call.

Return type

dict

Returns

Response Syntax

{
    'ChannelArn': 'string',
    'Member': {
        'Arn': 'string',
        'Name': 'string'
    }
}

Response Structure

  • (dict) --

    • ChannelArn (string) --

      The ARN of the channel.

    • Member (dict) --

      The ARN and metadata of the member being added.

      • Arn (string) --

        The ARN in an Identity.

      • Name (string) --

        The name in an Identity.

Exceptions

  • ChimeSDKMessaging.Client.exceptions.BadRequestException
  • ChimeSDKMessaging.Client.exceptions.ForbiddenException
  • ChimeSDKMessaging.Client.exceptions.UnauthorizedClientException
  • ChimeSDKMessaging.Client.exceptions.ConflictException
  • ChimeSDKMessaging.Client.exceptions.ResourceLimitExceededException
  • ChimeSDKMessaging.Client.exceptions.ThrottledClientException
  • ChimeSDKMessaging.Client.exceptions.ServiceUnavailableException
  • ChimeSDKMessaging.Client.exceptions.ServiceFailureException
create_channel_moderator(**kwargs)

Creates a new ChannelModerator . A channel moderator can:

  • Add and remove other members of the channel.
  • Add and remove other moderators of the channel.
  • Add and remove user bans for the channel.
  • Redact messages in the channel.
  • List messages in the channel.

Note

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

See also: AWS API Documentation

Request Syntax

response = client.create_channel_moderator(
    ChannelArn='string',
    ChannelModeratorArn='string',
    ChimeBearer='string'
)
Parameters
  • ChannelArn (string) --

    [REQUIRED]

    The ARN of the channel.

  • ChannelModeratorArn (string) --

    [REQUIRED]

    The ARN of the moderator.

  • ChimeBearer (string) --

    [REQUIRED]

    The AppInstanceUserArn of the user that makes the API call.

Return type

dict

Returns

Response Syntax

{
    'ChannelArn': 'string',
    'ChannelModerator': {
        'Arn': 'string',
        'Name': 'string'
    }
}

Response Structure

  • (dict) --

    • ChannelArn (string) --

      The ARN of the channel.

    • ChannelModerator (dict) --

      The ARNs of the channel and the moderator.

      • Arn (string) --

        The ARN in an Identity.

      • Name (string) --

        The name in an Identity.

Exceptions

  • ChimeSDKMessaging.Client.exceptions.BadRequestException
  • ChimeSDKMessaging.Client.exceptions.ForbiddenException
  • ChimeSDKMessaging.Client.exceptions.UnauthorizedClientException
  • ChimeSDKMessaging.Client.exceptions.ConflictException
  • ChimeSDKMessaging.Client.exceptions.ResourceLimitExceededException
  • ChimeSDKMessaging.Client.exceptions.ThrottledClientException
  • ChimeSDKMessaging.Client.exceptions.ServiceUnavailableException
  • ChimeSDKMessaging.Client.exceptions.ServiceFailureException
delete_channel(**kwargs)

Immediately makes a channel and its memberships inaccessible and marks them for deletion. This is an irreversible process.

Note

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

See also: AWS API Documentation

Request Syntax

response = client.delete_channel(
    ChannelArn='string',
    ChimeBearer='string'
)
Parameters
  • ChannelArn (string) --

    [REQUIRED]

    The ARN of the channel being deleted.

  • ChimeBearer (string) --

    [REQUIRED]

    The AppInstanceUserArn of the user that makes the API call.

Returns

None

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
delete_channel_ban(**kwargs)

Removes a user from a channel's ban list.

Note

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

See also: AWS API Documentation

Request Syntax

response = client.delete_channel_ban(
    ChannelArn='string',
    MemberArn='string',
    ChimeBearer='string'
)
Parameters
  • ChannelArn (string) --

    [REQUIRED]

    The ARN of the channel from which the AppInstanceUser was banned.

  • MemberArn (string) --

    [REQUIRED]

    The ARN of the AppInstanceUser that you want to reinstate.

  • ChimeBearer (string) --

    [REQUIRED]

    The AppInstanceUserArn of the user that makes the API call.

Returns

None

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
delete_channel_membership(**kwargs)

Removes a member from a channel.

Note

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

See also: AWS API Documentation

Request Syntax

response = client.delete_channel_membership(
    ChannelArn='string',
    MemberArn='string',
    ChimeBearer='string'
)
Parameters
  • ChannelArn (string) --

    [REQUIRED]

    The ARN of the channel from which you want to remove the user.

  • MemberArn (string) --

    [REQUIRED]

    The ARN of the member that you're removing from the channel.

  • ChimeBearer (string) --

    [REQUIRED]

    The AppInstanceUserArn of the user that makes the API call.

Returns

None

Exceptions

  • ChimeSDKMessaging.Client.exceptions.BadRequestException
  • ChimeSDKMessaging.Client.exceptions.ForbiddenException
  • ChimeSDKMessaging.Client.exceptions.UnauthorizedClientException
  • ChimeSDKMessaging.Client.exceptions.ConflictException
  • ChimeSDKMessaging.Client.exceptions.ThrottledClientException
  • ChimeSDKMessaging.Client.exceptions.ServiceUnavailableException
  • ChimeSDKMessaging.Client.exceptions.ServiceFailureException
delete_channel_message(**kwargs)

Deletes a channel message. Only admins can perform this action. Deletion makes messages inaccessible immediately. A background process deletes any revisions created by UpdateChannelMessage .

Note

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

See also: AWS API Documentation

Request Syntax

response = client.delete_channel_message(
    ChannelArn='string',
    MessageId='string',
    ChimeBearer='string'
)
Parameters
  • ChannelArn (string) --

    [REQUIRED]

    The ARN of the channel.

  • MessageId (string) --

    [REQUIRED]

    The ID of the message being deleted.

  • ChimeBearer (string) --

    [REQUIRED]

    The AppInstanceUserArn of the user that makes the API call.

Returns

None

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
delete_channel_moderator(**kwargs)

Deletes a channel moderator.

Note

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

See also: AWS API Documentation

Request Syntax

response = client.delete_channel_moderator(
    ChannelArn='string',
    ChannelModeratorArn='string',
    ChimeBearer='string'
)
Parameters
  • ChannelArn (string) --

    [REQUIRED]

    The ARN of the channel.

  • ChannelModeratorArn (string) --

    [REQUIRED]

    The ARN of the moderator being deleted.

  • ChimeBearer (string) --

    [REQUIRED]

    The AppInstanceUserArn of the user that makes the API call.

Returns

None

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
describe_channel(**kwargs)

Returns the full details of a channel in an Amazon Chime AppInstance .

Note

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

See also: AWS API Documentation

Request Syntax

response = client.describe_channel(
    ChannelArn='string',
    ChimeBearer='string'
)
Parameters
  • ChannelArn (string) --

    [REQUIRED]

    The ARN of the channel.

  • ChimeBearer (string) --

    [REQUIRED]

    The AppInstanceUserArn of the user that makes the API call.

Return type

dict

Returns

Response Syntax

{
    'Channel': {
        'Name': 'string',
        'ChannelArn': 'string',
        'Mode': 'UNRESTRICTED'|'RESTRICTED',
        'Privacy': 'PUBLIC'|'PRIVATE',
        'Metadata': 'string',
        'CreatedBy': {
            'Arn': 'string',
            'Name': 'string'
        },
        'CreatedTimestamp': datetime(2015, 1, 1),
        'LastMessageTimestamp': datetime(2015, 1, 1),
        'LastUpdatedTimestamp': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • Channel (dict) --

      The channel details.

      • Name (string) --

        The name of a channel.

      • ChannelArn (string) --

        The ARN of a channel.

      • Mode (string) --

        The mode of the channel.

      • Privacy (string) --

        The channel's privacy setting.

      • Metadata (string) --

        The channel's metadata.

      • CreatedBy (dict) --

        The AppInstanceUser who created the channel.

        • Arn (string) --

          The ARN in an Identity.

        • Name (string) --

          The name in an Identity.

      • CreatedTimestamp (datetime) --

        The time at which the AppInstanceUser created the channel.

      • LastMessageTimestamp (datetime) --

        The time at which a member sent the last message in the channel.

      • LastUpdatedTimestamp (datetime) --

        The time at which a channel was last updated.

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
describe_channel_ban(**kwargs)

Returns the full details of a channel ban.

Note

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

See also: AWS API Documentation

Request Syntax

response = client.describe_channel_ban(
    ChannelArn='string',
    MemberArn='string',
    ChimeBearer='string'
)
Parameters
  • ChannelArn (string) --

    [REQUIRED]

    The ARN of the channel from which the user is banned.

  • MemberArn (string) --

    [REQUIRED]

    The ARN of the member being banned.

  • ChimeBearer (string) --

    [REQUIRED]

    The AppInstanceUserArn of the user that makes the API call.

Return type

dict

Returns

Response Syntax

{
    'ChannelBan': {
        'Member': {
            'Arn': 'string',
            'Name': 'string'
        },
        'ChannelArn': 'string',
        'CreatedTimestamp': datetime(2015, 1, 1),
        'CreatedBy': {
            'Arn': 'string',
            'Name': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • ChannelBan (dict) --

      The details of the ban.

      • Member (dict) --

        The member being banned from the channel.

        • Arn (string) --

          The ARN in an Identity.

        • Name (string) --

          The name in an Identity.

      • ChannelArn (string) --

        The ARN of the channel from which a member is being banned.

      • CreatedTimestamp (datetime) --

        The time at which the ban was created.

      • CreatedBy (dict) --

        The AppInstanceUser who created the ban.

        • Arn (string) --

          The ARN in an Identity.

        • Name (string) --

          The name in an Identity.

Exceptions

  • ChimeSDKMessaging.Client.exceptions.BadRequestException
  • ChimeSDKMessaging.Client.exceptions.ForbiddenException
  • ChimeSDKMessaging.Client.exceptions.NotFoundException
  • ChimeSDKMessaging.Client.exceptions.UnauthorizedClientException
  • ChimeSDKMessaging.Client.exceptions.ThrottledClientException
  • ChimeSDKMessaging.Client.exceptions.ServiceUnavailableException
  • ChimeSDKMessaging.Client.exceptions.ServiceFailureException
describe_channel_membership(**kwargs)

Returns the full details of a user's channel membership.

Note

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

See also: AWS API Documentation

Request Syntax

response = client.describe_channel_membership(
    ChannelArn='string',
    MemberArn='string',
    ChimeBearer='string'
)
Parameters
  • ChannelArn (string) --

    [REQUIRED]

    The ARN of the channel.

  • MemberArn (string) --

    [REQUIRED]

    The ARN of the member.

  • ChimeBearer (string) --

    [REQUIRED]

    The AppInstanceUserArn of the user that makes the API call.

Return type

dict

Returns

Response Syntax

{
    'ChannelMembership': {
        'InvitedBy': {
            'Arn': 'string',
            'Name': 'string'
        },
        'Type': 'DEFAULT'|'HIDDEN',
        'Member': {
            'Arn': 'string',
            'Name': 'string'
        },
        'ChannelArn': 'string',
        'CreatedTimestamp': datetime(2015, 1, 1),
        'LastUpdatedTimestamp': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • ChannelMembership (dict) --

      The details of the membership.

      • InvitedBy (dict) --

        The identifier of the member who invited another member.

        • Arn (string) --

          The ARN in an Identity.

        • Name (string) --

          The name in an Identity.

      • Type (string) --

        The membership type set for the channel member.

      • Member (dict) --

        The data of the channel member.

        • Arn (string) --

          The ARN in an Identity.

        • Name (string) --

          The name in an Identity.

      • ChannelArn (string) --

        The ARN of the member's channel.

      • CreatedTimestamp (datetime) --

        The time at which the channel membership was created.

      • LastUpdatedTimestamp (datetime) --

        The time at which a channel membership was last updated.

Exceptions

  • ChimeSDKMessaging.Client.exceptions.BadRequestException
  • ChimeSDKMessaging.Client.exceptions.ForbiddenException
  • ChimeSDKMessaging.Client.exceptions.NotFoundException
  • ChimeSDKMessaging.Client.exceptions.UnauthorizedClientException
  • ChimeSDKMessaging.Client.exceptions.ThrottledClientException
  • ChimeSDKMessaging.Client.exceptions.ServiceUnavailableException
  • ChimeSDKMessaging.Client.exceptions.ServiceFailureException
describe_channel_membership_for_app_instance_user(**kwargs)

Returns the details of a channel based on the membership of the specified AppInstanceUser .

Note

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

See also: AWS API Documentation

Request Syntax

response = client.describe_channel_membership_for_app_instance_user(
    ChannelArn='string',
    AppInstanceUserArn='string',
    ChimeBearer='string'
)
Parameters
  • ChannelArn (string) --

    [REQUIRED]

    The ARN of the channel to which the user belongs.

  • AppInstanceUserArn (string) --

    [REQUIRED]

    The ARN of the user in a channel.

  • ChimeBearer (string) --

    [REQUIRED]

    The AppInstanceUserArn of the user that makes the API call.

Return type

dict

Returns

Response Syntax

{
    'ChannelMembership': {
        'ChannelSummary': {
            'Name': 'string',
            'ChannelArn': 'string',
            'Mode': 'UNRESTRICTED'|'RESTRICTED',
            'Privacy': 'PUBLIC'|'PRIVATE',
            'Metadata': 'string',
            'LastMessageTimestamp': datetime(2015, 1, 1)
        },
        'AppInstanceUserMembershipSummary': {
            'Type': 'DEFAULT'|'HIDDEN',
            'ReadMarkerTimestamp': datetime(2015, 1, 1)
        }
    }
}

Response Structure

  • (dict) --

    • ChannelMembership (dict) --

      The channel to which a user belongs.

      • ChannelSummary (dict) --

        Returns the channel data for an AppInstance .

        • 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.

      • AppInstanceUserMembershipSummary (dict) --

        Returns the channel membership data for an AppInstance .

        • Type (string) --

          The type of ChannelMembership .

        • ReadMarkerTimestamp (datetime) --

          The time at which a message was last read.

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
describe_channel_moderated_by_app_instance_user(**kwargs)

Returns the full details of a channel moderated by the specified AppInstanceUser .

Note

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

See also: AWS API Documentation

Request Syntax

response = client.describe_channel_moderated_by_app_instance_user(
    ChannelArn='string',
    AppInstanceUserArn='string',
    ChimeBearer='string'
)
Parameters
  • ChannelArn (string) --

    [REQUIRED]

    The ARN of the moderated channel.

  • AppInstanceUserArn (string) --

    [REQUIRED]

    The ARN of the AppInstanceUser in the moderated channel.

  • ChimeBearer (string) --

    [REQUIRED]

    The AppInstanceUserArn of the user that makes the API call.

Return type

dict

Returns

Response Syntax

{
    'Channel': {
        'ChannelSummary': {
            'Name': 'string',
            'ChannelArn': 'string',
            'Mode': 'UNRESTRICTED'|'RESTRICTED',
            'Privacy': 'PUBLIC'|'PRIVATE',
            'Metadata': 'string',
            'LastMessageTimestamp': datetime(2015, 1, 1)
        }
    }
}

Response Structure

  • (dict) --

    • Channel (dict) --

      The moderated channel.

      • ChannelSummary (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.

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
describe_channel_moderator(**kwargs)

Returns the full details of a single ChannelModerator.

Note

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

See also: AWS API Documentation

Request Syntax

response = client.describe_channel_moderator(
    ChannelArn='string',
    ChannelModeratorArn='string',
    ChimeBearer='string'
)
Parameters
  • ChannelArn (string) --

    [REQUIRED]

    The ARN of the channel.

  • ChannelModeratorArn (string) --

    [REQUIRED]

    The ARN of the channel moderator.

  • ChimeBearer (string) --

    [REQUIRED]

    The AppInstanceUserArn of the user that makes the API call.

Return type

dict

Returns

Response Syntax

{
    'ChannelModerator': {
        'Moderator': {
            'Arn': 'string',
            'Name': 'string'
        },
        'ChannelArn': 'string',
        'CreatedTimestamp': datetime(2015, 1, 1),
        'CreatedBy': {
            'Arn': 'string',
            'Name': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • ChannelModerator (dict) --

      The details of the channel moderator.

      • Moderator (dict) --

        The moderator's data.

        • Arn (string) --

          The ARN in an Identity.

        • Name (string) --

          The name in an Identity.

      • ChannelArn (string) --

        The ARN of the moderator's channel.

      • CreatedTimestamp (datetime) --

        The time at which the moderator was created.

      • CreatedBy (dict) --

        The AppInstanceUser who created the moderator.

        • Arn (string) --

          The ARN in an Identity.

        • Name (string) --

          The name in an Identity.

Exceptions

  • ChimeSDKMessaging.Client.exceptions.BadRequestException
  • ChimeSDKMessaging.Client.exceptions.ForbiddenException
  • ChimeSDKMessaging.Client.exceptions.NotFoundException
  • ChimeSDKMessaging.Client.exceptions.UnauthorizedClientException
  • ChimeSDKMessaging.Client.exceptions.ThrottledClientException
  • ChimeSDKMessaging.Client.exceptions.ServiceUnavailableException
  • ChimeSDKMessaging.Client.exceptions.ServiceFailureException
generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)

Generate a presigned url given a client, its method, and arguments

Parameters
  • ClientMethod (string) -- The client method to presign for
  • Params (dict) -- The parameters normally passed to ClientMethod.
  • ExpiresIn (int) -- The number of seconds the presigned url is valid for. By default it expires in an hour (3600 seconds)
  • HttpMethod (string) -- The http method to use on the generated url. By default, the http method is whatever is used in the method's model.
Returns

The presigned url

get_channel_message(**kwargs)

Gets the full details of a channel message.

Note

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

See also: AWS API Documentation

Request Syntax

response = client.get_channel_message(
    ChannelArn='string',
    MessageId='string',
    ChimeBearer='string'
)
Parameters
  • ChannelArn (string) --

    [REQUIRED]

    The ARN of the channel.

  • MessageId (string) --

    [REQUIRED]

    The ID of the message.

  • ChimeBearer (string) --

    [REQUIRED]

    The AppInstanceUserArn of the user that makes the API call.

Return type

dict

Returns

Response Syntax

{
    'ChannelMessage': {
        'ChannelArn': 'string',
        'MessageId': 'string',
        'Content': 'string',
        'Metadata': 'string',
        'Type': 'STANDARD'|'CONTROL',
        'CreatedTimestamp': datetime(2015, 1, 1),
        'LastEditedTimestamp': datetime(2015, 1, 1),
        'LastUpdatedTimestamp': datetime(2015, 1, 1),
        'Sender': {
            'Arn': 'string',
            'Name': 'string'
        },
        'Redacted': True|False,
        'Persistence': 'PERSISTENT'|'NON_PERSISTENT'
    }
}

Response Structure

  • (dict) --

    • ChannelMessage (dict) --

      The details of and content in the message.

      • ChannelArn (string) --

        The ARN of the channel.

      • MessageId (string) --

        The ID of a message.

      • Content (string) --

        The message content.

      • Metadata (string) --

        The message metadata.

      • Type (string) --

        The message type.

      • CreatedTimestamp (datetime) --

        The time at which the message was created.

      • LastEditedTimestamp (datetime) --

        The time at which a message was edited.

      • LastUpdatedTimestamp (datetime) --

        The time at which a message was updated.

      • Sender (dict) --

        The message sender.

        • Arn (string) --

          The ARN in an Identity.

        • Name (string) --

          The name in an Identity.

      • Redacted (boolean) --

        Hides the content of a message.

      • Persistence (string) --

        The persistence setting for a channel message.

Exceptions

  • ChimeSDKMessaging.Client.exceptions.BadRequestException
  • ChimeSDKMessaging.Client.exceptions.ForbiddenException
  • ChimeSDKMessaging.Client.exceptions.NotFoundException
  • ChimeSDKMessaging.Client.exceptions.UnauthorizedClientException
  • ChimeSDKMessaging.Client.exceptions.ThrottledClientException
  • ChimeSDKMessaging.Client.exceptions.ServiceUnavailableException
  • ChimeSDKMessaging.Client.exceptions.ServiceFailureException
get_messaging_session_endpoint()

The details of the endpoint for the messaging session.

See also: AWS API Documentation

Request Syntax

response = client.get_messaging_session_endpoint()
Return type
dict
Returns
Response Syntax
{
    'Endpoint': {
        'Url': 'string'
    }
}

Response Structure

  • (dict) --
    • Endpoint (dict) --

      The endpoint returned in the response.

      • Url (string) --

        The endpoint to which you establish a websocket connection.

Exceptions

  • ChimeSDKMessaging.Client.exceptions.UnauthorizedClientException
  • ChimeSDKMessaging.Client.exceptions.ForbiddenException
  • ChimeSDKMessaging.Client.exceptions.ThrottledClientException
  • ChimeSDKMessaging.Client.exceptions.ServiceUnavailableException
  • ChimeSDKMessaging.Client.exceptions.ServiceFailureException
get_paginator(operation_name)

Create a paginator for an operation.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Raises OperationNotPageableError
Raised if the operation is not pageable. You can use the client.can_paginate method to check if an operation is pageable.
Return type
L{botocore.paginate.Paginator}
Returns
A paginator object.
get_waiter(waiter_name)

Returns an object that can wait for some condition.

Parameters
waiter_name (str) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters.
Returns
The specified waiter object.
Return type
botocore.waiter.Waiter
list_channel_bans(**kwargs)

Lists all the users banned from a particular channel.

Note

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

See also: AWS API Documentation

Request Syntax

response = client.list_channel_bans(
    ChannelArn='string',
    MaxResults=123,
    NextToken='string',
    ChimeBearer='string'
)
Parameters
  • ChannelArn (string) --

    [REQUIRED]

    The ARN of the channel.

  • MaxResults (integer) -- The maximum number of bans that you want returned.
  • NextToken (string) -- The token passed by previous API calls until all requested bans are returned.
  • ChimeBearer (string) --

    [REQUIRED]

    The AppInstanceUserArn of the user that makes the API call.

Return type

dict

Returns

Response Syntax

{
    'ChannelArn': 'string',
    'NextToken': 'string',
    'ChannelBans': [
        {
            'Member': {
                'Arn': 'string',
                'Name': 'string'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • ChannelArn (string) --

      The ARN of the channel.

    • NextToken (string) --

      The token passed by previous API calls until all requested bans are returned.

    • ChannelBans (list) --

      The information for each requested ban.

      • (dict) --

        Summary of the details of a ChannelBan .

        • Member (dict) --

          The member being banned from a channel.

          • Arn (string) --

            The ARN in an Identity.

          • Name (string) --

            The name in an Identity.

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
list_channel_memberships(**kwargs)

Lists all channel memberships in a channel.

Note

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

See also: AWS API Documentation

Request Syntax

response = client.list_channel_memberships(
    ChannelArn='string',
    Type='DEFAULT'|'HIDDEN',
    MaxResults=123,
    NextToken='string',
    ChimeBearer='string'
)
Parameters
  • ChannelArn (string) --

    [REQUIRED]

    The maximum number of channel memberships that you want returned.

  • Type (string) -- The membership type of a user, DEFAULT or HIDDEN . Default members are always returned as part of ListChannelMemberships . Hidden members are only returned if the type filter in ListChannelMemberships equals HIDDEN . Otherwise hidden members are not returned.
  • 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 AppInstanceUserArn of the user that makes the API call.

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
list_channel_memberships_for_app_instance_user(**kwargs)

Lists all channels that a particular AppInstanceUser is a part of. Only an AppInstanceAdmin can call the API with a user ARN that is not their own.

Note

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

See also: AWS API Documentation

Request Syntax

response = client.list_channel_memberships_for_app_instance_user(
    AppInstanceUserArn='string',
    MaxResults=123,
    NextToken='string',
    ChimeBearer='string'
)
Parameters
  • AppInstanceUserArn (string) -- The ARN of the AppInstanceUser s
  • MaxResults (integer) -- The maximum number of users that you want returned.
  • NextToken (string) -- The token returned from previous API requests until the number of channel memberships is reached.
  • ChimeBearer (string) --

    [REQUIRED]

    The AppInstanceUserArn of the user that makes the API call.

Return type

dict

Returns

Response Syntax

{
    'ChannelMemberships': [
        {
            'ChannelSummary': {
                'Name': 'string',
                'ChannelArn': 'string',
                'Mode': 'UNRESTRICTED'|'RESTRICTED',
                'Privacy': 'PUBLIC'|'PRIVATE',
                'Metadata': 'string',
                'LastMessageTimestamp': datetime(2015, 1, 1)
            },
            'AppInstanceUserMembershipSummary': {
                'Type': 'DEFAULT'|'HIDDEN',
                'ReadMarkerTimestamp': datetime(2015, 1, 1)
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ChannelMemberships (list) --

      The token passed by previous API calls until all requested users are returned.

      • (dict) --

        Summary of the channel membership details of an AppInstanceUser .

        • ChannelSummary (dict) --

          Returns the channel data for an AppInstance .

          • 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.

        • AppInstanceUserMembershipSummary (dict) --

          Returns the channel membership data for an AppInstance .

          • Type (string) --

            The type of ChannelMembership .

          • ReadMarkerTimestamp (datetime) --

            The time at which a message was last read.

    • NextToken (string) --

      The token passed by previous API calls until all requested users 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
list_channel_messages(**kwargs)

List all the messages in a channel. Returns a paginated list of ChannelMessages . By default, sorted by creation timestamp in descending order.

Note

Redacted messages appear in the results as empty, since they are only redacted, not deleted. Deleted messages do not appear in the results. This action always returns the latest version of an edited message.

Also, the x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

See also: AWS API Documentation

Request Syntax

response = client.list_channel_messages(
    ChannelArn='string',
    SortOrder='ASCENDING'|'DESCENDING',
    NotBefore=datetime(2015, 1, 1),
    NotAfter=datetime(2015, 1, 1),
    MaxResults=123,
    NextToken='string',
    ChimeBearer='string'
)
Parameters
  • ChannelArn (string) --

    [REQUIRED]

    The ARN of the channel.

  • SortOrder (string) -- The order in which you want messages sorted. Default is Descending, based on time created.
  • NotBefore (datetime) -- The initial or starting time stamp for your requested messages.
  • NotAfter (datetime) -- The final or ending time stamp for your requested messages.
  • MaxResults (integer) -- The maximum number of messages that you want returned.
  • NextToken (string) -- The token passed by previous API calls until all requested messages are returned.
  • ChimeBearer (string) --

    [REQUIRED]

    The AppInstanceUserArn of the user that makes the API call.

Return type

dict

Returns

Response Syntax

{
    'ChannelArn': 'string',
    'NextToken': 'string',
    'ChannelMessages': [
        {
            'MessageId': 'string',
            'Content': 'string',
            'Metadata': 'string',
            'Type': 'STANDARD'|'CONTROL',
            'CreatedTimestamp': datetime(2015, 1, 1),
            'LastUpdatedTimestamp': datetime(2015, 1, 1),
            'LastEditedTimestamp': datetime(2015, 1, 1),
            'Sender': {
                'Arn': 'string',
                'Name': 'string'
            },
            'Redacted': True|False
        },
    ]
}

Response Structure

  • (dict) --

    • ChannelArn (string) --

      The ARN of the channel containing the requested messages.

    • NextToken (string) --

      The token passed by previous API calls until all requested messages are returned.

    • ChannelMessages (list) --

      The information about, and content of, each requested message.

      • (dict) --

        Summary of the messages in a Channel .

        • MessageId (string) --

          The ID of the message.

        • Content (string) --

          The content of the message.

        • Metadata (string) --

          The metadata of the message.

        • Type (string) --

          The type of message.

        • CreatedTimestamp (datetime) --

          The time at which the message summary was created.

        • LastUpdatedTimestamp (datetime) --

          The time at which a message was last updated.

        • LastEditedTimestamp (datetime) --

          The time at which a message was last edited.

        • Sender (dict) --

          The message sender.

          • Arn (string) --

            The ARN in an Identity.

          • Name (string) --

            The name in an Identity.

        • Redacted (boolean) --

          Indicates whether a message was redacted.

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
list_channel_moderators(**kwargs)

Lists all the moderators for a channel.

Note

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

See also: AWS API Documentation

Request Syntax

response = client.list_channel_moderators(
    ChannelArn='string',
    MaxResults=123,
    NextToken='string',
    ChimeBearer='string'
)
Parameters
  • ChannelArn (string) --

    [REQUIRED]

    The ARN of the channel.

  • MaxResults (integer) -- The maximum number of moderators that you want returned.
  • NextToken (string) -- The token passed by previous API calls until all requested moderators are returned.
  • ChimeBearer (string) --

    [REQUIRED]

    The AppInstanceUserArn of the user that makes the API call.

Return type

dict

Returns

Response Syntax

{
    'ChannelArn': 'string',
    'NextToken': 'string',
    'ChannelModerators': [
        {
            'Moderator': {
                'Arn': 'string',
                'Name': 'string'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • ChannelArn (string) --

      The ARN of the channel.

    • NextToken (string) --

      The token passed by previous API calls until all requested moderators are returned.

    • ChannelModerators (list) --

      The information about and names of each moderator.

      • (dict) --

        Summary of the details of a ChannelModerator .

        • Moderator (dict) --

          The data for a moderator.

          • Arn (string) --

            The ARN in an Identity.

          • Name (string) --

            The name in an Identity.

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
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 the AppInstanceUserArn of the user that makes the API call as the value in the header.

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 an AppInstanceAdmin 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) --

    [REQUIRED]

    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

  • ChimeSDKMessaging.Client.exceptions.BadRequestException
  • ChimeSDKMessaging.Client.exceptions.ForbiddenException
  • ChimeSDKMessaging.Client.exceptions.UnauthorizedClientException
  • ChimeSDKMessaging.Client.exceptions.ThrottledClientException
  • ChimeSDKMessaging.Client.exceptions.ServiceUnavailableException
  • ChimeSDKMessaging.Client.exceptions.ServiceFailureException
list_channels_moderated_by_app_instance_user(**kwargs)

A list of the channels moderated by an AppInstanceUser .

Note

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

See also: AWS API Documentation

Request Syntax

response = client.list_channels_moderated_by_app_instance_user(
    AppInstanceUserArn='string',
    MaxResults=123,
    NextToken='string',
    ChimeBearer='string'
)
Parameters
  • AppInstanceUserArn (string) -- The ARN of the user in the moderated channel.
  • MaxResults (integer) -- The maximum number of channels in the request.
  • NextToken (string) -- The token returned from previous API requests until the number of channels moderated by the user is reached.
  • ChimeBearer (string) --

    [REQUIRED]

    The AppInstanceUserArn of the user that makes the API call.

Return type

dict

Returns

Response Syntax

{
    'Channels': [
        {
            'ChannelSummary': {
                '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 moderated channels in the request.

      • (dict) --

        Summary of the details of a moderated channel.

        • ChannelSummary (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 moderated by the user 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
redact_channel_message(**kwargs)

Redacts message content, but not metadata. The message exists in the back end, but the action returns null content, and the state shows as redacted.

Note

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

See also: AWS API Documentation

Request Syntax

response = client.redact_channel_message(
    ChannelArn='string',
    MessageId='string',
    ChimeBearer='string'
)
Parameters
  • ChannelArn (string) --

    [REQUIRED]

    The ARN of the channel containing the messages that you want to redact.

  • MessageId (string) --

    [REQUIRED]

    The ID of the message being redacted.

  • ChimeBearer (string) --

    [REQUIRED]

    The AppInstanceUserArn of the user that makes the API call.

Return type

dict

Returns

Response Syntax

{
    'ChannelArn': 'string',
    'MessageId': 'string'
}

Response Structure

  • (dict) --

    • ChannelArn (string) --

      The ARN of the channel containing the messages that you want to redact.

    • MessageId (string) --

      The ID of the message being redacted.

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
send_channel_message(**kwargs)

Sends a message to a particular channel that the member is a part of.

Note

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

Also, STANDARD messages can contain 4KB of data and the 1KB of metadata. CONTROL messages can contain 30 bytes of data and no metadata.

See also: AWS API Documentation

Request Syntax

response = client.send_channel_message(
    ChannelArn='string',
    Content='string',
    Type='STANDARD'|'CONTROL',
    Persistence='PERSISTENT'|'NON_PERSISTENT',
    Metadata='string',
    ClientRequestToken='string',
    ChimeBearer='string'
)
Parameters
  • ChannelArn (string) --

    [REQUIRED]

    The ARN of the channel.

  • Content (string) --

    [REQUIRED]

    The content of the message.

  • Type (string) --

    [REQUIRED]

    The type of message, STANDARD or CONTROL .

  • Persistence (string) --

    [REQUIRED]

    Boolean that controls whether the message is persisted on the back end. Required.

  • Metadata (string) -- The optional metadata for each message.
  • ClientRequestToken (string) --

    [REQUIRED]

    The Idempotency token for each client request.

    This field is autopopulated if not provided.

  • ChimeBearer (string) --

    [REQUIRED]

    The AppInstanceUserArn of the user that makes the API call.

Return type

dict

Returns

Response Syntax

{
    'ChannelArn': 'string',
    'MessageId': 'string'
}

Response Structure

  • (dict) --

    • ChannelArn (string) --

      The ARN of the channel.

    • MessageId (string) --

      The ID string assigned to each message.

Exceptions

  • ChimeSDKMessaging.Client.exceptions.BadRequestException
  • ChimeSDKMessaging.Client.exceptions.ConflictException
  • ChimeSDKMessaging.Client.exceptions.ForbiddenException
  • ChimeSDKMessaging.Client.exceptions.UnauthorizedClientException
  • ChimeSDKMessaging.Client.exceptions.ThrottledClientException
  • ChimeSDKMessaging.Client.exceptions.ServiceUnavailableException
  • ChimeSDKMessaging.Client.exceptions.ServiceFailureException
update_channel(**kwargs)

Update a channel's attributes.

Restriction : You can't change a channel's privacy.

Note

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

See also: AWS API Documentation

Request Syntax

response = client.update_channel(
    ChannelArn='string',
    Name='string',
    Mode='UNRESTRICTED'|'RESTRICTED',
    Metadata='string',
    ChimeBearer='string'
)
Parameters
  • ChannelArn (string) --

    [REQUIRED]

    The ARN of the channel.

  • Name (string) --

    [REQUIRED]

    The name of the channel.

  • Mode (string) --

    [REQUIRED]

    The mode of the update request.

  • Metadata (string) -- The metadata for the update request.
  • ChimeBearer (string) --

    [REQUIRED]

    The AppInstanceUserArn of the user that makes the API call.

Return type

dict

Returns

Response Syntax

{
    'ChannelArn': 'string'
}

Response Structure

  • (dict) --

    • ChannelArn (string) --

      The ARN of the channel.

Exceptions

  • ChimeSDKMessaging.Client.exceptions.BadRequestException
  • ChimeSDKMessaging.Client.exceptions.ForbiddenException
  • ChimeSDKMessaging.Client.exceptions.ConflictException
  • ChimeSDKMessaging.Client.exceptions.UnauthorizedClientException
  • ChimeSDKMessaging.Client.exceptions.ThrottledClientException
  • ChimeSDKMessaging.Client.exceptions.ServiceUnavailableException
  • ChimeSDKMessaging.Client.exceptions.ServiceFailureException
update_channel_message(**kwargs)

Updates the content of a message.

Note

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

See also: AWS API Documentation

Request Syntax

response = client.update_channel_message(
    ChannelArn='string',
    MessageId='string',
    Content='string',
    Metadata='string',
    ChimeBearer='string'
)
Parameters
  • ChannelArn (string) --

    [REQUIRED]

    The ARN of the channel.

  • MessageId (string) --

    [REQUIRED]

    The ID string of the message being updated.

  • Content (string) -- The content of the message being updated.
  • Metadata (string) -- The metadata of the message being updated.
  • ChimeBearer (string) --

    [REQUIRED]

    The AppInstanceUserArn of the user that makes the API call.

Return type

dict

Returns

Response Syntax

{
    'ChannelArn': 'string',
    'MessageId': 'string'
}

Response Structure

  • (dict) --

    • ChannelArn (string) --

      The ARN of the channel.

    • MessageId (string) --

      The ID string of the message being updated.

Exceptions

  • ChimeSDKMessaging.Client.exceptions.BadRequestException
  • ChimeSDKMessaging.Client.exceptions.ConflictException
  • ChimeSDKMessaging.Client.exceptions.ForbiddenException
  • ChimeSDKMessaging.Client.exceptions.UnauthorizedClientException
  • ChimeSDKMessaging.Client.exceptions.ThrottledClientException
  • ChimeSDKMessaging.Client.exceptions.ServiceUnavailableException
  • ChimeSDKMessaging.Client.exceptions.ServiceFailureException
update_channel_read_marker(**kwargs)

The details of the time when a user last read messages in a channel.

Note

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

See also: AWS API Documentation

Request Syntax

response = client.update_channel_read_marker(
    ChannelArn='string',
    ChimeBearer='string'
)
Parameters
  • ChannelArn (string) --

    [REQUIRED]

    The ARN of the channel.

  • ChimeBearer (string) --

    [REQUIRED]

    The AppInstanceUserArn of the user that makes the API call.

Return type

dict

Returns

Response Syntax

{
    'ChannelArn': 'string'
}

Response Structure

  • (dict) --

    • ChannelArn (string) --

      The ARN of the channel.

Exceptions

  • ChimeSDKMessaging.Client.exceptions.BadRequestException
  • ChimeSDKMessaging.Client.exceptions.ForbiddenException
  • ChimeSDKMessaging.Client.exceptions.ConflictException
  • ChimeSDKMessaging.Client.exceptions.UnauthorizedClientException
  • ChimeSDKMessaging.Client.exceptions.ThrottledClientException
  • ChimeSDKMessaging.Client.exceptions.ServiceUnavailableException
  • ChimeSDKMessaging.Client.exceptions.ServiceFailureException

Paginators

The available paginators are: