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

**********************
create_room_membership
**********************



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


  **Request Syntax**
  ::

    response = 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.

          
    
  
  **Exceptions**
  
  *   :py:class:`Chime.Client.exceptions.ConflictException`

  
  *   :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.ResourceLimitExceededException`

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

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

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

  