Class CfnVersion

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.94.0 (build b380f01)", date="2024-03-01T20:58:26.504Z") @Stability(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())
         .runtimePolicy(RuntimePolicyProperty.builder()
                 .updateRuntimeOn("updateRuntimeOn")
                 // the properties below are optional
                 .runtimeVersionArn("runtimeVersionArn")
                 .build())
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String 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

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      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:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrFunctionArn

      @Stability(Stable) @NotNull public String getAttrFunctionArn()
      The ARN of the version.
    • getAttrVersion

      @Stability(Stable) @NotNull public String getAttrVersion()
      The version number.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getFunctionName

      @Stability(Stable) @NotNull public String getFunctionName()
      The name of the Lambda function.
    • setFunctionName

      @Stability(Stable) public void setFunctionName(@NotNull String value)
      The name of the Lambda function.
    • getCodeSha256

      @Stability(Stable) @Nullable public String getCodeSha256()
      Only publish a version if the hash value matches the value that's specified.
    • setCodeSha256

      @Stability(Stable) public void setCodeSha256(@Nullable String value)
      Only publish a version if the hash value matches the value that's specified.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      A description for the version to override the description in the function configuration.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      A description for the version to override the description in the function configuration.
    • getProvisionedConcurrencyConfig

      @Stability(Stable) @Nullable public Object getProvisionedConcurrencyConfig()
      Specifies a provisioned concurrency configuration for a function's version.
    • setProvisionedConcurrencyConfig

      @Stability(Stable) public void setProvisionedConcurrencyConfig(@Nullable IResolvable value)
      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

      @Stability(Stable) @Nullable public Object getRuntimePolicy()
      Runtime Management Config of a function.
    • setRuntimePolicy

      @Stability(Stable) public void setRuntimePolicy(@Nullable IResolvable value)
      Runtime Management Config of a function.
    • setRuntimePolicy

      @Stability(Stable) public void setRuntimePolicy(@Nullable CfnVersion.RuntimePolicyProperty value)
      Runtime Management Config of a function.