public abstract class FunctionRef
extends software.amazon.awscdk.Construct
implements software.amazon.awscdk.services.events.IEventRuleTarget, software.amazon.awscdk.services.logs.ILogSubscriptionDestination, software.amazon.awscdk.services.s3.notifications.IBucketNotificationDestination
software.amazon.jsii.JsiiObject.InitializationModesoftware.amazon.awscdk.services.events.IEventRuleTarget.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
protected |
FunctionRef(software.amazon.jsii.JsiiObject.InitializationMode mode) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPermission(String id,
Permission permission)
Adds a permission to the Lambda resource policy.
|
void |
addToRolePolicy(software.amazon.awscdk.PolicyStatement statement) |
software.amazon.awscdk.services.s3.notifications.BucketNotificationDestinationProps |
asBucketNotificationDestination(software.amazon.awscdk.Arn bucketArn,
String bucketId)
Allows this Lambda to be used as a destination for bucket notifications.
|
software.amazon.awscdk.services.events.EventRuleTargetProps |
asEventRuleTarget(software.amazon.awscdk.services.events.RuleArn ruleArn,
String ruleId)
Returns a RuleTarget that can be used to trigger this Lambda as a
result from a CloudWatch event.
|
FunctionRefProps |
export()
Export this Function (without the role)
|
protected Boolean |
getCanCreatePermissions()
Whether the addPermission() call adds any permissions
True for new Lambdas, false for imported Lambdas (they might live in different accounts).
|
FunctionArn |
getFunctionArn()
The ARN fo the function.
|
FunctionName |
getFunctionName()
The name of the function.
|
software.amazon.awscdk.services.iam.Role |
getRole()
The IAM role associated with this function.
|
static FunctionRef |
import_(software.amazon.awscdk.Construct parent,
String name,
FunctionRefProps ref)
Creates a Lambda function object which represents a function not defined
within this stack.
|
software.amazon.awscdk.services.logs.LogSubscriptionDestination |
logSubscriptionDestination(software.amazon.awscdk.services.logs.LogGroup sourceLogGroup)
Return the properties required to send subscription events to this destination.
|
software.amazon.awscdk.services.cloudwatch.Metric |
metric(String metricName)
Return the given named metric for this Lambda
|
software.amazon.awscdk.services.cloudwatch.Metric |
metric(String metricName,
software.amazon.awscdk.services.cloudwatch.MetricCustomization props)
Return the given named metric for this Lambda
|
static software.amazon.awscdk.services.cloudwatch.Metric |
metricAll(String metricName)
Return the given named metric for this Lambda
|
static software.amazon.awscdk.services.cloudwatch.Metric |
metricAll(String metricName,
software.amazon.awscdk.services.cloudwatch.MetricCustomization props)
Return the given named metric for this Lambda
|
static software.amazon.awscdk.services.cloudwatch.Metric |
metricAllConcurrentExecutions()
Metric for the number of concurrent executions across all Lambdas
|
static software.amazon.awscdk.services.cloudwatch.Metric |
metricAllConcurrentExecutions(software.amazon.awscdk.services.cloudwatch.MetricCustomization props)
Metric for the number of concurrent executions across all Lambdas
|
static software.amazon.awscdk.services.cloudwatch.Metric |
metricAllDuration()
Metric for the Duration executing all Lambdas
|
static software.amazon.awscdk.services.cloudwatch.Metric |
metricAllDuration(software.amazon.awscdk.services.cloudwatch.MetricCustomization props)
Metric for the Duration executing all Lambdas
|
static software.amazon.awscdk.services.cloudwatch.Metric |
metricAllErrors()
Metric for the number of Errors executing all Lambdas
|
static software.amazon.awscdk.services.cloudwatch.Metric |
metricAllErrors(software.amazon.awscdk.services.cloudwatch.MetricCustomization props)
Metric for the number of Errors executing all Lambdas
|
static software.amazon.awscdk.services.cloudwatch.Metric |
metricAllInvocations()
Metric for the number of invocations of all Lambdas
|
static software.amazon.awscdk.services.cloudwatch.Metric |
metricAllInvocations(software.amazon.awscdk.services.cloudwatch.MetricCustomization props)
Metric for the number of invocations of all Lambdas
|
static software.amazon.awscdk.services.cloudwatch.Metric |
metricAllThrottles()
Metric for the number of throttled invocations of all Lambdas
|
static software.amazon.awscdk.services.cloudwatch.Metric |
metricAllThrottles(software.amazon.awscdk.services.cloudwatch.MetricCustomization props)
Metric for the number of throttled invocations of all Lambdas
|
static software.amazon.awscdk.services.cloudwatch.Metric |
metricAllUnreservedConcurrentExecutions()
Metric for the number of unreserved concurrent executions across all Lambdas
|
static software.amazon.awscdk.services.cloudwatch.Metric |
metricAllUnreservedConcurrentExecutions(software.amazon.awscdk.services.cloudwatch.MetricCustomization props)
Metric for the number of unreserved concurrent executions across all Lambdas
|
software.amazon.awscdk.services.cloudwatch.Metric |
metricDuration()
Metric for the Duration of this Lambda
|
software.amazon.awscdk.services.cloudwatch.Metric |
metricDuration(software.amazon.awscdk.services.cloudwatch.MetricCustomization props)
Metric for the Duration of this Lambda
|
software.amazon.awscdk.services.cloudwatch.Metric |
metricErrors()
Metric for the Errors executing this Lambda
|
software.amazon.awscdk.services.cloudwatch.Metric |
metricErrors(software.amazon.awscdk.services.cloudwatch.MetricCustomization props)
Metric for the Errors executing this Lambda
|
software.amazon.awscdk.services.cloudwatch.Metric |
metricInvocations()
Metric for the number of invocations of this Lambda
|
software.amazon.awscdk.services.cloudwatch.Metric |
metricInvocations(software.amazon.awscdk.services.cloudwatch.MetricCustomization props)
Metric for the number of invocations of this Lambda
|
software.amazon.awscdk.services.cloudwatch.Metric |
metricThrottles()
Metric for the number of throttled invocations of this Lambda
|
software.amazon.awscdk.services.cloudwatch.Metric |
metricThrottles(software.amazon.awscdk.services.cloudwatch.MetricCustomization props)
Metric for the number of throttled invocations of this Lambda
|
addChild, addError, addInfo, addMetadata, addMetadata, addWarning, ancestors, ancestors, findChild, getChildren, getContext, getId, getMetadata, getParent, getPath, getUniqueId, lock, requireContext, required, setContext, toString, toTreeString, toTreeString, tryFindChild, unlock, validate, validateTreeprotected FunctionRef(software.amazon.jsii.JsiiObject.InitializationMode mode)
public static FunctionRef import_(software.amazon.awscdk.Construct parent, String name, FunctionRefProps ref)
parent - The parent constructname - The name of the lambda constructref - A reference to a Lambda function. Can be created manually (see
example above) or obtained through a call to `lambda.export()`.public static software.amazon.awscdk.services.cloudwatch.Metric metricAll(String metricName, @Nullable software.amazon.awscdk.services.cloudwatch.MetricCustomization props)
public static software.amazon.awscdk.services.cloudwatch.Metric metricAll(String metricName)
public static software.amazon.awscdk.services.cloudwatch.Metric metricAllErrors(@Nullable software.amazon.awscdk.services.cloudwatch.MetricCustomization props)
public static software.amazon.awscdk.services.cloudwatch.Metric metricAllErrors()
public static software.amazon.awscdk.services.cloudwatch.Metric metricAllDuration(@Nullable software.amazon.awscdk.services.cloudwatch.MetricCustomization props)
public static software.amazon.awscdk.services.cloudwatch.Metric metricAllDuration()
public static software.amazon.awscdk.services.cloudwatch.Metric metricAllInvocations(@Nullable software.amazon.awscdk.services.cloudwatch.MetricCustomization props)
public static software.amazon.awscdk.services.cloudwatch.Metric metricAllInvocations()
public static software.amazon.awscdk.services.cloudwatch.Metric metricAllThrottles(@Nullable software.amazon.awscdk.services.cloudwatch.MetricCustomization props)
public static software.amazon.awscdk.services.cloudwatch.Metric metricAllThrottles()
public static software.amazon.awscdk.services.cloudwatch.Metric metricAllConcurrentExecutions(@Nullable software.amazon.awscdk.services.cloudwatch.MetricCustomization props)
public static software.amazon.awscdk.services.cloudwatch.Metric metricAllConcurrentExecutions()
public static software.amazon.awscdk.services.cloudwatch.Metric metricAllUnreservedConcurrentExecutions(@Nullable software.amazon.awscdk.services.cloudwatch.MetricCustomization props)
public static software.amazon.awscdk.services.cloudwatch.Metric metricAllUnreservedConcurrentExecutions()
public void addPermission(String id, Permission permission)
id - The id ƒor the permission constructpublic void addToRolePolicy(software.amazon.awscdk.PolicyStatement statement)
public software.amazon.awscdk.services.events.EventRuleTargetProps asEventRuleTarget(software.amazon.awscdk.services.events.RuleArn ruleArn,
String ruleId)
asEventRuleTarget in interface software.amazon.awscdk.services.events.IEventRuleTargetpublic software.amazon.awscdk.services.cloudwatch.Metric metric(String metricName, @Nullable software.amazon.awscdk.services.cloudwatch.MetricCustomization props)
public software.amazon.awscdk.services.cloudwatch.Metric metric(String metricName)
public software.amazon.awscdk.services.cloudwatch.Metric metricErrors(@Nullable software.amazon.awscdk.services.cloudwatch.MetricCustomization props)
public software.amazon.awscdk.services.cloudwatch.Metric metricErrors()
public software.amazon.awscdk.services.cloudwatch.Metric metricDuration(@Nullable software.amazon.awscdk.services.cloudwatch.MetricCustomization props)
public software.amazon.awscdk.services.cloudwatch.Metric metricDuration()
public software.amazon.awscdk.services.cloudwatch.Metric metricInvocations(@Nullable software.amazon.awscdk.services.cloudwatch.MetricCustomization props)
public software.amazon.awscdk.services.cloudwatch.Metric metricInvocations()
public software.amazon.awscdk.services.cloudwatch.Metric metricThrottles(@Nullable software.amazon.awscdk.services.cloudwatch.MetricCustomization props)
public software.amazon.awscdk.services.cloudwatch.Metric metricThrottles()
public software.amazon.awscdk.services.logs.LogSubscriptionDestination logSubscriptionDestination(software.amazon.awscdk.services.logs.LogGroup sourceLogGroup)
logSubscriptionDestination in interface software.amazon.awscdk.services.logs.ILogSubscriptionDestinationpublic FunctionRefProps export()
public software.amazon.awscdk.services.s3.notifications.BucketNotificationDestinationProps asBucketNotificationDestination(software.amazon.awscdk.Arn bucketArn,
String bucketId)
asBucketNotificationDestination in interface software.amazon.awscdk.services.s3.notifications.IBucketNotificationDestinationpublic FunctionName getFunctionName()
public FunctionArn getFunctionArn()
@Nullable public software.amazon.awscdk.services.iam.Role getRole()
protected Boolean getCanCreatePermissions()
Copyright © 2018. All rights reserved.