:doc:`Chime <../../chime>` / Client / batch_create_room_membership

****************************
batch_create_room_membership
****************************



.. py:method:: Chime.Client.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 <https://docs.aws.amazon.com/goto/WebAPI/chime-2018-05-01/BatchCreateRoomMembership>`_  


  **Request Syntax**
  ::

    response = 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'|'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**
  
  *   :py:class:`Chime.Client.exceptions.UnauthorizedClientException`

  
  *   :py:class:`Chime.Client.exceptions.NotFoundException`

  
  *   :py:class:`Chime.Client.exceptions.BadRequestException`

  
  *   :py:class:`Chime.Client.exceptions.ForbiddenException`

  
  *   :py:class:`Chime.Client.exceptions.ThrottledClientException`

  
  *   :py:class:`Chime.Client.exceptions.ServiceUnavailableException`

  
  *   :py:class:`Chime.Client.exceptions.ServiceFailureException`

  