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

*************************
batch_delete_phone_number
*************************



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

  

  Moves phone numbers into the **Deletion queue**. Phone numbers must be disassociated from any users or Amazon Chime Voice Connectors before they can be deleted.

   

  Phone numbers remain in the **Deletion queue** for 7 days before they are deleted permanently.

  

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


  **Request Syntax**
  ::

    response = client.batch_delete_phone_number(
        PhoneNumberIds=[
            'string',
        ]
    )
    
  :type PhoneNumberIds: list
  :param PhoneNumberIds: **[REQUIRED]** 

    List of phone number IDs.

    

  
    - *(string) --* 

    

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

    
    ::

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

    

    - *(dict) --* 
      

      - **PhoneNumberErrors** *(list) --* 

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

        
        

        - *(dict) --* 

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

          
          

          - **PhoneNumberId** *(string) --* 

            The phone number 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`

  