amazonka-sns-1.6.0: Amazon Simple Notification Service SDK.

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.SNS.SetSMSAttributes

Contents

Description

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 Sending an SMS Message in the Amazon SNS Developer Guide .

Synopsis

Creating a Request

setSMSAttributes :: SetSMSAttributes Source #

Creates a value of SetSMSAttributes with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • ssmsaAttributes - 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. Important: 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 exceed the maximum, contact AWS Support or your AWS sales representative for a service 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 .

data SetSMSAttributes Source #

The input for the SetSMSAttributes action.

See: setSMSAttributes smart constructor.

Instances

Eq SetSMSAttributes Source # 
Data SetSMSAttributes Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SetSMSAttributes -> c SetSMSAttributes #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SetSMSAttributes #

toConstr :: SetSMSAttributes -> Constr #

dataTypeOf :: SetSMSAttributes -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c SetSMSAttributes) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SetSMSAttributes) #

gmapT :: (forall b. Data b => b -> b) -> SetSMSAttributes -> SetSMSAttributes #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SetSMSAttributes -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SetSMSAttributes -> r #

gmapQ :: (forall d. Data d => d -> u) -> SetSMSAttributes -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SetSMSAttributes -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SetSMSAttributes -> m SetSMSAttributes #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SetSMSAttributes -> m SetSMSAttributes #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SetSMSAttributes -> m SetSMSAttributes #

Read SetSMSAttributes Source # 
Show SetSMSAttributes Source # 
Generic SetSMSAttributes Source # 
Hashable SetSMSAttributes Source # 
NFData SetSMSAttributes Source # 

Methods

rnf :: SetSMSAttributes -> () #

AWSRequest SetSMSAttributes Source # 
ToHeaders SetSMSAttributes Source # 
ToPath SetSMSAttributes Source # 
ToQuery SetSMSAttributes Source # 
type Rep SetSMSAttributes Source # 
type Rep SetSMSAttributes = D1 * (MetaData "SetSMSAttributes" "Network.AWS.SNS.SetSMSAttributes" "amazonka-sns-1.6.0-9aFI2fxVFLPtYIjs5ltfP" True) (C1 * (MetaCons "SetSMSAttributes'" PrefixI True) (S1 * (MetaSel (Just Symbol "_ssmsaAttributes") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Map Text Text))))
type Rs SetSMSAttributes Source # 

Request Lenses

ssmsaAttributes :: Lens' SetSMSAttributes (HashMap Text Text) Source #

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. Important: 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 exceed the maximum, contact AWS Support or your AWS sales representative for a service 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 .

Destructuring the Response

setSMSAttributesResponse Source #

Creates a value of SetSMSAttributesResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data SetSMSAttributesResponse Source #

The response for the SetSMSAttributes action.

See: setSMSAttributesResponse smart constructor.

Instances

Eq SetSMSAttributesResponse Source # 
Data SetSMSAttributesResponse Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SetSMSAttributesResponse -> c SetSMSAttributesResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SetSMSAttributesResponse #

toConstr :: SetSMSAttributesResponse -> Constr #

dataTypeOf :: SetSMSAttributesResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c SetSMSAttributesResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SetSMSAttributesResponse) #

gmapT :: (forall b. Data b => b -> b) -> SetSMSAttributesResponse -> SetSMSAttributesResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SetSMSAttributesResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SetSMSAttributesResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> SetSMSAttributesResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SetSMSAttributesResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SetSMSAttributesResponse -> m SetSMSAttributesResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SetSMSAttributesResponse -> m SetSMSAttributesResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SetSMSAttributesResponse -> m SetSMSAttributesResponse #

Read SetSMSAttributesResponse Source # 
Show SetSMSAttributesResponse Source # 
Generic SetSMSAttributesResponse Source # 
NFData SetSMSAttributesResponse Source # 
type Rep SetSMSAttributesResponse Source # 
type Rep SetSMSAttributesResponse = D1 * (MetaData "SetSMSAttributesResponse" "Network.AWS.SNS.SetSMSAttributes" "amazonka-sns-1.6.0-9aFI2fxVFLPtYIjs5ltfP" True) (C1 * (MetaCons "SetSMSAttributesResponse'" PrefixI True) (S1 * (MetaSel (Just Symbol "_ssmsarsResponseStatus") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Int)))

Response Lenses