PinpointSMSVoiceV2 / Client / describe_opted_out_numbers

describe_opted_out_numbers#

PinpointSMSVoiceV2.Client.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
)
Parameters:
  • OptOutListName (string) –

    [REQUIRED]

    The OptOutListName or OptOutListArn of the OptOutList. You can use DescribeOptOutLists to find the values for OptOutListName and OptOutListArn.

  • OptedOutNumbers (list) –

    An array of phone numbers to search for in the OptOutList.

    • (string) –

  • Filters (list) –

    An array of OptedOutFilter objects to filter the results on.

    • (dict) –

      The information for opted out numbers that meet a specified criteria.

      • Name (string) – [REQUIRED]

        The name of the attribute to filter on.

      • Values (list) – [REQUIRED]

        An array of values to filter for.

        • (string) –

  • NextToken (string) – The token to be used for the next set of paginated results. You don’t need to supply a value for this field in the initial request.

  • MaxResults (integer) – The maximum number of results to return per each request.

Return type:

dict

Returns:

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