AWS SDK for C++  1.8.59
AWS SDK for C++
Public Member Functions | Protected Member Functions | List of all members
Aws::SNS::Model::PublishRequest Class Reference

#include <PublishRequest.h>

+ Inheritance diagram for Aws::SNS::Model::PublishRequest:

Public Member Functions

 PublishRequest ()
 
virtual const char * GetServiceRequestName () const override
 
Aws::String SerializePayload () const override
 
const Aws::StringGetTopicArn () const
 
bool TopicArnHasBeenSet () const
 
void SetTopicArn (const Aws::String &value)
 
void SetTopicArn (Aws::String &&value)
 
void SetTopicArn (const char *value)
 
PublishRequestWithTopicArn (const Aws::String &value)
 
PublishRequestWithTopicArn (Aws::String &&value)
 
PublishRequestWithTopicArn (const char *value)
 
const Aws::StringGetTargetArn () const
 
bool TargetArnHasBeenSet () const
 
void SetTargetArn (const Aws::String &value)
 
void SetTargetArn (Aws::String &&value)
 
void SetTargetArn (const char *value)
 
PublishRequestWithTargetArn (const Aws::String &value)
 
PublishRequestWithTargetArn (Aws::String &&value)
 
PublishRequestWithTargetArn (const char *value)
 
const Aws::StringGetPhoneNumber () const
 
bool PhoneNumberHasBeenSet () const
 
void SetPhoneNumber (const Aws::String &value)
 
void SetPhoneNumber (Aws::String &&value)
 
void SetPhoneNumber (const char *value)
 
PublishRequestWithPhoneNumber (const Aws::String &value)
 
PublishRequestWithPhoneNumber (Aws::String &&value)
 
PublishRequestWithPhoneNumber (const char *value)
 
const Aws::StringGetMessage () const
 
bool MessageHasBeenSet () const
 
void SetMessage (const Aws::String &value)
 
void SetMessage (Aws::String &&value)
 
void SetMessage (const char *value)
 
PublishRequestWithMessage (const Aws::String &value)
 
PublishRequestWithMessage (Aws::String &&value)
 
PublishRequestWithMessage (const char *value)
 
const Aws::StringGetSubject () const
 
bool SubjectHasBeenSet () const
 
void SetSubject (const Aws::String &value)
 
void SetSubject (Aws::String &&value)
 
void SetSubject (const char *value)
 
PublishRequestWithSubject (const Aws::String &value)
 
PublishRequestWithSubject (Aws::String &&value)
 
PublishRequestWithSubject (const char *value)
 
const Aws::StringGetMessageStructure () const
 
bool MessageStructureHasBeenSet () const
 
void SetMessageStructure (const Aws::String &value)
 
void SetMessageStructure (Aws::String &&value)
 
void SetMessageStructure (const char *value)
 
PublishRequestWithMessageStructure (const Aws::String &value)
 
PublishRequestWithMessageStructure (Aws::String &&value)
 
PublishRequestWithMessageStructure (const char *value)
 
const Aws::Map< Aws::String, MessageAttributeValue > & GetMessageAttributes () const
 
bool MessageAttributesHasBeenSet () const
 
void SetMessageAttributes (const Aws::Map< Aws::String, MessageAttributeValue > &value)
 
void SetMessageAttributes (Aws::Map< Aws::String, MessageAttributeValue > &&value)
 
PublishRequestWithMessageAttributes (const Aws::Map< Aws::String, MessageAttributeValue > &value)
 
PublishRequestWithMessageAttributes (Aws::Map< Aws::String, MessageAttributeValue > &&value)
 
PublishRequestAddMessageAttributes (const Aws::String &key, const MessageAttributeValue &value)
 
PublishRequestAddMessageAttributes (Aws::String &&key, const MessageAttributeValue &value)
 
PublishRequestAddMessageAttributes (const Aws::String &key, MessageAttributeValue &&value)
 
PublishRequestAddMessageAttributes (Aws::String &&key, MessageAttributeValue &&value)
 
PublishRequestAddMessageAttributes (const char *key, MessageAttributeValue &&value)
 
PublishRequestAddMessageAttributes (const char *key, const MessageAttributeValue &value)
 
- Public Member Functions inherited from Aws::SNS::SNSRequest
virtual ~SNSRequest ()
 
void AddParametersToRequest (Aws::Http::HttpRequest &httpRequest) const
 
Aws::Http::HeaderValueCollection GetHeaders () const override
 
- Public Member Functions inherited from Aws::AmazonSerializableWebServiceRequest
 AmazonSerializableWebServiceRequest ()
 
virtual ~AmazonSerializableWebServiceRequest ()
 
std::shared_ptr< Aws::IOStreamGetBody () const override
 
- Public Member Functions inherited from Aws::AmazonWebServiceRequest
 AmazonWebServiceRequest ()
 
virtual ~AmazonWebServiceRequest ()=default
 
virtual void AddQueryStringParameters (Aws::Http::URI &uri) const
 
virtual void PutToPresignedUrl (Aws::Http::URI &uri) const
 
virtual bool IsStreaming () const
 
virtual bool IsEventStreamRequest () const
 
virtual bool SignBody () const
 
virtual bool IsChunked () const
 
virtual void SetRequestSignedHandler (const RequestSignedHandler &handler)
 
