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. |
scope
Required
- Type: com.aliyun.ros.cdk.core.Construct
id
Required
- Type: java.lang.String
enableResourcePropertyConstraint
Optional
- Type: java.lang.Boolean
functionName
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property functionName: The name of the function.
handler
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property handler: The handler of the function.
runtime
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property runtime: The programming language of the function.
code
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR CodeProperty
Property code: Function code ZIP package.
Choose one of Code and CustomContainerConfig.
cpu
Optional
- 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.
customContainerConfig
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR CustomContainerConfigProperty
Property customContainerConfig: Custom container configuration.
Choose one of Code and CustomContainerConfig.
customDns
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR CustomDnsProperty
Property customDns: Custom DNS configuration.
customRuntimeConfig
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR CustomRuntimeConfigProperty
Property customRuntimeConfig: Custom runtime configuration.
description
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property description: Function description.
diskSize
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property diskSize: The disk size of the function, in MB.
environmentVariables
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.Map
Property environmentVariables: The environment variables of the function.
gpuConfig
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR GpuConfigProperty
Property gpuConfig: The GPU configuration of the function.
instanceConcurrency
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property instanceConcurrency: The maximum number of concurrent instances of the function.
instanceLifecycleConfig
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR InstanceLifecycleConfigProperty
Property instanceLifecycleConfig: The instance lifecycle configuration of the function.
internetAccess
Optional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property internetAccess: Whether the function can access the Internet.
layers
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
Property layers: The layers of the function.
logConfig
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR LogConfigProperty
Property logConfig: The log configuration of the function.
memorySize
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property memorySize: The memory size of the function, in MB.
nasConfig
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR NasConfigProperty
Property nasConfig: The NAS configuration of the function.
ossMountConfig
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR OssMountConfigProperty
Property ossMountConfig: The OSS mount configuration of the function.
role
Optional
- 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.
timeout
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property timeout: The timeout of the function.
tracingConfig
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR TracingConfigProperty
Property tracingConfig: The tracing configuration of the function.
vpcConfig
Optional
- 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. |
node
Required
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
ref
Required
public java.lang.String getRef();
- Type: java.lang.String
stack
Required
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
resource
Optional
public RosResource getResource();
- Type: com.aliyun.ros.cdk.core.RosResource
attrArn
Required
public IResolvable getAttrArn();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute ARN: The ARN for ALIYUN::ROS::CustomResource.
attrFunctionId
Required
public IResolvable getAttrFunctionId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute FunctionId: The function ID.
attrFunctionName
Required
public IResolvable getAttrFunctionName();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute FunctionName: The function name.