describe_opted_out_numbers
(**kwargs)¶Describes the specified opted out destination numbers or all opted out destination numbers in an opt-out list.
If you specify opted out numbers, the output includes information for only the specified opted out numbers. If you specify filters, the output includes information for only those opted out numbers that meet the filter criteria. If you don't specify opted out numbers or filters, the output includes information for all opted out destination numbers in your opt-out list.
If you specify an opted out number that isn't valid, an Error is returned.
See also: AWS API Documentation
Request Syntax
response = client.describe_opted_out_numbers(
OptOutListName='string',
OptedOutNumbers=[
'string',
],
Filters=[
{
'Name': 'end-user-opted-out',
'Values': [
'string',
]
},
],
NextToken='string',
MaxResults=123
)
[REQUIRED]
The OptOutListName or OptOutListArn of the OptOutList. You can use DescribeOptOutLists to find the values for OptOutListName and OptOutListArn.
An array of phone numbers to search for in the OptOutList.
An array of OptedOutFilter objects to filter the results on.
The information for opted out numbers that meet a specified criteria.
The name of the attribute to filter on.
An array of values to filter for.
dict
Response Syntax
{
'OptOutListArn': 'string',
'OptOutListName': 'string',
'OptedOutNumbers': [
{
'OptedOutNumber': 'string',
'OptedOutTimestamp': datetime(2015, 1, 1),
'EndUserOptedOut': True|False
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
OptOutListArn (string) --
The Amazon Resource Name (ARN) of the OptOutList.
OptOutListName (string) --
The name of the OptOutList.
OptedOutNumbers (list) --
An array of OptedOutNumbersInformation objects that provide information about the requested OptedOutNumbers.
(dict) --
The information for an opted out number in an Amazon Web Services account.
OptedOutNumber (string) --
The phone number that is opted out.
OptedOutTimestamp (datetime) --
The time that the op tout occurred, in UNIX epoch time format.
EndUserOptedOut (boolean) --
This is set to true if it was the end recipient that opted out.
NextToken (string) --
The token to be used for the next set of paginated results. If this field is empty then there are no more results.
Exceptions
PinpointSMSVoiceV2.Client.exceptions.ThrottlingException
PinpointSMSVoiceV2.Client.exceptions.AccessDeniedException
PinpointSMSVoiceV2.Client.exceptions.ResourceNotFoundException
PinpointSMSVoiceV2.Client.exceptions.ValidationException
PinpointSMSVoiceV2.Client.exceptions.InternalServerException