Class LayerVersion.Builder
java.lang.Object
software.amazon.awscdk.services.lambda.LayerVersion.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<LayerVersion>
- Enclosing class:
LayerVersion
@Stability(Stable)
public static final class LayerVersion.Builder
extends Object
implements software.amazon.jsii.Builder<LayerVersion>
A fluent builder for
LayerVersion
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
The content of this Layer.compatibleArchitectures
(List<? extends Architecture> compatibleArchitectures) The system architectures compatible with this layer.compatibleRuntimes
(List<? extends Runtime> compatibleRuntimes) The runtimes compatible with this Layer.static LayerVersion.Builder
description
(String description) The description the this Lambda Layer.layerVersionName
(String layerVersionName) The name of the layer.The SPDX licence identifier or URL to the license file for this layer.removalPolicy
(RemovalPolicy removalPolicy) Whether to retain this version of the layer when a new version is added or when the stack is deleted.
-
Method Details
-
create
@Stability(Stable) public static LayerVersion.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
LayerVersion.Builder
.
-
description
The description the this Lambda Layer.Default: - No description.
- Parameters:
description
- The description the this Lambda Layer. This parameter is required.- Returns:
this
-
layerVersionName
The name of the layer.Default: - A name will be generated.
- Parameters:
layerVersionName
- The name of the layer. This parameter is required.- Returns:
this
-
license
The SPDX licence identifier or URL to the license file for this layer.Default: - No license information will be recorded.
- Parameters:
license
- The SPDX licence identifier or URL to the license file for this layer. This parameter is required.- Returns:
this
-
removalPolicy
Whether to retain this version of the layer when a new version is added or when the stack is deleted.Default: RemovalPolicy.DESTROY
- Parameters:
removalPolicy
- Whether to retain this version of the layer when a new version is added or when the stack is deleted. This parameter is required.- Returns:
this
-
code
The content of this Layer.Using
Code.fromInline
is not supported.- Parameters:
code
- The content of this Layer. This parameter is required.- Returns:
this
-
compatibleArchitectures
@Stability(Stable) public LayerVersion.Builder compatibleArchitectures(List<? extends Architecture> compatibleArchitectures) The system architectures compatible with this layer.Default: [Architecture.X86_64]
- Parameters:
compatibleArchitectures
- The system architectures compatible with this layer. This parameter is required.- Returns:
this
-
compatibleRuntimes
@Stability(Stable) public LayerVersion.Builder compatibleRuntimes(List<? extends Runtime> compatibleRuntimes) The runtimes compatible with this Layer.Default: - All runtimes are supported.
- Parameters:
compatibleRuntimes
- The runtimes compatible with this Layer. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<LayerVersion>
- Returns:
- a newly built instance of
LayerVersion
.
-