Class: AWSCDK::SESActions::S3Props

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ses_actions/s3_props.rb

Overview

Construction properties for a S3 action.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bucket:, kms_key: nil, object_key_prefix: nil, topic: nil) ⇒ S3Props

Returns a new instance of S3Props.

Parameters:

  • bucket (AWSCDK::S3::IBucket)

    The S3 bucket that incoming email will be saved to.

  • kms_key (AWSCDK::KMS::IKey, nil) (defaults to: nil)

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

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

    The key prefix of the S3 bucket.

  • topic (AWSCDK::SNS::ITopic, nil) (defaults to: nil)

    The SNS topic to notify when the S3 action is taken.



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

def initialize(bucket:, kms_key: nil, object_key_prefix: nil, topic: nil)
  @bucket = bucket
  Jsii::Type.check_type(@bucket, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuSUJ1Y2tldCJ9")), "bucket")
  @kms_key = kms_key
  Jsii::Type.check_type(@kms_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa21zLklLZXkifQ==")), "kmsKey") unless @kms_key.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 = topic
  Jsii::Type.check_type(@topic, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc25zLklUb3BpYyJ9")), "topic") unless @topic.nil?
end

Instance Attribute Details

#bucketAWSCDK::S3::IBucket (readonly)

The S3 bucket that incoming email will be saved to.

Returns:



25
26
27
# File 'ses_actions/s3_props.rb', line 25

def bucket
  @bucket
end

#kms_keyAWSCDK::KMS::IKey? (readonly)

Note:

Default: no encryption

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

Returns:



30
31
32
# File 'ses_actions/s3_props.rb', line 30

def kms_key
  @kms_key
end

#object_key_prefixString? (readonly)

Note:

Default: no prefix

The key prefix of the S3 bucket.

Returns:

  • (String, nil)


35
36
37
# File 'ses_actions/s3_props.rb', line 35

def object_key_prefix
  @object_key_prefix
end

#topicAWSCDK::SNS::ITopic? (readonly)

Note:

Default: no notification

The SNS topic to notify when the S3 action is taken.

Returns:



40
41
42
# File 'ses_actions/s3_props.rb', line 40

def topic
  @topic
end

Class Method Details

.jsii_propertiesObject



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

def self.jsii_properties
  {
    :bucket => "bucket",
    :kms_key => "kmsKey",
    :object_key_prefix => "objectKeyPrefix",
    :topic => "topic",
  }
end

Instance Method Details

#to_jsiiObject



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

def to_jsii
  result = {}
  result.merge!({
    "bucket" => @bucket,
    "kmsKey" => @kms_key,
    "objectKeyPrefix" => @object_key_prefix,
    "topic" => @topic,
  })
  result.compact
end