Interface AliasProps

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

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:24:03.809Z") @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_LATEST)
         .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