CfnVersionProps

class aws_cdk.aws_lambda.CfnVersionProps(*, function_name, code_sha256=None, description=None, provisioned_concurrency_config=None, runtime_policy=None)

Bases: object

Properties for defining a CfnVersion.

Parameters:
  • function_name (str) – The name or ARN of the Lambda function. Name formats - Function name - MyFunction . - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction . - Partial ARN - 123456789012:function:MyFunction . The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.

  • code_sha256 (Optional[str]) – Only publish a version if the hash value matches the value that’s specified. Use this option to avoid publishing a version if the function code has changed since you last updated it. Updates are not supported for this property.

  • description (Optional[str]) – A description for the version to override the description in the function configuration. Updates are not supported for this property.

  • provisioned_concurrency_config (Union[IResolvable, ProvisionedConcurrencyConfigurationProperty, Dict[str, Any], None]) – Specifies a provisioned concurrency configuration for a function’s version. Updates are not supported for this property.

  • runtime_policy (Union[IResolvable, RuntimePolicyProperty, Dict[str, Any], None]) – Runtime Management Config of a function.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-version.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 import aws_lambda as lambda_

cfn_version_props = lambda.CfnVersionProps(
    function_name="functionName",

    # the properties below are optional
    code_sha256="codeSha256",
    description="description",
    provisioned_concurrency_config=lambda.CfnVersion.ProvisionedConcurrencyConfigurationProperty(
        provisioned_concurrent_executions=123
    ),
    runtime_policy=lambda.CfnVersion.RuntimePolicyProperty(
        update_runtime_on="updateRuntimeOn",

        # the properties below are optional
        runtime_version_arn="runtimeVersionArn"
    )
)

Attributes

code_sha256

Only publish a version if the hash value matches the value that’s specified.

Use this option to avoid publishing a version if the function code has changed since you last updated it. Updates are not supported for this property.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-version.html#cfn-lambda-version-codesha256

description

A description for the version to override the description in the function configuration.

Updates are not supported for this property.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-version.html#cfn-lambda-version-description

function_name

The name or ARN of the Lambda function.

Name formats - Function name - MyFunction .

  • Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction .

  • Partial ARN - 123456789012:function:MyFunction .

The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-version.html#cfn-lambda-version-functionname

provisioned_concurrency_config

Specifies a provisioned concurrency configuration for a function’s version.

Updates are not supported for this property.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-version.html#cfn-lambda-version-provisionedconcurrencyconfig

runtime_policy

Runtime Management Config of a function.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-version.html#cfn-lambda-version-runtimepolicy