- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
SetSMSAttributesCommand
Use this request to set the default settings for sending SMS messages and receiving daily SMS usage reports.
You can override some of these settings for a single message when you use the Publish
action with the MessageAttributes.entry.N
parameter. For more information, see Publishing to a mobile phone in the Amazon SNS Developer Guide.
To use this operation, you must grant the Amazon SNS service principal (sns.amazonaws.com
) permission to perform the s3:ListBucket
action.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { SNSClient, SetSMSAttributesCommand } from "@aws-sdk/client-sns"; // ES Modules import
// const { SNSClient, SetSMSAttributesCommand } = require("@aws-sdk/client-sns"); // CommonJS import
const client = new SNSClient(config);
const input = { // SetSMSAttributesInput
attributes: { // MapStringToString // required
"<keys>": "STRING_VALUE",
},
};
const command = new SetSMSAttributesCommand(input);
const response = await client.send(command);
// {};
SetSMSAttributesCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
attributes Required | Record<string, string> | undefined | The default settings for sending SMS messages from your Amazon Web Services account. You can set values for the following attribute names: Amazon SNS stops sending SMS messages within minutes of the limit being crossed. During that interval, if you continue to send SMS messages, you will incur costs that exceed your limit. By default, the spend limit is set to the maximum allowed by Amazon SNS. If you want to raise the limit, submit an SNS Limit Increase case . For New limit value, enter your desired monthly spend limit. In the Use Case Description field, explain that you are requesting an SMS monthly spend limit increase.
To receive the report, the bucket must have a policy that allows the Amazon SNS service principal to perform the For an example bucket policy and usage report, see Monitoring SMS Activity in the Amazon SNS Developer Guide. |
SetSMSAttributesCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AuthorizationErrorException | client | Indicates that the user has been denied access to the requested resource. |
InternalErrorException | server | Indicates an internal service error. |
InvalidParameterException | client | Indicates that a request parameter does not comply with the associated constraints. |
ThrottledException | client | Indicates that the rate at which requests have been submitted for this action exceeds the limit for your Amazon Web Services account. |
SNSServiceException | Base exception class for all service exceptions from SNS service. |