Class SnsMessage
- java.lang.Object
-
- software.amazon.awssdk.messagemanager.sns.model.SnsMessage
-
- Direct Known Subclasses:
SnsNotification,SnsSubscriptionConfirmation,SnsUnsubscribeConfirmation
@SdkPublicApi public abstract class SnsMessage extends Object
Base class for SNS message types. This contains the common fields of SNS messages.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceSnsMessage.Builder<SubclassT extends SnsMessage.Builder<?>>protected static classSnsMessage.BuilderImpl<SubclassT extends SnsMessage.Builder<?>>
-
Constructor Summary
Constructors Modifier Constructor Description protectedSnsMessage(SnsMessage.BuilderImpl<?> builder)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)inthashCode()Stringmessage()The message body.StringmessageId()A Universally Unique Identifier (UUID), unique for each message published.SdkBytessignature()SHA1withRSA or SHA256withRSA signature of this message.SignatureVersionsignatureVersion()Version of the Amazon SNS signature used.URIsigningCertUrl()The URL to the certificate that was used to sign the message.Instanttimestamp()The time (GMT) when the message was sent.StringtopicArn()The Amazon Resource Name (ARN) for the topic.protected ToStringtoStringBuilder(String className)abstract SnsMessageTypetype()The type of this message.
-
-
-
Constructor Detail
-
SnsMessage
protected SnsMessage(SnsMessage.BuilderImpl<?> builder)
-
-
Method Detail
-
type
public abstract SnsMessageType type()
The type of this message.
-
messageId
public String messageId()
A Universally Unique Identifier (UUID), unique for each message published. For a message that Amazon SNS resends during a retry, the message ID of the original message is used.
-
message
public String message()
The message body.
-
topicArn
public String topicArn()
The Amazon Resource Name (ARN) for the topic.
-
timestamp
public Instant timestamp()
The time (GMT) when the message was sent.
-
signature
public SdkBytes signature()
SHA1withRSA or SHA256withRSA signature of this message. The values from the message used to calculate the signature are dictated by the message type. See the service documentation for more information.
-
signatureVersion
public SignatureVersion signatureVersion()
Version of the Amazon SNS signature used.
-
signingCertUrl
public URI signingCertUrl()
The URL to the certificate that was used to sign the message.
-
-