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. |
functionNameRequired
public readonly functionName: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property functionName: The name of the function.
handlerRequired
public readonly handler: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property handler: The handler of the function.
runtimeRequired
public readonly runtime: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property runtime: The programming language of the function.
codeOptional
public readonly code: IResolvable | CodeProperty;
- Type: @alicloud/ros-cdk-core.IResolvable | CodeProperty
Property code: Function code ZIP package.
Choose one of Code and CustomContainerConfig.
cpuOptional
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.
customContainerConfigOptional
public readonly customContainerConfig: IResolvable | CustomContainerConfigProperty;
- Type: @alicloud/ros-cdk-core.IResolvable | CustomContainerConfigProperty
Property customContainerConfig: Custom container configuration.
Choose one of Code and CustomContainerConfig.
customDnsOptional
public readonly customDns: IResolvable | CustomDnsProperty;
- Type: @alicloud/ros-cdk-core.IResolvable | CustomDnsProperty
Property customDns: Custom DNS configuration.
customRuntimeConfigOptional
public readonly customRuntimeConfig: IResolvable | CustomRuntimeConfigProperty;
- Type: @alicloud/ros-cdk-core.IResolvable | CustomRuntimeConfigProperty
Property customRuntimeConfig: Custom runtime configuration.
descriptionOptional
public readonly description: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property description: Function description.
diskSizeOptional
public readonly diskSize: number | IResolvable;
- Type: number | @alicloud/ros-cdk-core.IResolvable
Property diskSize: The disk size of the function, in MB.
environmentVariablesOptional
public readonly environmentVariables: IResolvable | {[ key: string ]: any};
- Type: @alicloud/ros-cdk-core.IResolvable | {[ key: string ]: any}
Property environmentVariables: The environment variables of the function.
gpuConfigOptional
public readonly gpuConfig: IResolvable | GpuConfigProperty;
- Type: @alicloud/ros-cdk-core.IResolvable | GpuConfigProperty
Property gpuConfig: The GPU configuration of the function.
instanceConcurrencyOptional
public readonly instanceConcurrency: number | IResolvable;
- Type: number | @alicloud/ros-cdk-core.IResolvable
Property instanceConcurrency: The maximum number of concurrent instances of the function.
instanceLifecycleConfigOptional
public readonly instanceLifecycleConfig: IResolvable | InstanceLifecycleConfigProperty;
- Type: @alicloud/ros-cdk-core.IResolvable | InstanceLifecycleConfigProperty
Property instanceLifecycleConfig: The instance lifecycle configuration of the function.
internetAccessOptional
public readonly internetAccess: boolean | IResolvable;
- Type: boolean | @alicloud/ros-cdk-core.IResolvable
Property internetAccess: Whether the function can access the Internet.
layersOptional
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.
logConfigOptional
public readonly logConfig: IResolvable | LogConfigProperty;
- Type: @alicloud/ros-cdk-core.IResolvable | LogConfigProperty
Property logConfig: The log configuration of the function.
memorySizeOptional
public readonly memorySize: number | IResolvable;
- Type: number | @alicloud/ros-cdk-core.IResolvable
Property memorySize: The memory size of the function, in MB.
nasConfigOptional
public readonly nasConfig: IResolvable | NasConfigProperty;
- Type: @alicloud/ros-cdk-core.IResolvable | NasConfigProperty
Property nasConfig: The NAS configuration of the function.
ossMountConfigOptional
public readonly ossMountConfig: IResolvable | OssMountConfigProperty;
- Type: @alicloud/ros-cdk-core.IResolvable | OssMountConfigProperty
Property ossMountConfig: The OSS mount configuration of the function.
roleOptional
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.
timeoutOptional
public readonly timeout: number | IResolvable;
- Type: number | @alicloud/ros-cdk-core.IResolvable
Property timeout: The timeout of the function.
tracingConfigOptional
public readonly tracingConfig: IResolvable | TracingConfigProperty;
- Type: @alicloud/ros-cdk-core.IResolvable | TracingConfigProperty
Property tracingConfig: The tracing configuration of the function.
vpcConfigOptional
public readonly vpcConfig: IResolvable | VpcConfigProperty;
- Type: @alicloud/ros-cdk-core.IResolvable | VpcConfigProperty
Property vpcConfig: The VPC configuration of the function.