virtual const RequestSignedHandlerGetRequestSignedHandler () const
 
const Aws::IOStreamFactoryGetResponseStreamFactory () const
 
void SetResponseStreamFactory (const Aws::IOStreamFactory &factory)
 
virtual void SetDataReceivedEventHandler (const Aws::Http::DataReceivedEventHandler &dataReceivedEventHandler)
 
virtual void SetDataSentEventHandler (const Aws::Http::DataSentEventHandler &dataSentEventHandler)
 
virtual void SetContinueRequestHandler (const Aws::Http::ContinueRequestHandler &continueRequestHandler)
 
virtual void SetDataReceivedEventHandler (Aws::Http::DataReceivedEventHandler &&dataReceivedEventHandler)
 
virtual void SetDataSentEventHandler (Aws::Http::DataSentEventHandler &&dataSentEventHandler)
 
virtual void SetContinueRequestHandler (Aws::Http::ContinueRequestHandler &&continueRequestHandler)
 
virtual void SetRequestRetryHandler (const RequestRetryHandler &handler)
 
virtual void SetRequestRetryHandler (RequestRetryHandler &&handler)
 
virtual const Aws::Http::DataReceivedEventHandlerGetDataReceivedEventHandler () const
 
virtual const Aws::Http::DataSentEventHandlerGetDataSentEventHandler () const
 
virtual const Aws::Http::ContinueRequestHandlerGetContinueRequestHandler () const
 
virtual const RequestRetryHandlerGetRequestRetryHandler () const
 
virtual bool ShouldComputeContentMd5 () const
 

Protected Member Functions

void DumpBodyToUrl (Aws::Http::URI &uri) const override
 
- Protected Member Functions inherited from Aws::SNS::SNSRequest
virtual Aws::Http::HeaderValueCollection GetRequestSpecificHeaders () const
 

Detailed Description

Input for Publish action.

See Also:

AWS API Reference

Definition at line 26 of file PublishRequest.h.

Constructor & Destructor Documentation

◆ PublishRequest()

Aws::SNS::Model::PublishRequest::PublishRequest ( )

Member Function Documentation

◆ AddMessageAttributes() [1/6]

PublishRequest& Aws::SNS::Model::PublishRequest::AddMessageAttributes ( const Aws::String key,
const MessageAttributeValue value 
)
inline

Message attributes for Publish action.

Definition at line 707 of file PublishRequest.h.

◆ AddMessageAttributes() [2/6]

PublishRequest& Aws::SNS::Model::PublishRequest::AddMessageAttributes ( Aws::String &&  key,
const MessageAttributeValue value 
)
inline

Message attributes for Publish action.

Definition at line 712 of file PublishRequest.h.

◆ AddMessageAttributes() [3/6]

PublishRequest& Aws::SNS::Model::PublishRequest::AddMessageAttributes ( const Aws::String key,
MessageAttributeValue &&  value 
)
inline

Message attributes for Publish action.

Definition at line 717 of file PublishRequest.h.

◆ AddMessageAttributes() [4/6]

PublishRequest& Aws::SNS::Model::PublishRequest::AddMessageAttributes ( Aws::String &&  key,
MessageAttributeValue &&  value 
)
inline

Message attributes for Publish action.

Definition at line 722 of file PublishRequest.h.

◆ AddMessageAttributes() [5/6]

PublishRequest& Aws::SNS::Model::PublishRequest::AddMessageAttributes ( const char *  key,
MessageAttributeValue &&  value 
)
inline

Message attributes for Publish action.

Definition at line 727 of file PublishRequest.h.

◆ AddMessageAttributes() [6/6]

PublishRequest& Aws::SNS::Model::PublishRequest::AddMessageAttributes ( const char *  key,
const MessageAttributeValue value 
)
inline

Message attributes for Publish action.

Definition at line 732 of file PublishRequest.h.

◆ DumpBodyToUrl()

void Aws::SNS::Model::PublishRequest::DumpBodyToUrl ( Aws::Http::URI uri) const
overrideprotectedvirtual

Default does nothing. Override this to convert what would otherwise be the payload of the request to a query string format.

Reimplemented from Aws::AmazonWebServiceRequest.

◆ GetMessage()

const Aws::String& Aws::SNS::Model::PublishRequest::GetMessage ( ) const
inline

The message you want to send.

If you are publishing to a topic and you want to send the same message to all transport protocols, include the text of the message as a String value. If you want to send different messages for each transport protocol, set the value of the MessageStructure parameter to json and use a JSON object for the Message parameter.

Constraints:

  • With the exception of SMS, messages must be UTF-8 encoded strings and at most 256 KB in size (262,144 bytes, not 262,144 characters).

  • For SMS, each message can contain up to 140 characters. This character limit depends on the encoding schema. For example, an SMS message can contain 160 GSM characters, 140 ASCII characters, or 70 UCS-2 characters.

    If you publish a message that exceeds this size limit, Amazon SNS sends the message as multiple messages, each fitting within the size limit. Messages aren't truncated mid-word but are cut off at whole-word boundaries.

    The total size limit for a single SMS Publish action is 1,600 characters.

