PinpointSMSVoiceV2 / Client / put_opted_out_number
put_opted_out_number#
- PinpointSMSVoiceV2.Client.put_opted_out_number(**kwargs)#
Creates an opted out destination phone number in the opt-out list.
If the destination phone number isn’t valid or if the specified opt-out list doesn’t exist, an error is returned.
See also: AWS API Documentation
Request Syntax
response = client.put_opted_out_number( OptOutListName='string', OptedOutNumber='string' )
- Parameters:
OptOutListName (string) –
[REQUIRED]
The OptOutListName or OptOutListArn to add the phone number to.
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 to add to the OptOutList in E.164 format.
- 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 added to the OptOutList.
OptedOutTimestamp (datetime) –
The time that the phone number was added to the OptOutList, 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.InternalServerException