Interface IFunction.Jsii$Default
- All Superinterfaces:
IConnectable,IConnectable.Jsii$Default,software.constructs.IConstruct,software.constructs.IConstruct.Jsii$Default,software.constructs.IDependable,software.constructs.IDependable.Jsii$Default,IEnvironmentAware,IEnvironmentAware.Jsii$Default,IFunction,IFunctionRef,IFunctionRef.Jsii$Default,IGrantable,IGrantable.Jsii$Default,IResource,IResource.Jsii$Default,software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
IAlias.Jsii$Default,IVersion.Jsii$Default
- All Known Implementing Classes:
IAlias.Jsii$Proxy,IFunction.Jsii$Proxy,IVersion.Jsii$Proxy
- Enclosing interface:
IFunction
IFunction.-
Nested Class Summary
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.ec2.IConnectable
IConnectable.Jsii$Default, IConnectable.Jsii$ProxyNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$ProxyNested classes/interfaces inherited from interface software.constructs.IDependable
software.constructs.IDependable.Jsii$Default, software.constructs.IDependable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
IEnvironmentAware.Jsii$Default, IEnvironmentAware.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.services.lambda.IFunction
IFunction.Jsii$Default, IFunction.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.lambda.IFunctionRef
IFunctionRef.Jsii$Default, IFunctionRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.services.iam.IGrantable
IGrantable.Jsii$Default, IGrantable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default, IResource.Jsii$Proxy -
Method Summary
Modifier and TypeMethodDescriptiondefault voidaddEventSource(IEventSource source) Adds an event source to this function.default EventSourceMappingaddEventSourceMapping(String id, EventSourceMappingOptions options) Adds an event source that maps to this AWS Lambda function.default FunctionUrlAdds a url to this lambda function.default FunctionUrladdFunctionUrl(FunctionUrlOptions options) Adds a url to this lambda function.default voidaddPermission(String id, Permission permission) Adds a permission to the Lambda resource policy.default voidaddToRolePolicy(PolicyStatement statement) Adds a statement to the IAM role assumed by the instance.default voidConfigures options for asynchronous invocation.default ArchitectureThe system architectures compatible with this lambda function.default StringThe ARN of the function.default StringThe name of the function.default BooleanWhether or not this Lambda function was bound to a VPC.default IVersionThe$LATESTversion of this function.default software.constructs.NodeThe construct node where permissions are attached.The ARN(s) to put into the resource field of the generated IAM policy for grantInvoke().default IRolegetRole()The IAM role associated with this function.default TenancyConfigThe tenancy configuration for this function.default GrantgrantInvoke(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.default GrantgrantInvokeLatestVersion(IGrantable identity) Grant the given identity permissions to invoke the $LATEST version or unqualified version of this Lambda.default GrantgrantInvokeUrl(IGrantable identity) Grant the given identity permissions to invoke this Lambda Function URL.default GrantgrantInvokeVersion(IGrantable identity, IVersion version) Grant the given identity permissions to invoke the given version of this Lambda.default MetricReturn the given named metric for this Lambda Return the given named metric for this Function.default Metricmetric(String metricName, MetricOptions props) Return the given named metric for this Lambda Return the given named metric for this Function.default MetricMetric for the Duration of this Lambda How long execution of this Lambda takes.default MetricmetricDuration(MetricOptions props) Metric for the Duration of this Lambda How long execution of this Lambda takes.default MetricHow many invocations of this Lambda fail.default MetricmetricErrors(MetricOptions props) How many invocations of this Lambda fail.default MetricMetric for the number of invocations of this Lambda How often this Lambda is invoked.default MetricmetricInvocations(MetricOptions props) Metric for the number of invocations of this Lambda How often this Lambda is invoked.default MetricMetric for the number of throttled invocations of this Lambda How often this Lambda is throttled.default MetricmetricThrottles(MetricOptions props) Metric for the number of throttled invocations of this Lambda How often this Lambda is throttled.Methods inherited from interface software.amazon.awscdk.services.ec2.IConnectable.Jsii$Default
getConnectionsMethods inherited from interface software.constructs.IConstruct.Jsii$Default
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware.Jsii$Default
getEnvMethods inherited from interface software.amazon.awscdk.interfaces.lambda.IFunctionRef.Jsii$Default
getFunctionRefMethods inherited from interface software.amazon.awscdk.services.iam.IGrantable.Jsii$Default
getGrantPrincipalMethods inherited from interface software.amazon.awscdk.IResource.Jsii$Default
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getArchitecture
The system architectures compatible with this lambda function.- Specified by:
getArchitecturein interfaceIFunction
-
getFunctionArn
The ARN of the function.- Specified by:
getFunctionArnin interfaceIFunction
-
getFunctionName
The name of the function.- Specified by:
getFunctionNamein interfaceIFunction
-
getIsBoundToVpc
Whether or not this Lambda function was bound to a VPC.If this is is
false, trying to access theconnectionsobject will fail.- Specified by:
getIsBoundToVpcin interfaceIFunction
-
getLatestVersion
The$LATESTversion 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.currentVersioninstead.- Specified by:
getLatestVersionin interfaceIFunction
-
getPermissionsNode
@Stability(Stable) @NotNull default software.constructs.Node getPermissionsNode()The construct node where permissions are attached.- Specified by:
getPermissionsNodein interfaceIFunction
-
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:
getResourceArnsForGrantInvokein interfaceIFunction
-
getRole
The IAM role associated with this function. -
getTenancyConfig
The tenancy configuration for this function.- Specified by:
getTenancyConfigin interfaceIFunction
-
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:
addEventSourcein interfaceIFunction- Parameters:
source- This parameter is required.
-
addEventSourceMapping
@Stability(Stable) @NotNull default EventSourceMapping addEventSourceMapping(@NotNull String id, @NotNull EventSourceMappingOptions options) Adds an event source that maps to this AWS Lambda function.- Specified by:
addEventSourceMappingin interfaceIFunction- Parameters:
id- construct ID. This parameter is required.options- mapping options. This parameter is required.
-
addFunctionUrl
@Stability(Stable) @NotNull default FunctionUrl addFunctionUrl(@Nullable FunctionUrlOptions options) Adds a url to this lambda function.- Specified by:
addFunctionUrlin interfaceIFunction- Parameters:
options-
-
addFunctionUrl
Adds a url to this lambda function.- Specified by:
addFunctionUrlin interfaceIFunction
-
addPermission
Adds a permission to the Lambda resource policy.- Specified by:
addPermissionin interfaceIFunction- 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:
addToRolePolicyin interfaceIFunction- Parameters:
statement- This parameter is required.
-
configureAsyncInvoke
Configures options for asynchronous invocation.- Specified by:
configureAsyncInvokein interfaceIFunction- Parameters:
options- This parameter is required.
-
grantInvoke
Grant the given identity permissions to invoke this Lambda.- Specified by:
grantInvokein interfaceIFunction- Parameters:
identity- This parameter is required.
-
grantInvokeCompositePrincipal
@Stability(Stable) @NotNull default List<Grant> grantInvokeCompositePrincipal(@NotNull CompositePrincipal compositePrincipal) Grant multiple principals the ability to invoke this Lambda via CompositePrincipal.- Specified by:
grantInvokeCompositePrincipalin interfaceIFunction- Parameters:
compositePrincipal- This parameter is required.
-
grantInvokeLatestVersion
Grant the given identity permissions to invoke the $LATEST version or unqualified version of this Lambda.- Specified by:
grantInvokeLatestVersionin interfaceIFunction- Parameters:
identity- This parameter is required.
-
grantInvokeUrl
Grant the given identity permissions to invoke this Lambda Function URL.- Specified by:
grantInvokeUrlin interfaceIFunction- Parameters:
identity- This parameter is required.
-
grantInvokeVersion
@Stability(Stable) @NotNull default Grant grantInvokeVersion(@NotNull IGrantable identity, @NotNull IVersion version) Grant the given identity permissions to invoke the given version of this Lambda.- Specified by:
grantInvokeVersionin interfaceIFunction- Parameters:
identity- This parameter is required.version- This parameter is required.
-
metric
@Stability(Stable) @NotNull default Metric metric(@NotNull String metricName, @Nullable MetricOptions props) Return the given named metric for this Lambda Return the given named metric for this Function. -
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:
metricDurationin interfaceIFunction- 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:
metricDurationin interfaceIFunction
-
metricErrors
How many invocations of this Lambda fail.Sum over 5 minutes
- Specified by:
metricErrorsin interfaceIFunction- Parameters:
props-
-
metricErrors
How many invocations of this Lambda fail.Sum over 5 minutes
- Specified by:
metricErrorsin 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:
metricInvocationsin interfaceIFunction- 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:
metricInvocationsin 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:
metricThrottlesin interfaceIFunction- 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:
metricThrottlesin interfaceIFunction
-