JSON-specific constraints:

  • Keys in the JSON object that correspond to supported transport protocols must have simple JSON string values.

  • The values will be parsed (unescaped) before they are used in outgoing messages.

  • Outbound notifications are JSON encoded (meaning that the characters will be reescaped for sending).

  • Values have a minimum length of 0 (the empty string, "", is allowed).

  • Values have a maximum length bounded by the overall message size (so, including multiple protocols may limit message sizes).

  • Non-string values will cause the key to be ignored.

  • Keys that do not correspond to supported transport protocols are ignored.

  • Duplicate keys are not allowed.

  • Failure to parse or validate any key or value in the message will cause the Publish call to return an error (no partial delivery).

Definition at line 253 of file PublishRequest.h.

◆ GetMessageAttributes()

const Aws::Map<Aws::String, MessageAttributeValue>& Aws::SNS::Model::PublishRequest::GetMessageAttributes ( ) const
inline

Message attributes for Publish action.

Definition at line 677 of file PublishRequest.h.

◆ GetMessageStructure()

const Aws::String& Aws::SNS::Model::PublishRequest::GetMessageStructure ( ) const
inline

Set MessageStructure to json if you want to send a different message for each protocol. For example, using one publish action, you can send a short message to your SMS subscribers and a longer message to your email subscribers. If you set MessageStructure to json, the value of the Message parameter must:

  • be a syntactically valid JSON object; and

  • contain at least a top-level JSON key of "default" with a value that is a string.

You can define other top-level keys that define the message you want to send to a specific transport protocol (e.g., "http").

Valid value: json

Definition at line 573 of file PublishRequest.h.

◆ GetPhoneNumber()

const Aws::String& Aws::SNS::Model::PublishRequest::GetPhoneNumber ( ) const
inline

The phone number to which you want to deliver an SMS message. Use E.164 format.

If you don't specify a value for the PhoneNumber parameter, you must specify a value for the TargetArn or TopicArn parameters.

Definition at line 164 of file PublishRequest.h.

◆ GetServiceRequestName()

virtual const char* Aws::SNS::Model::PublishRequest::GetServiceRequestName ( ) const
inlineoverridevirtual

Implements Aws::AmazonWebServiceRequest.

Definition at line 35 of file PublishRequest.h.

◆ GetSubject()

const Aws::String& Aws::SNS::Model::PublishRequest::GetSubject ( ) const
inline

Optional parameter to be used as the "Subject" line when the message is delivered to email endpoints. This field will also be included, if present, in the standard JSON messages delivered to other endpoints.

Constraints: Subjects must be ASCII text that begins with a letter, number, or punctuation mark; must not include line breaks or control characters; and must be less than 100 characters long.

Definition at line 488 of file PublishRequest.h.

◆ GetTargetArn()

const Aws::String& Aws::SNS::Model::PublishRequest::GetTargetArn ( ) const
inline

If you don't specify a value for the TargetArn parameter, you must specify a value for the PhoneNumber or TopicArn parameters.

Definition at line 106 of file PublishRequest.h.

◆ GetTopicArn()

const Aws::String& Aws::SNS::Model::PublishRequest::GetTopicArn ( ) const
inline

The topic you want to publish to.

If you don't specify a value for the TopicArn parameter, you must specify a value for the PhoneNumber or TargetArn parameters.

Definition at line 49 of file PublishRequest.h.

◆ MessageAttributesHasBeenSet()

bool Aws::SNS::Model::PublishRequest::MessageAttributesHasBeenSet ( ) const
inline

Message attributes for Publish action.

Definition at line 682 of file PublishRequest.h.

◆ MessageHasBeenSet()

bool Aws::SNS::Model::PublishRequest::MessageHasBeenSet ( ) const
inline

The message you want to send.

If you are publishing to a topic and you want to send the same message to all transport protocols, include the text of the message as a String value. If you want to send different messages for each transport protocol, set the value of the MessageStructure parameter to json and use a JSON object for the Message parameter.

Constraints:

  • With the exception of SMS, messages must be UTF-8 encoded strings and at most 256 KB in size (262,144 bytes, not 262,144 characters).

  • For SMS, each message can contain up to 140 characters. This character limit depends on the encoding schema. For example, an SMS message can contain 160 GSM characters, 140 ASCII characters, or 70 UCS-2 characters.

    If you publish a message that exceeds this size limit, Amazon SNS sends the message as multiple messages, each fitting within the size limit. Messages aren't truncated mid-word but are cut off at whole-word boundaries.

    The total size limit for a single SMS Publish action is 1,600 characters.

JSON-specific constraints:

  • Keys in the JSON object that correspond to supported transport protocols must have simple JSON string values.

  • The values will be parsed (unescaped) before they are used in outgoing messages.

  • Outbound notifications are JSON encoded (meaning that the characters will be reescaped for sending).

  • Values have a minimum length of 0 (the empty string, "", is allowed).

  • Values have a maximum length bounded by the overall message size (so, including multiple protocols may limit message sizes).

  • Non-string values will cause the key to be ignored.

  • Keys that do not correspond to supported transport protocols are ignored.

  • Duplicate keys are not allowed.

  • Failure to parse or validate any key or value in the message will cause the Publish call to return an error (no partial delivery).

Definition at line 285 of file PublishRequest.h.

◆ MessageStructureHasBeenSet()

bool Aws::SNS::Model::PublishRequest::MessageStructureHasBeenSet ( ) const
inline

