SNSClient.check_if_phone_number_is_opted_out
rboto-sns==0.4.0 · Service index · Types
Model summary (excerpt): Accepts a phone number and indicates whether the phone holder has opted out of receiving SMS messages from your Amazon Web Services account. You cannot send SMS messages to a number that is opted out. To resume sending messages, you can opt in the number by using the OptInPhoneNumber action.
Install and imports
Signature
async def check_if_phone_number_is_opted_out(
*,
phone_number: str,
) -> CheckIfPhoneNumberIsOptedOutOutput: ...
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) |
|---|---|---|
phone_number |
Yes | The phone number for which you want to check the opt out status. |
Output
CheckIfPhoneNumberIsOptedOutOutput.
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 |
|---|---|---|---|
is_opted_out |
bool |
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
CheckIfPhoneNumberIsOptedOutOutput
Follow these links for nested inputs and outputs; recursive types link back to the same type page.
Pagination and streaming
No generated paginator for this operation.
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.