Class CfnAlias

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.97.0 (build 729de35)", date="2024-04-24T21:00:31.828Z") @Stability(Stable) public class CfnAlias extends CfnResource implements IInspectable
The AWS::Lambda::Alias resource creates an alias for a Lambda function version. Use aliases to provide clients with a function identifier that you can update to invoke a different version.

You can also map an alias to split invocation requests between two versions. Use the RoutingConfig parameter to specify a second version and the percentage of invocation requests that it receives.

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.*;
 CfnAlias cfnAlias = CfnAlias.Builder.create(this, "MyCfnAlias")
         .functionName("functionName")
         .functionVersion("functionVersion")
         .name("name")
         // the properties below are optional
         .description("description")
         .provisionedConcurrencyConfig(ProvisionedConcurrencyConfigurationProperty.builder()
                 .provisionedConcurrentExecutions(123)
                 .build())
         .routingConfig(AliasRoutingConfigurationProperty.builder()
                 .additionalVersionWeights(List.of(VersionWeightProperty.builder()
                         .functionVersion("functionVersion")
                         .functionWeight(123)
                         .build()))
                 .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

    • CfnAlias

      protected CfnAlias(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnAlias

      protected CfnAlias(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnAlias

      @Stability(Stable) public CfnAlias(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnAliasProps 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.
    • getAttrAliasArn

      @Stability(Stable) @NotNull public String getAttrAliasArn()
      Lambda Alias ARN generated by the service.
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
    • getCfnProperties

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

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

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

      @Stability(Stable) @NotNull public String getFunctionVersion()
      The function version that the alias invokes.
    • setFunctionVersion

      @Stability(Stable) public void setFunctionVersion(@NotNull String value)
      The function version that the alias invokes.
    • getName

      @Stability(Stable) @NotNull public String getName()
      The name of the alias.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The name of the alias.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      A description of the alias.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      A description of the alias.
    • getProvisionedConcurrencyConfig

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

      @Stability(Stable) public void setProvisionedConcurrencyConfig(@Nullable IResolvable value)
      Specifies a provisioned concurrency configuration for a function's alias.
    • setProvisionedConcurrencyConfig

      @Stability(Stable) public void setProvisionedConcurrencyConfig(@Nullable CfnAlias.ProvisionedConcurrencyConfigurationProperty value)
      Specifies a provisioned concurrency configuration for a function's alias.
    • getRoutingConfig

      @Stability(Stable) @Nullable public Object getRoutingConfig()
      The routing configuration of the alias.
    • setRoutingConfig

      @Stability(Stable) public void setRoutingConfig(@Nullable IResolvable value)
      The routing configuration of the alias.
    • setRoutingConfig

      @Stability(Stable) public void setRoutingConfig(@Nullable CfnAlias.AliasRoutingConfigurationProperty value)
      The routing configuration of the alias.