PinpointSMSVoiceV2 / Client / delete_opted_out_number

delete_opted_out_number#

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

Request Syntax

response = client.delete_opted_out_number(
    OptOutListName='string',
    OptedOutNumber='string'
)
Parameters:
  • OptOutListName (string) –

    [REQUIRED]

    The OptOutListName or OptOutListArn to remove the phone number from.

    Warning

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

  • OptedOutNumber (string) –

    [REQUIRED]

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

Return type:

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 format.

    • EndUserOptedOut (boolean) –

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

Exceptions

  • PinpointSMSVoiceV2.Client.exceptions.ThrottlingException

  • PinpointSMSVoiceV2.Client.exceptions.AccessDeniedException

  • PinpointSMSVoiceV2.Client.exceptions.ResourceNotFoundException

  • PinpointSMSVoiceV2.Client.exceptions.ValidationException

  • PinpointSMSVoiceV2.Client.exceptions.ConflictException

  • PinpointSMSVoiceV2.Client.exceptions.InternalServerException