Skip to content
v2.278.0

CfnLayerVersionProps Struct ​

Properties for defining a CfnLayerVersion.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sam as sam } from 'aws-cdk-lib';
const cfnLayerVersionProps: sam.CfnLayerVersionProps = {
  compatibleRuntimes: ['compatibleRuntimes'],
  contentUri: 'contentUri',
  description: 'description',
  layerName: 'layerName',
  licenseInfo: 'licenseInfo',
  retentionPolicy: 'retentionPolicy',
};
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_sam as sam

cfn_layer_version_props = sam.CfnLayerVersionProps(
    compatible_runtimes=["compatibleRuntimes"],
    content_uri="contentUri",
    description="description",
    layer_name="layerName",
    license_info="licenseInfo",
    retention_policy="retentionPolicy"
)
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.sam.*;

CfnLayerVersionProps cfnLayerVersionProps = CfnLayerVersionProps.builder()
        .compatibleRuntimes(List.of("compatibleRuntimes"))
        .contentUri("contentUri")
        .description("description")
        .layerName("layerName")
        .licenseInfo("licenseInfo")
        .retentionPolicy("retentionPolicy")
        .build();
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.SAM;

var cfnLayerVersionProps = new CfnLayerVersionProps {
    CompatibleRuntimes = new [] { "compatibleRuntimes" },
    ContentUri = "contentUri",
    Description = "description",
    LayerName = "layerName",
    LicenseInfo = "licenseInfo",
    RetentionPolicy = "retentionPolicy"
};
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{
	CompatibleRuntimes: []*string{
		jsii.String("compatibleRuntimes"),
	},
	ContentUri: jsii.String("contentUri"),
	Description: jsii.String("description"),
	LayerName: jsii.String("layerName"),
	LicenseInfo: jsii.String("licenseInfo"),
	RetentionPolicy: jsii.String("retentionPolicy"),
}

Properties ​

compatibleRuntimesoptionalstring[]compatible_runtimesoptionaltyping.List[str]compatibleRuntimesoptionalList<String>CompatibleRuntimesoptionalstring[]CompatibleRuntimesoptional*[]*string #
contentUrioptionalstring | IResolvable | CfnLayerVersion.S3LocationPropertycontent_urioptionaltyping.Union[str, IResolvable, S3LocationProperty]contentUrioptionalStringContentUrioptionalstringContentUrioptionalinterface{} #
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #
layerNameoptionalstringlayer_nameoptionalstrlayerNameoptionalStringLayerNameoptionalstringLayerNameoptional*string #
licenseInfooptionalstringlicense_infooptionalstrlicenseInfooptionalStringLicenseInfooptionalstringLicenseInfooptional*string #
retentionPolicyoptionalstringretention_policyoptionalstrretentionPolicyoptionalStringRetentionPolicyoptionalstringRetentionPolicyoptional*string #