batch_create_room_membership

batch_create_room_membership(**kwargs)

Adds up to 50 members to a chat room in an Amazon Chime Enterprise account. Members can be 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

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

    [REQUIRED]

    The Amazon Chime account ID.

  • RoomId (string) --

    [REQUIRED]

    The room ID.

  • MembershipItemList (list) --

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

Return type

dict

Returns

Response Syntax

{
    'Errors': [
        {
            'MemberId': 'string',
            'ErrorCode': 'BadRequest'|'Conflict'|'Forbidden'|'NotFound'|'PreconditionFailed'|'ResourceLimitExceeded'|'ServiceFailure'|'AccessDenied'|'ServiceUnavailable'|'Throttled'|'Throttling'|'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.

Exceptions

  • Chime.Client.exceptions.UnauthorizedClientException
  • Chime.Client.exceptions.NotFoundException
  • Chime.Client.exceptions.BadRequestException
  • Chime.Client.exceptions.ForbiddenException
  • Chime.Client.exceptions.ThrottledClientException
  • Chime.Client.exceptions.ServiceUnavailableException
  • Chime.Client.exceptions.ServiceFailureException