Interface IVersionOptions
Options for lambda.Version
.
Inherited Members
Namespace: Amazon.CDK.AWS.Lambda
Assembly: Amazon.CDK.AWS.Lambda.dll
Syntax (csharp)
public interface IVersionOptions : IEventInvokeConfigOptions
Syntax (vb)
Public Interface IVersionOptions
Inherits IEventInvokeConfigOptions
Remarks
ExampleMetadata: infused
Examples
var fn = new Function(this, "MyFunction", new FunctionProps {
CurrentVersionOptions = new VersionOptions {
RemovalPolicy = RemovalPolicy.RETAIN, // retain old versions
RetryAttempts = 1
},
Runtime = Runtime.NODEJS_16_X,
Handler = "index.handler",
Code = Code.FromAsset(Join(__dirname, "lambda-handler"))
});
fn.AddAlias("live");
Synopsis
Properties
CodeSha256 | SHA256 of the version of the Lambda source code. |
Description | Description of the version. |
ProvisionedConcurrentExecutions | Specifies a provisioned concurrency configuration for a function's version. |
RemovalPolicy | Whether to retain old versions of this function when a new version is created. |
Properties
CodeSha256
SHA256 of the version of the Lambda source code.
virtual string CodeSha256 { get; }
Property Value
System.String
Remarks
Specify to validate that you're deploying the right version.
Default: No validation is performed
Description
Description of the version.
virtual string Description { get; }
Property Value
System.String
Remarks
Default: Description of the Lambda
ProvisionedConcurrentExecutions
Specifies a provisioned concurrency configuration for a function's version.
virtual Nullable<double> ProvisionedConcurrentExecutions { get; }
Property Value
System.Nullable<System.Double>
Remarks
Default: No provisioned concurrency
RemovalPolicy
Whether to retain old versions of this function when a new version is created.
virtual Nullable<RemovalPolicy> RemovalPolicy { get; }
Property Value
System.Nullable<RemovalPolicy>
Remarks
Default: RemovalPolicy.DESTROY