# CfnLayerVersionProps

Properties for defining a `CfnLayerVersion`.

Used as props by: [CfnLayerVersion](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.CfnLayerVersion.html)

- Source: Generated at build time

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_lambda as lambda } from 'aws-cdk-lib';
const cfnLayerVersionProps: lambda.CfnLayerVersionProps = {
  content: {
    s3Bucket: 's3Bucket',
    s3Key: 's3Key',

    // the properties below are optional
    s3ObjectStorageMode: 's3ObjectStorageMode',
    s3ObjectVersion: 's3ObjectVersion',
  },

  // the properties below are optional
  compatibleArchitectures: ['compatibleArchitectures'],
  compatibleRuntimes: ['compatibleRuntimes'],
  description: 'description',
  layerName: 'layerName',
  licenseInfo: 'licenseInfo',
};
```

Python:

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

cfn_layer_version_props = lambda.CfnLayerVersionProps(
    content=lambda.CfnLayerVersion.ContentProperty(
        s3_bucket="s3Bucket",
        s3_key="s3Key",

        # the properties below are optional
        s3_object_storage_mode="s3ObjectStorageMode",
        s3_object_version="s3ObjectVersion"
    ),

    # the properties below are optional
    compatible_architectures=["compatibleArchitectures"],
    compatible_runtimes=["compatibleRuntimes"],
    description="description",
    layer_name="layerName",
    license_info="licenseInfo"
)
```

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.services.lambda.*;

CfnLayerVersionProps cfnLayerVersionProps = CfnLayerVersionProps.builder()
        .content(ContentProperty.builder()
                .s3Bucket("s3Bucket")
                .s3Key("s3Key")

                // the properties below are optional
                .s3ObjectStorageMode("s3ObjectStorageMode")
                .s3ObjectVersion("s3ObjectVersion")
                .build())

        // the properties below are optional
        .compatibleArchitectures(List.of("compatibleArchitectures"))
        .compatibleRuntimes(List.of("compatibleRuntimes"))
        .description("description")
        .layerName("layerName")
        .licenseInfo("licenseInfo")
        .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.AWS.Lambda;

var cfnLayerVersionProps = new CfnLayerVersionProps {
    Content = new ContentProperty {
        S3Bucket = "s3Bucket",
        S3Key = "s3Key",

        // the properties below are optional
        S3ObjectStorageMode = "s3ObjectStorageMode",
        S3ObjectVersion = "s3ObjectVersion"
    },

    // the properties below are optional
    CompatibleArchitectures = new [] { "compatibleArchitectures" },
    CompatibleRuntimes = new [] { "compatibleRuntimes" },
    Description = "description",
    LayerName = "layerName",
    LicenseInfo = "licenseInfo"
};
```

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 "github.com/aws/aws-cdk-go/awscdk"

cfnLayerVersionProps := &CfnLayerVersionProps{
	Content: &ContentProperty{
		S3Bucket: jsii.String("s3Bucket"),
		S3Key: jsii.String("s3Key"),

		// the properties below are optional
		S3ObjectStorageMode: jsii.String("s3ObjectStorageMode"),
		S3ObjectVersion: jsii.String("s3ObjectVersion"),
	},

	// the properties below are optional
	CompatibleArchitectures: []*string{
		jsii.String("compatibleArchitectures"),
	},
	CompatibleRuntimes: []*string{
		jsii.String("compatibleRuntimes"),
	},
	Description: jsii.String("description"),
	LayerName: jsii.String("layerName"),
	LicenseInfo: jsii.String("licenseInfo"),
}
```

## Properties

- `compatibleArchitectures`: string[] — A list of compatible [instruction set architectures](https://docs.aws.amazon.com/lambda/latest/dg/foundation-arch.html) .

- `compatibleRuntimes`: string[] — A list of compatible [function runtimes](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html) . Used for filtering with [ListLayers](https://docs.aws.amazon.com/lambda/latest/dg/API_ListLayers.html) and [ListLayerVersions](https://docs.aws.amazon.com/lambda/latest/dg/API_ListLayerVersions.html) .

- `content`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnLayerVersion.ContentProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.CfnLayerVersion.ContentProperty.html) (required) — The function layer archive.

- `description`: string — The description of the version.

- `layerName`: string — The name or Amazon Resource Name (ARN) of the layer.

- `licenseInfo`: string — The layer's software license. It can be any of the following:.

  - An [SPDX license identifier](https://docs.aws.amazon.com/https://spdx.org/licenses/) . 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.
