Chime / Client / create_room_membership

create_room_membership#

Chime.Client.create_room_membership(**kwargs)#

Adds a member to a chat room in an Amazon Chime Enterprise account. A member can be either a user or a bot. The member role designates whether the member is a chat room administrator or a general chat room member.

See also: AWS API Documentation

Request Syntax

response = client.create_room_membership(
    AccountId='string',
    RoomId='string',
    MemberId='string',
    Role='Administrator'|'Member'
)
Parameters:
  • AccountId (string) –

    [REQUIRED]

    The Amazon Chime account ID.

  • RoomId (string) –

    [REQUIRED]

    The room ID.

  • MemberId (string) –

    [REQUIRED]

    The Amazon Chime member ID (user ID or bot ID).

  • Role (string) – The role of the member.

Return type:

dict

Returns:

Response Syntax

{
    'RoomMembership': {
        'RoomId': 'string',
        'Member': {
            'MemberId': 'string',
            'MemberType': 'User'|'Bot'|'Webhook',
            'Email': 'string',
            'FullName': 'string',
            'AccountId': 'string'
        },
        'Role': 'Administrator'|'Member',
        'InvitedBy': 'string',
        'UpdatedTimestamp': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) –

    • RoomMembership (dict) –

      The room membership details.

      • RoomId (string) –

        The room ID.

      • Member (dict) –

        The member details, such as email address, name, member ID, and member type.

        • MemberId (string) –

          The member ID (user ID or bot ID).

        • MemberType (string) –

          The member type.

        • Email (string) –

          The member email address.

        • FullName (string) –

          The member name.

        • AccountId (string) –

          The Amazon Chime account ID.

      • Role (string) –

        The membership role.

      • InvitedBy (string) –

        The identifier of the user that invited the room member.

      • UpdatedTimestamp (datetime) –

        The room membership update timestamp, in ISO 8601 format.

Exceptions

  • Chime.Client.exceptions.ConflictException

  • Chime.Client.exceptions.UnauthorizedClientException

  • Chime.Client.exceptions.NotFoundException

  • Chime.Client.exceptions.BadRequestException

  • Chime.Client.exceptions.ForbiddenException

  • Chime.Client.exceptions.ResourceLimitExceededException

  • Chime.Client.exceptions.ThrottledClientException

  • Chime.Client.exceptions.ServiceUnavailableException

  • Chime.Client.exceptions.ServiceFailureException