@Generated(value="jsii-pacmak/1.30.0 (build adae23f)", date="2021-06-30T10:01:21.546Z") @Stability(value=Experimental) public class Version extends QualifiedFunctionBase implements IVersion
This object exists to--at deploy time--query the "then-current" version of
the Lambda function that it refers to. This Version object can then be
used in Alias to refer to a particular deployment of a Lambda.
This means that for every new update you deploy to your Lambda (using the CDK and Aliases), you must always create a new Version object. In particular, it must have a different name, so that a new resource is created.
If you want to ensure that you're associating the right version with
the right deployment, specify the codeSha256 property while
creating the `Version.
| Modifier and Type | Class and Description |
|---|---|
static class |
Version.Builder
(experimental) A fluent builder for
Version. |
software.amazon.jsii.JsiiObject.InitializationModeIVersion.Jsii$Default, IVersion.Jsii$ProxyIClientVpnConnectionHandler.Jsii$Default| Modifier | Constructor and Description |
|---|---|
|
Version(software.constructs.Construct scope,
String id,
VersionProps props) |
protected |
Version(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Version(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
Alias |
addAlias(String aliasName)
(experimental) Defines an alias for this version.
|
Alias |
addAlias(String aliasName,
AliasOptions options)
(experimental) Defines an alias for this version.
|
static IVersion |
fromVersionArn(software.constructs.Construct scope,
String id,
String versionArn)
(experimental) Construct a Version object from a Version ARN.
|
static IVersion |
fromVersionAttributes(software.constructs.Construct scope,
String id,
VersionAttributes attrs) |
protected Boolean |
getCanCreatePermissions()
(experimental) Whether the addPermission() call adds any permissions.
|
String |
getEdgeArn()
(experimental) The ARN of the version for Lambda@Edge.
|
String |
getFunctionArn()
(experimental) The ARN fo the function.
|
String |
getFunctionName()
(experimental) The name of the function.
|
IPrincipal |
getGrantPrincipal()
(experimental) The principal this Lambda Function is running as.
|
IFunction |
getLambda()
(experimental) The underlying AWS Lambda function.
|
protected String |
getQualifier()
(experimental) The qualifier of the version or alias of this function.
|
IRole |
getRole()
(experimental) The IAM role associated with this function.
|
String |
getVersion()
(experimental) The most recently deployed version of this function.
|
Metric |
metric(String metricName)
(experimental) Return the given named metric for this Function.
|
Metric |
metric(String metricName,
MetricOptions props)
(experimental) Return the given named metric for this Function.
|
configureAsyncInvoke, getLatestVersion, getPermissionsNodeaddEventSource, addEventSourceMapping, addPermission, addToRolePolicy, getConnections, getIsBoundToVpc, grantInvoke, metricDuration, metricDuration, metricErrors, metricErrors, metricInvocations, metricInvocations, metricThrottles, metricThrottlesapplyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResourcejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddEventSource, addEventSourceMapping, addPermission, addToRolePolicy, configureAsyncInvoke, getIsBoundToVpc, getLatestVersion, getPermissionsNode, grantInvoke, metricDuration, metricDuration, metricErrors, metricErrors, metricInvocations, metricInvocations, metricThrottles, metricThrottlesgetConnectionsprotected Version(software.amazon.jsii.JsiiObjectRef objRef)
protected Version(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
public Version(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
VersionProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Experimental) @NotNull public static IVersion fromVersionArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String versionArn)
scope - The cdk scope creating this resource. This parameter is required.id - The cdk id of this resource. This parameter is required.versionArn - The version ARN to create this version from. This parameter is required.@Stability(value=Experimental) @NotNull public static IVersion fromVersionAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull VersionAttributes attrs)
scope - This parameter is required.id - This parameter is required.attrs - This parameter is required.@Stability(value=Experimental) @NotNull public Alias addAlias(@NotNull String aliasName, @Nullable AliasOptions options)
@Stability(value=Experimental) @NotNull public Alias addAlias(@NotNull String aliasName)
@Stability(value=Experimental) @NotNull public Metric metric(@NotNull String metricName, @Nullable MetricOptions props)
metric in interface IFunctionmetric in class FunctionBasemetricName - This parameter is required.props - @Stability(value=Experimental) @NotNull public Metric metric(@NotNull String metricName)
metric in interface IFunctionmetric in class FunctionBasemetricName - This parameter is required.@Stability(value=Experimental) @NotNull protected Boolean getCanCreatePermissions()
True for new Lambdas, false for version $LATEST and imported Lambdas from different accounts.
getCanCreatePermissions in class FunctionBase@Stability(value=Experimental) @NotNull public String getEdgeArn()
getEdgeArn in interface IVersion@Stability(value=Experimental) @NotNull public String getFunctionArn()
getFunctionArn in interface IClientVpnConnectionHandlergetFunctionArn in interface IFunctiongetFunctionArn in class FunctionBase@Stability(value=Experimental) @NotNull public String getFunctionName()
getFunctionName in interface IClientVpnConnectionHandlergetFunctionName in interface IFunctiongetFunctionName in class FunctionBase@Stability(value=Experimental) @NotNull public IPrincipal getGrantPrincipal()
getGrantPrincipal in interface IGrantablegetGrantPrincipal in class FunctionBase@Stability(value=Experimental) @NotNull public IFunction getLambda()
getLambda in interface IVersiongetLambda in class QualifiedFunctionBase@Stability(value=Experimental) @NotNull protected String getQualifier()
A qualifier is the identifier that's appended to a version or alias ARN.
getQualifier in class QualifiedFunctionBasehttps://docs.aws.amazon.com/lambda/latest/dg/API_GetFunctionConfiguration.html#API_GetFunctionConfiguration_RequestParameters@Stability(value=Experimental) @NotNull public String getVersion()
getVersion in interface IVersion@Stability(value=Experimental) @Nullable public IRole getRole()
Undefined if the function was imported without a role.
getRole in interface IFunctiongetRole in class FunctionBaseCopyright © 2021. All rights reserved.