Set MessageStructure to json if you want to send a different message for each protocol. For example, using one publish action, you can send a short message to your SMS subscribers and a longer message to your email subscribers. If you set MessageStructure to json, the value of the Message parameter must:

  • be a syntactically valid JSON object; and

  • contain at least a top-level JSON key of "default" with a value that is a string.

You can define other top-level keys that define the message you want to send to a specific transport protocol (e.g., "http").

Valid value: json

Definition at line 587 of file PublishRequest.h.

◆ PhoneNumberHasBeenSet()

bool Aws::SNS::Model::PublishRequest::PhoneNumberHasBeenSet ( ) const
inline

The phone number to which you want to deliver an SMS message. Use E.164 format.

If you don't specify a value for the PhoneNumber parameter, you must specify a value for the TargetArn or TopicArn parameters.

Definition at line 172 of file PublishRequest.h.

◆ SerializePayload()

Aws::String Aws::SNS::Model::PublishRequest::SerializePayload ( ) const
overridevirtual

Convert payload into String.

Implements Aws::AmazonSerializableWebServiceRequest.

◆ SetMessage() [1/3]

void Aws::SNS::Model::PublishRequest::SetMessage ( const Aws::String value)
inline

The message you want to send.

If you are publishing to a topic and you want to send the same message to all transport protocols, include the text of the message as a String value. If you want to send different messages for each transport protocol, set the value of the MessageStructure parameter to json and use a JSON object for the Message parameter.

Constraints:

  • With the exception of SMS, messages must be UTF-8 encoded strings and at most 256 KB in size (262,144 bytes, not 262,144 characters).

  • For SMS, each message can contain up to 140 characters. This character limit depends on the encoding schema. For example, an SMS message can contain 160 GSM characters, 140 ASCII characters, or 70 UCS-2 characters.

    If you publish a message that exceeds this size limit, Amazon SNS sends the message as multiple messages, each fitting within the size limit. Messages aren't truncated mid-word but are cut off at whole-word boundaries.

    The total size limit for a single SMS Publish action is 1,600 characters.

JSON-specific constraints:

  • Keys in the JSON object that correspond to supported transport protocols must have simple JSON string values.

  • The values will be parsed (unescaped) before they are used in outgoing messages.

  • Outbound notifications are JSON encoded (meaning that the characters will be reescaped for sending).

  • Values have a minimum length of 0 (the empty string, "", is allowed).

  • Values have a maximum length bounded by the overall message size (so, including multiple protocols may limit message sizes).

  • Non-string values will cause the key to be ignored.

  • Keys that do not correspond to supported transport protocols are ignored.

  • Duplicate keys are not allowed.

  • Failure to parse or validate any key or value in the message will cause the Publish call to return an error (no partial delivery).

Definition at line 317 of file PublishRequest.h.

◆ SetMessage() [2/3]

void Aws::SNS::Model::PublishRequest::SetMessage ( Aws::String &&  value)
inline

The message you want to send.

If you are publishing to a topic and you want to send the same message to all transport protocols, include the text of the message as a String value. If you want to send different messages for each transport protocol, set the value of the MessageStructure parameter to json and use a JSON object for the Message parameter.

Constraints:

  • With the exception of SMS, messages must be UTF-8 encoded strings and at most 256 KB in size (262,144 bytes, not 262,144 characters).

  • For SMS, each message can contain up to 140 characters. This character limit depends on the encoding schema. For example, an SMS message can contain 160 GSM characters, 140 ASCII characters, or 70 UCS-2 characters.

    If you publish a message that exceeds this size limit, Amazon SNS sends the message as multiple messages, each fitting within the size limit. Messages aren't truncated mid-word but are cut off at whole-word boundaries.

    The total size limit for a single SMS Publish action is 1,600 characters.

JSON-specific constraints:

  • Keys in the JSON object that correspond to supported transport protocols must have simple JSON string values.

  • The values will be parsed (unescaped) before they are used in outgoing messages.

  • Outbound notifications are JSON encoded (meaning that the characters will be reescaped for sending).

  • Values have a minimum length of 0 (the empty string, "", is allowed).

  • Values have a maximum length bounded by the overall message size (so, including multiple protocols may limit message sizes).

  • Non-string values will cause the key to be ignored.

  • Keys that do not correspond to supported transport protocols are ignored.

  • Duplicate keys are not allowed.

  • Failure to parse or validate any key or value in the message will cause the Publish call to return an error (no partial delivery).

Definition at line 349 of file PublishRequest.h.

◆ SetMessage() [3/3]

void Aws::SNS::Model::PublishRequest::SetMessage ( const char *  value)
inline

The message you want to send.

If you are publishing to a topic and you want to send the same message to all transport protocols, include the text of the message as a String value. If you want to send different messages for each transport protocol, set the value of the MessageStructure parameter to json and use a JSON object for the Message parameter.

Constraints:

  • With the exception of SMS, messages must be UTF-8 encoded strings and at most 256 KB in size (262,144 bytes, not 262,144 characters).

  • For SMS, each message can contain up to 140 characters. This character limit depends on the encoding schema. For example, an SMS message can contain 160 GSM characters, 140 ASCII characters, or 70 UCS-2 characters.

    If you publish a message that exceeds this size limit, Amazon SNS sends the message as multiple messages, each fitting within the size limit. Messages aren't truncated mid-word but are cut off at whole-word boundaries.

    The total size limit for a single SMS Publish action is 1,600 characters.

