@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:40.426Z") @Stability(value=Stable) public class CfnVersion extends CfnResource implements IInspectable
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())
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnVersion.Builder
A fluent builder for
CfnVersion. |
static interface |
CfnVersion.ProvisionedConcurrencyConfigurationProperty
A [provisioned concurrency](https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html) configuration for a function's version.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnVersion(software.constructs.Construct scope,
String id,
CfnVersionProps props)
Create a new `AWS::Lambda::Version`.
|
protected |
CfnVersion(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnVersion(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAttrVersion()
The version number.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getCodeSha256()
Only publish a version if the hash value matches the value that's specified.
|
String |
getDescription()
A description for the version to override the description in the function configuration.
|
String |
getFunctionName()
The name of the Lambda function.
|
Object |
getProvisionedConcurrencyConfig()
Specifies a provisioned concurrency configuration for a function's version.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setCodeSha256(String value)
Only publish a version if the hash value matches the value that's specified.
|
void |
setDescription(String value)
A description for the version to override the description in the function configuration.
|
void |
setFunctionName(String value)
The name of the Lambda function.
|
void |
setProvisionedConcurrencyConfig(CfnVersion.ProvisionedConcurrencyConfigurationProperty value)
Specifies a provisioned concurrency configuration for a function's version.
|
void |
setProvisionedConcurrencyConfig(IResolvable value)
Specifies a provisioned concurrency configuration for a function's version.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnVersion(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnVersion(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnVersion(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnVersionProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrVersion()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public String getFunctionName()
Name formats - Function name - MyFunction .
arn:aws:lambda:us-west-2:123456789012:function:MyFunction .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.
@Stability(value=Stable)
public void setFunctionName(@NotNull
String value)
Name formats - Function name - MyFunction .
arn:aws:lambda:us-west-2:123456789012:function:MyFunction .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.
@Stability(value=Stable) @Nullable public String getCodeSha256()
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.
@Stability(value=Stable)
public void setCodeSha256(@Nullable
String value)
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.
@Stability(value=Stable) @Nullable public String getDescription()
Updates are not supported for this property.
@Stability(value=Stable)
public void setDescription(@Nullable
String value)
Updates are not supported for this property.
@Stability(value=Stable) @Nullable public Object getProvisionedConcurrencyConfig()
Updates are not supported for this property.
@Stability(value=Stable)
public void setProvisionedConcurrencyConfig(@Nullable
CfnVersion.ProvisionedConcurrencyConfigurationProperty value)
Updates are not supported for this property.
@Stability(value=Stable)
public void setProvisionedConcurrencyConfig(@Nullable
IResolvable value)
Updates are not supported for this property.
Copyright © 2022. All rights reserved.