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. |
disableOndemand | boolean | @alicloud/ros-cdk-core.IResolvable | Property disableOndemand: Whether to disable the creation of on-demand instances. |
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. |
instanceIsolationMode | string | @alicloud/ros-cdk-core.IResolvable | Property instanceIsolationMode: Instance isolation mode. |
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. |
sessionAffinity | string | @alicloud/ros-cdk-core.IResolvable | Property sessionAffinity: The session affinity policy for Function Compute requests. |
sessionAffinityConfig | @alicloud/ros-cdk-core.IResolvable | {[ key: string ]: any} | Property sessionAffinityConfig: Session affinity configuration. |
tags | TagsProperty[] | Property tags: Tags to attach to function. |
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.
disableOndemandOptional
public readonly disableOndemand: boolean | IResolvable;
- Type: boolean | @alicloud/ros-cdk-core.IResolvable
Property disableOndemand: Whether to disable the creation of on-demand instances.
When enabled, on-demand instances will not be created, and only reserved instances can be used.
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.
instanceIsolationModeOptional
public readonly instanceIsolationMode: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property instanceIsolationMode: Instance isolation mode.
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.
sessionAffinityOptional
public readonly sessionAffinity: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property sessionAffinity: The session affinity policy for Function Compute requests.
Set to MCP_SSE to implement MCP SSE protocol request affinity. Set to GENERATED_COOKIE for cookie-based affinity. Set to HEADER_FIELD for header-based affinity. If not set or set to NONE, there is no affinity effect, and requests are routed according to the default scheduling policy of Function Compute.
sessionAffinityConfigOptional
public readonly sessionAffinityConfig: IResolvable | {[ key: string ]: any};
- Type: @alicloud/ros-cdk-core.IResolvable | {[ key: string ]: any}
Property sessionAffinityConfig: Session affinity configuration.
tagsOptional
public readonly tags: TagsProperty[];
- Type: TagsProperty[]
Property tags: Tags to attach to function.
Max support 20 tags to add during create function. Each tag with two properties Key and Value, and Key is required.
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.