Skip to content
v2.277.0

SnapStartResponseProperty Struct ​

The function's SnapStart setting.

Example ​

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 snapStartResponseProperty: lambda.CfnFunction.SnapStartResponseProperty = {
  applyOn: 'applyOn',
  optimizationStatus: 'optimizationStatus',
};
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_

snap_start_response_property = lambda.CfnFunction.SnapStartResponseProperty(
    apply_on="applyOn",
    optimization_status="optimizationStatus"
)
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.*;

SnapStartResponseProperty snapStartResponseProperty = SnapStartResponseProperty.builder()
        .applyOn("applyOn")
        .optimizationStatus("optimizationStatus")
        .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.Lambda;

var snapStartResponseProperty = new SnapStartResponseProperty {
    ApplyOn = "applyOn",
    OptimizationStatus = "optimizationStatus"
};
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"

snapStartResponseProperty := &SnapStartResponseProperty{
	ApplyOn: jsii.String("applyOn"),
	OptimizationStatus: jsii.String("optimizationStatus"),
}

Properties ​

applyOnoptionalstringapply_onoptionalstrapplyOnoptionalStringApplyOnoptionalstringApplyOnoptional*string#
When set to `PublishedVersions` , Lambda creates a snapshot of the execution environment when you publish a function version.
optimizationStatusoptionalstringoptimization_statusoptionalstroptimizationStatusoptionalStringOptimizationStatusoptionalstringOptimizationStatusoptional*string#
When you provide a [qualified Amazon Resource Name (ARN)](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html#versioning-versions-using) , this response element indicates whether SnapStart is activated for the specified function version.