Class: AWSCDK::SES::S3ActionConfig

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

Overview

S3Action configuration.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bucket_name:, kms_key_arn: nil, object_key_prefix: nil, topic_arn: nil) ⇒ S3ActionConfig

Returns a new instance of S3ActionConfig.

Parameters:

  • bucket_name (String)

    The name of the Amazon S3 bucket that you want to send incoming mail to.

  • kms_key_arn (String, nil) (defaults to: nil)

    The customer master key that Amazon SES should use to encrypt your emails before saving them to the Amazon S3 bucket.

  • object_key_prefix (String, nil) (defaults to: nil)

    The key prefix of the Amazon S3 bucket.

  • topic_arn (String, nil) (defaults to: nil)

    The ARN of the Amazon SNS topic to notify when the message is saved to the Amazon S3 bucket.



11
12
13
14
15
16
17
18
19
20
# File 'ses/s3_action_config.rb', line 11

def initialize(bucket_name:, kms_key_arn: nil, object_key_prefix: nil, topic_arn: nil)
  @bucket_name = bucket_name
  Jsii::Type.check_type(@bucket_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "bucketName")
  @kms_key_arn = kms_key_arn
  Jsii::Type.check_type(@kms_key_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "kmsKeyArn") unless @kms_key_arn.nil?
  @object_key_prefix = object_key_prefix
  Jsii::Type.check_type(@object_key_prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "objectKeyPrefix") unless @object_key_prefix.nil?
  @topic_arn = topic_arn
  Jsii::Type.check_type(@topic_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "topicArn") unless @topic_arn.nil?
end

Instance Attribute Details

#bucket_nameString (readonly)

The name of the Amazon S3 bucket that you want to send incoming mail to.

Returns:

  • (String)


25
26
27
# File 'ses/s3_action_config.rb', line 25

def bucket_name
  @bucket_name
end

#kms_key_arnString? (readonly)

Note:

Default: - Emails are not encrypted.

The customer master key that Amazon SES should use to encrypt your emails before saving them to the Amazon S3 bucket.

Returns:

  • (String, nil)


30
31
32
# File 'ses/s3_action_config.rb', line 30

def kms_key_arn
  @kms_key_arn
end

#object_key_prefixString? (readonly)

Note:

Default: - No prefix.

The key prefix of the Amazon S3 bucket.

Returns:

  • (String, nil)


35
36
37
# File 'ses/s3_action_config.rb', line 35

def object_key_prefix
  @object_key_prefix
end

#topic_arnString? (readonly)

Note:

Default: - No notification is sent to SNS.

The ARN of the Amazon SNS topic to notify when the message is saved to the Amazon S3 bucket.

Returns:

  • (String, nil)


40
41
42
# File 'ses/s3_action_config.rb', line 40

def topic_arn
  @topic_arn
end

Class Method Details

.jsii_propertiesObject



42
43
44
45
46
47
48
49
# File 'ses/s3_action_config.rb', line 42

def self.jsii_properties
  {
    :bucket_name => "bucketName",
    :kms_key_arn => "kmsKeyArn",
    :object_key_prefix => "objectKeyPrefix",
    :topic_arn => "topicArn",
  }
end

Instance Method Details

#to_jsiiObject



51
52
53
54
55
56
57
58
59
60
# File 'ses/s3_action_config.rb', line 51

def to_jsii
  result = {}
  result.merge!({
    "bucketName" => @bucket_name,
    "kmsKeyArn" => @kms_key_arn,
    "objectKeyPrefix" => @object_key_prefix,
    "topicArn" => @topic_arn,
  })
  result.compact
end