Class IAlias.Jsii$Proxy
- All Implemented Interfaces:
IResource
,IResource.Jsii$Default
,IConnectable
,IConnectable.Jsii$Default
,IGrantable
,IGrantable.Jsii$Default
,IAlias
,IAlias.Jsii$Default
,IFunction
,IFunction.Jsii$Default
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IConstruct.Jsii$Default
,software.constructs.IDependable
,software.constructs.IDependable.Jsii$Default
- Enclosing interface:
IAlias
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.lambda.IAlias
IAlias.Jsii$Default, IAlias.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.ec2.IConnectable
IConnectable.Jsii$Default, IConnectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy
Nested classes/interfaces inherited from interface software.constructs.IDependable
software.constructs.IDependable.Jsii$Default, software.constructs.IDependable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.lambda.IFunction
IFunction.Jsii$Default, IFunction.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.iam.IGrantable
IGrantable.Jsii$Default, IGrantable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default, IResource.Jsii$Proxy
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
addEventSource
(IEventSource source) Adds an event source to this function.final EventSourceMapping
addEventSourceMapping
(String id, EventSourceMappingOptions options) Adds an event source that maps to this AWS Lambda function.final FunctionUrl
Adds a url to this lambda function.final FunctionUrl
addFunctionUrl
(FunctionUrlOptions options) Adds a url to this lambda function.final void
addPermission
(String id, Permission permission) Adds a permission to the Lambda resource policy.final void
addToRolePolicy
(PolicyStatement statement) Adds a statement to the IAM role assumed by the instance.final void
applyRemovalPolicy
(RemovalPolicy policy) Apply the given removal policy to this resource.final void
Configures options for asynchronous invocation.final String
Name of this alias.final Architecture
The system architectures compatible with this lambda function.final Connections
The network connections associated with this resource.final ResourceEnvironment
getEnv()
The environment this resource belongs to.final String
The ARN of the function.final String
The name of the function.final IPrincipal
The principal to grant permissions to.final Boolean
Whether or not this Lambda function was bound to a VPC.final IVersion
The$LATEST
version of this function.final software.constructs.Node
getNode()
The tree node.final software.constructs.Node
The construct node where permissions are attached.The ARN(s) to put into the resource field of the generated IAM policy for grantInvoke().final IRole
getRole()
The IAM role associated with this function.final Stack
getStack()
The stack in which this resource is defined.final IVersion
The underlying Lambda function version.final Grant
grantInvoke
(IGrantable identity) Grant the given identity permissions to invoke this Lambda.grantInvokeCompositePrincipal
(CompositePrincipal compositePrincipal) Grant multiple principals the ability to invoke this Lambda via CompositePrincipal.final Grant
grantInvokeLatestVersion
(IGrantable identity) Grant the given identity permissions to invoke the $LATEST version or unqualified version of this Lambda.final Grant
grantInvokeUrl
(IGrantable identity) Grant the given identity permissions to invoke this Lambda Function URL.final Grant
grantInvokeVersion
(IGrantable identity, IVersion version) Grant the given identity permissions to invoke the given version of this Lambda.final Metric
Return the given named metric for this Lambda Return the given named metric for this Function.final Metric
metric
(String metricName, MetricOptions props) Return the given named metric for this Lambda Return the given named metric for this Function.final Metric
Metric for the Duration of this Lambda How long execution of this Lambda takes.final Metric
metricDuration
(MetricOptions props) Metric for the Duration of this Lambda How long execution of this Lambda takes.final Metric
How many invocations of this Lambda fail.final Metric
metricErrors
(MetricOptions props) How many invocations of this Lambda fail.final Metric
Metric for the number of invocations of this Lambda How often this Lambda is invoked.final Metric
metricInvocations
(MetricOptions props) Metric for the number of invocations of this Lambda How often this Lambda is invoked.final Metric
Metric for the number of throttled invocations of this Lambda How often this Lambda is throttled.final Metric
metricThrottles
(MetricOptions props) Metric for the number of throttled invocations of this Lambda How often this Lambda is throttled.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
Jsii$Proxy
protected Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
-
-
Method Details
-
getNode
@Stability(Stable) @NotNull public final software.constructs.Node getNode()The tree node.- Specified by:
getNode
in interfaceIAlias.Jsii$Default
- Specified by:
getNode
in interfacesoftware.constructs.IConstruct
- Specified by:
getNode
in interfacesoftware.constructs.IConstruct.Jsii$Default
- Specified by:
getNode
in interfaceIFunction.Jsii$Default
- Specified by:
getNode
in interfaceIResource.Jsii$Default
-
getEnv
The environment this resource belongs to.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.
- Specified by:
getEnv
in interfaceIAlias.Jsii$Default
- Specified by:
getEnv
in interfaceIFunction.Jsii$Default
- Specified by:
getEnv
in interfaceIResource
- Specified by:
getEnv
in interfaceIResource.Jsii$Default
-
getStack
The stack in which this resource is defined.- Specified by:
getStack
in interfaceIAlias.Jsii$Default
- Specified by:
getStack
in interfaceIFunction.Jsii$Default
- Specified by:
getStack
in interfaceIResource
- Specified by:
getStack
in interfaceIResource.Jsii$Default
-
getConnections
The network connections associated with this resource.- Specified by:
getConnections
in interfaceIAlias.Jsii$Default
- Specified by:
getConnections
in interfaceIConnectable
- Specified by:
getConnections
in interfaceIConnectable.Jsii$Default
- Specified by:
getConnections
in interfaceIFunction.Jsii$Default
-
getGrantPrincipal
The principal to grant permissions to.- Specified by:
getGrantPrincipal
in interfaceIAlias.Jsii$Default
- Specified by:
getGrantPrincipal
in interfaceIFunction.Jsii$Default
- Specified by:
getGrantPrincipal
in interfaceIGrantable
- Specified by:
getGrantPrincipal
in interfaceIGrantable.Jsii$Default
-
getArchitecture
The system architectures compatible with this lambda function.- Specified by:
getArchitecture
in interfaceIAlias.Jsii$Default
- Specified by:
getArchitecture
in interfaceIFunction
- Specified by:
getArchitecture
in interfaceIFunction.Jsii$Default
-
getFunctionArn
The ARN of the function.- Specified by:
getFunctionArn
in interfaceIAlias.Jsii$Default
- Specified by:
getFunctionArn
in interfaceIFunction
- Specified by:
getFunctionArn
in interfaceIFunction.Jsii$Default
-
getFunctionName
The name of the function.- Specified by:
getFunctionName
in interfaceIAlias.Jsii$Default
- Specified by:
getFunctionName
in interfaceIFunction
- Specified by:
getFunctionName
in interfaceIFunction.Jsii$Default
-
getIsBoundToVpc
Whether or not this Lambda function was bound to a VPC.If this is is
false
, trying to access theconnections
object will fail.- Specified by:
getIsBoundToVpc
in interfaceIAlias.Jsii$Default
- Specified by:
getIsBoundToVpc
in interfaceIFunction
- Specified by:
getIsBoundToVpc
in interfaceIFunction.Jsii$Default
-
getLatestVersion
The$LATEST
version of this function.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.- Specified by:
getLatestVersion
in interfaceIAlias.Jsii$Default
- Specified by:
getLatestVersion
in interfaceIFunction
- Specified by:
getLatestVersion
in interfaceIFunction.Jsii$Default
-
getPermissionsNode
@Stability(Stable) @NotNull public final software.constructs.Node getPermissionsNode()The construct node where permissions are attached.- Specified by:
getPermissionsNode
in interfaceIAlias.Jsii$Default
- Specified by:
getPermissionsNode
in interfaceIFunction
- Specified by:
getPermissionsNode
in interfaceIFunction.Jsii$Default
-
getResourceArnsForGrantInvoke
The ARN(s) to put into the resource field of the generated IAM policy for grantInvoke().This property is for cdk modules to consume only. You should not need to use this property. Instead, use grantInvoke() directly.
- Specified by:
getResourceArnsForGrantInvoke
in interfaceIAlias.Jsii$Default
- Specified by:
getResourceArnsForGrantInvoke
in interfaceIFunction
- Specified by:
getResourceArnsForGrantInvoke
in interfaceIFunction.Jsii$Default
-
getRole
The IAM role associated with this function.- Specified by:
getRole
in interfaceIAlias.Jsii$Default
- Specified by:
getRole
in interfaceIFunction
- Specified by:
getRole
in interfaceIFunction.Jsii$Default
-
getAliasName
Name of this alias.- Specified by:
getAliasName
in interfaceIAlias
- Specified by:
getAliasName
in interfaceIAlias.Jsii$Default
-
getVersion
The underlying Lambda function version.- Specified by:
getVersion
in interfaceIAlias
- Specified by:
getVersion
in interfaceIAlias.Jsii$Default
-
applyRemovalPolicy
Apply the given removal policy to this resource.The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (
RemovalPolicy.DESTROY
), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN
).- Specified by:
applyRemovalPolicy
in interfaceIAlias.Jsii$Default
- Specified by:
applyRemovalPolicy
in interfaceIFunction.Jsii$Default
- Specified by:
applyRemovalPolicy
in interfaceIResource
- Specified by:
applyRemovalPolicy
in interfaceIResource.Jsii$Default
- Parameters:
policy
- This parameter is required.
-
addEventSource
Adds an event source to this function.Event sources are implemented in the aws-cdk-lib/aws-lambda-event-sources module.
The following example adds an SQS Queue as an event source:
import { SqsEventSource } from 'aws-cdk-lib/aws-lambda-event-sources'; myFunction.addEventSource(new SqsEventSource(myQueue));
- Specified by:
addEventSource
in interfaceIAlias.Jsii$Default
- Specified by:
addEventSource
in interfaceIFunction
- Specified by:
addEventSource
in interfaceIFunction.Jsii$Default
- Parameters:
source
- This parameter is required.
-
addEventSourceMapping
@Stability(Stable) @NotNull public final EventSourceMapping addEventSourceMapping(@NotNull String id, @NotNull EventSourceMappingOptions options) Adds an event source that maps to this AWS Lambda function.- Specified by:
addEventSourceMapping
in interfaceIAlias.Jsii$Default
- Specified by:
addEventSourceMapping
in interfaceIFunction
- Specified by:
addEventSourceMapping
in interfaceIFunction.Jsii$Default
- Parameters:
id
- construct ID. This parameter is required.options
- mapping options. This parameter is required.
-
addFunctionUrl
@Stability(Stable) @NotNull public final FunctionUrl addFunctionUrl(@Nullable FunctionUrlOptions options) Adds a url to this lambda function.- Specified by:
addFunctionUrl
in interfaceIAlias.Jsii$Default
- Specified by:
addFunctionUrl
in interfaceIFunction
- Specified by:
addFunctionUrl
in interfaceIFunction.Jsii$Default
- Parameters:
options
-
-
addFunctionUrl
Adds a url to this lambda function.- Specified by:
addFunctionUrl
in interfaceIFunction
-
addPermission
@Stability(Stable) public final void addPermission(@NotNull String id, @NotNull Permission permission) Adds a permission to the Lambda resource policy.- Specified by:
addPermission
in interfaceIAlias.Jsii$Default
- Specified by:
addPermission
in interfaceIFunction
- Specified by:
addPermission
in interfaceIFunction.Jsii$Default
- Parameters:
id
- The id for the permission construct. This parameter is required.permission
- The permission to grant to this Lambda function. This parameter is required.- See Also:
-
addToRolePolicy
Adds a statement to the IAM role assumed by the instance.- Specified by:
addToRolePolicy
in interfaceIAlias.Jsii$Default
- Specified by:
addToRolePolicy
in interfaceIFunction
- Specified by:
addToRolePolicy
in interfaceIFunction.Jsii$Default
- Parameters:
statement
- This parameter is required.
-
configureAsyncInvoke
@Stability(Stable) public final void configureAsyncInvoke(@NotNull EventInvokeConfigOptions options) Configures options for asynchronous invocation.- Specified by:
configureAsyncInvoke
in interfaceIAlias.Jsii$Default
- Specified by:
configureAsyncInvoke
in interfaceIFunction
- Specified by:
configureAsyncInvoke
in interfaceIFunction.Jsii$Default
- Parameters:
options
- This parameter is required.
-
grantInvoke
Grant the given identity permissions to invoke this Lambda.- Specified by:
grantInvoke
in interfaceIAlias.Jsii$Default
- Specified by:
grantInvoke
in interfaceIFunction
- Specified by:
grantInvoke
in interfaceIFunction.Jsii$Default
- Parameters:
identity
- This parameter is required.
-
grantInvokeCompositePrincipal
@Stability(Stable) @NotNull public final List<Grant> grantInvokeCompositePrincipal(@NotNull CompositePrincipal compositePrincipal) Grant multiple principals the ability to invoke this Lambda via CompositePrincipal.- Specified by:
grantInvokeCompositePrincipal
in interfaceIAlias.Jsii$Default
- Specified by:
grantInvokeCompositePrincipal
in interfaceIFunction
- Specified by:
grantInvokeCompositePrincipal
in interfaceIFunction.Jsii$Default
- Parameters:
compositePrincipal
- This parameter is required.
-
grantInvokeLatestVersion
@Stability(Stable) @NotNull public final Grant grantInvokeLatestVersion(@NotNull IGrantable identity) Grant the given identity permissions to invoke the $LATEST version or unqualified version of this Lambda.- Specified by:
grantInvokeLatestVersion
in interfaceIAlias.Jsii$Default
- Specified by:
grantInvokeLatestVersion
in interfaceIFunction
- Specified by:
grantInvokeLatestVersion
in interfaceIFunction.Jsii$Default
- Parameters:
identity
- This parameter is required.
-
grantInvokeUrl
Grant the given identity permissions to invoke this Lambda Function URL.- Specified by:
grantInvokeUrl
in interfaceIAlias.Jsii$Default
- Specified by:
grantInvokeUrl
in interfaceIFunction
- Specified by:
grantInvokeUrl
in interfaceIFunction.Jsii$Default
- Parameters:
identity
- This parameter is required.
-
grantInvokeVersion
@Stability(Stable) @NotNull public final Grant grantInvokeVersion(@NotNull IGrantable identity, @NotNull IVersion version) Grant the given identity permissions to invoke the given version of this Lambda.- Specified by:
grantInvokeVersion
in interfaceIAlias.Jsii$Default
- Specified by:
grantInvokeVersion
in interfaceIFunction
- Specified by:
grantInvokeVersion
in interfaceIFunction.Jsii$Default
- Parameters:
identity
- This parameter is required.version
- This parameter is required.
-
metric
@Stability(Stable) @NotNull public final Metric metric(@NotNull String metricName, @Nullable MetricOptions props) Return the given named metric for this Lambda Return the given named metric for this Function.- Specified by:
metric
in interfaceIAlias.Jsii$Default
- Specified by:
metric
in interfaceIFunction
- Specified by:
metric
in interfaceIFunction.Jsii$Default
- Parameters:
metricName
- This parameter is required.props
-
-
metric
Return the given named metric for this Lambda Return the given named metric for this Function. -
metricDuration
Metric for the Duration of this Lambda How long execution of this Lambda takes.Average over 5 minutes
Default: average over 5 minutes
- Specified by:
metricDuration
in interfaceIAlias.Jsii$Default
- Specified by:
metricDuration
in interfaceIFunction
- Specified by:
metricDuration
in interfaceIFunction.Jsii$Default
- Parameters:
props
-
-
metricDuration
Metric for the Duration of this Lambda How long execution of this Lambda takes.Average over 5 minutes
Default: average over 5 minutes
- Specified by:
metricDuration
in interfaceIFunction
-
metricErrors
How many invocations of this Lambda fail.Sum over 5 minutes
- Specified by:
metricErrors
in interfaceIAlias.Jsii$Default
- Specified by:
metricErrors
in interfaceIFunction
- Specified by:
metricErrors
in interfaceIFunction.Jsii$Default
- Parameters:
props
-
-
metricErrors
How many invocations of this Lambda fail.Sum over 5 minutes
- Specified by:
metricErrors
in interfaceIFunction
-
metricInvocations
Metric for the number of invocations of this Lambda How often this Lambda is invoked.Sum over 5 minutes
Default: sum over 5 minutes
- Specified by:
metricInvocations
in interfaceIAlias.Jsii$Default
- Specified by:
metricInvocations
in interfaceIFunction
- Specified by:
metricInvocations
in interfaceIFunction.Jsii$Default
- Parameters:
props
-
-
metricInvocations
Metric for the number of invocations of this Lambda How often this Lambda is invoked.Sum over 5 minutes
Default: sum over 5 minutes
- Specified by:
metricInvocations
in interfaceIFunction
-
metricThrottles
Metric for the number of throttled invocations of this Lambda How often this Lambda is throttled.Sum over 5 minutes
Default: sum over 5 minutes
- Specified by:
metricThrottles
in interfaceIAlias.Jsii$Default
- Specified by:
metricThrottles
in interfaceIFunction
- Specified by:
metricThrottles
in interfaceIFunction.Jsii$Default
- Parameters:
props
-
-
metricThrottles
Metric for the number of throttled invocations of this Lambda How often this Lambda is throttled.Sum over 5 minutes
Default: sum over 5 minutes
- Specified by:
metricThrottles
in interfaceIFunction
-