@Generated(value="jsii-pacmak/1.30.0 (build adae23f)", date="2021-06-30T10:01:21.542Z") @Stability(value=Experimental) public class SingletonFunction extends FunctionBase
This construct is a way to guarantee that the lambda function will be guaranteed to be part of the stack,
once and only once, irrespective of how many times the construct is declared to be part of the stack.
This is guaranteed as long as the uuid property and the optional lambdaPurpose property stay the same
whenever they're declared into the stack.
| Modifier and Type | Class and Description |
|---|---|
static class |
SingletonFunction.Builder
(experimental) A fluent builder for
SingletonFunction. |
software.amazon.jsii.JsiiObject.InitializationModeIFunction.Jsii$DefaultIClientVpnConnectionHandler.Jsii$Default| Modifier | Constructor and Description |
|---|---|
|
SingletonFunction(software.constructs.Construct scope,
String id,
SingletonFunctionProps props) |
protected |
SingletonFunction(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
SingletonFunction(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDependency(software.constructs.IDependable... up)
(experimental) Using node.addDependency() does not work on this method as the underlying lambda function is modeled as a singleton across the stack.
|
void |
addPermission(String name,
Permission permission)
(experimental) Adds a permission to the Lambda resource policy.
|
void |
dependOn(software.constructs.IConstruct down)
(experimental) The SingletonFunction construct cannot be added as a dependency of another construct using node.addDependency().
|
protected Boolean |
getCanCreatePermissions()
(experimental) Whether the addPermission() call adds any permissions.
|
Connections |
getConnections()
(experimental) Access the Connections object.
|
Version |
getCurrentVersion()
(experimental) Returns a `lambda.Version` which represents the current version of this singleton Lambda function.
|
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.
|
Boolean |
getIsBoundToVpc()
(experimental) Whether or not this Lambda function was bound to a VPC.
|
software.constructs.Node |
getPermissionsNode()
(experimental) The construct node where permissions are attached.
|
IRole |
getRole()
(experimental) The IAM role associated with this function.
|
addEventSource, addEventSourceMapping, addToRolePolicy, configureAsyncInvoke, getLatestVersion, grantInvoke, metric, metric, 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, jsiiStaticSetprotected SingletonFunction(software.amazon.jsii.JsiiObjectRef objRef)
protected SingletonFunction(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
public SingletonFunction(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
SingletonFunctionProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Experimental)
public void addDependency(@NotNull
software.constructs.IDependable... up)
up - This parameter is required.@Stability(value=Experimental)
public void addPermission(@NotNull
String name,
@NotNull
Permission permission)
addPermission in interface IFunctionaddPermission in class FunctionBasename - This parameter is required.permission - This parameter is required.for details.@Stability(value=Experimental)
public void dependOn(@NotNull
software.constructs.IConstruct down)
down - 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 Connections getConnections()
Will fail if not a VPC-enabled Lambda Function
getConnections in interface IConnectablegetConnections in class FunctionBase@Stability(value=Experimental) @NotNull public Version getCurrentVersion()
You can specify options for this version using the currentVersionOptions
prop when initializing the lambda.SingletonFunction.
@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 Boolean getIsBoundToVpc()
If this is is false, trying to access the connections object will fail.
getIsBoundToVpc in interface IFunctiongetIsBoundToVpc in class FunctionBase@Stability(value=Experimental) @NotNull public software.constructs.Node getPermissionsNode()
getPermissionsNode in interface IFunctiongetPermissionsNode in class FunctionBase@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.