Function
This class encapsulates and extends the ROS resource type ALIYUN::FC3::Function.
Initializers
import com.aliyun.ros.cdk.fc3.Function;
Function.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.functionName(java.lang.String)
.functionName(IResolvable)
.handler(java.lang.String)
.handler(IResolvable)
.runtime(java.lang.String)
.runtime(IResolvable)
// .code(IResolvable)
// .code(CodeProperty)
// .cpu(java.lang.Number)
// .cpu(IResolvable)
// .customContainerConfig(IResolvable)
// .customContainerConfig(CustomContainerConfigProperty)
// .customDns(IResolvable)
// .customDns(CustomDnsProperty)
// .customRuntimeConfig(IResolvable)
// .customRuntimeConfig(CustomRuntimeConfigProperty)
// .description(java.lang.String)
// .description(IResolvable)
// .diskSize(java.lang.Number)
// .diskSize(IResolvable)
// .environmentVariables(IResolvable)
// .environmentVariables(java.util.Map<java.lang.String, java.lang.Object>)
// .gpuConfig(IResolvable)
// .gpuConfig(GpuConfigProperty)
// .instanceConcurrency(java.lang.Number)
// .instanceConcurrency(IResolvable)
// .instanceLifecycleConfig(IResolvable)
// .instanceLifecycleConfig(InstanceLifecycleConfigProperty)
// .internetAccess(java.lang.Boolean)
// .internetAccess(IResolvable)
// .layers(IResolvable)
// .layers(java.util.List<java.lang.String)
// .layers(IResolvable>)
// .logConfig(IResolvable)
// .logConfig(LogConfigProperty)
// .memorySize(java.lang.Number)
// .memorySize(IResolvable)
// .nasConfig(IResolvable)
// .nasConfig(NasConfigProperty)
// .ossMountConfig(IResolvable)
// .ossMountConfig(OssMountConfigProperty)
// .role(java.lang.String)
// .role(IResolvable)
// .timeout(java.lang.Number)
// .timeout(IResolvable)
// .tracingConfig(IResolvable)
// .tracingConfig(TracingConfigProperty)
// .vpcConfig(IResolvable)
// .vpcConfig(VpcConfigProperty)
.build();
| Name | Type | Description |
|---|---|---|
scope |
com.aliyun.ros.cdk.core.Construct |
No description. |
id |
java.lang.String |
No description. |
enableResourcePropertyConstraint |
java.lang.Boolean |
No description. |
functionName |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property functionName: The name of the function. |
handler |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property handler: The handler of the function. |
runtime |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property runtime: The programming language of the function. |
code |
com.aliyun.ros.cdk.core.IResolvable OR CodeProperty |
Property code: Function code ZIP package. |
cpu |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property cpu: The CPU size of the function in vCPU as a multiple of 0.05 vCPU. The minimum value is 0.05 and the maximum value is 16. At the same time, the ratio of cpu to memorySize (in GB) should be between 1:1 and 1:4. |
customContainerConfig |
com.aliyun.ros.cdk.core.IResolvable OR CustomContainerConfigProperty |
Property customContainerConfig: Custom container configuration. |
customDns |
com.aliyun.ros.cdk.core.IResolvable OR CustomDnsProperty |
Property customDns: Custom DNS configuration. |
customRuntimeConfig |
com.aliyun.ros.cdk.core.IResolvable OR CustomRuntimeConfigProperty |
Property customRuntimeConfig: Custom runtime configuration. |
description |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property description: Function description. |
diskSize |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property diskSize: The disk size of the function, in MB. |
environmentVariables |
com.aliyun.ros.cdk.core.IResolvable OR java.util.Map |
Property environmentVariables: The environment variables of the function. |
gpuConfig |
com.aliyun.ros.cdk.core.IResolvable OR GpuConfigProperty |
Property gpuConfig: The GPU configuration of the function. |
instanceConcurrency |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property instanceConcurrency: The maximum number of concurrent instances of the function. |
instanceLifecycleConfig |
com.aliyun.ros.cdk.core.IResolvable OR InstanceLifecycleConfigProperty |
Property instanceLifecycleConfig: The instance lifecycle configuration of the function. |
internetAccess |
java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable |
Property internetAccess: Whether the function can access the Internet. |
layers |
com.aliyun.ros.cdk.core.IResolvable OR java.util.List |
Property layers: The layers of the function. |
logConfig |
com.aliyun.ros.cdk.core.IResolvable OR LogConfigProperty |
Property logConfig: The log configuration of the function. |
memorySize |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property memorySize: The memory size of the function, in MB. |
nasConfig |
com.aliyun.ros.cdk.core.IResolvable OR NasConfigProperty |
Property nasConfig: The NAS configuration of the function. |
ossMountConfig |
com.aliyun.ros.cdk.core.IResolvable OR OssMountConfigProperty |
Property ossMountConfig: The OSS mount configuration of the function. |
role |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property role: The user is authorized to the RAM role of Function Compute. |
timeout |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property timeout: The timeout of the function. |
tracingConfig |
com.aliyun.ros.cdk.core.IResolvable OR TracingConfigProperty |
Property tracingConfig: The tracing configuration of the function. |
vpcConfig |
com.aliyun.ros.cdk.core.IResolvable OR VpcConfigProperty |
Property vpcConfig: The VPC configuration of the function. |
scopeRequired
- Type: com.aliyun.ros.cdk.core.Construct
idRequired
- Type: java.lang.String
enableResourcePropertyConstraintOptional
- Type: java.lang.Boolean
functionNameRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property functionName: The name of the function.
handlerRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property handler: The handler of the function.
runtimeRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property runtime: The programming language of the function.
codeOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR CodeProperty
Property code: Function code ZIP package.
Choose one of Code and CustomContainerConfig.
cpuOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property cpu: The CPU size of the function in vCPU as a multiple of 0.05 vCPU. The minimum value is 0.05 and the maximum value is 16. At the same time, the ratio of cpu to memorySize (in GB) should be between 1:1 and 1:4.
customContainerConfigOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR CustomContainerConfigProperty
Property customContainerConfig: Custom container configuration.
Choose one of Code and CustomContainerConfig.
customDnsOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR CustomDnsProperty
Property customDns: Custom DNS configuration.
customRuntimeConfigOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR CustomRuntimeConfigProperty
Property customRuntimeConfig: Custom runtime configuration.
descriptionOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property description: Function description.
diskSizeOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property diskSize: The disk size of the function, in MB.
environmentVariablesOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.Map
Property environmentVariables: The environment variables of the function.
gpuConfigOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR GpuConfigProperty
Property gpuConfig: The GPU configuration of the function.
instanceConcurrencyOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property instanceConcurrency: The maximum number of concurrent instances of the function.
instanceLifecycleConfigOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR InstanceLifecycleConfigProperty
Property instanceLifecycleConfig: The instance lifecycle configuration of the function.
internetAccessOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property internetAccess: Whether the function can access the Internet.
layersOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
Property layers: The layers of the function.
logConfigOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR LogConfigProperty
Property logConfig: The log configuration of the function.
memorySizeOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property memorySize: The memory size of the function, in MB.
nasConfigOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR NasConfigProperty
Property nasConfig: The NAS configuration of the function.
ossMountConfigOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR OssMountConfigProperty
Property ossMountConfig: The OSS mount configuration of the function.
roleOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property role: The user is authorized to the RAM role of Function Compute.
After setting, Function Compute will assume the role and generate temporary access credentials. The temporary access credentials of this role can be used in functions to access specified Alibaba Cloud services, such as OSS and OTS.
timeoutOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property timeout: The timeout of the function.
tracingConfigOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR TracingConfigProperty
Property tracingConfig: The tracing configuration of the function.
vpcConfigOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR VpcConfigProperty
Property vpcConfig: The VPC configuration of the function.
Methods
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
synthesize |
Allows this construct to emit artifacts into the cloud assembly during synthesis. |
addCondition |
No description. |
addCount |
No description. |
addDependency |
No description. |
addResourceDesc |
No description. |
applyRemovalPolicy |
No description. |
getAtt |
No description. |
setMetadata |
No description. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
synthesize
public void synthesize(ISynthesisSession session)
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack and Asset
as they participate in synthesizing the cloud assembly.
- Type: com.aliyun.ros.cdk.core.ISynthesisSession
The synthesis session.
addCondition
public void addCondition(RosCondition condition)
- Type: com.aliyun.ros.cdk.core.RosCondition
addCount
public void addCount(java.lang.Number OR IResolvable count)
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
addDependency
public void addDependency(Resource resource)
- Type: com.aliyun.ros.cdk.core.Resource
addResourceDesc
public void addResourceDesc(java.lang.String desc)
- Type: java.lang.String
applyRemovalPolicy
public void applyRemovalPolicy(RemovalPolicy policy)
- Type: com.aliyun.ros.cdk.core.RemovalPolicy
getAtt
public IResolvable getAtt(java.lang.String name)
- Type: java.lang.String
setMetadata
public void setMetadata(java.lang.String key, java.lang.Object value)
- Type: java.lang.String
- Type: java.lang.Object
Static Functions
| Name | Description |
|---|---|
isConstruct |
Return whether the given object is a Construct. |
isConstruct
import com.aliyun.ros.cdk.fc3.Function;
Function.isConstruct(java.lang.Object x)
Return whether the given object is a Construct.
- Type: java.lang.Object
Properties
| Name | Type | Description |
|---|---|---|
node |
com.aliyun.ros.cdk.core.ConstructNode |
The construct tree node associated with this construct. |
ref |
java.lang.String |
No description. |
stack |
com.aliyun.ros.cdk.core.Stack |
The stack in which this resource is defined. |
resource |
com.aliyun.ros.cdk.core.RosResource |
No description. |
attrArn |
com.aliyun.ros.cdk.core.IResolvable |
Attribute ARN: The ARN for ALIYUN::ROS::CustomResource. |
attrFunctionId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute FunctionId: The function ID. |
attrFunctionName |
com.aliyun.ros.cdk.core.IResolvable |
Attribute FunctionName: The function name. |
nodeRequired
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
refRequired
public java.lang.String getRef();
- Type: java.lang.String
stackRequired
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
resourceOptional
public RosResource getResource();
- Type: com.aliyun.ros.cdk.core.RosResource
attrArnRequired
public IResolvable getAttrArn();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute ARN: The ARN for ALIYUN::ROS::CustomResource.
attrFunctionIdRequired
public IResolvable getAttrFunctionId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute FunctionId: The function ID.
attrFunctionNameRequired
public IResolvable getAttrFunctionName();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute FunctionName: The function name.