Skip to content

get_sms_attributes

get_sms_attributes(
    *,
    config_overrides: Optional[SNSClientConfig] = None,
    attributes: Optional[ListString] = None,
) -> GetSMSAttributesResponse

Returns the settings for sending SMS messages from your Amazon Web Services account.

These settings are set with the SetSMSAttributes action.

Parameters:

  • attributes (Optional[ListString], default: None ) –

    A list of the individual attribute names, such as MonthlySpendLimit, for which you want values.

    For all attribute names, see SetSMSAttributes.

    If you don't use this parameter, Amazon SNS returns all SMS attributes.

Raises:

Source code in docs_src/capo_sns/_services/sns.py
def get_sms_attributes(
    self,
    *,
    config_overrides: Optional[SNSClientConfig] = None,
    attributes: Optional["capo_sns.types.list_string.ListString"] = None,
) -> "capo_sns.types.get_sms_attributes_response.GetSMSAttributesResponse":
    """<p>Returns the settings for sending SMS messages from your Amazon Web Services account.</p> <p>These settings are set with the <code>SetSMSAttributes</code> action.</p>

    Args:
        attributes: <p>A list of the individual attribute names, such as <code>MonthlySpendLimit</code>, for which you want values.</p> <p>For all attribute names, see <a href="https://docs.aws.amazon.com/sns/latest/api/API_SetSMSAttributes.html">SetSMSAttributes</a>.</p> <p>If you don't use this parameter, Amazon SNS returns all SMS attributes.</p>

    Raises:
        capo_sns.errors.authorization_error_exception.AuthorizationErrorException: <p>Indicates that the user has been denied access to the requested resource.</p>
        capo_sns.errors.internal_error_exception.InternalErrorException: <p>Indicates an internal service error.</p>
        capo_sns.errors.invalid_parameter_exception.InvalidParameterException: <p>Indicates that a request parameter does not comply with the associated constraints.</p>
        capo_sns.errors.throttled_exception.ThrottledException: <p>Indicates that the rate at which requests have been submitted for this action exceeds the limit for your Amazon Web Services account.</p>
        capo_sns.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_sns.types.get_sms_attributes_input.GetSMSAttributesInput]",
    ) -> OperationResponse[
        "capo_sns.types.get_sms_attributes_response.GetSMSAttributesResponse"
    ]:
        import capo_sns._operations.amazon_simple_notification_service.get_sms_attributes

        output, http_response = (
            capo_sns._operations.amazon_simple_notification_service.get_sms_attributes.get_sms_attributes(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetSMSAttributes")
    )
    input_: capo_sns.types.get_sms_attributes_input.GetSMSAttributesInput = {}
    if attributes is not None:
        input_["attributes"] = attributes

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output