@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:40.379Z") @Stability(value=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();
| Modifier and Type | Class and Description |
|---|---|
static interface |
CfnAlias.AliasRoutingConfigurationProperty
The [traffic-shifting](https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html) configuration of a Lambda function alias.
|
static class |
CfnAlias.Builder
A fluent builder for
CfnAlias. |
static interface |
CfnAlias.ProvisionedConcurrencyConfigurationProperty
A provisioned concurrency configuration for a function's alias.
|
static interface |
CfnAlias.VersionWeightProperty
The [traffic-shifting](https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html) configuration of a Lambda function alias.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnAlias(software.constructs.Construct scope,
String id,
CfnAliasProps props)
Create a new `AWS::Lambda::Alias`.
|
protected |
CfnAlias(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnAlias(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,Object> |
getCfnProperties() |
String |
getDescription()
A description of the alias.
|
String |
getFunctionName()
The name of the Lambda function.
|
String |
getFunctionVersion()
The function version that the alias invokes.
|
String |
getName()
The name of the alias.
|
Object |
getProvisionedConcurrencyConfig()
Specifies a [provisioned concurrency](https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html) configuration for a function's alias.
|
Object |
getRoutingConfig()
The [routing configuration](https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html) of the alias.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setDescription(String value)
A description of the alias.
|
void |
setFunctionName(String value)
The name of the Lambda function.
|
void |
setFunctionVersion(String value)
The function version that the alias invokes.
|
void |
setName(String value)
The name of the alias.
|
void |
setProvisionedConcurrencyConfig(CfnAlias.ProvisionedConcurrencyConfigurationProperty value)
Specifies a [provisioned concurrency](https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html) configuration for a function's alias.
|
void |
setProvisionedConcurrencyConfig(IResolvable value)
Specifies a [provisioned concurrency](https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html) configuration for a function's alias.
|
void |
setRoutingConfig(CfnAlias.AliasRoutingConfigurationProperty value)
The [routing configuration](https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html) of the alias.
|
void |
setRoutingConfig(IResolvable value)
The [routing configuration](https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html) of the alias.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnAlias(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnAlias(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnAlias(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnAliasProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public String getFunctionName()
Name formats - Function name - MyFunction .
arn:aws:lambda:us-west-2:123456789012:function:MyFunction .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.
@Stability(value=Stable)
public void setFunctionName(@NotNull
String value)
Name formats - Function name - MyFunction .
arn:aws:lambda:us-west-2:123456789012:function:MyFunction .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.
@Stability(value=Stable) @NotNull public String getFunctionVersion()
@Stability(value=Stable)
public void setFunctionVersion(@NotNull
String value)
@Stability(value=Stable) @NotNull public String getName()
@Stability(value=Stable)
public void setName(@NotNull
String value)
@Stability(value=Stable) @Nullable public String getDescription()
@Stability(value=Stable)
public void setDescription(@Nullable
String value)
@Stability(value=Stable) @Nullable public Object getProvisionedConcurrencyConfig()
@Stability(value=Stable)
public void setProvisionedConcurrencyConfig(@Nullable
CfnAlias.ProvisionedConcurrencyConfigurationProperty value)
@Stability(value=Stable)
public void setProvisionedConcurrencyConfig(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public Object getRoutingConfig()
@Stability(value=Stable)
public void setRoutingConfig(@Nullable
CfnAlias.AliasRoutingConfigurationProperty value)
@Stability(value=Stable)
public void setRoutingConfig(@Nullable
IResolvable value)
Copyright © 2022. All rights reserved.