public class SetSMSAttributesRequest extends AmazonWebServiceRequest implements java.io.Serializable
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.
Constructor and Description |
---|
SetSMSAttributesRequest() |
Modifier and Type | Method and Description |
---|---|
SetSMSAttributesRequest |
addattributesEntry(java.lang.String key,
java.lang.String value)
The default settings for sending SMS messages from your account.
|
SetSMSAttributesRequest |
clearattributesEntries()
Removes all the entries added into attributes.
|
boolean |
equals(java.lang.Object obj) |
java.util.Map<java.lang.String,java.lang.String> |
getAttributes()
The default settings for sending SMS messages from your account.
|
int |
hashCode() |
void |
setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
The default settings for sending SMS messages from your account.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
SetSMSAttributesRequest |
withAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
The default settings for sending SMS messages from your account.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public java.util.Map<java.lang.String,java.lang.String> getAttributes()
The default settings for sending SMS messages from your account. You can set values for the following attribute names:
MonthlySpendLimit
– The maximum amount in USD that you are
willing to spend each month to send SMS messages. When Amazon SNS
determines that sending an SMS message would incur a cost that exceeds
this limit, it stops sending SMS messages within minutes.
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.
DeliveryStatusIAMRole
– The ARN of the IAM role that allows
Amazon SNS to write logs about SMS deliveries in CloudWatch Logs. For
each SMS message that you send, Amazon SNS writes a log that includes the
message price, the success or failure status, the reason for failure (if
the message failed), the message dwell time, and other information.
DeliveryStatusSuccessSamplingRate
– The percentage of
successful SMS deliveries for which Amazon SNS will write logs in
CloudWatch Logs. The value can be an integer from 0 - 100. For example,
to write logs only for failed deliveries, set this value to
0
. To write logs for 10% of your successful deliveries, set
it to 10
.
DefaultSenderID
– A string, such as your business brand,
that is displayed as the sender on the receiving device. Support for
sender IDs varies by country. The sender ID can be 1 - 11 alphanumeric
characters, and it must contain at least one letter.
DefaultSMSType
– The type of SMS message that you will send
by default. You can assign the following values:
Promotional
– (Default) Noncritical messages, such as
marketing messages. Amazon SNS optimizes the message delivery to incur
the lowest cost.
Transactional
– Critical messages that support customer
transactions, such as one-time passcodes for multi-factor authentication.
Amazon SNS optimizes the message delivery to achieve the highest
reliability.
UsageReportS3Bucket
– The name of the Amazon S3 bucket to
receive daily SMS usage reports from Amazon SNS. Each day, Amazon SNS
will deliver a usage report as a CSV file to the bucket. The report
includes the following information for each SMS message that was
successfully delivered by your account:
Time that the message was published (in UTC)
Message ID
Destination phone number
Message type
Delivery status
Message price (in USD)
Part number (a message is split into multiple parts if it is too long for a single message)
Total number of parts
To receive the report, the bucket must have a policy that allows the
Amazon SNS service principle to perform the s3:PutObject
and
s3:GetBucketLocation
actions.
For an example bucket policy and usage report, see Monitoring SMS Activity in the Amazon SNS Developer Guide.
The default settings for sending SMS messages from your account. You can set values for the following attribute names:
MonthlySpendLimit
– The maximum amount in USD that
you are willing to spend each month to send SMS messages. When
Amazon SNS determines that sending an SMS message would incur a
cost that exceeds this limit, it stops sending SMS messages
within minutes.
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.
DeliveryStatusIAMRole
– The ARN of the IAM role that
allows Amazon SNS to write logs about SMS deliveries in
CloudWatch Logs. For each SMS message that you send, Amazon SNS
writes a log that includes the message price, the success or
failure status, the reason for failure (if the message failed),
the message dwell time, and other information.
DeliveryStatusSuccessSamplingRate
– The percentage
of successful SMS deliveries for which Amazon SNS will write logs
in CloudWatch Logs. The value can be an integer from 0 - 100. For
example, to write logs only for failed deliveries, set this value
to 0
. To write logs for 10% of your successful
deliveries, set it to 10
.
DefaultSenderID
– A string, such as your business
brand, that is displayed as the sender on the receiving device.
Support for sender IDs varies by country. The sender ID can be 1
- 11 alphanumeric characters, and it must contain at least one
letter.
DefaultSMSType
– The type of SMS message that you
will send by default. You can assign the following values:
Promotional
– (Default) Noncritical messages, such
as marketing messages. Amazon SNS optimizes the message delivery
to incur the lowest cost.
Transactional
– Critical messages that support
customer transactions, such as one-time passcodes for
multi-factor authentication. Amazon SNS optimizes the message
delivery to achieve the highest reliability.
UsageReportS3Bucket
– The name of the Amazon S3
bucket to receive daily SMS usage reports from Amazon SNS. Each
day, Amazon SNS will deliver a usage report as a CSV file to the
bucket. The report includes the following information for each
SMS message that was successfully delivered by your account:
Time that the message was published (in UTC)
Message ID
Destination phone number
Message type
Delivery status
Message price (in USD)
Part number (a message is split into multiple parts if it is too long for a single message)
Total number of parts
To receive the report, the bucket must have a policy that allows
the Amazon SNS service principle to perform the
s3:PutObject
and s3:GetBucketLocation
actions.
For an example bucket policy and usage report, see Monitoring SMS Activity in the Amazon SNS Developer Guide.
public void setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
The default settings for sending SMS messages from your account. You can set values for the following attribute names:
MonthlySpendLimit
– The maximum amount in USD that you are
willing to spend each month to send SMS messages. When Amazon SNS
determines that sending an SMS message would incur a cost that exceeds
this limit, it stops sending SMS messages within minutes.
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.
DeliveryStatusIAMRole
– The ARN of the IAM role that allows
Amazon SNS to write logs about SMS deliveries in CloudWatch Logs. For
each SMS message that you send, Amazon SNS writes a log that includes the
message price, the success or failure status, the reason for failure (if
the message failed), the message dwell time, and other information.
DeliveryStatusSuccessSamplingRate
– The percentage of
successful SMS deliveries for which Amazon SNS will write logs in
CloudWatch Logs. The value can be an integer from 0 - 100. For example,
to write logs only for failed deliveries, set this value to
0
. To write logs for 10% of your successful deliveries, set
it to 10
.
DefaultSenderID
– A string, such as your business brand,
that is displayed as the sender on the receiving device. Support for
sender IDs varies by country. The sender ID can be 1 - 11 alphanumeric
characters, and it must contain at least one letter.
DefaultSMSType
– The type of SMS message that you will send
by default. You can assign the following values:
Promotional
– (Default) Noncritical messages, such as
marketing messages. Amazon SNS optimizes the message delivery to incur
the lowest cost.
Transactional
– Critical messages that support customer
transactions, such as one-time passcodes for multi-factor authentication.
Amazon SNS optimizes the message delivery to achieve the highest
reliability.
UsageReportS3Bucket
– The name of the Amazon S3 bucket to
receive daily SMS usage reports from Amazon SNS. Each day, Amazon SNS
will deliver a usage report as a CSV file to the bucket. The report
includes the following information for each SMS message that was
successfully delivered by your account:
Time that the message was published (in UTC)
Message ID
Destination phone number
Message type
Delivery status
Message price (in USD)
Part number (a message is split into multiple parts if it is too long for a single message)
Total number of parts
To receive the report, the bucket must have a policy that allows the
Amazon SNS service principle to perform the s3:PutObject
and
s3:GetBucketLocation
actions.
For an example bucket policy and usage report, see Monitoring SMS Activity in the Amazon SNS Developer Guide.
attributes
- The default settings for sending SMS messages from your account. You can set values for the following attribute names:
MonthlySpendLimit
– The maximum amount in USD
that you are willing to spend each month to send SMS messages.
When Amazon SNS determines that sending an SMS message would
incur a cost that exceeds this limit, it stops sending SMS
messages within minutes.
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.
DeliveryStatusIAMRole
– The ARN of the IAM role
that allows Amazon SNS to write logs about SMS deliveries in
CloudWatch Logs. For each SMS message that you send, Amazon
SNS writes a log that includes the message price, the success
or failure status, the reason for failure (if the message
failed), the message dwell time, and other information.
DeliveryStatusSuccessSamplingRate
– The
percentage of successful SMS deliveries for which Amazon SNS
will write logs in CloudWatch Logs. The value can be an
integer from 0 - 100. For example, to write logs only for
failed deliveries, set this value to 0
. To write
logs for 10% of your successful deliveries, set it to
10
.
DefaultSenderID
– A string, such as your business
brand, that is displayed as the sender on the receiving
device. Support for sender IDs varies by country. The sender
ID can be 1 - 11 alphanumeric characters, and it must contain
at least one letter.
DefaultSMSType
– The type of SMS message that you
will send by default. You can assign the following values:
Promotional
– (Default) Noncritical messages,
such as marketing messages. Amazon SNS optimizes the message
delivery to incur the lowest cost.
Transactional
– Critical messages that support
customer transactions, such as one-time passcodes for
multi-factor authentication. Amazon SNS optimizes the message
delivery to achieve the highest reliability.
UsageReportS3Bucket
– The name of the Amazon S3
bucket to receive daily SMS usage reports from Amazon SNS.
Each day, Amazon SNS will deliver a usage report as a CSV file
to the bucket. The report includes the following information
for each SMS message that was successfully delivered by your
account:
Time that the message was published (in UTC)
Message ID
Destination phone number
Message type
Delivery status
Message price (in USD)
Part number (a message is split into multiple parts if it is too long for a single message)
Total number of parts
To receive the report, the bucket must have a policy that
allows the Amazon SNS service principle to perform the
s3:PutObject
and
s3:GetBucketLocation
actions.
For an example bucket policy and usage report, see Monitoring SMS Activity in the Amazon SNS Developer Guide.
public SetSMSAttributesRequest withAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
The default settings for sending SMS messages from your account. You can set values for the following attribute names:
MonthlySpendLimit
– The maximum amount in USD that you are
willing to spend each month to send SMS messages. When Amazon SNS
determines that sending an SMS message would incur a cost that exceeds
this limit, it stops sending SMS messages within minutes.
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.
DeliveryStatusIAMRole
– The ARN of the IAM role that allows
Amazon SNS to write logs about SMS deliveries in CloudWatch Logs. For
each SMS message that you send, Amazon SNS writes a log that includes the
message price, the success or failure status, the reason for failure (if
the message failed), the message dwell time, and other information.
DeliveryStatusSuccessSamplingRate
– The percentage of
successful SMS deliveries for which Amazon SNS will write logs in
CloudWatch Logs. The value can be an integer from 0 - 100. For example,
to write logs only for failed deliveries, set this value to
0
. To write logs for 10% of your successful deliveries, set
it to 10
.
DefaultSenderID
– A string, such as your business brand,
that is displayed as the sender on the receiving device. Support for
sender IDs varies by country. The sender ID can be 1 - 11 alphanumeric
characters, and it must contain at least one letter.
DefaultSMSType
– The type of SMS message that you will send
by default. You can assign the following values:
Promotional
– (Default) Noncritical messages, such as
marketing messages. Amazon SNS optimizes the message delivery to incur
the lowest cost.
Transactional
– Critical messages that support customer
transactions, such as one-time passcodes for multi-factor authentication.
Amazon SNS optimizes the message delivery to achieve the highest
reliability.
UsageReportS3Bucket
– The name of the Amazon S3 bucket to
receive daily SMS usage reports from Amazon SNS. Each day, Amazon SNS
will deliver a usage report as a CSV file to the bucket. The report
includes the following information for each SMS message that was
successfully delivered by your account:
Time that the message was published (in UTC)
Message ID
Destination phone number
Message type
Delivery status
Message price (in USD)
Part number (a message is split into multiple parts if it is too long for a single message)
Total number of parts
To receive the report, the bucket must have a policy that allows the
Amazon SNS service principle to perform the s3:PutObject
and
s3:GetBucketLocation
actions.
For an example bucket policy and usage report, see Monitoring SMS Activity in the Amazon SNS Developer Guide.
Returns a reference to this object so that method calls can be chained together.
attributes
- The default settings for sending SMS messages from your account. You can set values for the following attribute names:
MonthlySpendLimit
– The maximum amount in USD
that you are willing to spend each month to send SMS messages.
When Amazon SNS determines that sending an SMS message would
incur a cost that exceeds this limit, it stops sending SMS
messages within minutes.
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.
DeliveryStatusIAMRole
– The ARN of the IAM role
that allows Amazon SNS to write logs about SMS deliveries in
CloudWatch Logs. For each SMS message that you send, Amazon
SNS writes a log that includes the message price, the success
or failure status, the reason for failure (if the message
failed), the message dwell time, and other information.
DeliveryStatusSuccessSamplingRate
– The
percentage of successful SMS deliveries for which Amazon SNS
will write logs in CloudWatch Logs. The value can be an
integer from 0 - 100. For example, to write logs only for
failed deliveries, set this value to 0
. To write
logs for 10% of your successful deliveries, set it to
10
.
DefaultSenderID
– A string, such as your business
brand, that is displayed as the sender on the receiving
device. Support for sender IDs varies by country. The sender
ID can be 1 - 11 alphanumeric characters, and it must contain
at least one letter.
DefaultSMSType
– The type of SMS message that you
will send by default. You can assign the following values:
Promotional
– (Default) Noncritical messages,
such as marketing messages. Amazon SNS optimizes the message
delivery to incur the lowest cost.
Transactional
– Critical messages that support
customer transactions, such as one-time passcodes for
multi-factor authentication. Amazon SNS optimizes the message
delivery to achieve the highest reliability.
UsageReportS3Bucket
– The name of the Amazon S3
bucket to receive daily SMS usage reports from Amazon SNS.
Each day, Amazon SNS will deliver a usage report as a CSV file
to the bucket. The report includes the following information
for each SMS message that was successfully delivered by your
account:
Time that the message was published (in UTC)
Message ID
Destination phone number
Message type
Delivery status
Message price (in USD)
Part number (a message is split into multiple parts if it is too long for a single message)
Total number of parts
To receive the report, the bucket must have a policy that
allows the Amazon SNS service principle to perform the
s3:PutObject
and
s3:GetBucketLocation
actions.
For an example bucket policy and usage report, see Monitoring SMS Activity in the Amazon SNS Developer Guide.
public SetSMSAttributesRequest addattributesEntry(java.lang.String key, java.lang.String value)
The default settings for sending SMS messages from your account. You can set values for the following attribute names:
MonthlySpendLimit
– The maximum amount in USD that you are
willing to spend each month to send SMS messages. When Amazon SNS
determines that sending an SMS message would incur a cost that exceeds
this limit, it stops sending SMS messages within minutes.
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.
DeliveryStatusIAMRole
– The ARN of the IAM role that allows
Amazon SNS to write logs about SMS deliveries in CloudWatch Logs. For
each SMS message that you send, Amazon SNS writes a log that includes the
message price, the success or failure status, the reason for failure (if
the message failed), the message dwell time, and other information.
DeliveryStatusSuccessSamplingRate
– The percentage of
successful SMS deliveries for which Amazon SNS will write logs in
CloudWatch Logs. The value can be an integer from 0 - 100. For example,
to write logs only for failed deliveries, set this value to
0
. To write logs for 10% of your successful deliveries, set
it to 10
.
DefaultSenderID
– A string, such as your business brand,
that is displayed as the sender on the receiving device. Support for
sender IDs varies by country. The sender ID can be 1 - 11 alphanumeric
characters, and it must contain at least one letter.
DefaultSMSType
– The type of SMS message that you will send
by default. You can assign the following values:
Promotional
– (Default) Noncritical messages, such as
marketing messages. Amazon SNS optimizes the message delivery to incur
the lowest cost.
Transactional
– Critical messages that support customer
transactions, such as one-time passcodes for multi-factor authentication.
Amazon SNS optimizes the message delivery to achieve the highest
reliability.
UsageReportS3Bucket
– The name of the Amazon S3 bucket to
receive daily SMS usage reports from Amazon SNS. Each day, Amazon SNS
will deliver a usage report as a CSV file to the bucket. The report
includes the following information for each SMS message that was
successfully delivered by your account:
Time that the message was published (in UTC)
Message ID
Destination phone number
Message type
Delivery status
Message price (in USD)
Part number (a message is split into multiple parts if it is too long for a single message)
Total number of parts
To receive the report, the bucket must have a policy that allows the
Amazon SNS service principle to perform the s3:PutObject
and
s3:GetBucketLocation
actions.
For an example bucket policy and usage report, see Monitoring SMS Activity in the Amazon SNS Developer Guide.
The method adds a new key-value pair into attributes parameter, and returns a reference to this object so that method calls can be chained together.
key
- The key of the entry to be added into attributes.value
- The corresponding value of the entry to be added into
attributes.public SetSMSAttributesRequest clearattributesEntries()
Returns a reference to this object so that method calls can be chained together.
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.