:doc:`PinpointSMSVoiceV2 <../../pinpoint-sms-voice-v2>` / Client / delete_opted_out_number

***********************
delete_opted_out_number
***********************



.. py:method:: PinpointSMSVoiceV2.Client.delete_opted_out_number(**kwargs)

  

  Deletes an existing opted out destination phone number from the specified opt-out list.

   

  Each destination phone number can only be deleted once every 30 days.

   

  If the specified destination phone number doesn't exist or if the opt-out list doesn't exist, an error is returned.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/pinpoint-sms-voice-v2-2022-03-31/DeleteOptedOutNumber>`_  


  **Request Syntax**
  ::

    response = client.delete_opted_out_number(
        OptOutListName='string',
        OptedOutNumber='string'
    )
    
  :type OptOutListName: string
  :param OptOutListName: **[REQUIRED]** 

    The OptOutListName or OptOutListArn to remove the phone number from.

     

    .. warning::

       

      If you are using a shared End User Messaging SMS resource then you must use the full Amazon Resource Name(ARN).

      

    

  
  :type OptedOutNumber: string
  :param OptedOutNumber: **[REQUIRED]** 

    The phone number, in E.164 format, to remove from the OptOutList.

    

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

    
    ::

      {
          'OptOutListArn': 'string',
          'OptOutListName': 'string',
          'OptedOutNumber': 'string',
          'OptedOutTimestamp': datetime(2015, 1, 1),
          'EndUserOptedOut': True|False
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **OptOutListArn** *(string) --* 

        The OptOutListArn that the phone number was removed from.

        
      

      - **OptOutListName** *(string) --* 

        The OptOutListName that the phone number was removed from.

        
      

      - **OptedOutNumber** *(string) --* 

        The phone number that was removed from the OptOutList.

        
      

      - **OptedOutTimestamp** *(datetime) --* 

        The time that the number was removed at, in `UNIX epoch time <https://www.epochconverter.com/>`__ format.

        
      

      - **EndUserOptedOut** *(boolean) --* 

        This is true if it was the end user who requested their phone number be removed.

        
  
  **Exceptions**
  
  *   :py:class:`PinpointSMSVoiceV2.Client.exceptions.ThrottlingException`

  
  *   :py:class:`PinpointSMSVoiceV2.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`PinpointSMSVoiceV2.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`PinpointSMSVoiceV2.Client.exceptions.ValidationException`

  
  *   :py:class:`PinpointSMSVoiceV2.Client.exceptions.ConflictException`

  
  *   :py:class:`PinpointSMSVoiceV2.Client.exceptions.InternalServerException`

  