@Internal public static final class IFunction.Jsii$Proxy extends software.amazon.jsii.JsiiObject implements IFunction.Jsii$Default
software.amazon.jsii.JsiiObject.InitializationMode
IFunction.Jsii$Default, IFunction.Jsii$Proxy
Modifier | Constructor and Description |
---|---|
protected |
Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
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() |
ResourceEnvironment |
getEnv()
(experimental) The environment this resource belongs to.
|
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.
|
IVersion |
getLatestVersion()
(experimental) The `$LATEST` version of this function.
|
software.constructs.Node |
getNode()
The tree node.
|
software.constructs.Node |
getPermissionsNode()
(experimental) The construct node where permissions are attached.
|
IRole |
getRole()
(experimental) The IAM role associated with this function.
|
Stack |
getStack()
(experimental) The stack in which this resource is defined.
|
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.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
@Stability(value=Stable) @NotNull public final software.constructs.Node getNode()
getNode
in interface IResource.Jsii$Default
getNode
in interface IFunction.Jsii$Default
getNode
in interface software.constructs.IConstruct
getNode
in interface software.constructs.IConstruct.Jsii$Default
@Stability(value=Experimental) @NotNull public final ResourceEnvironment getEnv()
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
getEnv
in interface IResource
getEnv
in interface IResource.Jsii$Default
getEnv
in interface IFunction.Jsii$Default
@Stability(value=Experimental) @NotNull public final Stack getStack()
getStack
in interface IResource
getStack
in interface IResource.Jsii$Default
getStack
in interface IFunction.Jsii$Default
@Stability(value=Experimental) @NotNull public final Connections getConnections()
getConnections
in interface IConnectable
getConnections
in interface IConnectable.Jsii$Default
getConnections
in interface IFunction.Jsii$Default
@Stability(value=Experimental) @NotNull public final IPrincipal getGrantPrincipal()
getGrantPrincipal
in interface IGrantable
getGrantPrincipal
in interface IGrantable.Jsii$Default
getGrantPrincipal
in interface IFunction.Jsii$Default
@Stability(value=Experimental) @NotNull public final String getFunctionArn()
getFunctionArn
in interface IFunction
getFunctionArn
in interface IFunction.Jsii$Default
@Stability(value=Experimental) @NotNull public final String getFunctionName()
getFunctionName
in interface IFunction
getFunctionName
in interface IFunction.Jsii$Default
@Stability(value=Experimental) @NotNull public final Boolean getIsBoundToVpc()
If this is is false
, trying to access the connections
object will fail.
getIsBoundToVpc
in interface IFunction
getIsBoundToVpc
in interface IFunction.Jsii$Default
@Stability(value=Experimental) @NotNull public final 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
getLatestVersion
in interface IFunction.Jsii$Default
@Stability(value=Experimental) @NotNull public final software.constructs.Node getPermissionsNode()
getPermissionsNode
in interface IFunction
getPermissionsNode
in interface IFunction.Jsii$Default
@Stability(value=Experimental) @Nullable public final IRole getRole()
getRole
in interface IFunction
getRole
in interface IFunction.Jsii$Default
@Stability(value=Experimental) public final void addEventSource(@NotNull IEventSource source)
Event sources are implemented in the @aws-cdk/aws-lambda-event-sources module.
The following example adds an SQS Queue as an event source:
import { SqsEventSource } from '@aws-cdk/aws-lambda-event-sources'; myFunction.addEventSource(new SqsEventSource(myQueue));
addEventSource
in interface IFunction
addEventSource
in interface IFunction.Jsii$Default
source
- This parameter is required.@Stability(value=Experimental) @NotNull public final EventSourceMapping addEventSourceMapping(@NotNull String id, @NotNull EventSourceMappingOptions options)
addEventSourceMapping
in interface IFunction
addEventSourceMapping
in interface IFunction.Jsii$Default
id
- construct ID. This parameter is required.options
- mapping options. This parameter is required.@Stability(value=Experimental) public final void addPermission(@NotNull String id, @NotNull Permission permission)
addPermission
in interface IFunction
addPermission
in interface IFunction.Jsii$Default
id
- The id for the permission construct. This parameter is required.permission
- The permission to grant to this Lambda function. This parameter is required.for details.
@Stability(value=Experimental) public final void addToRolePolicy(@NotNull PolicyStatement statement)
addToRolePolicy
in interface IFunction
addToRolePolicy
in interface IFunction.Jsii$Default
statement
- This parameter is required.@Stability(value=Experimental) public final void configureAsyncInvoke(@NotNull EventInvokeConfigOptions options)
configureAsyncInvoke
in interface IFunction
configureAsyncInvoke
in interface IFunction.Jsii$Default
options
- This parameter is required.@Stability(value=Experimental) @NotNull public final Grant grantInvoke(@NotNull IGrantable identity)
grantInvoke
in interface IFunction
grantInvoke
in interface IFunction.Jsii$Default
identity
- This parameter is required.@Stability(value=Experimental) @NotNull public final Metric metric(@NotNull String metricName, @Nullable MetricOptions props)
metric
in interface IFunction
metric
in interface IFunction.Jsii$Default
metricName
- This parameter is required.props
- @Stability(value=Experimental) @NotNull public final Metric metric(@NotNull String metricName)
@Stability(value=Experimental) @NotNull public final Metric metricDuration(@Nullable MetricOptions props)
Average over 5 minutes
Default: average over 5 minutes
metricDuration
in interface IFunction
metricDuration
in interface IFunction.Jsii$Default
props
- @Stability(value=Experimental) @NotNull public final Metric metricDuration()
Average over 5 minutes
Default: average over 5 minutes
metricDuration
in interface IFunction
@Stability(value=Experimental) @NotNull public final Metric metricErrors(@Nullable MetricOptions props)
Sum over 5 minutes
metricErrors
in interface IFunction
metricErrors
in interface IFunction.Jsii$Default
props
- @Stability(value=Experimental) @NotNull public final Metric metricErrors()
Sum over 5 minutes
metricErrors
in interface IFunction
@Stability(value=Experimental) @NotNull public final Metric metricInvocations(@Nullable MetricOptions props)
Sum over 5 minutes
Default: sum over 5 minutes
metricInvocations
in interface IFunction
metricInvocations
in interface IFunction.Jsii$Default
props
- @Stability(value=Experimental) @NotNull public final Metric metricInvocations()
Sum over 5 minutes
Default: sum over 5 minutes
metricInvocations
in interface IFunction
@Stability(value=Experimental) @NotNull public final Metric metricThrottles(@Nullable MetricOptions props)
Sum over 5 minutes
Default: sum over 5 minutes
metricThrottles
in interface IFunction
metricThrottles
in interface IFunction.Jsii$Default
props
- @Stability(value=Experimental) @NotNull public final Metric metricThrottles()
Sum over 5 minutes
Default: sum over 5 minutes
metricThrottles
in interface IFunction
Copyright © 2021. All rights reserved.