@Generated(value="jsii-pacmak/1.14.0 (build 729554b)", date="2020-10-29T17:34:18.524Z") @Stability(value=Stable) public interface IFunction extends software.amazon.jsii.JsiiSerializable, IResource, IConnectable, IGrantable
| Modifier and Type | Interface and Description |
|---|---|
static interface |
IFunction.Jsii$Default
Internal default implementation for
IFunction. |
static class |
IFunction.Jsii$Proxy
A proxy class which represents a concrete javascript instance of this type.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addEventSource(IEventSource source) |
EventSourceMapping |
addEventSourceMapping(String id,
EventSourceMappingOptions options)
Adds an event source that maps to this AWS Lambda function.
|
void |
addPermission(String id,
Permission permission)
Adds a permission to the Lambda resource policy.
|
void |
addToRolePolicy(PolicyStatement statement)
Adds a statement to the IAM role assumed by the instance.
|
void |
configureAsyncInvoke(EventInvokeConfigOptions options)
Configures options for asynchronous invocation.
|
String |
getFunctionArn()
The ARN fo the function.
|
String |
getFunctionName()
The name of the function.
|
Boolean |
getIsBoundToVpc()
Whether or not this Lambda function was bound to a VPC.
|
IVersion |
getLatestVersion()
The `$LATEST` version of this function.
|
ConstructNode |
getPermissionsNode()
The construct node where permissions are attached.
|
default IRole |
getRole()
The IAM role associated with this function.
|
Grant |
grantInvoke(IGrantable identity)
Grant the given identity permissions to invoke this Lambda.
|
Metric |
metric(String metricName)
Return the given named metric for this Lambda Return the given named metric for this Function.
|
Metric |
metric(String metricName,
MetricOptions props)
Return the given named metric for this Lambda Return the given named metric for this Function.
|
Metric |
metricDuration()
Metric for the Duration of this Lambda How long execution of this Lambda takes.
|
Metric |
metricDuration(MetricOptions props)
Metric for the Duration of this Lambda How long execution of this Lambda takes.
|
Metric |
metricErrors()
How many invocations of this Lambda fail.
|
Metric |
metricErrors(MetricOptions props)
How many invocations of this Lambda fail.
|
Metric |
metricInvocations()
Metric for the number of invocations of this Lambda How often this Lambda is invoked.
|
Metric |
metricInvocations(MetricOptions props)
Metric for the number of invocations of this Lambda How often this Lambda is invoked.
|
Metric |
metricThrottles()
Metric for the number of throttled invocations of this Lambda How often this Lambda is throttled.
|
Metric |
metricThrottles(MetricOptions props)
Metric for the number of throttled invocations of this Lambda How often this Lambda is throttled.
|
getNodegetConnectionsgetGrantPrincipal@Stability(value=Stable) @NotNull String getFunctionArn()
@Stability(value=Stable) @NotNull String getFunctionName()
@Stability(value=Stable) @NotNull Boolean getIsBoundToVpc()
If this is is false, trying to access the connections object will fail.
@Stability(value=Stable) @NotNull 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.
@Stability(value=Stable) @NotNull ConstructNode getPermissionsNode()
@Stability(value=Stable) @Nullable default IRole getRole()
@Stability(value=Stable)
void addEventSource(@NotNull
IEventSource source)
source - This parameter is required.@Stability(value=Stable) @NotNull EventSourceMapping addEventSourceMapping(@NotNull String id, @NotNull EventSourceMappingOptions options)
id - construct ID. This parameter is required.options - mapping options. This parameter is required.@Stability(value=Stable)
void addPermission(@NotNull
String id,
@NotNull
Permission permission)
id - The id ƒor the permission construct. This parameter is required.permission - The permission to grant to this Lambda function. This parameter is required.for details.@Stability(value=Stable)
void addToRolePolicy(@NotNull
PolicyStatement statement)
statement - This parameter is required.@Stability(value=Stable)
void configureAsyncInvoke(@NotNull
EventInvokeConfigOptions options)
options - This parameter is required.@Stability(value=Stable) @NotNull Grant grantInvoke(@NotNull IGrantable identity)
identity - This parameter is required.@Stability(value=Stable) @NotNull Metric metric(@NotNull String metricName, @Nullable MetricOptions props)
metricName - This parameter is required.props - @Stability(value=Stable) @NotNull Metric metric(@NotNull String metricName)
metricName - This parameter is required.@Stability(value=Stable) @NotNull Metric metricDuration(@Nullable MetricOptions props)
Average over 5 minutes
Default: average over 5 minutes
props - @Stability(value=Stable) @NotNull Metric metricDuration()
Average over 5 minutes
Default: average over 5 minutes
@Stability(value=Stable) @NotNull Metric metricErrors(@Nullable MetricOptions props)
Sum over 5 minutes
props - @Stability(value=Stable) @NotNull Metric metricErrors()
Sum over 5 minutes
@Stability(value=Stable) @NotNull Metric metricInvocations(@Nullable MetricOptions props)
Sum over 5 minutes
Default: sum over 5 minutes
props - @Stability(value=Stable) @NotNull Metric metricInvocations()
Sum over 5 minutes
Default: sum over 5 minutes
@Stability(value=Stable) @NotNull Metric metricThrottles(@Nullable MetricOptions props)
Sum over 5 minutes
Default: sum over 5 minutes
props - @Stability(value=Stable) @NotNull Metric metricThrottles()
Sum over 5 minutes
Default: sum over 5 minutes
Copyright © 2020. All rights reserved.