Class CfnLayerVersion

java.lang.Object
software.amazon.jsii.JsiiObject
All Implemented Interfaces:
IConstruct, IDependable, IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:40.641Z") @Stability(Stable) public class CfnLayerVersion extends CfnResource implements IInspectable
A CloudFormation AWS::Lambda::LayerVersion.

The AWS::Lambda::LayerVersion resource creates a Lambda layer from a ZIP archive.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.lambda.*;
 CfnLayerVersion cfnLayerVersion = CfnLayerVersion.Builder.create(this, "MyCfnLayerVersion")
         .content(ContentProperty.builder()
                 .s3Bucket("s3Bucket")
                 .s3Key("s3Key")
                 // the properties below are optional
                 .s3ObjectVersion("s3ObjectVersion")
                 .build())
         // the properties below are optional
         .compatibleArchitectures(List.of("compatibleArchitectures"))
         .compatibleRuntimes(List.of("compatibleRuntimes"))
         .description("description")
         .layerName("layerName")
         .licenseInfo("licenseInfo")
         .build();
 
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnLayerVersion

      protected CfnLayerVersion(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnLayerVersion

      protected CfnLayerVersion(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnLayerVersion

      @Stability(Stable) public CfnLayerVersion(@NotNull Construct scope, @NotNull String id, @NotNull CfnLayerVersionProps props)
      Create a new AWS::Lambda::LayerVersion.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      props -
      • resource properties.
      This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector -
      • tree inspector to collect and process attributes.
      This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getContent

      @Stability(Stable) @NotNull public Object getContent()
      The function layer archive.
    • setContent

      @Stability(Stable) public void setContent(@NotNull IResolvable value)
      The function layer archive.
    • setContent

      @Stability(Stable) public void setContent(@NotNull CfnLayerVersion.ContentProperty value)
      The function layer archive.
    • getCompatibleArchitectures

      @Stability(Stable) @Nullable public List<String> getCompatibleArchitectures()
      A list of compatible instruction set architectures .
    • setCompatibleArchitectures

      @Stability(Stable) public void setCompatibleArchitectures(@Nullable List<String> value)
      A list of compatible instruction set architectures .
    • getCompatibleRuntimes

      @Stability(Stable) @Nullable public List<String> getCompatibleRuntimes()
      A list of compatible function runtimes . Used for filtering with ListLayers and ListLayerVersions .
    • setCompatibleRuntimes

      @Stability(Stable) public void setCompatibleRuntimes(@Nullable List<String> value)
      A list of compatible function runtimes . Used for filtering with ListLayers and ListLayerVersions .
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      The description of the version.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      The description of the version.
    • getLayerName

      @Stability(Stable) @Nullable public String getLayerName()
      The name or Amazon Resource Name (ARN) of the layer.
    • setLayerName

      @Stability(Stable) public void setLayerName(@Nullable String value)
      The name or Amazon Resource Name (ARN) of the layer.
    • getLicenseInfo

      @Stability(Stable) @Nullable public String getLicenseInfo()
      The layer's software license. It can be any of the following:.

      • An SPDX license identifier . For example, MIT .
      • The URL of a license hosted on the internet. For example, https://opensource.org/licenses/MIT .
      • The full text of the license.
    • setLicenseInfo

      @Stability(Stable) public void setLicenseInfo(@Nullable String value)
      The layer's software license. It can be any of the following:.

      • An SPDX license identifier . For example, MIT .
      • The URL of a license hosted on the internet. For example, https://opensource.org/licenses/MIT .
      • The full text of the license.