FunctionProps
Properties for defining a Function
.
See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-fc3-function
Initializer
import { FunctionProps } from '@alicloud/ros-cdk-fc3'
const functionProps: FunctionProps = { ... }
Properties
Name | Type | Description |
---|---|---|
functionName |
string | @alicloud/ros-cdk-core.IResolvable |
Property functionName: The name of the function. |
handler |
string | @alicloud/ros-cdk-core.IResolvable |
Property handler: The handler of the function. |
runtime |
string | @alicloud/ros-cdk-core.IResolvable |
Property runtime: The programming language of the function. |
code |
@alicloud/ros-cdk-core.IResolvable | CodeProperty |
Property code: Function code ZIP package. |
cpu |
number | @alicloud/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 |
@alicloud/ros-cdk-core.IResolvable | CustomContainerConfigProperty |
Property customContainerConfig: Custom container configuration. |
customDns |
@alicloud/ros-cdk-core.IResolvable | CustomDnsProperty |
Property customDns: Custom DNS configuration. |
customRuntimeConfig |
@alicloud/ros-cdk-core.IResolvable | CustomRuntimeConfigProperty |
Property customRuntimeConfig: Custom runtime configuration. |
description |
string | @alicloud/ros-cdk-core.IResolvable |
Property description: Function description. |
diskSize |
number | @alicloud/ros-cdk-core.IResolvable |
Property diskSize: The disk size of the function, in MB. |
environmentVariables |
@alicloud/ros-cdk-core.IResolvable | {[ key: string ]: any} |
Property environmentVariables: The environment variables of the function. |
gpuConfig |
@alicloud/ros-cdk-core.IResolvable | GpuConfigProperty |
Property gpuConfig: The GPU configuration of the function. |
instanceConcurrency |
number | @alicloud/ros-cdk-core.IResolvable |
Property instanceConcurrency: The maximum number of concurrent instances of the function. |
instanceLifecycleConfig |
@alicloud/ros-cdk-core.IResolvable | InstanceLifecycleConfigProperty |
Property instanceLifecycleConfig: The instance lifecycle configuration of the function. |
internetAccess |
boolean | @alicloud/ros-cdk-core.IResolvable |
Property internetAccess: Whether the function can access the Internet. |
layers |
@alicloud/ros-cdk-core.IResolvable | string | @alicloud/ros-cdk-core.IResolvable[] |
Property layers: The layers of the function. |
logConfig |
@alicloud/ros-cdk-core.IResolvable | LogConfigProperty |
Property logConfig: The log configuration of the function. |
memorySize |
number | @alicloud/ros-cdk-core.IResolvable |
Property memorySize: The memory size of the function, in MB. |
nasConfig |
@alicloud/ros-cdk-core.IResolvable | NasConfigProperty |
Property nasConfig: The NAS configuration of the function. |
ossMountConfig |
@alicloud/ros-cdk-core.IResolvable | OssMountConfigProperty |
Property ossMountConfig: The OSS mount configuration of the function. |
role |
string | @alicloud/ros-cdk-core.IResolvable |
Property role: The user is authorized to the RAM role of Function Compute. |
timeout |
number | @alicloud/ros-cdk-core.IResolvable |
Property timeout: The timeout of the function. |
tracingConfig |
@alicloud/ros-cdk-core.IResolvable | TracingConfigProperty |
Property tracingConfig: The tracing configuration of the function. |
vpcConfig |
@alicloud/ros-cdk-core.IResolvable | VpcConfigProperty |
Property vpcConfig: The VPC configuration of the function. |
functionName
Required
public readonly functionName: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property functionName: The name of the function.
handler
Required
public readonly handler: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property handler: The handler of the function.
runtime
Required
public readonly runtime: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property runtime: The programming language of the function.
code
Optional
public readonly code: IResolvable | CodeProperty;
- Type: @alicloud/ros-cdk-core.IResolvable | CodeProperty
Property code: Function code ZIP package.
Choose one of Code and CustomContainerConfig.
cpu
Optional
public readonly cpu: number | IResolvable;
- Type: number | @alicloud/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
public readonly customContainerConfig: IResolvable | CustomContainerConfigProperty;
- Type: @alicloud/ros-cdk-core.IResolvable | CustomContainerConfigProperty
Property customContainerConfig: Custom container configuration.
Choose one of Code and CustomContainerConfig.
customDns
Optional
public readonly customDns: IResolvable | CustomDnsProperty;
- Type: @alicloud/ros-cdk-core.IResolvable | CustomDnsProperty
Property customDns: Custom DNS configuration.
customRuntimeConfig
Optional
public readonly customRuntimeConfig: IResolvable | CustomRuntimeConfigProperty;
- Type: @alicloud/ros-cdk-core.IResolvable | CustomRuntimeConfigProperty
Property customRuntimeConfig: Custom runtime configuration.
description
Optional
public readonly description: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property description: Function description.
diskSize
Optional
public readonly diskSize: number | IResolvable;
- Type: number | @alicloud/ros-cdk-core.IResolvable
Property diskSize: The disk size of the function, in MB.
environmentVariables
Optional
public readonly environmentVariables: IResolvable | {[ key: string ]: any};
- Type: @alicloud/ros-cdk-core.IResolvable | {[ key: string ]: any}
Property environmentVariables: The environment variables of the function.
gpuConfig
Optional
public readonly gpuConfig: IResolvable | GpuConfigProperty;
- Type: @alicloud/ros-cdk-core.IResolvable | GpuConfigProperty
Property gpuConfig: The GPU configuration of the function.
instanceConcurrency
Optional
public readonly instanceConcurrency: number | IResolvable;
- Type: number | @alicloud/ros-cdk-core.IResolvable
Property instanceConcurrency: The maximum number of concurrent instances of the function.
instanceLifecycleConfig
Optional
public readonly instanceLifecycleConfig: IResolvable | InstanceLifecycleConfigProperty;
- Type: @alicloud/ros-cdk-core.IResolvable | InstanceLifecycleConfigProperty
Property instanceLifecycleConfig: The instance lifecycle configuration of the function.
internetAccess
Optional
public readonly internetAccess: boolean | IResolvable;
- Type: boolean | @alicloud/ros-cdk-core.IResolvable
Property internetAccess: Whether the function can access the Internet.
layers
Optional
public readonly layers: IResolvable | string | IResolvable[];
- Type: @alicloud/ros-cdk-core.IResolvable | string | @alicloud/ros-cdk-core.IResolvable[]
Property layers: The layers of the function.
logConfig
Optional
public readonly logConfig: IResolvable | LogConfigProperty;
- Type: @alicloud/ros-cdk-core.IResolvable | LogConfigProperty
Property logConfig: The log configuration of the function.
memorySize
Optional
public readonly memorySize: number | IResolvable;
- Type: number | @alicloud/ros-cdk-core.IResolvable
Property memorySize: The memory size of the function, in MB.
nasConfig
Optional
public readonly nasConfig: IResolvable | NasConfigProperty;
- Type: @alicloud/ros-cdk-core.IResolvable | NasConfigProperty
Property nasConfig: The NAS configuration of the function.
ossMountConfig
Optional
public readonly ossMountConfig: IResolvable | OssMountConfigProperty;
- Type: @alicloud/ros-cdk-core.IResolvable | OssMountConfigProperty
Property ossMountConfig: The OSS mount configuration of the function.
role
Optional
public readonly role: string | IResolvable;
- Type: string | @alicloud/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
public readonly timeout: number | IResolvable;
- Type: number | @alicloud/ros-cdk-core.IResolvable
Property timeout: The timeout of the function.
tracingConfig
Optional
public readonly tracingConfig: IResolvable | TracingConfigProperty;
- Type: @alicloud/ros-cdk-core.IResolvable | TracingConfigProperty
Property tracingConfig: The tracing configuration of the function.
vpcConfig
Optional
public readonly vpcConfig: IResolvable | VpcConfigProperty;
- Type: @alicloud/ros-cdk-core.IResolvable | VpcConfigProperty
Property vpcConfig: The VPC configuration of the function.