CfnLayerVersionPropsMixin

class aws_cdk.mixins_preview.aws_lambda.mixins.CfnLayerVersionPropsMixin(props, *, strategy=None)

Bases: Mixin

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-layerversion.html

CloudformationResource:

AWS::Lambda::LayerVersion

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

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

cfn_layer_version_props_mixin = lambda_mixins.CfnLayerVersionPropsMixin(lambda_mixins.CfnLayerVersionMixinProps(
    compatible_architectures=["compatibleArchitectures"],
    compatible_runtimes=["compatibleRuntimes"],
    content=lambda_mixins.CfnLayerVersionPropsMixin.ContentProperty(
        s3_bucket="s3Bucket",
        s3_key="s3Key",
        s3_object_version="s3ObjectVersion"
    ),
    description="description",
    layer_name="layerName",
    license_info="licenseInfo"
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::Lambda::LayerVersion.

Parameters:

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['compatibleArchitectures', 'compatibleRuntimes', 'content', 'description', 'layerName', 'licenseInfo']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

ContentProperty

class CfnLayerVersionPropsMixin.ContentProperty(*, s3_bucket=None, s3_key=None, s3_object_version=None)

Bases: object

A ZIP archive that contains the contents of an Lambda layer .

Parameters:
  • s3_bucket (Optional[str]) – The Amazon S3 bucket of the layer archive.

  • s3_key (Optional[str]) – The Amazon S3 key of the layer archive.

  • s3_object_version (Optional[str]) – For versioned objects, the version of the layer archive object to use.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-layerversion-content.html

ExampleMetadata:

fixture=_generated

Example:

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

content_property = lambda_mixins.CfnLayerVersionPropsMixin.ContentProperty(
    s3_bucket="s3Bucket",
    s3_key="s3Key",
    s3_object_version="s3ObjectVersion"
)

Attributes

s3_bucket

The Amazon S3 bucket of the layer archive.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-layerversion-content.html#cfn-lambda-layerversion-content-s3bucket

s3_key

The Amazon S3 key of the layer archive.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-layerversion-content.html#cfn-lambda-layerversion-content-s3key

s3_object_version

For versioned objects, the version of the layer archive object to use.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-layerversion-content.html#cfn-lambda-layerversion-content-s3objectversion