# LayerVersionOptions

Non runtime options.

- Source: [`aws-lambda/lib/layers.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/aws-cdk-lib/aws-lambda/lib/layers.ts#L23)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_lambda as lambda } from 'aws-cdk-lib';
const layerVersionOptions: lambda.LayerVersionOptions = {
  description: 'description',
  layerVersionName: 'layerVersionName',
  license: 'license',
  removalPolicy: cdk.RemovalPolicy.DESTROY,
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
from aws_cdk import aws_lambda as lambda_

layer_version_options = lambda.LayerVersionOptions(
    description="description",
    layer_version_name="layerVersionName",
    license="license",
    removal_policy=cdk.RemovalPolicy.DESTROY
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.lambda.*;

LayerVersionOptions layerVersionOptions = LayerVersionOptions.builder()
        .description("description")
        .layerVersionName("layerVersionName")
        .license("license")
        .removalPolicy(RemovalPolicy.DESTROY)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.AWS.Lambda;

var layerVersionOptions = new LayerVersionOptions {
    Description = "description",
    LayerVersionName = "layerVersionName",
    License = "license",
    RemovalPolicy = RemovalPolicy.DESTROY
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

layerVersionOptions := &LayerVersionOptions{
	Description: jsii.String("description"),
	LayerVersionName: jsii.String("layerVersionName"),
	License: jsii.String("license"),
	RemovalPolicy: cdk.RemovalPolicy_DESTROY,
}
```

## Properties

- `description`: string — The description the this Lambda Layer.

  **Default:** No description.

- `layerVersionName`: string — The name of the layer.

  **Default:** A name will be generated.

- `license`: string — The SPDX licence identifier or URL to the license file for this layer.

  **Default:** No license information will be recorded.

- `removalPolicy`: [RemovalPolicy](/cdk/api/v2/docs/aws-cdk-lib.RemovalPolicy.html) = RemovalPolicy.DESTROY — Whether to retain this version of the layer when a new version is added or when the stack is deleted.
