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

******************
batch_suspend_user
******************



.. py:method:: Chime.Client.batch_suspend_user(**kwargs)

  

  Suspends up to 50 users from a ``Team`` or ``EnterpriseLWA`` Amazon Chime account. For more information about different account types, see `Managing Your Amazon Chime Accounts <https://docs.aws.amazon.com/chime/latest/ag/manage-chime-account.html>`__ in the *Amazon Chime Administration Guide*.

   

  Users suspended from a ``Team`` account are disassociated from the account,but they can continue to use Amazon Chime as free users. To remove the suspension from suspended ``Team`` account users, invite them to the ``Team`` account again. You can use the  InviteUsers action to do so.

   

  Users suspended from an ``EnterpriseLWA`` account are immediately signed out of Amazon Chime and can no longer sign in. To remove the suspension from suspended ``EnterpriseLWA`` account users, use the  BatchUnsuspendUser action.

   

  To sign out users without suspending them, use the  LogoutUser action.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/chime-2018-05-01/BatchSuspendUser>`_  


  **Request Syntax**
  ::

    response = client.batch_suspend_user(
        AccountId='string',
        UserIdList=[
            'string',
        ]
    )
    
  :type AccountId: string
  :param AccountId: **[REQUIRED]** 

    The Amazon Chime account ID.

    

  
  :type UserIdList: list
  :param UserIdList: **[REQUIRED]** 

    The request containing the user IDs to suspend.

    

  
    - *(string) --* 

    

  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'UserErrors': [
              {
                  'UserId': 'string',
                  'ErrorCode': 'BadRequest'|'Conflict'|'Forbidden'|'NotFound'|'PreconditionFailed'|'ResourceLimitExceeded'|'ServiceFailure'|'AccessDenied'|'ServiceUnavailable'|'Throttled'|'Throttling'|'Unauthorized'|'Unprocessable'|'VoiceConnectorGroupAssociationsExist'|'PhoneNumberAssociationsExist',
                  'ErrorMessage': 'string'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **UserErrors** *(list) --* 

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

        
        

        - *(dict) --* 

          The list of errors returned when errors are encountered during the  BatchSuspendUser,  BatchUnsuspendUser, or  BatchUpdateUser actions. This includes user IDs, error codes, and error messages.

          
          

          - **UserId** *(string) --* 

            The user ID for which the action failed.

            
          

          - **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.ForbiddenException`

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

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

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

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

  