JSON-specific constraints:

  • Keys in the JSON object that correspond to supported transport protocols must have simple JSON string values.

  • The values will be parsed (unescaped) before they are used in outgoing messages.

  • Outbound notifications are JSON encoded (meaning that the characters will be reescaped for sending).

  • Values have a minimum length of 0 (the empty string, "", is allowed).

  • Values have a maximum length bounded by the overall message size (so, including multiple protocols may limit message sizes).

  • Non-string values will cause the key to be ignored.

  • Keys that do not correspond to supported transport protocols are ignored.

  • Duplicate keys are not allowed.

  • Failure to parse or validate any key or value in the message will cause the Publish call to return an error (no partial delivery).

Definition at line 381 of file PublishRequest.h.

◆ SetMessageAttributes() [1/2]

void Aws::SNS::Model::PublishRequest::SetMessageAttributes ( const Aws::Map< Aws::String, MessageAttributeValue > &  value)
inline

Message attributes for Publish action.

Definition at line 687 of file PublishRequest.h.

◆ SetMessageAttributes() [2/2]

void Aws::SNS::Model::PublishRequest::SetMessageAttributes ( Aws::Map< Aws::String, MessageAttributeValue > &&  value)
inline

Message attributes for Publish action.

Definition at line 692 of file PublishRequest.h.

◆ SetMessageStructure() [1/3]

void Aws::SNS::Model::PublishRequest::SetMessageStructure ( const Aws::String value)
inline

Set MessageStructure to json if you want to send a different message for each protocol. For example, using one publish action, you can send a short message to your SMS subscribers and a longer message to your email subscribers. If you set MessageStructure to json, the value of the Message parameter must:

  • be a syntactically valid JSON object; and

  • contain at least a top-level JSON key of "default" with a value that is a string.

You can define other top-level keys that define the message you want to send to a specific transport protocol (e.g., "http").

Valid value: json

Definition at line 601 of file PublishRequest.h.

◆ SetMessageStructure() [2/3]

void Aws::SNS::Model::PublishRequest::SetMessageStructure ( Aws::String &&  value)
inline

Set MessageStructure to json if you want to send a different message for each protocol. For example, using one publish action, you can send a short message to your SMS subscribers and a longer message to your email subscribers. If you set MessageStructure to json, the value of the Message parameter must:

  • be a syntactically valid JSON object; and

  • contain at least a top-level JSON key of "default" with a value that is a string.

You can define other top-level keys that define the message you want to send to a specific transport protocol (e.g., "http").

Valid value: json

Definition at line 615 of file PublishRequest.h.

◆ SetMessageStructure() [3/3]

void Aws::SNS::Model::PublishRequest::SetMessageStructure ( const char *  value)
inline

Set MessageStructure to json if you want to send a different message for each protocol. For example, using one publish action, you can send a short message to your SMS subscribers and a longer message to your email subscribers. If you set MessageStructure to json, the value of the Message parameter must:

  • be a syntactically valid JSON object; and

  • contain at least a top-level JSON key of "default" with a value that is a string.

You can define other top-level keys that define the message you want to send to a specific transport protocol (e.g., "http").

Valid value: json

Definition at line 629 of file PublishRequest.h.

◆ SetPhoneNumber() [1/3]

void Aws::SNS::Model::PublishRequest::SetPhoneNumber ( const Aws::String value)
inline

The phone number to which you want to deliver an SMS message. Use E.164 format.

If you don't specify a value for the PhoneNumber parameter, you must specify a value for the TargetArn or TopicArn parameters.

Definition at line 180 of file PublishRequest.h.

◆ SetPhoneNumber() [2/3]

void Aws::SNS::Model::PublishRequest::SetPhoneNumber ( Aws::String &&  value)
inline

The phone number to which you want to deliver an SMS message. Use E.164 format.

If you don't specify a value for the PhoneNumber parameter, you must specify a value for the TargetArn or TopicArn parameters.

Definition at line 188 of file PublishRequest.h.

◆ SetPhoneNumber() [3/3]

void Aws::SNS::Model::PublishRequest::SetPhoneNumber ( const char *  value)
inline

The phone number to which you want to deliver an SMS message. Use E.164 format.

If you don't specify a value for the PhoneNumber parameter, you must specify a value for the TargetArn or TopicArn parameters.

Definition at line 196 of file PublishRequest.h.

◆ SetSubject() [1/3]

void Aws::SNS::Model::PublishRequest::SetSubject ( const Aws::String value)
inline

Optional parameter to be used as the "Subject" line when the message is delivered to email endpoints. This field will also be included, if present, in the standard JSON messages delivered to other endpoints.

Constraints: Subjects must be ASCII text that begins with a letter, number, or punctuation mark; must not include line breaks or control characters; and must be less than 100 characters long.

Definition at line 508 of file PublishRequest.h.

◆ SetSubject() [2/3]

void Aws::SNS::Model::PublishRequest::SetSubject ( Aws::String &&  value)
inline

Optional parameter to be used as the "Subject" line when the message is delivered to email endpoints. This field will also be included, if present, in the standard JSON messages delivered to other endpoints.

Constraints: Subjects must be ASCII text that begins with a letter, number, or punctuation mark; must not include line breaks or control characters; and must be less than 100 characters long.

Definition at line 518 of file PublishRequest.h.

