Class LayerVersionOptions.Builder
java.lang.Object
software.amazon.awscdk.services.lambda.LayerVersionOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<LayerVersionOptions>
- Enclosing interface:
LayerVersionOptions
@Stability(Stable)
public static final class LayerVersionOptions.Builder
extends Object
implements software.amazon.jsii.Builder<LayerVersionOptions>
A builder for
LayerVersionOptions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.description
(String description) Sets the value ofLayerVersionOptions.getDescription()
layerVersionName
(String layerVersionName) Sets the value ofLayerVersionOptions.getLayerVersionName()
Sets the value ofLayerVersionOptions.getLicense()
removalPolicy
(RemovalPolicy removalPolicy) Sets the value ofLayerVersionOptions.getRemovalPolicy()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
description
Sets the value ofLayerVersionOptions.getDescription()
- Parameters:
description
- The description the this Lambda Layer.- Returns:
this
-
layerVersionName
Sets the value ofLayerVersionOptions.getLayerVersionName()
- Parameters:
layerVersionName
- The name of the layer.- Returns:
this
-
license
Sets the value ofLayerVersionOptions.getLicense()
- Parameters:
license
- The SPDX licence identifier or URL to the license file for this layer.- Returns:
this
-
removalPolicy
Sets the value ofLayerVersionOptions.getRemovalPolicy()
- Parameters:
removalPolicy
- Whether to retain this version of the layer when a new version is added or when the stack is deleted.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<LayerVersionOptions>
- Returns:
- a new instance of
LayerVersionOptions
- Throws:
NullPointerException
- if any required attribute was not provided
-