Struct aws_lambda_events::sns::SnsMessage
source · [−]pub struct SnsMessage {
pub sns_message_type: String,
pub message_id: String,
pub topic_arn: String,
pub subject: Option<String>,
pub timestamp: DateTime<Utc>,
pub signature_version: String,
pub signature: String,
pub signing_cert_url: String,
pub unsubscribe_url: String,
pub message: String,
pub message_attributes: HashMap<String, MessageAttribute>,
}
Expand description
SnsMessage stores information about each record of a SNS event
Fields
sns_message_type: String
The type of SNS message. For a lambda event, this should always be Notification
message_id: String
A Universally Unique Identifier, unique for each message published. For a notification that Amazon SNS resends during a retry, the message ID of the original message is used.
topic_arn: String
The Amazon Resource Name (ARN) for the topic that this message was published to.
subject: Option<String>
The Subject parameter specified when the notification was published to the topic.
The SNS Developer Guide states: This is an optional parameter. If no Subject was specified, then this name-value pair does not appear in this JSON document.
Preliminary tests show this appears in the lambda event JSON as Subject: null
, marking as Option with need to test additional scenarios
timestamp: DateTime<Utc>
The time (UTC) when the notification was published.
signature_version: String
Version of the Amazon SNS signature used.
signature: String
Base64-encoded SHA1withRSA signature of the Message, MessageId, Subject (if present), Type, Timestamp, and TopicArn values.
signing_cert_url: String
The URL to the certificate that was used to sign the message.
unsubscribe_url: String
A URL that you can use to unsubscribe the endpoint from this topic. If you visit this URL, Amazon SNS unsubscribes the endpoint and stops sending notifications to this endpoint.
message: String
The Message value specified when the notification was published to the topic.
message_attributes: HashMap<String, MessageAttribute>
This is a HashMap of defined attributes for a message. Additional details can be found in the SNS Developer Guide
Trait Implementations
sourceimpl Clone for SnsMessage
impl Clone for SnsMessage
sourcefn clone(&self) -> SnsMessage
fn clone(&self) -> SnsMessage
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SnsMessage
impl Debug for SnsMessage
sourceimpl<'de> Deserialize<'de> for SnsMessage
impl<'de> Deserialize<'de> for SnsMessage
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<SnsMessage> for SnsMessage
impl PartialEq<SnsMessage> for SnsMessage
sourcefn eq(&self, other: &SnsMessage) -> bool
fn eq(&self, other: &SnsMessage) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &SnsMessage) -> bool
fn ne(&self, other: &SnsMessage) -> bool
This method tests for !=
.
sourceimpl Serialize for SnsMessage
impl Serialize for SnsMessage
impl StructuralPartialEq for SnsMessage
Auto Trait Implementations
impl RefUnwindSafe for SnsMessage
impl Send for SnsMessage
impl Sync for SnsMessage
impl Unpin for SnsMessage
impl UnwindSafe for SnsMessage
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more