@Generated(value="jsii-pacmak/0.7.8 (build 100f5ad)", date="2018-10-26T17:58:07.466Z") 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.awscdk.services.ec2.IConnectable, software.amazon.awscdk.services.stepfunctions.IStepFunctionsTaskResource
| 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.
|
PipelineInvokeAction |
addToPipeline(software.amazon.awscdk.services.codepipeline.api.IStage stage,
String name)
Convenience method for creating a new
PipelineInvokeAction,
and adding it to the given Stage. |
PipelineInvokeAction |
addToPipeline(software.amazon.awscdk.services.codepipeline.api.IStage stage,
String name,
CommonPipelineInvokeActionProps props)
Convenience method for creating a new
PipelineInvokeAction,
and adding it to the given Stage. |
void |
addToRolePolicy(software.amazon.awscdk.services.iam.PolicyStatement statement) |
software.amazon.awscdk.services.s3.notifications.BucketNotificationDestinationProps |
asBucketNotificationDestination(String bucketArn,
String bucketId)
Allows this Lambda to be used as a destination for bucket notifications.
|
software.amazon.awscdk.services.events.EventRuleTargetProps |
asEventRuleTarget(String ruleArn,
String ruleId)
Returns a RuleTarget that can be used to trigger this Lambda as a
result from a CloudWatch event.
|
software.amazon.awscdk.services.stepfunctions.StepFunctionsTaskResourceProps |
asStepFunctionsTaskResource(software.amazon.awscdk.services.stepfunctions.Task _callingTask)
Return the properties required for using this object as a Task resource
|
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).
|
software.amazon.awscdk.services.ec2.Connections |
getConnections()
Access the Connections object
Will fail if not a VPC-enabled Lambda Function
|
String |
getFunctionArn()
The ARN fo the function.
|
String |
getFunctionName()
The name of the function.
|
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.
|
software.amazon.awscdk.services.iam.Role |
getRole()
The IAM role associated with this function.
|
void |
grantInvoke()
Grant the given identity permissions to invoke this Lambda
|
void |
grantInvoke(software.amazon.awscdk.services.iam.IPrincipal identity)
Grant the given identity permissions to invoke this Lambda
|
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.LogGroupRef 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, addMetadata, addWarning, ancestors, ancestors, findChild, getChildren, getContext, getId, getLocked, getMetadata, getParent, getPath, getUniqueId, lock, requireContext, required, setContext, 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 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 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 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 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 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 PipelineInvokeAction addToPipeline(software.amazon.awscdk.services.codepipeline.api.IStage stage, String name, @Nullable CommonPipelineInvokeActionProps props)
PipelineInvokeAction,
and adding it to the given Stage.stage - the Pipeline Stage to add the new Action toname - the name of the newly created Actionprops - the properties of the new ActionPipelineInvokeActionpublic PipelineInvokeAction addToPipeline(software.amazon.awscdk.services.codepipeline.api.IStage stage, String name)
PipelineInvokeAction,
and adding it to the given Stage.stage - the Pipeline Stage to add the new Action toname - the name of the newly created ActionPipelineInvokeActionpublic void addToRolePolicy(software.amazon.awscdk.services.iam.PolicyStatement statement)
public software.amazon.awscdk.services.s3.notifications.BucketNotificationDestinationProps asBucketNotificationDestination(String bucketArn, String bucketId)
asBucketNotificationDestination in interface software.amazon.awscdk.services.s3.notifications.IBucketNotificationDestinationpublic software.amazon.awscdk.services.events.EventRuleTargetProps asEventRuleTarget(String ruleArn, String ruleId)
asEventRuleTarget in interface software.amazon.awscdk.services.events.IEventRuleTargetpublic software.amazon.awscdk.services.stepfunctions.StepFunctionsTaskResourceProps asStepFunctionsTaskResource(software.amazon.awscdk.services.stepfunctions.Task _callingTask)
asStepFunctionsTaskResource in interface software.amazon.awscdk.services.stepfunctions.IStepFunctionsTaskResourcepublic FunctionRefProps export()
public void grantInvoke(@Nullable software.amazon.awscdk.services.iam.IPrincipal identity)
public void grantInvoke()
public software.amazon.awscdk.services.logs.LogSubscriptionDestination logSubscriptionDestination(software.amazon.awscdk.services.logs.LogGroupRef sourceLogGroup)
logSubscriptionDestination in interface software.amazon.awscdk.services.logs.ILogSubscriptionDestinationpublic 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 metricDuration(@Nullable software.amazon.awscdk.services.cloudwatch.MetricCustomization props)
public software.amazon.awscdk.services.cloudwatch.Metric metricDuration()
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 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()
protected Boolean getCanCreatePermissions()
public software.amazon.awscdk.services.ec2.Connections getConnections()
getConnections in interface software.amazon.awscdk.services.ec2.IConnectablepublic String getFunctionArn()
public String getFunctionName()
public Boolean getIsBoundToVpc()
@Nullable public software.amazon.awscdk.services.iam.Role getRole()
Copyright © 2018. All rights reserved.