Class CfnAlias
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.lambda.CfnAlias
- All Implemented Interfaces:
IEnvironmentAware,IInspectable,IAliasRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.118.0 (build 02eec31)",
date="2025-11-10T13:40:08.702Z")
@Stability(Stable)
public class CfnAlias
extends CfnResource
implements IInspectable, IAliasRef
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceThe traffic-shifting configuration of a Lambda function alias.static final classA fluent builder forCfnAlias.static interfaceA provisioned concurrency configuration for a function's alias.static interfaceThe traffic-shifting configuration of a Lambda function alias.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.lambda.IAliasRef
IAliasRef.Jsii$Default, IAliasRef.Jsii$ProxyNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnAlias(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnAlias(software.amazon.jsii.JsiiObjectRef objRef) CfnAlias(software.constructs.Construct scope, String id, CfnAliasProps props) -
Method Summary
Modifier and TypeMethodDescriptionA reference to a Alias resource.The Amazon Resource Name (ARN) of the alias.A description of the alias.The name or ARN of the Lambda function.The function version that the alias invokes.getName()The name of the alias.Specifies a provisioned concurrency configuration for a function's alias.The routing configuration of the alias.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetDescription(String value) A description of the alias.voidsetFunctionName(String value) The name or ARN of the Lambda function.voidsetFunctionVersion(String value) The function version that the alias invokes.voidThe name of the alias.voidSpecifies a provisioned concurrency configuration for a function's alias.voidSpecifies a provisioned concurrency configuration for a function's alias.voidsetRoutingConfig(IResolvable value) The routing configuration of the alias.voidThe routing configuration of the alias.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAliasRef
A reference to a Alias resource.- Specified by:
getAliasRefin interfaceIAliasRef
-
getAttrAliasArn
The Amazon Resource Name (ARN) of the alias. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getFunctionName
The name or ARN of the Lambda function. -
setFunctionName
The name or ARN of the Lambda function. -
getFunctionVersion
The function version that the alias invokes. -
setFunctionVersion
The function version that the alias invokes. -
getName
The name of the alias. -
setName
The name of the alias. -
getDescription
A description of the alias. -
setDescription
A description of the alias. -
getProvisionedConcurrencyConfig
Specifies a provisioned concurrency configuration for a function's alias.Returns union: either
IResolvableorCfnAlias.ProvisionedConcurrencyConfigurationProperty -
setProvisionedConcurrencyConfig
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
The routing configuration of the alias.Returns union: either
IResolvableorCfnAlias.AliasRoutingConfigurationProperty -
setRoutingConfig
The routing configuration of the alias. -
setRoutingConfig
@Stability(Stable) public void setRoutingConfig(@Nullable CfnAlias.AliasRoutingConfigurationProperty value) The routing configuration of the alias.
-