Skip to content

list_phone_numbers_opted_out

Operation

list_phone_numbers_opted_out

list_phone_numbers_opted_out(request: ListPhoneNumbersOptedOutInput | ListPhoneNumbersOptedOutInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[ListPhoneNumbersOptedOutInputDict]) -> 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
request ListPhoneNumbersOptedOutInput | ListPhoneNumbersOptedOutInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
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
**kwargs Unpack[ListPhoneNumbersOptedOutInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
ListPhoneNumbersOptedOutOutput

An instance of ListPhoneNumbersOptedOutOutput.

list_phone_numbers_opted_out async

list_phone_numbers_opted_out(request: ListPhoneNumbersOptedOutInput | ListPhoneNumbersOptedOutInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[ListPhoneNumbersOptedOutInputDict]) -> 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
request ListPhoneNumbersOptedOutInput | ListPhoneNumbersOptedOutInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
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
**kwargs Unpack[ListPhoneNumbersOptedOutInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
ListPhoneNumbersOptedOutOutput

An instance of ListPhoneNumbersOptedOutOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

ListPhoneNumbersOptedOutInputDict

Bases: TypedDict

Dictionary form of ListPhoneNumbersOptedOutInput.

Attributes

next_token instance-attribute
next_token: str | 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.

ListPhoneNumbersOptedOutInput dataclass

Bases: _SerdeShape

The input for the ListPhoneNumbersOptedOut action.

Attributes

next_token class-attribute instance-attribute
next_token: str | 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

Bases: _SerdeShape

The response from the ListPhoneNumbersOptedOut action.

Attributes

next_token class-attribute instance-attribute
next_token: str | 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 = ...

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.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.