Skip to content

Sns  >  Operations  >  list_phone_numbers_opted_out

list_phone_numbers_opted_out

Operation

list_phone_numbers_opted_out async

list_phone_numbers_opted_out(input: ListPhoneNumbersOptedOutInput, plugins: list[Plugin] | None = None) -> ListPhoneNumbersOptedOutOutput

Returns a list of phone numbers that are opted out, meaning you cannot send SMS messages to them.

The results for ListPhoneNumbersOptedOut are paginated, and each page returns up to 100 phone numbers. If additional phone numbers are available after the first page of results, then a NextToken string will be returned. To receive the next page, you call ListPhoneNumbersOptedOut again using the NextToken string received from the previous call. When there are no more records to return, NextToken will be null.

Parameters:

Name Type Description Default
input ListPhoneNumbersOptedOutInput

An instance of ListPhoneNumbersOptedOutInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
ListPhoneNumbersOptedOutOutput

An instance of ListPhoneNumbersOptedOutOutput.

Input

ListPhoneNumbersOptedOutInput dataclass

The input for the ListPhoneNumbersOptedOut action.

Attributes

next_token class-attribute instance-attribute
next_token: str | None = None

A NextToken string is used when you call the ListPhoneNumbersOptedOut action to retrieve additional records that are available after the first page of results.

Output

ListPhoneNumbersOptedOutOutput dataclass

The response from the ListPhoneNumbersOptedOut action.

Attributes

next_token class-attribute instance-attribute
next_token: str | None = None

A NextToken string is returned when you call the ListPhoneNumbersOptedOut action if additional records are available after the first page of results.

phone_numbers class-attribute instance-attribute
phone_numbers: list[str] | None = None

A list of phone numbers that are opted out of receiving SMS messages. The list is paginated, and each page can contain up to 100 phone numbers.