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

@Internal public static interface IFunction.Jsii$Default extends IFunction, IResource.Jsii$Default, IFunctionRef.Jsii$Default, IConnectable.Jsii$Default, IGrantable.Jsii$Default
Internal default implementation for IFunction.
  • Method Details

    • getArchitecture

      @Stability(Stable) @NotNull default Architecture getArchitecture()
      The system architectures compatible with this lambda function.
      Specified by:
      getArchitecture in interface IFunction
    • getFunctionArn

      @Stability(Stable) @NotNull default String getFunctionArn()
      The ARN of the function.
      Specified by:
      getFunctionArn in interface IFunction
    • getFunctionName

      @Stability(Stable) @NotNull default String getFunctionName()
      The name of the function.
      Specified by:
      getFunctionName in interface IFunction
    • getIsBoundToVpc

      @Stability(Stable) @NotNull default Boolean getIsBoundToVpc()
      Whether or not this Lambda function was bound to a VPC.

      If this is is false, trying to access the connections object will fail.

      Specified by:
      getIsBoundToVpc in interface IFunction
    • getLatestVersion

      @Stability(Stable) @NotNull default IVersion 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 interface IFunction
    • getPermissionsNode

      @Stability(Stable) @NotNull default software.constructs.Node getPermissionsNode()
      The construct node where permissions are attached.
      Specified by:
      getPermissionsNode in interface IFunction
    • getResourceArnsForGrantInvoke

      @Stability(Stable) @NotNull default List<String> 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 interface IFunction
    • getRole

      @Stability(Stable) @Nullable default IRole getRole()
      The IAM role associated with this function.
      Specified by:
      getRole in interface IFunction
    • getTenancyConfig

      @Stability(Stable) @Nullable default TenancyConfig getTenancyConfig()
      The tenancy configuration for this function.
      Specified by:
      getTenancyConfig in interface IFunction
    • addEventSource

      @Stability(Stable) default void addEventSource(@NotNull IEventSource source)
      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 interface IFunction
      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:
      addEventSourceMapping in interface IFunction
      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:
      addFunctionUrl in interface IFunction
      Parameters:
      options -
    • addFunctionUrl

      @Stability(Stable) @NotNull default FunctionUrl addFunctionUrl()
      Adds a url to this lambda function.
      Specified by:
      addFunctionUrl in interface IFunction
    • addPermission

      @Stability(Stable) default void addPermission(@NotNull String id, @NotNull Permission permission)
      Adds a permission to the Lambda resource policy.

      Specified by:
      addPermission in interface IFunction
      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

      @Stability(Stable) default void addToRolePolicy(@NotNull PolicyStatement statement)
      Adds a statement to the IAM role assumed by the instance.

      Specified by:
      addToRolePolicy in interface IFunction
      Parameters:
      statement - This parameter is required.
    • configureAsyncInvoke

      @Stability(Stable) default void configureAsyncInvoke(@NotNull EventInvokeConfigOptions options)
      Configures options for asynchronous invocation.

      Specified by:
      configureAsyncInvoke in interface IFunction
      Parameters:
      options - This parameter is required.
    • grantInvoke

      @Stability(Stable) @NotNull default Grant grantInvoke(@NotNull IGrantable identity)
      Grant the given identity permissions to invoke this Lambda.

      Specified by:
      grantInvoke in interface IFunction
      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:
      grantInvokeCompositePrincipal in interface IFunction
      Parameters:
      compositePrincipal - This parameter is required.
    • grantInvokeLatestVersion

      @Stability(Stable) @NotNull default 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 interface IFunction
      Parameters:
      identity - This parameter is required.
    • grantInvokeUrl

      @Stability(Stable) @NotNull default Grant grantInvokeUrl(@NotNull IGrantable identity)
      Grant the given identity permissions to invoke this Lambda Function URL.

      Specified by:
      grantInvokeUrl in interface IFunction
      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:
      grantInvokeVersion in interface IFunction
      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.

      Specified by:
      metric in interface IFunction
      Parameters:
      metricName - This parameter is required.
      props -
    • metric

      @Stability(Stable) @NotNull default Metric metric(@NotNull String metricName)
      Return the given named metric for this Lambda Return the given named metric for this Function.

      Specified by:
      metric in interface IFunction
      Parameters:
      metricName - This parameter is required.
    • metricDuration

      @Stability(Stable) @NotNull default Metric metricDuration(@Nullable MetricOptions props)
      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 interface IFunction
      Parameters:
      props -
    • metricDuration

      @Stability(Stable) @NotNull default Metric 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 interface IFunction
    • metricErrors

      @Stability(Stable) @NotNull default Metric metricErrors(@Nullable MetricOptions props)
      How many invocations of this Lambda fail.

      Sum over 5 minutes

      Specified by:
      metricErrors in interface IFunction
      Parameters:
      props -
    • metricErrors

      @Stability(Stable) @NotNull default Metric metricErrors()
      How many invocations of this Lambda fail.

      Sum over 5 minutes

      Specified by:
      metricErrors in interface IFunction
    • metricInvocations

      @Stability(Stable) @NotNull default Metric metricInvocations(@Nullable MetricOptions props)
      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 interface IFunction
      Parameters:
      props -
    • metricInvocations

      @Stability(Stable) @NotNull default Metric 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 interface IFunction
    • metricThrottles

      @Stability(Stable) @NotNull default Metric metricThrottles(@Nullable MetricOptions props)
      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 interface IFunction
      Parameters:
      props -
    • metricThrottles

      @Stability(Stable) @NotNull default Metric 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 interface IFunction