Class: AWSCDK::SES::CfnConfigurationSetEventDestination::EventDestinationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ses/cfn_configuration_set_event_destination.rb

Overview

In the Amazon SES API v2, events include message sends, deliveries, opens, clicks, bounces, complaints and delivery delays.

Event destinations are places that you can send information about these events to. For example, you can send event data to Amazon SNS to receive notifications when you receive bounces or complaints, or you can use Amazon Kinesis Data Firehose to stream data to Amazon S3 for long-term storage.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(matching_event_types:, cloud_watch_destination: nil, enabled: nil, event_bridge_destination: nil, kinesis_firehose_destination: nil, name: nil, sns_destination: nil) ⇒ EventDestinationProperty

Returns a new instance of EventDestinationProperty.

Parameters:



661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
# File 'ses/cfn_configuration_set_event_destination.rb', line 661

def initialize(matching_event_types:, cloud_watch_destination: nil, enabled: nil, event_bridge_destination: nil, kinesis_firehose_destination: nil, name: nil, sns_destination: nil)
  @matching_event_types = matching_event_types
  Jsii::Type.check_type(@matching_event_types, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "matchingEventTypes")
  @cloud_watch_destination = cloud_watch_destination.is_a?(Hash) ? ::AWSCDK::SES::CfnConfigurationSetEventDestination::CloudWatchDestinationProperty.new(**cloud_watch_destination.transform_keys(&:to_sym)) : cloud_watch_destination
  Jsii::Type.check_type(@cloud_watch_destination, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zZXMuQ2ZuQ29uZmlndXJhdGlvblNldEV2ZW50RGVzdGluYXRpb24uQ2xvdWRXYXRjaERlc3RpbmF0aW9uUHJvcGVydHkifV19fQ==")), "cloudWatchDestination") unless @cloud_watch_destination.nil?
  @enabled = enabled
  Jsii::Type.check_type(@enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enabled") unless @enabled.nil?
  @event_bridge_destination = event_bridge_destination.is_a?(Hash) ? ::AWSCDK::SES::CfnConfigurationSetEventDestination::EventBridgeDestinationProperty.new(**event_bridge_destination.transform_keys(&:to_sym)) : event_bridge_destination
  Jsii::Type.check_type(@event_bridge_destination, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zZXMuQ2ZuQ29uZmlndXJhdGlvblNldEV2ZW50RGVzdGluYXRpb24uRXZlbnRCcmlkZ2VEZXN0aW5hdGlvblByb3BlcnR5In1dfX0=")), "eventBridgeDestination") unless @event_bridge_destination.nil?
  @kinesis_firehose_destination = kinesis_firehose_destination.is_a?(Hash) ? ::AWSCDK::SES::CfnConfigurationSetEventDestination::KinesisFirehoseDestinationProperty.new(**kinesis_firehose_destination.transform_keys(&:to_sym)) : kinesis_firehose_destination
  Jsii::Type.check_type(@kinesis_firehose_destination, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zZXMuQ2ZuQ29uZmlndXJhdGlvblNldEV2ZW50RGVzdGluYXRpb24uS2luZXNpc0ZpcmVob3NlRGVzdGluYXRpb25Qcm9wZXJ0eSJ9XX19")), "kinesisFirehoseDestination") unless @kinesis_firehose_destination.nil?
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil?
  @sns_destination = sns_destination.is_a?(Hash) ? ::AWSCDK::SES::CfnConfigurationSetEventDestination::SNSDestinationProperty.new(**sns_destination.transform_keys(&:to_sym)) : sns_destination
  Jsii::Type.check_type(@sns_destination, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zZXMuQ2ZuQ29uZmlndXJhdGlvblNldEV2ZW50RGVzdGluYXRpb24uU25zRGVzdGluYXRpb25Qcm9wZXJ0eSJ9XX19")), "snsDestination") unless @sns_destination.nil?
end

Instance Attribute Details

#cloud_watch_destinationAWSCDK::IResolvable, ... (readonly)

An object that defines an Amazon CloudWatch destination for email events.

You can use Amazon CloudWatch to monitor and gain insights on your email sending metrics.



700
701
702
# File 'ses/cfn_configuration_set_event_destination.rb', line 700

def cloud_watch_destination
  @cloud_watch_destination
end

#enabledBoolean, ... (readonly)

If true , the event destination is enabled.

When the event destination is enabled, the specified event types are sent to the destinations in this EventDestinationDefinition .

If false , the event destination is disabled. When the event destination is disabled, events aren't sent to the specified destinations.



709
710
711
# File 'ses/cfn_configuration_set_event_destination.rb', line 709

def enabled
  @enabled
end

#event_bridge_destinationAWSCDK::IResolvable, ... (readonly)

An object that defines an Amazon EventBridge destination for email events.

You can use Amazon EventBridge to send notifications when certain email events occur.



716
717
718
# File 'ses/cfn_configuration_set_event_destination.rb', line 716

def event_bridge_destination
  @event_bridge_destination
end

#kinesis_firehose_destinationAWSCDK::IResolvable, ... (readonly)

An object that contains the delivery stream ARN and the IAM role ARN associated with an Amazon Kinesis Firehose event destination.



721
722
723
# File 'ses/cfn_configuration_set_event_destination.rb', line 721

def kinesis_firehose_destination
  @kinesis_firehose_destination
end

#matching_event_typesArray<String> (readonly)

The types of events that Amazon SES sends to the specified event destinations.

  • SEND - The send request was successful and SES will attempt to deliver the message to the recipient’s mail server. (If account-level or global suppression is being used, SES will still count it as a send, but delivery is suppressed.)
  • REJECT - SES accepted the email, but determined that it contained a virus and didn’t attempt to deliver it to the recipient’s mail server.
  • BOUNCE - ( Hard bounce ) The recipient's mail server permanently rejected the email. ( Soft bounces are only included when SES fails to deliver the email after retrying for a period of time.)
  • COMPLAINT - The email was successfully delivered to the recipient’s mail server, but the recipient marked it as spam.
  • DELIVERY - SES successfully delivered the email to the recipient's mail server.
  • OPEN - The recipient received the message and opened it in their email client.
  • CLICK - The recipient clicked one or more links in the email.
  • RENDERING_FAILURE - The email wasn't sent because of a template rendering issue. This event type can occur when template data is missing, or when there is a mismatch between template parameters and data. (This event type only occurs when you send email using the SendEmail or SendBulkEmail API operations.)
  • DELIVERY_DELAY - The email couldn't be delivered to the recipient’s mail server because a temporary issue occurred. Delivery delays can occur, for example, when the recipient's inbox is full, or when the receiving email server experiences a transient issue.
  • SUBSCRIPTION - The email was successfully delivered, but the recipient updated their subscription preferences by clicking on an unsubscribe link as part of your subscription management .


693
694
695
# File 'ses/cfn_configuration_set_event_destination.rb', line 693

def matching_event_types
  @matching_event_types
end

#nameString? (readonly)

The name of the event destination. The name must meet the following requirements:.

  • Contain only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-).
  • Contain 64 characters or fewer.


729
730
731
# File 'ses/cfn_configuration_set_event_destination.rb', line 729

def name
  @name
end

#sns_destinationAWSCDK::IResolvable, ... (readonly)

An object that contains the topic ARN associated with an Amazon Simple Notification Service (Amazon SNS) event destination.



734
735
736
# File 'ses/cfn_configuration_set_event_destination.rb', line 734

def sns_destination
  @sns_destination
end

Class Method Details

.jsii_propertiesObject



736
737
738
739
740
741
742
743
744
745
746
# File 'ses/cfn_configuration_set_event_destination.rb', line 736

def self.jsii_properties
  {
    :matching_event_types => "matchingEventTypes",
    :cloud_watch_destination => "cloudWatchDestination",
    :enabled => "enabled",
    :event_bridge_destination => "eventBridgeDestination",
    :kinesis_firehose_destination => "kinesisFirehoseDestination",
    :name => "name",
    :sns_destination => "snsDestination",
  }
end

Instance Method Details

#to_jsiiObject



748
749
750
751
752
753
754
755
756
757
758
759
760
# File 'ses/cfn_configuration_set_event_destination.rb', line 748

def to_jsii
  result = {}
  result.merge!({
    "matchingEventTypes" => @matching_event_types,
    "cloudWatchDestination" => @cloud_watch_destination,
    "enabled" => @enabled,
    "eventBridgeDestination" => @event_bridge_destination,
    "kinesisFirehoseDestination" => @kinesis_firehose_destination,
    "name" => @name,
    "snsDestination" => @sns_destination,
  })
  result.compact
end