Class: AWSCDK::Lambda::BucketOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
lambda/bucket_options.rb

Overview

Optional parameters for creating code using bucket.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object_version: nil, source_kms_key: nil) ⇒ BucketOptions

Returns a new instance of BucketOptions.

Parameters:

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

    Optional S3 object version.

  • source_kms_key (AWSCDK::Interfaces::AWSKMS::IKeyRef, nil) (defaults to: nil)

    The ARN of the KMS key used to encrypt the handler code.



9
10
11
12
13
14
# File 'lambda/bucket_options.rb', line 9

def initialize(object_version: nil, source_kms_key: nil)
  @object_version = object_version
  Jsii::Type.check_type(@object_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "objectVersion") unless @object_version.nil?
  @source_kms_key = source_kms_key
  Jsii::Type.check_type(@source_kms_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19rbXMuSUtleVJlZiJ9")), "sourceKMSKey") unless @source_kms_key.nil?
end

Instance Attribute Details

#object_versionString? (readonly)

Optional S3 object version.

Returns:

  • (String, nil)


19
20
21
# File 'lambda/bucket_options.rb', line 19

def object_version
  @object_version
end

#source_kms_keyAWSCDK::Interfaces::AWSKMS::IKeyRef? (readonly)

Note:

Default: - the default server-side encryption with Amazon S3 managed keys(SSE-S3) key will be used.

The ARN of the KMS key used to encrypt the handler code.



24
25
26
# File 'lambda/bucket_options.rb', line 24

def source_kms_key
  @source_kms_key
end

Class Method Details

.jsii_propertiesObject



26
27
28
29
30
31
# File 'lambda/bucket_options.rb', line 26

def self.jsii_properties
  {
    :object_version => "objectVersion",
    :source_kms_key => "sourceKMSKey",
  }
end

Instance Method Details

#to_jsiiObject



33
34
35
36
37
38
39
40
# File 'lambda/bucket_options.rb', line 33

def to_jsii
  result = {}
  result.merge!({
    "objectVersion" => @object_version,
    "sourceKMSKey" => @source_kms_key,
  })
  result.compact
end