@Generated(value="jsii-pacmak/1.30.0 (build adae23f)", date="2021-06-30T10:00:50.300Z") @Stability(value=Experimental) public class EdgeFunction extends Resource implements IVersion
Convenience resource for requesting a Lambda function in the 'us-east-1' region for use with Lambda@Edge. Implements several restrictions enforced by Lambda@Edge.
Note that this construct requires that the 'us-east-1' region has been bootstrapped. See https://docs.aws.amazon.com/cdk/latest/guide/bootstrapping.html or 'cdk bootstrap --help' for options.
| Modifier and Type | Class and Description |
|---|---|
static class |
EdgeFunction.Builder
(experimental) A fluent builder for
EdgeFunction. |
software.amazon.jsii.JsiiObject.InitializationModeIVersion.Jsii$Default, IVersion.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
EdgeFunction(software.constructs.Construct scope,
String id,
EdgeFunctionProps props) |
protected |
EdgeFunction(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
EdgeFunction(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.
|
void |
addEventSource(IEventSource source)
(experimental) Adds an event source to this function.
|
EventSourceMapping |
addEventSourceMapping(String id,
EventSourceMappingOptions options)
(experimental) Adds an event source that maps to this AWS Lambda function.
|
void |
addPermission(String id,
Permission permission)
(experimental) Adds a permission to the Lambda resource policy.
|
void |
addToRolePolicy(PolicyStatement statement)
(experimental) Adds a statement to the IAM role assumed by the instance.
|
void |
configureAsyncInvoke(EventInvokeConfigOptions options)
(experimental) Configures options for asynchronous invocation.
|
Connections |
getConnections()
(experimental) Not supported.
|
IVersion |
getCurrentVersion()
(experimental) Convenience method to make `EdgeFunction` conform to the same interface as `Function`.
|
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 to grant permissions to.
|
Boolean |
getIsBoundToVpc()
(experimental) Whether or not this Lambda function was bound to a VPC.
|
IFunction |
getLambda()
(experimental) The underlying AWS Lambda function.
|
IVersion |
getLatestVersion()
(experimental) The `$LATEST` version of this function.
|
software.constructs.Node |
getPermissionsNode()
(experimental) The construct node where permissions are attached.
|
IRole |
getRole()
(experimental) The IAM role associated with this function.
|
String |
getVersion()
(experimental) The most recently deployed version of this function.
|
Grant |
grantInvoke(IGrantable identity)
(experimental) Grant the given identity permissions to invoke this Lambda.
|
Metric |
metric(String metricName)
(experimental) Return the given named metric for this Lambda Return the given named metric for this Function.
|
Metric |
metric(String metricName,
MetricOptions props)
(experimental) Return the given named metric for this Lambda Return the given named metric for this Function.
|
Metric |
metricDuration()
(experimental) Metric for the Duration of this Lambda How long execution of this Lambda takes.
|
Metric |
metricDuration(MetricOptions props)
(experimental) Metric for the Duration of this Lambda How long execution of this Lambda takes.
|
Metric |
metricErrors()
(experimental) How many invocations of this Lambda fail.
|
Metric |
metricErrors(MetricOptions props)
(experimental) How many invocations of this Lambda fail.
|
Metric |
metricInvocations()
(experimental) Metric for the number of invocations of this Lambda How often this Lambda is invoked.
|
Metric |
metricInvocations(MetricOptions props)
(experimental) Metric for the number of invocations of this Lambda How often this Lambda is invoked.
|
Metric |
metricThrottles()
(experimental) Metric for the number of throttled invocations of this Lambda How often this Lambda is throttled.
|
Metric |
metricThrottles(MetricOptions props)
(experimental) Metric for the number of throttled invocations of this Lambda How often this Lambda is throttled.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResourcejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected EdgeFunction(software.amazon.jsii.JsiiObjectRef objRef)
protected EdgeFunction(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
public EdgeFunction(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
EdgeFunctionProps props)
scope - This parameter is required.id - This parameter is required.props - 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)
public void addEventSource(@NotNull
IEventSource source)
addEventSource in interface IFunctionsource - This parameter is required.@Stability(value=Experimental) @NotNull public EventSourceMapping addEventSourceMapping(@NotNull String id, @NotNull EventSourceMappingOptions options)
addEventSourceMapping in interface IFunctionid - This parameter is required.options - This parameter is required.@Stability(value=Experimental)
public void addPermission(@NotNull
String id,
@NotNull
Permission permission)
addPermission in interface IFunctionid - This parameter is required.permission - This parameter is required.for details.@Stability(value=Experimental)
public void addToRolePolicy(@NotNull
PolicyStatement statement)
addToRolePolicy in interface IFunctionstatement - This parameter is required.@Stability(value=Experimental)
public void configureAsyncInvoke(@NotNull
EventInvokeConfigOptions options)
configureAsyncInvoke in interface IFunctionoptions - This parameter is required.@Stability(value=Experimental) @NotNull public Grant grantInvoke(@NotNull IGrantable identity)
grantInvoke in interface IFunctionidentity - This parameter is required.@Stability(value=Experimental) @NotNull public Metric metric(@NotNull String metricName, @Nullable MetricOptions props)
@Stability(value=Experimental) @NotNull public Metric metric(@NotNull String metricName)
@Stability(value=Experimental) @NotNull public Metric metricDuration(@Nullable MetricOptions props)
Average over 5 minutes
metricDuration in interface IFunctionprops - @Stability(value=Experimental) @NotNull public Metric metricDuration()
Average over 5 minutes
metricDuration in interface IFunction@Stability(value=Experimental) @NotNull public Metric metricErrors(@Nullable MetricOptions props)
Sum over 5 minutes
metricErrors in interface IFunctionprops - @Stability(value=Experimental) @NotNull public Metric metricErrors()
Sum over 5 minutes
metricErrors in interface IFunction@Stability(value=Experimental) @NotNull public Metric metricInvocations(@Nullable MetricOptions props)
Sum over 5 minutes
metricInvocations in interface IFunctionprops - @Stability(value=Experimental) @NotNull public Metric metricInvocations()
Sum over 5 minutes
metricInvocations in interface IFunction@Stability(value=Experimental) @NotNull public Metric metricThrottles(@Nullable MetricOptions props)
Sum over 5 minutes
metricThrottles in interface IFunctionprops - @Stability(value=Experimental) @NotNull public Metric metricThrottles()
Sum over 5 minutes
metricThrottles in interface IFunction@Stability(value=Experimental) @NotNull public Connections getConnections()
Connections are only applicable to VPC-enabled functions.
getConnections in interface IConnectable@Stability(value=Experimental) @NotNull public IVersion getCurrentVersion()
@Stability(value=Experimental) @NotNull public String getEdgeArn()
getEdgeArn in interface IVersion@Stability(value=Experimental) @NotNull public String getFunctionArn()
getFunctionArn in interface IFunction@Stability(value=Experimental) @NotNull public String getFunctionName()
getFunctionName in interface IFunction@Stability(value=Experimental) @NotNull public IPrincipal getGrantPrincipal()
getGrantPrincipal in interface IGrantable@Stability(value=Experimental) @NotNull public Boolean getIsBoundToVpc()
If this is is false, trying to access the connections object will fail.
getIsBoundToVpc in interface IFunction@Stability(value=Experimental) @NotNull public IFunction getLambda()
@Stability(value=Experimental) @NotNull public IVersion getLatestVersion()
Note that this is reference to a non-specific AWS Lambda version, which means the function this version refers to can return different results in different invocations.
To obtain a reference to an explicit version which references the current
function configuration, use lambdaFunction.currentVersion instead.
getLatestVersion in interface IFunction@Stability(value=Experimental) @NotNull public software.constructs.Node getPermissionsNode()
getPermissionsNode in interface IFunction@Stability(value=Experimental) @NotNull public String getVersion()
getVersion in interface IVersionCopyright © 2021. All rights reserved.