SNSClient.list_phone_numbers_opted_out
rboto-sns==0.4.0 · Service index · Types
Model summary (excerpt): 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...
Install and imports
Signature
async def list_phone_numbers_opted_out(
*,
next_token: str | None = None,
) -> ListPhoneNumbersOptedOutOutput: ...
Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.
Arguments
| Argument | Required | Model notes (excerpt) |
|---|---|---|
next_token |
No | 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.
Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.
| Field | Type | Presence | References |
|---|---|---|---|
phone_numbers |
list[str] | None |
Always present | — |
next_token |
str | None |
Always present | — |
| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.
Related types
ListPhoneNumbersOptedOutOutput
Follow these links for nested inputs and outputs; recursive types link back to the same type page.
Pagination and streaming
client.paginators.list_phone_numbers_opted_out(...) accepts the same arguments and returns AsyncIterator[ListPhoneNumbersOptedOutOutput]. Direct calls return one page. Pages preserve the Output representation above.
Input cursors: next_token. Page-size argument: not exposed.
No output stream.
Errors
Import from rboto_sns.exceptions:
AuthorizationError, InternalError, InvalidParameterError, ThrottledError.
Other service failures use the service base error; credential, transport and timeout failures use shared errors.