Class PythonLayerVersion.Builder

java.lang.Object
software.amazon.awscdk.services.lambda.python.PythonLayerVersion.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<PythonLayerVersion>
Enclosing class:
PythonLayerVersion

@Stability(Experimental) public static final class PythonLayerVersion.Builder extends Object implements software.amazon.jsii.Builder<PythonLayerVersion>
(experimental) A fluent builder for PythonLayerVersion.
  • Method Details

    • create

      @Stability(Experimental) public static PythonLayerVersion.Builder create(Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of PythonLayerVersion.Builder.
    • description

      @Stability(Stable) public PythonLayerVersion.Builder description(String 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

      @Stability(Stable) public PythonLayerVersion.Builder layerVersionName(String 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

      @Stability(Stable) public PythonLayerVersion.Builder license(String 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

      @Stability(Stable) public PythonLayerVersion.Builder removalPolicy(RemovalPolicy 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
    • entry

      @Stability(Experimental) public PythonLayerVersion.Builder entry(String entry)
      (experimental) The path to the root directory of the lambda layer.

      Parameters:
      entry - The path to the root directory of the lambda layer. This parameter is required.
      Returns:
      this
    • bundling

      @Stability(Experimental) public PythonLayerVersion.Builder bundling(BundlingOptions bundling)
      (experimental) Bundling options to use for this function.

      Use this to specify custom bundling options like the bundling Docker image, asset hash type, custom hash, architecture, etc.

      Default: - Use the default bundling Docker image, with x86_64 architecture.

      Parameters:
      bundling - Bundling options to use for this function. This parameter is required.
      Returns:
      this
    • compatibleArchitectures

      @Stability(Experimental) public PythonLayerVersion.Builder compatibleArchitectures(List<? extends Architecture> compatibleArchitectures)
      (experimental) 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(Experimental) public PythonLayerVersion.Builder compatibleRuntimes(List<? extends Runtime> compatibleRuntimes)
      (experimental) The runtimes compatible with the python layer.

      Default: - Only Python 3.7 is supported.

      Parameters:
      compatibleRuntimes - The runtimes compatible with the python layer. This parameter is required.
      Returns:
      this
    • build

      @Stability(Experimental) public PythonLayerVersion build()
      Specified by:
      build in interface software.amazon.jsii.Builder<PythonLayerVersion>
      Returns:
      a newly built instance of PythonLayerVersion.