Class: AWSCDK::Lambda::LayerVersionProps

Inherits:
LayerVersionOptions
  • Object
show all
Defined in:
lambda/layer_version_props.rb

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, code:, compatible_architectures: nil, compatible_runtimes: nil) ⇒ LayerVersionProps

Returns a new instance of LayerVersionProps.

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.

  • code (AWSCDK::Lambda::Code)

    The content of this Layer.

  • compatible_architectures (Array<AWSCDK::Lambda::Architecture>, nil) (defaults to: nil)

    The system architectures compatible with this layer.

  • compatible_runtimes (Array<AWSCDK::Lambda::Runtime>, nil) (defaults to: nil)

    The runtimes compatible with this Layer.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lambda/layer_version_props.rb', line 13

def initialize(description: nil, layer_version_name: nil, license: nil, removal_policy: nil, code:, compatible_architectures: nil, compatible_runtimes: 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?
  @code = code
  Jsii::Type.check_type(@code, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLkNvZGUifQ==")), "code")
  @compatible_architectures = compatible_architectures
  Jsii::Type.check_type(@compatible_architectures, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQXJjaGl0ZWN0dXJlIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "compatibleArchitectures") unless @compatible_architectures.nil?
  @compatible_runtimes = compatible_runtimes
  Jsii::Type.check_type(@compatible_runtimes, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuUnVudGltZSJ9LCJraW5kIjoiYXJyYXkifX0=")), "compatibleRuntimes") unless @compatible_runtimes.nil?
end

Instance Attribute Details

#codeAWSCDK::Lambda::Code (readonly)

The content of this Layer.

Using Code.fromInline is not supported.



55
56
57
# File 'lambda/layer_version_props.rb', line 55

def code
  @code
end

#compatible_architecturesArray<AWSCDK::Lambda::Architecture>? (readonly)

Note:

Default: [Architecture.X86_64]

The system architectures compatible with this layer.

Returns:



60
61
62
# File 'lambda/layer_version_props.rb', line 60

def compatible_architectures
  @compatible_architectures
end

#compatible_runtimesArray<AWSCDK::Lambda::Runtime>? (readonly)

Note:

Default: - All runtimes are supported.

The runtimes compatible with this Layer.

Returns:



65
66
67
# File 'lambda/layer_version_props.rb', line 65

def compatible_runtimes
  @compatible_runtimes
end

#descriptionString? (readonly)

Note:

Default: - No description.

The description the this Lambda Layer.

Returns:

  • (String, nil)


34
35
36
# File 'lambda/layer_version_props.rb', line 34

def description
  @description
end

#layer_version_nameString? (readonly)

Note:

Default: - A name will be generated.

The name of the layer.

Returns:

  • (String, nil)


39
40
41
# File 'lambda/layer_version_props.rb', line 39

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)


44
45
46
# File 'lambda/layer_version_props.rb', line 44

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:



49
50
51
# File 'lambda/layer_version_props.rb', line 49

def removal_policy
  @removal_policy
end

Class Method Details

.jsii_propertiesObject



67
68
69
70
71
72
73
74
75
76
77
# File 'lambda/layer_version_props.rb', line 67

def self.jsii_properties
  {
    :description => "description",
    :layer_version_name => "layerVersionName",
    :license => "license",
    :removal_policy => "removalPolicy",
    :code => "code",
    :compatible_architectures => "compatibleArchitectures",
    :compatible_runtimes => "compatibleRuntimes",
  }
end

Instance Method Details

#to_jsiiObject



79
80
81
82
83
84
85
86
87
88
89
90
91
92
# File 'lambda/layer_version_props.rb', line 79

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "description" => @description,
    "layerVersionName" => @layer_version_name,
    "license" => @license,
    "removalPolicy" => @removal_policy,
    "code" => @code,
    "compatibleArchitectures" => @compatible_architectures,
    "compatibleRuntimes" => @compatible_runtimes,
  })
  result.compact
end