Class CfnAlias
- All Implemented Interfaces:
IConstruct,IDependable,IInspectable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
AWS::Lambda::Alias.
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();
-
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.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionA description of the alias.The name 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 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.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods 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.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 Construct scope, @NotNull String id, @NotNull CfnAliasProps props) Create a newAWS::Lambda::Alias.- Parameters:
scope-- scope in which this resource is defined.
id-- scoped id of the resource.
props-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getFunctionName
The name of the Lambda function.Name formats - Function name -
MyFunction.- Function ARN -
arn:aws:lambda:us-west-2:123456789012:function:MyFunction. - Partial ARN -
123456789012:function:MyFunction.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
- Function ARN -
-
setFunctionName
The name of the Lambda function.Name formats - Function name -
MyFunction.- Function ARN -
arn:aws:lambda:us-west-2:123456789012:function:MyFunction. - Partial ARN -
123456789012:function:MyFunction.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
- Function ARN -
-
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. -
setProvisionedConcurrencyConfig
@Stability(Stable) public void setProvisionedConcurrencyConfig(@Nullable CfnAlias.ProvisionedConcurrencyConfigurationProperty value) Specifies a provisioned concurrency configuration for a function's alias. -
setProvisionedConcurrencyConfig
Specifies a provisioned concurrency configuration for a function's alias. -
getRoutingConfig
The routing configuration of the alias. -
setRoutingConfig
The routing configuration of the alias. -
setRoutingConfig
@Stability(Stable) public void setRoutingConfig(@Nullable CfnAlias.AliasRoutingConfigurationProperty value) The routing configuration of the alias.
-