:doc:`ChimeSDKVoice <../../chime-sdk-voice>` / Client / batch_update_phone_number

*************************
batch_update_phone_number
*************************



.. py:method:: ChimeSDKVoice.Client.batch_update_phone_number(**kwargs)

  

  Updates phone number product types, calling names, or phone number names. You can update one attribute at a time for each ``UpdatePhoneNumberRequestItem``. For example, you can update the product type, the calling name, or phone name.

   

  .. note::

    

    You cannot have a duplicate ``phoneNumberId`` in a request.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-voice-2022-08-03/BatchUpdatePhoneNumber>`_  


  **Request Syntax**
  ::

    response = client.batch_update_phone_number(
        UpdatePhoneNumberRequestItems=[
            {
                'PhoneNumberId': 'string',
                'ProductType': 'VoiceConnector'|'SipMediaApplicationDialIn',
                'CallingName': 'string',
                'Name': 'string'
            },
        ]
    )
    
  :type UpdatePhoneNumberRequestItems: list
  :param UpdatePhoneNumberRequestItems: **[REQUIRED]** 

    Lists the phone numbers in the update request.

    

  
    - *(dict) --* 

      The phone number ID, product type, or calling name fields to update, used with the  BatchUpdatePhoneNumber and  UpdatePhoneNumber actions.

      

    
      - **PhoneNumberId** *(string) --* **[REQUIRED]** 

        The phone number ID to update.

        

      
      - **ProductType** *(string) --* 

        The product type to update.

        

      
      - **CallingName** *(string) --* 

        The outbound calling name to update.

        

      
      - **Name** *(string) --* 

        The name of the phone number.

        

      
    

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

    
    ::

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

    

    - *(dict) --* 
      

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

        A list of failed phone numbers and their error messages.

        
        

        - *(dict) --* 

          If a phone number action fails for one or more of the phone numbers in a request, a list of the failed 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:`ChimeSDKVoice.Client.exceptions.UnauthorizedClientException`

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

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

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

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

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

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

  