@Internal public static interface IVersion.Jsii$Default extends IVersion, IFunction.Jsii$Default
IVersion.IVersion.Jsii$Default, IVersion.Jsii$Proxy| Modifier and Type | Method and Description |
|---|---|
default Alias |
addAlias(String aliasName,
AliasOptions options)
(experimental) Defines an alias for this version.
|
default void |
addEventSource(IEventSource source)
(experimental) Adds an event source to this function.
|
default EventSourceMapping |
addEventSourceMapping(String id,
EventSourceMappingOptions options)
(experimental) Adds an event source that maps to this AWS Lambda function.
|
default void |
addPermission(String id,
Permission permission)
(experimental) Adds a permission to the Lambda resource policy.
|
default void |
addToRolePolicy(PolicyStatement statement)
(experimental) Adds a statement to the IAM role assumed by the instance.
|
default void |
configureAsyncInvoke(EventInvokeConfigOptions options)
(experimental) Configures options for asynchronous invocation.
|
default Connections |
getConnections() |
default String |
getEdgeArn()
(experimental) The ARN of the version for Lambda@Edge.
|
default ResourceEnvironment |
getEnv()
(experimental) The environment this resource belongs to.
|
default String |
getFunctionArn()
(experimental) The ARN fo the function.
|
default String |
getFunctionName()
(experimental) The name of the function.
|
default IPrincipal |
getGrantPrincipal()
(experimental) The principal to grant permissions to.
|
default Boolean |
getIsBoundToVpc()
(experimental) Whether or not this Lambda function was bound to a VPC.
|
default IFunction |
getLambda()
(experimental) The underlying AWS Lambda function.
|
default IVersion |
getLatestVersion()
(experimental) The `$LATEST` version of this function.
|
default software.constructs.Node |
getNode()
The tree node.
|
default software.constructs.Node |
getPermissionsNode()
(experimental) The construct node where permissions are attached.
|
default IRole |
getRole()
(experimental) The IAM role associated with this function.
|
default Stack |
getStack()
(experimental) The stack in which this resource is defined.
|
default String |
getVersion()
(experimental) The most recently deployed version of this function.
|
default Grant |
grantInvoke(IGrantable identity)
(experimental) Grant the given identity permissions to invoke this Lambda.
|
default Metric |
metric(String metricName,
MetricOptions props)
(experimental) Return the given named metric for this Lambda Return the given named metric for this Function.
|
default Metric |
metricDuration(MetricOptions props)
(experimental) Metric for the Duration of this Lambda How long execution of this Lambda takes.
|
default Metric |
metricErrors(MetricOptions props)
(experimental) How many invocations of this Lambda fail.
|
default Metric |
metricInvocations(MetricOptions props)
(experimental) Metric for the number of invocations of this Lambda How often this Lambda is invoked.
|
default Metric |
metricThrottles(MetricOptions props)
(experimental) Metric for the number of throttled invocations of this Lambda How often this Lambda is throttled.
|
metric, metricDuration, metricErrors, metricInvocations, metricThrottles@Stability(value=Stable) @NotNull default software.constructs.Node getNode()
getNode in interface software.constructs.IConstructgetNode in interface software.constructs.IConstruct.Jsii$DefaultgetNode in interface IFunction.Jsii$DefaultgetNode in interface IResource.Jsii$Default@Stability(value=Experimental) @NotNull default 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 IFunction.Jsii$DefaultgetEnv in interface IResourcegetEnv in interface IResource.Jsii$Default@Stability(value=Experimental) @NotNull default Stack getStack()
getStack in interface IFunction.Jsii$DefaultgetStack in interface IResourcegetStack in interface IResource.Jsii$Default@Stability(value=Experimental) @NotNull default Connections getConnections()
getConnections in interface IConnectablegetConnections in interface IConnectable.Jsii$DefaultgetConnections in interface IFunction.Jsii$Default@Stability(value=Experimental) @NotNull default IPrincipal getGrantPrincipal()
getGrantPrincipal in interface IFunction.Jsii$DefaultgetGrantPrincipal in interface IGrantablegetGrantPrincipal in interface IGrantable.Jsii$Default@Stability(value=Experimental) @NotNull default String getFunctionArn()
getFunctionArn in interface IFunctiongetFunctionArn in interface IFunction.Jsii$Default@Stability(value=Experimental) @NotNull default String getFunctionName()
getFunctionName in interface IFunctiongetFunctionName in interface IFunction.Jsii$Default@Stability(value=Experimental) @NotNull default Boolean getIsBoundToVpc()
If this is is false, trying to access the connections object will fail.
getIsBoundToVpc in interface IFunctiongetIsBoundToVpc in interface IFunction.Jsii$Default@Stability(value=Experimental) @NotNull default 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 IFunctiongetLatestVersion in interface IFunction.Jsii$Default@Stability(value=Experimental) @NotNull default software.constructs.Node getPermissionsNode()
getPermissionsNode in interface IFunctiongetPermissionsNode in interface IFunction.Jsii$Default@Stability(value=Experimental) @Nullable default IRole getRole()
getRole in interface IFunctiongetRole in interface IFunction.Jsii$Default@Stability(value=Experimental) @NotNull default String getEdgeArn()
getEdgeArn in interface IVersion@Stability(value=Experimental) @NotNull default IFunction getLambda()
@Stability(value=Experimental) @NotNull default String getVersion()
getVersion in interface IVersion@Stability(value=Experimental)
default 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 IFunctionaddEventSource in interface IFunction.Jsii$Defaultsource - This parameter is required.@Stability(value=Experimental) @NotNull default EventSourceMapping addEventSourceMapping(@NotNull String id, @NotNull EventSourceMappingOptions options)
addEventSourceMapping in interface IFunctionaddEventSourceMapping in interface IFunction.Jsii$Defaultid - construct ID. This parameter is required.options - mapping options. This parameter is required.@Stability(value=Experimental)
default void addPermission(@NotNull
String id,
@NotNull
Permission permission)
addPermission in interface IFunctionaddPermission in interface IFunction.Jsii$Defaultid - 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)
default void addToRolePolicy(@NotNull
PolicyStatement statement)
addToRolePolicy in interface IFunctionaddToRolePolicy in interface IFunction.Jsii$Defaultstatement - This parameter is required.@Stability(value=Experimental)
default void configureAsyncInvoke(@NotNull
EventInvokeConfigOptions options)
configureAsyncInvoke in interface IFunctionconfigureAsyncInvoke in interface IFunction.Jsii$Defaultoptions - This parameter is required.@Stability(value=Experimental) @NotNull default Grant grantInvoke(@NotNull IGrantable identity)
grantInvoke in interface IFunctiongrantInvoke in interface IFunction.Jsii$Defaultidentity - This parameter is required.@Stability(value=Experimental) @NotNull default Metric metric(@NotNull String metricName, @Nullable MetricOptions props)
metric in interface IFunctionmetric in interface IFunction.Jsii$DefaultmetricName - This parameter is required.props - @Stability(value=Experimental) @NotNull default Metric metricDuration(@Nullable MetricOptions props)
Average over 5 minutes
Default: average over 5 minutes
metricDuration in interface IFunctionmetricDuration in interface IFunction.Jsii$Defaultprops - @Stability(value=Experimental) @NotNull default Metric metricErrors(@Nullable MetricOptions props)
Sum over 5 minutes
metricErrors in interface IFunctionmetricErrors in interface IFunction.Jsii$Defaultprops - @Stability(value=Experimental) @NotNull default Metric metricInvocations(@Nullable MetricOptions props)
Sum over 5 minutes
Default: sum over 5 minutes
metricInvocations in interface IFunctionmetricInvocations in interface IFunction.Jsii$Defaultprops - @Stability(value=Experimental) @NotNull default Metric metricThrottles(@Nullable MetricOptions props)
Sum over 5 minutes
Default: sum over 5 minutes
metricThrottles in interface IFunctionmetricThrottles in interface IFunction.Jsii$Defaultprops - @Stability(value=Experimental) @NotNull default Alias addAlias(@NotNull String aliasName, @Nullable AliasOptions options)
Copyright © 2021. All rights reserved.