◆ SetSubject() [3/3]

void Aws::SNS::Model::PublishRequest::SetSubject ( const char *  value)
inline

Optional parameter to be used as the "Subject" line when the message is delivered to email endpoints. This field will also be included, if present, in the standard JSON messages delivered to other endpoints.

Constraints: Subjects must be ASCII text that begins with a letter, number, or punctuation mark; must not include line breaks or control characters; and must be less than 100 characters long.

Definition at line 528 of file PublishRequest.h.

◆ SetTargetArn() [1/3]

void Aws::SNS::Model::PublishRequest::SetTargetArn ( const Aws::String value)
inline

If you don't specify a value for the TargetArn parameter, you must specify a value for the PhoneNumber or TopicArn parameters.

Definition at line 120 of file PublishRequest.h.

◆ SetTargetArn() [2/3]

void Aws::SNS::Model::PublishRequest::SetTargetArn ( Aws::String &&  value)
inline

If you don't specify a value for the TargetArn parameter, you must specify a value for the PhoneNumber or TopicArn parameters.

Definition at line 127 of file PublishRequest.h.

◆ SetTargetArn() [3/3]

void Aws::SNS::Model::PublishRequest::SetTargetArn ( const char *  value)
inline

If you don't specify a value for the TargetArn parameter, you must specify a value for the PhoneNumber or TopicArn parameters.

Definition at line 134 of file PublishRequest.h.

◆ SetTopicArn() [1/3]

void Aws::SNS::Model::PublishRequest::SetTopicArn ( const Aws::String value)
inline

The topic you want to publish to.

If you don't specify a value for the TopicArn parameter, you must specify a value for the PhoneNumber or TargetArn parameters.

Definition at line 63 of file PublishRequest.h.

◆ SetTopicArn() [2/3]

void Aws::SNS::Model::PublishRequest::SetTopicArn ( Aws::String &&  value)
inline

The topic you want to publish to.

If you don't specify a value for the TopicArn parameter, you must specify a value for the PhoneNumber or TargetArn parameters.

Definition at line 70 of file PublishRequest.h.

◆ SetTopicArn() [3/3]

void Aws::SNS::Model::PublishRequest::SetTopicArn ( const char *  value)
inline

The topic you want to publish to.

If you don't specify a value for the TopicArn parameter, you must specify a value for the PhoneNumber or TargetArn parameters.

Definition at line 77 of file PublishRequest.h.

◆ SubjectHasBeenSet()

bool Aws::SNS::Model::PublishRequest::SubjectHasBeenSet ( ) const
inline

Optional parameter to be used as the "Subject" line when the message is delivered to email endpoints. This field will also be included, if present, in the standard JSON messages delivered to other endpoints.

Constraints: Subjects must be ASCII text that begins with a letter, number, or punctuation mark; must not include line breaks or control characters; and must be less than 100 characters long.

Definition at line 498 of file PublishRequest.h.

◆ TargetArnHasBeenSet()

bool Aws::SNS::Model::PublishRequest::TargetArnHasBeenSet ( ) const
inline

If you don't specify a value for the TargetArn parameter, you must specify a value for the PhoneNumber or TopicArn parameters.

Definition at line 113 of file PublishRequest.h.

◆ TopicArnHasBeenSet()

bool Aws::SNS::Model::PublishRequest::TopicArnHasBeenSet ( ) const
inline

The topic you want to publish to.

If you don't specify a value for the TopicArn parameter, you must specify a value for the PhoneNumber or TargetArn parameters.

Definition at line 56 of file PublishRequest.h.

◆ WithMessage() [1/3]

PublishRequest& Aws::SNS::Model::PublishRequest::WithMessage ( const Aws::String value)
inline

The message you want to send.

If you are publishing to a topic and you want to send the same message to all transport protocols, include the text of the message as a String value. If you want to send different messages for each transport protocol, set the value of the MessageStructure parameter to json and use a JSON object for the Message parameter.

Constraints:

  • With the exception of SMS, messages must be UTF-8 encoded strings and at most 256 KB in size (262,144 bytes, not 262,144 characters).

  • For SMS, each message can contain up to 140 characters. This character limit depends on the encoding schema. For example, an SMS message can contain 160 GSM characters, 140 ASCII characters, or 70 UCS-2 characters.

    If you publish a message that exceeds this size limit, Amazon SNS sends the message as multiple messages, each fitting within the size limit. Messages aren't truncated mid-word but are cut off at whole-word boundaries.

    The total size limit for a single SMS Publish action is 1,600 characters.

JSON-specific constraints:

  • Keys in the JSON object that correspond to supported transport protocols must have simple JSON string values.

  • The values will be parsed (unescaped) before they are used in outgoing messages.

  • Outbound notifications are JSON encoded (meaning that the characters will be reescaped for sending).

  • Values have a minimum length of 0 (the empty string, "", is allowed).

  • Values have a maximum length bounded by the overall message size (so, including multiple protocols may limit message sizes).

  • Non-string values will cause the key to be ignored.

  • Keys that do not correspond to supported transport protocols are ignored.

  • Duplicate keys are not allowed.

  • Failure to parse or validate any key or value in the message will cause the Publish call to return an error (no partial delivery).

Definition at line 413 of file PublishRequest.h.

◆ WithMessage() [2/3]

