Interface AliasProps

All Superinterfaces:
AliasOptions, EventInvokeConfigOptions, software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
AliasProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:40.549Z") @Stability(Stable) public interface AliasProps extends software.amazon.jsii.JsiiSerializable, AliasOptions
Properties for a new Lambda alias.

Example:

 CfnParametersCode lambdaCode = Code.fromCfnParameters();
 Function func = Function.Builder.create(this, "Lambda")
         .code(lambdaCode)
         .handler("index.handler")
         .runtime(Runtime.NODEJS_14_X)
         .build();
 // used to make sure each CDK synthesis produces a different Version
 Version version = func.getCurrentVersion();
 Alias alias = Alias.Builder.create(this, "LambdaAlias")
         .aliasName("Prod")
         .version(version)
         .build();
 LambdaDeploymentGroup.Builder.create(this, "DeploymentGroup")
         .alias(alias)
         .deploymentConfig(LambdaDeploymentConfig.LINEAR_10PERCENT_EVERY_1MINUTE)
         .build();
 
  • Method Details

    • getAliasName

      @Stability(Stable) @NotNull String getAliasName()
      Name of this alias.
    • getVersion

      @Stability(Stable) @NotNull IVersion getVersion()
      Function version this alias refers to.

      Use lambda.currentVersion to reference a version with your latest changes.

    • builder

      @Stability(Stable) static AliasProps.Builder builder()
      Returns:
      a AliasProps.Builder of AliasProps