@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:40.374Z") @Stability(value=Stable) public class Alias extends QualifiedFunctionBase implements IAlias
Example:
// Example automatically generated from non-compiling source. May contain errors.
CfnParametersCode lambdaCode = Code.fromCfnParameters();
Function func = Function.Builder.create(this, "Lambda")
.code(lambdaCode)
.handler("index.handler")
.runtime(Runtime.NODEJS_14_X)
.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();
| Modifier and Type | Class and Description |
|---|---|
static class |
Alias.Builder
A fluent builder for
Alias. |
software.amazon.jsii.JsiiObject.InitializationModeIAlias.Jsii$Default, IAlias.Jsii$ProxyIClientVpnConnectionHandler.Jsii$Default| Modifier | Constructor and Description |
|---|---|
|
Alias(software.constructs.Construct scope,
String id,
AliasProps props) |
protected |
Alias(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Alias(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
IScalableFunctionAttribute |
addAutoScaling(AutoScalingOptions options)
Configure provisioned concurrency autoscaling on a function alias.
|
static IAlias |
fromAliasAttributes(software.constructs.Construct scope,
String id,
AliasAttributes attrs) |
String |
getAliasName()
Name of this alias.
|
Architecture |
getArchitecture()
The architecture of this Lambda Function.
|
protected Boolean |
getCanCreatePermissions()
Whether the addPermission() call adds any permissions.
|
String |
getFunctionArn()
ARN of this alias.
|
String |
getFunctionName()
ARN of this alias.
|
IPrincipal |
getGrantPrincipal()
The principal this Lambda Function is running as.
|
IFunction |
getLambda() |
protected String |
getQualifier()
The qualifier of the version or alias of this function.
|
IRole |
getRole()
The IAM role associated with this function.
|
IVersion |
getVersion()
The underlying Lambda function version.
|
Metric |
metric(String metricName)
Return the given named metric for this Function.
|
Metric |
metric(String metricName,
MetricOptions props)
Return the given named metric for this Function.
|
configureAsyncInvoke, considerWarningOnInvokeFunctionPermissions, getLatestVersion, getPermissionsNode, getResourceArnsForGrantInvokeaddEventSource, addEventSourceMapping, addFunctionUrl, addFunctionUrl, addPermission, addToRolePolicy, getConnections, getIsBoundToVpc, grantInvoke, grantInvokeUrl, metricDuration, metricDuration, metricErrors, metricErrors, metricInvocations, metricInvocations, metricThrottles, metricThrottles, warnInvokeFunctionPermissionsapplyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourcejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddEventSource, addEventSourceMapping, addFunctionUrl, addFunctionUrl, addPermission, addToRolePolicy, configureAsyncInvoke, getIsBoundToVpc, getLatestVersion, getPermissionsNode, getResourceArnsForGrantInvoke, grantInvoke, grantInvokeUrl, metricDuration, metricDuration, metricErrors, metricErrors, metricInvocations, metricInvocations, metricThrottles, metricThrottlesapplyRemovalPolicy, getEnv, getStackgetConnectionsprotected Alias(software.amazon.jsii.JsiiObjectRef objRef)
protected Alias(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public Alias(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
AliasProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Stable) @NotNull public static IAlias fromAliasAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull AliasAttributes attrs)
scope - This parameter is required.id - This parameter is required.attrs - This parameter is required.@Stability(value=Stable) @NotNull public IScalableFunctionAttribute addAutoScaling(@NotNull AutoScalingOptions options)
Returns a scalable attribute that can call
scaleOnUtilization() and scaleOnSchedule().
options - Autoscaling options. This parameter is required.@Stability(value=Stable) @NotNull public Metric metric(@NotNull String metricName, @Nullable MetricOptions props)
metric in interface IFunctionmetric in class FunctionBasemetricName - This parameter is required.props - @Stability(value=Stable) @NotNull public Metric metric(@NotNull String metricName)
metric in interface IFunctionmetric in class FunctionBasemetricName - This parameter is required.@Stability(value=Stable) @NotNull public String getAliasName()
getAliasName in interface IAlias@Stability(value=Stable) @NotNull public Architecture getArchitecture()
getArchitecture in interface IFunctiongetArchitecture in class FunctionBase@Stability(value=Stable) @NotNull protected Boolean getCanCreatePermissions()
True for new Lambdas, false for version $LATEST and imported Lambdas from different accounts.
getCanCreatePermissions in class FunctionBase@Stability(value=Stable) @NotNull public String getFunctionArn()
Used to be able to use Alias in place of a regular Lambda. Lambda accepts ARNs everywhere it accepts function names.
getFunctionArn in interface IClientVpnConnectionHandlergetFunctionArn in interface IFunctiongetFunctionArn in class FunctionBase@Stability(value=Stable) @NotNull public String getFunctionName()
Used to be able to use Alias in place of a regular Lambda. Lambda accepts ARNs everywhere it accepts function names.
getFunctionName in interface IClientVpnConnectionHandlergetFunctionName in interface IFunctiongetFunctionName in class FunctionBase@Stability(value=Stable) @NotNull public IPrincipal getGrantPrincipal()
getGrantPrincipal in interface IGrantablegetGrantPrincipal in class FunctionBase@Stability(value=Stable) @NotNull public IFunction getLambda()
getLambda in class QualifiedFunctionBase@Stability(value=Stable) @NotNull protected String getQualifier()
A qualifier is the identifier that's appended to a version or alias ARN.
@Stability(value=Stable) @NotNull public IVersion getVersion()
getVersion in interface IAlias@Stability(value=Stable) @Nullable public IRole getRole()
Undefined if the function was imported without a role.
getRole in interface IFunctiongetRole in class FunctionBaseCopyright © 2022. All rights reserved.