Amazon Chime

2019/11/15 - Amazon Chime - 10 new api methods

Changes  This release adds support for Chime Room Management APIs

ListRooms (new) Link ¶

Lists the room details for the specified Amazon Chime account. Optionally, filter the results by a member ID (user ID or bot ID) to see a list of rooms that the member belongs to.

See also: AWS API Documentation

Request Syntax

client.list_rooms(
    AccountId='string',
    MemberId='string',
    MaxResults=123,
    NextToken='string'
)
type AccountId

string

param AccountId

[REQUIRED]

The Amazon Chime account ID.

type MemberId

string

param MemberId

The member ID (user ID or bot ID).

type MaxResults

integer

param MaxResults

The maximum number of results to return in a single call.

type NextToken

string

param NextToken

The token to use to retrieve the next page of results.

rtype

dict

returns

Response Syntax

{
    'Rooms': [
        {
            'RoomId': 'string',
            'Name': 'string',
            'AccountId': 'string',
            'CreatedBy': 'string',
            'CreatedTimestamp': datetime(2015, 1, 1),
            'UpdatedTimestamp': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Rooms (list) --

      The room details.

      • (dict) --

        The Amazon Chime chat room details.

        • RoomId (string) --

          The room ID.

        • Name (string) --

          The room name.

        • AccountId (string) --

          The Amazon Chime account ID.

        • CreatedBy (string) --

          The identifier of the room creator.

        • CreatedTimestamp (datetime) --

          The room creation timestamp, in ISO 8601 format.

        • UpdatedTimestamp (datetime) --

          The room update timestamp, in ISO 8601 format.

    • NextToken (string) --

      The token to use to retrieve the next page of results.

BatchCreateRoomMembership (new) Link ¶

Adds up to 50 members to a chat room. Members can be either users or bots. 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

client.batch_create_room_membership(
    AccountId='string',
    RoomId='string',
    MembershipItemList=[
        {
            'MemberId': 'string',
            'Role': 'Administrator'|'Member'
        },
    ]
)
type AccountId

string

param AccountId

[REQUIRED]

The Amazon Chime account ID.

type RoomId

string

param RoomId

[REQUIRED]

The room ID.

type MembershipItemList

list

param MembershipItemList

[REQUIRED]

The list of membership items.

  • (dict) --

    Membership details, such as member ID and member role.

    • MemberId (string) --

      The member ID.

    • Role (string) --

      The member role.

rtype

dict

returns

Response Syntax

{
    'Errors': [
        {
            'MemberId': 'string',
            'ErrorCode': 'BadRequest'|'Conflict'|'Forbidden'|'NotFound'|'PreconditionFailed'|'ResourceLimitExceeded'|'ServiceFailure'|'AccessDenied'|'ServiceUnavailable'|'Throttled'|'Unauthorized'|'Unprocessable'|'VoiceConnectorGroupAssociationsExist'|'PhoneNumberAssociationsExist',
            'ErrorMessage': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • Errors (list) --

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

      • (dict) --

        The list of errors returned when a member action results in an error.

        • MemberId (string) --

          The member ID.

        • ErrorCode (string) --

          The error code.

        • ErrorMessage (string) --

          The error message.

GetRoom (new) Link ¶

Retrieves room details, such as name.

See also: AWS API Documentation

Request Syntax

client.get_room(
    AccountId='string',
    RoomId='string'
)
type AccountId

string

param AccountId

[REQUIRED]

The Amazon Chime account ID.

type RoomId

string

param RoomId

[REQUIRED]

The room ID.

rtype

dict

returns

Response Syntax

{
    'Room': {
        'RoomId': 'string',
        'Name': 'string',
        'AccountId': 'string',
        'CreatedBy': 'string',
        'CreatedTimestamp': datetime(2015, 1, 1),
        'UpdatedTimestamp': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • Room (dict) --

      The room details.

      • RoomId (string) --

        The room ID.

      • Name (string) --

        The room name.

      • AccountId (string) --

        The Amazon Chime account ID.

      • CreatedBy (string) --

        The identifier of the room creator.

      • CreatedTimestamp (datetime) --

        The room creation timestamp, in ISO 8601 format.

      • UpdatedTimestamp (datetime) --

        The room update timestamp, in ISO 8601 format.

DeleteRoom (new) Link ¶

Deletes a chat room.

See also: AWS API Documentation

Request Syntax

client.delete_room(
    AccountId='string',
    RoomId='string'
)
type AccountId

string

param AccountId

[REQUIRED]

The Amazon Chime account ID.

type RoomId

string

param RoomId

[REQUIRED]

The chat room ID.

returns

None

UpdateRoom (new) Link ¶

Updates room details, such as the room name.

See also: AWS API Documentation

Request Syntax

client.update_room(
    AccountId='string',
    RoomId='string',
    Name='string'
)
type AccountId

string

param AccountId

[REQUIRED]

The Amazon Chime account ID.

type RoomId

string

param RoomId

[REQUIRED]

The room ID.

type Name

string

param Name

The room name.

rtype

dict

returns

Response Syntax

{
    'Room': {
        'RoomId': 'string',
        'Name': 'string',
        'AccountId': 'string',
        'CreatedBy': 'string',
        'CreatedTimestamp': datetime(2015, 1, 1),
        'UpdatedTimestamp': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • Room (dict) --

      The room details.

      • RoomId (string) --

        The room ID.

      • Name (string) --

        The room name.

      • AccountId (string) --

        The Amazon Chime account ID.

      • CreatedBy (string) --

        The identifier of the room creator.

      • CreatedTimestamp (datetime) --

        The room creation timestamp, in ISO 8601 format.

      • UpdatedTimestamp (datetime) --

        The room update timestamp, in ISO 8601 format.

CreateRoom (new) Link ¶

Creates a chat room for the specified Amazon Chime account.

See also: AWS API Documentation

Request Syntax

client.create_room(
    AccountId='string',
    Name='string',
    ClientRequestToken='string'
)
type AccountId

string

param AccountId

[REQUIRED]

The Amazon Chime account ID.

type Name

string

param Name

[REQUIRED]

The room name.

type ClientRequestToken

string

param ClientRequestToken

The idempotency token for the request.

This field is autopopulated if not provided.

rtype

dict

returns

Response Syntax

{
    'Room': {
        'RoomId': 'string',
        'Name': 'string',
        'AccountId': 'string',
        'CreatedBy': 'string',
        'CreatedTimestamp': datetime(2015, 1, 1),
        'UpdatedTimestamp': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • Room (dict) --

      The room details.

      • RoomId (string) --

        The room ID.

      • Name (string) --

        The room name.

      • AccountId (string) --

        The Amazon Chime account ID.

      • CreatedBy (string) --

        The identifier of the room creator.

      • CreatedTimestamp (datetime) --

        The room creation timestamp, in ISO 8601 format.

      • UpdatedTimestamp (datetime) --

        The room update timestamp, in ISO 8601 format.

UpdateRoomMembership (new) Link ¶

Updates room membership details, such as member role. The member role designates whether the member is a chat room administrator or a general chat room member. Member role can only be updated for user IDs.

See also: AWS API Documentation

Request Syntax

client.update_room_membership(
    AccountId='string',
    RoomId='string',
    MemberId='string',
    Role='Administrator'|'Member'
)
type AccountId

string

param AccountId

[REQUIRED]

The Amazon Chime account ID.

type RoomId

string

param RoomId

[REQUIRED]

The room ID.

type MemberId

string

param MemberId

[REQUIRED]

The member ID.

type Role

string

param Role

The role of the member.

rtype

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.

CreateRoomMembership (new) Link ¶

Adds a member to a chat room. 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

client.create_room_membership(
    AccountId='string',
    RoomId='string',
    MemberId='string',
    Role='Administrator'|'Member'
)
type AccountId

string

param AccountId

[REQUIRED]

The Amazon Chime account ID.

type RoomId

string

param RoomId

[REQUIRED]

The room ID.

type MemberId

string

param MemberId

[REQUIRED]

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

type Role

string

param Role

The role of the member.

rtype

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.

ListRoomMemberships (new) Link ¶

Lists the membership details for the specified room, such as member IDs, member email addresses, and member names.

See also: AWS API Documentation

Request Syntax

client.list_room_memberships(
    AccountId='string',
    RoomId='string',
    MaxResults=123,
    NextToken='string'
)
type AccountId

string

param AccountId

[REQUIRED]

The Amazon Chime account ID.

type RoomId

string

param RoomId

[REQUIRED]

The room ID.

type MaxResults

integer

param MaxResults

The maximum number of results to return in a single call.

type NextToken

string

param NextToken

The token to use to retrieve the next page of results.

rtype

dict

returns

Response Syntax

{
    'RoomMemberships': [
        {
            '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)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • RoomMemberships (list) --

      The room membership details.

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

    • NextToken (string) --

      The token to use to retrieve the next page of results.

DeleteRoomMembership (new) Link ¶

Removes a member from a chat room.

See also: AWS API Documentation

Request Syntax

client.delete_room_membership(
    AccountId='string',
    RoomId='string',
    MemberId='string'
)
type AccountId

string

param AccountId

[REQUIRED]

The Amazon Chime account ID.

type RoomId

string

param RoomId

[REQUIRED]

The room ID.

type MemberId

string

param MemberId

[REQUIRED]

The member ID (user ID or bot ID).

returns

None