PublishRequest& Aws::SNS::Model::PublishRequest::WithMessage ( Aws::String &&  value)
inline

The message you want to send.

If you are publishing to a topic and you want to send the same message to all transport protocols, include the text of the message as a String value. If you want to send different messages for each transport protocol, set the value of the MessageStructure parameter to json and use a JSON object for the Message parameter.

Constraints:

  • With the exception of SMS, messages must be UTF-8 encoded strings and at most 256 KB in size (262,144 bytes, not 262,144 characters).

  • For SMS, each message can contain up to 140 characters. This character limit depends on the encoding schema. For example, an SMS message can contain 160 GSM characters, 140 ASCII characters, or 70 UCS-2 characters.

    If you publish a message that exceeds this size limit, Amazon SNS sends the message as multiple messages, each fitting within the size limit. Messages aren't truncated mid-word but are cut off at whole-word boundaries.

    The total size limit for a single SMS Publish action is 1,600 characters.

JSON-specific constraints:

  • Keys in the JSON object that correspond to supported transport protocols must have simple JSON string values.

  • The values will be parsed (unescaped) before they are used in outgoing messages.

  • Outbound notifications are JSON encoded (meaning that the characters will be reescaped for sending).

  • Values have a minimum length of 0 (the empty string, "", is allowed).

  • Values have a maximum length bounded by the overall message size (so, including multiple protocols may limit message sizes).

  • Non-string values will cause the key to be ignored.

  • Keys that do not correspond to supported transport protocols are ignored.

  • Duplicate keys are not allowed.

  • Failure to parse or validate any key or value in the message will cause the Publish call to return an error (no partial delivery).

Definition at line 445 of file PublishRequest.h.

◆ WithMessage() [3/3]

PublishRequest& Aws::SNS::Model::PublishRequest::WithMessage ( const char *  value)
inline

The message you want to send.

If you are publishing to a topic and you want to send the same message to all transport protocols, include the text of the message as a String value. If you want to send different messages for each transport protocol, set the value of the MessageStructure parameter to json and use a JSON object for the Message parameter.

Constraints:

  • With the exception of SMS, messages must be UTF-8 encoded strings and at most 256 KB in size (262,144 bytes, not 262,144 characters).

  • For SMS, each message can contain up to 140 characters. This character limit depends on the encoding schema. For example, an SMS message can contain 160 GSM characters, 140 ASCII characters, or 70 UCS-2 characters.

    If you publish a message that exceeds this size limit, Amazon SNS sends the message as multiple messages, each fitting within the size limit. Messages aren't truncated mid-word but are cut off at whole-word boundaries.

    The total size limit for a single SMS Publish action is 1,600 characters.

JSON-specific constraints:

  • Keys in the JSON object that correspond to supported transport protocols must have simple JSON string values.

  • The values will be parsed (unescaped) before they are used in outgoing messages.

  • Outbound notifications are JSON encoded (meaning that the characters will be reescaped for sending).

  • Values have a minimum length of 0 (the empty string, "", is allowed).

  • Values have a maximum length bounded by the overall message size (so, including multiple protocols may limit message sizes).

  • Non-string values will cause the key to be ignored.

  • Keys that do not correspond to supported transport protocols are ignored.

  • Duplicate keys are not allowed.

  • Failure to parse or validate any key or value in the message will cause the Publish call to return an error (no partial delivery).

Definition at line 477 of file PublishRequest.h.

◆ WithMessageAttributes() [1/2]

PublishRequest& Aws::SNS::Model::PublishRequest::WithMessageAttributes ( const Aws::Map< Aws::String, MessageAttributeValue > &  value)
inline

Message attributes for Publish action.

Definition at line 697 of file PublishRequest.h.

◆ WithMessageAttributes() [2/2]

PublishRequest& Aws::SNS::Model::PublishRequest::WithMessageAttributes ( Aws::Map< Aws::String, MessageAttributeValue > &&  value)
inline

Message attributes for Publish action.

Definition at line 702 of file PublishRequest.h.

◆ WithMessageStructure() [1/3]

PublishRequest& Aws::SNS::Model::PublishRequest::WithMessageStructure ( const Aws::String value)
inline

Set MessageStructure to json if you want to send a different message for each protocol. For example, using one publish action, you can send a short message to your SMS subscribers and a longer message to your email subscribers. If you set MessageStructure to json, the value of the Message parameter must:

  • be a syntactically valid JSON object; and

  • contain at least a top-level JSON key of "default" with a value that is a string.

You can define other top-level keys that define the message you want to send to a specific transport protocol (e.g., "http").

Valid value: json

Definition at line 643 of file PublishRequest.h.

◆ WithMessageStructure() [2/3]

PublishRequest& Aws::SNS::Model::PublishRequest::WithMessageStructure ( Aws::String &&  value)
inline

Set MessageStructure to json if you want to send a different message for each protocol. For example, using one publish action, you can send a short message to your SMS subscribers and a longer message to your email subscribers. If you set MessageStructure to json, the value of the Message parameter must:

  • be a syntactically valid JSON object; and

  • contain at least a top-level JSON key of "default" with a value that is a string.

You can define other top-level keys that define the message you want to send to a specific transport protocol (e.g., "http").

Valid value: json

Definition at line 657 of file PublishRequest.h.

◆ WithMessageStructure() [3/3]

