Class CfnVersion
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.lambda.CfnVersion
- All Implemented Interfaces:
IEnvironmentAware,IInspectable,IVersionRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.118.0 (build 02eec31)",
date="2025-11-10T13:40:08.774Z")
@Stability(Stable)
public class CfnVersion
extends CfnResource
implements IInspectable, IVersionRef
The
AWS::Lambda::Version resource creates a version from the current code and configuration of a function. Use versions to create a snapshot of your function code and configuration that doesn't change.
Example:
// 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.*;
CfnVersion cfnVersion = CfnVersion.Builder.create(this, "MyCfnVersion")
.functionName("functionName")
// the properties below are optional
.codeSha256("codeSha256")
.description("description")
.provisionedConcurrencyConfig(ProvisionedConcurrencyConfigurationProperty.builder()
.provisionedConcurrentExecutions(123)
.build())
.runtimePolicy(RuntimePolicyProperty.builder()
.updateRuntimeOn("updateRuntimeOn")
// the properties below are optional
.runtimeVersionArn("runtimeVersionArn")
.build())
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnVersion.static interfaceA provisioned concurrency configuration for a function's version.static interfaceSets the runtime management configuration for a function's version.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.services.lambda.IVersionRef
IVersionRef.Jsii$Default, IVersionRef.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnVersion(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnVersion(software.amazon.jsii.JsiiObjectRef objRef) CfnVersion(software.constructs.Construct scope, String id, CfnVersionProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe ARN of the function.The version number.Only publish a version if the hash value matches the value that's specified.A description for the version to override the description in the function configuration.The name or ARN of the Lambda function.Specifies a provisioned concurrency configuration for a function's version.Runtime Management Config of a function.A reference to a Version resource.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetCodeSha256(String value) Only publish a version if the hash value matches the value that's specified.voidsetDescription(String value) A description for the version to override the description in the function configuration.voidsetFunctionName(String value) The name or ARN of the Lambda function.voidSpecifies a provisioned concurrency configuration for a function's version.voidSpecifies a provisioned concurrency configuration for a function's version.voidsetRuntimePolicy(IResolvable value) Runtime Management Config of a function.voidRuntime Management Config of a function.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnVersion
protected CfnVersion(software.amazon.jsii.JsiiObjectRef objRef) -
CfnVersion
protected CfnVersion(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnVersion
@Stability(Stable) public CfnVersion(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnVersionProps props) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrFunctionArn
The ARN of the function. -
getAttrVersion
The version number. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getVersionRef
A reference to a Version resource.- Specified by:
getVersionRefin interfaceIVersionRef
-
getFunctionName
The name or ARN of the Lambda function. -
setFunctionName
The name or ARN of the Lambda function. -
getCodeSha256
Only publish a version if the hash value matches the value that's specified. -
setCodeSha256
Only publish a version if the hash value matches the value that's specified. -
getDescription
A description for the version to override the description in the function configuration. -
setDescription
A description for the version to override the description in the function configuration. -
getProvisionedConcurrencyConfig
Specifies a provisioned concurrency configuration for a function's version.Returns union: either
IResolvableorCfnVersion.ProvisionedConcurrencyConfigurationProperty -
setProvisionedConcurrencyConfig
Specifies a provisioned concurrency configuration for a function's version. -
setProvisionedConcurrencyConfig
@Stability(Stable) public void setProvisionedConcurrencyConfig(@Nullable CfnVersion.ProvisionedConcurrencyConfigurationProperty value) Specifies a provisioned concurrency configuration for a function's version. -
getRuntimePolicy
Runtime Management Config of a function.Returns union: either
IResolvableorCfnVersion.RuntimePolicyProperty -
setRuntimePolicy
Runtime Management Config of a function. -
setRuntimePolicy
Runtime Management Config of a function.
-