@Generated(value="jsii-pacmak/0.7.8 (build 100f5ad)", date="2018-10-26T17:58:07.463Z") public class Function extends FunctionRef
| Modifier | Constructor and Description |
|---|---|
|
Function(software.amazon.awscdk.Construct parent,
String name,
FunctionProps props) |
protected |
Function(software.amazon.jsii.JsiiObject.InitializationMode mode) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEnvironment(String key)
Adds an environment variable to this Lambda function.
|
void |
addEnvironment(String key,
Object value)
Adds an environment variable to this Lambda function.
|
FunctionVersion |
addVersion(String name)
Add a new version for this Lambda
If you want to deploy through CloudFormation and use aliases, you need to
add a new version (with a new name) to your Lambda every time you want
to deploy an update.
|
FunctionVersion |
addVersion(String name,
String codeSha256)
Add a new version for this Lambda
If you want to deploy through CloudFormation and use aliases, you need to
add a new version (with a new name) to your Lambda every time you want
to deploy an update.
|
FunctionVersion |
addVersion(String name,
String codeSha256,
String description)
Add a new version for this Lambda
If you want to deploy through CloudFormation and use aliases, you need to
add a new version (with a new name) to your Lambda every time you want
to deploy an update.
|
protected Boolean |
getCanCreatePermissions()
Whether the addPermission() call adds any permissions
True for new Lambdas, false for imported Lambdas (they might live in different accounts).
|
String |
getFunctionArn()
ARN of this function
|
String |
getFunctionName()
Name of this function
|
String |
getHandler()
The name of the handler configured for this lambda.
|
software.amazon.awscdk.services.iam.Role |
getRole()
Execution role associated with this function
|
Runtime |
getRuntime()
The runtime configured for this lambda.
|
addPermission, addToPipeline, addToPipeline, addToRolePolicy, asBucketNotificationDestination, asEventRuleTarget, asStepFunctionsTaskResource, export, getConnections, getIsBoundToVpc, grantInvoke, grantInvoke, import_, logSubscriptionDestination, metric, metric, metricAll, metricAll, metricAllConcurrentExecutions, metricAllConcurrentExecutions, metricAllDuration, metricAllDuration, metricAllErrors, metricAllErrors, metricAllInvocations, metricAllInvocations, metricAllThrottles, metricAllThrottles, metricAllUnreservedConcurrentExecutions, metricAllUnreservedConcurrentExecutions, metricDuration, metricDuration, metricErrors, metricErrors, metricInvocations, metricInvocations, metricThrottles, metricThrottlesaddChild, 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 Function(software.amazon.jsii.JsiiObject.InitializationMode mode)
public Function(software.amazon.awscdk.Construct parent,
String name,
FunctionProps props)
public void addEnvironment(String key, @Nullable Object value)
key - The environment variable key.value - The environment variable's value.public void addEnvironment(String key)
key - The environment variable key.public FunctionVersion addVersion(String name, @Nullable String codeSha256, @Nullable String description)
name - A unique name for this versioncodeSha256 - The SHA-256 hash of the most recently deployed Lambda source code, or
omit to skip validation.description - A description for this version.public FunctionVersion addVersion(String name, @Nullable String codeSha256)
name - A unique name for this versioncodeSha256 - The SHA-256 hash of the most recently deployed Lambda source code, or
omit to skip validation.public FunctionVersion addVersion(String name)
name - A unique name for this versionprotected Boolean getCanCreatePermissions()
getCanCreatePermissions in class FunctionRefpublic String getFunctionArn()
getFunctionArn in class FunctionRefpublic String getFunctionName()
getFunctionName in class FunctionRefpublic String getHandler()
public Runtime getRuntime()
@Nullable public software.amazon.awscdk.services.iam.Role getRole()
getRole in class FunctionRefCopyright © 2018. All rights reserved.