PublishRequest& Aws::SNS::Model::PublishRequest::WithMessageStructure ( const char *  value)
inline

Set MessageStructure to json if you want to send a different message for each protocol. For example, using one publish action, you can send a short message to your SMS subscribers and a longer message to your email subscribers. If you set MessageStructure to json, the value of the Message parameter must:

  • be a syntactically valid JSON object; and

  • contain at least a top-level JSON key of "default" with a value that is a string.

You can define other top-level keys that define the message you want to send to a specific transport protocol (e.g., "http").

Valid value: json

Definition at line 671 of file PublishRequest.h.

◆ WithPhoneNumber() [1/3]

PublishRequest& Aws::SNS::Model::PublishRequest::WithPhoneNumber ( const Aws::String value)
inline

The phone number to which you want to deliver an SMS message. Use E.164 format.

If you don't specify a value for the PhoneNumber parameter, you must specify a value for the TargetArn or TopicArn parameters.

Definition at line 204 of file PublishRequest.h.

◆ WithPhoneNumber() [2/3]

PublishRequest& Aws::SNS::Model::PublishRequest::WithPhoneNumber ( Aws::String &&  value)
inline

The phone number to which you want to deliver an SMS message. Use E.164 format.

If you don't specify a value for the PhoneNumber parameter, you must specify a value for the TargetArn or TopicArn parameters.

Definition at line 212 of file PublishRequest.h.

◆ WithPhoneNumber() [3/3]

PublishRequest& Aws::SNS::Model::PublishRequest::WithPhoneNumber ( const char *  value)
inline

The phone number to which you want to deliver an SMS message. Use E.164 format.

If you don't specify a value for the PhoneNumber parameter, you must specify a value for the TargetArn or TopicArn parameters.

Definition at line 220 of file PublishRequest.h.

◆ WithSubject() [1/3]

PublishRequest& Aws::SNS::Model::PublishRequest::WithSubject ( const Aws::String value)
inline

Optional parameter to be used as the "Subject" line when the message is delivered to email endpoints. This field will also be included, if present, in the standard JSON messages delivered to other endpoints.

Constraints: Subjects must be ASCII text that begins with a letter, number, or punctuation mark; must not include line breaks or control characters; and must be less than 100 characters long.

Definition at line 538 of file PublishRequest.h.

◆ WithSubject() [2/3]

PublishRequest& Aws::SNS::Model::PublishRequest::WithSubject ( Aws::String &&  value)
inline

Optional parameter to be used as the "Subject" line when the message is delivered to email endpoints. This field will also be included, if present, in the standard JSON messages delivered to other endpoints.

Constraints: Subjects must be ASCII text that begins with a letter, number, or punctuation mark; must not include line breaks or control characters; and must be less than 100 characters long.

Definition at line 548 of file PublishRequest.h.

◆ WithSubject() [3/3]

PublishRequest& Aws::SNS::Model::PublishRequest::WithSubject ( const char *  value)
inline

Optional parameter to be used as the "Subject" line when the message is delivered to email endpoints. This field will also be included, if present, in the standard JSON messages delivered to other endpoints.

Constraints: Subjects must be ASCII text that begins with a letter, number, or punctuation mark; must not include line breaks or control characters; and must be less than 100 characters long.

Definition at line 558 of file PublishRequest.h.

◆ WithTargetArn() [1/3]

PublishRequest& Aws::SNS::Model::PublishRequest::WithTargetArn ( const Aws::String value)
inline

If you don't specify a value for the TargetArn parameter, you must specify a value for the PhoneNumber or TopicArn parameters.

Definition at line 141 of file PublishRequest.h.

◆ WithTargetArn() [2/3]

PublishRequest& Aws::SNS::Model::PublishRequest::WithTargetArn ( Aws::String &&  value)
inline

If you don't specify a value for the TargetArn parameter, you must specify a value for the PhoneNumber or TopicArn parameters.

Definition at line 148 of file PublishRequest.h.

◆ WithTargetArn() [3/3]

PublishRequest& Aws::SNS::Model::PublishRequest::WithTargetArn ( const char *  value)
inline

If you don't specify a value for the TargetArn parameter, you must specify a value for the PhoneNumber or TopicArn parameters.

Definition at line 155 of file PublishRequest.h.

◆ WithTopicArn() [1/3]

PublishRequest& Aws::SNS::Model::PublishRequest::WithTopicArn ( const Aws::String value)
inline

The topic you want to publish to.

If you don't specify a value for the TopicArn parameter, you must specify a value for the PhoneNumber or TargetArn parameters.

Definition at line 84 of file PublishRequest.h.

◆ WithTopicArn() [2/3]

PublishRequest& Aws::SNS::Model::PublishRequest::WithTopicArn ( Aws::String &&  value)
inline

The topic you want to publish to.

If you don't specify a value for the TopicArn parameter, you must specify a value for the PhoneNumber or TargetArn parameters.

Definition at line 91 of file PublishRequest.h.

◆ WithTopicArn() [3/3]

PublishRequest& Aws::SNS::Model::PublishRequest::WithTopicArn ( const char *  value)
inline

The topic you want to publish to.

If you don't specify a value for the TopicArn parameter, you must specify a value for the PhoneNumber or TargetArn parameters.

Definition at line 98 of file PublishRequest.h.


The documentation for this class was generated from the following file: