Class: AWSCDK::Lambda::LayerVersionOptions

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

Overview

Non runtime options.

Direct Known Subclasses

LayerVersionProps

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(description: nil, layer_version_name: nil, license: nil, removal_policy: nil) ⇒ LayerVersionOptions

Returns a new instance of LayerVersionOptions.

Parameters:

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

    The description the this Lambda Layer.

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

    The name of the layer.

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

    The SPDX licence identifier or URL to the license file for this layer.

  • removal_policy (AWSCDK::RemovalPolicy, nil) (defaults to: nil)

    Whether to retain this version of the layer when a new version is added or when the stack is deleted.



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

def initialize(description: nil, layer_version_name: nil, license: nil, removal_policy: nil)
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @layer_version_name = layer_version_name
  Jsii::Type.check_type(@layer_version_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "layerVersionName") unless @layer_version_name.nil?
  @license = license
  Jsii::Type.check_type(@license, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "license") unless @license.nil?
  @removal_policy = removal_policy
  Jsii::Type.check_type(@removal_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "removalPolicy") unless @removal_policy.nil?
end

Instance Attribute Details

#descriptionString? (readonly)

Note:

Default: - No description.

The description the this Lambda Layer.

Returns:

  • (String, nil)


26
27
28
# File 'lambda/layer_version_options.rb', line 26

def description
  @description
end

#layer_version_nameString? (readonly)

Note:

Default: - A name will be generated.

The name of the layer.

Returns:

  • (String, nil)


31
32
33
# File 'lambda/layer_version_options.rb', line 31

def layer_version_name
  @layer_version_name
end

#licenseString? (readonly)

Note:

Default: - No license information will be recorded.

The SPDX licence identifier or URL to the license file for this layer.

Returns:

  • (String, nil)


36
37
38
# File 'lambda/layer_version_options.rb', line 36

def license
  @license
end

#removal_policyAWSCDK::RemovalPolicy? (readonly)

Note:

Default: RemovalPolicy.DESTROY

Whether to retain this version of the layer when a new version is added or when the stack is deleted.

Returns:



41
42
43
# File 'lambda/layer_version_options.rb', line 41

def removal_policy
  @removal_policy
end

Class Method Details

.jsii_propertiesObject



43
44
45
46
47
48
49
50
# File 'lambda/layer_version_options.rb', line 43

def self.jsii_properties
  {
    :description => "description",
    :layer_version_name => "layerVersionName",
    :license => "license",
    :removal_policy => "removalPolicy",
  }
end

Instance Method Details

#to_jsiiObject



52
53
54
55
56
57
58
59
60
61
# File 'lambda/layer_version_options.rb', line 52

def to_jsii
  result = {}
  result.merge!({
    "description" => @description,
    "layerVersionName" => @layer_version_name,
    "license" => @license,
    "removalPolicy" => @removal_policy,
  })
  result.compact
end