The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

SNS::Notification - An object for representing SNS Notifications

SYNOPSIS

  use SNS::Notification;
  my $not = SNS::Notification->new(
    Timestamp => ...
    ... required attributes ...
  );
  #do something with $obj

  my $body = decode_json($sns_message);
  my $sns = eval { SNS::Notification->new($body) };
  if ($@) {
    die "Doesn't look like an SNS::Message to me";
  }
  print $sns->Message;

DESCRIPTION

This module holds an object for representing an SNS messsage. It tries to validate that all appropiate fields are present.

This is really just a module for other modules that work with SNS to depend on (and not reimplement it constantly).

SEE ALSO

http://docs.aws.amazon.com/sns/latest/dg/json-formats.html

http://docs.aws.amazon.com/sns/latest/dg/SendMessageToHttp.html

http://docs.aws.amazon.com/sns/latest/dg/SendMessageToSQS.html

COPYRIGHT and LICENSE

Copyright (c) 2020 by Jose Luis Martinez

This code is distributed under the Apache 2 License. The full text of the license can be found in the LICENSE file included with this module.