FunctionProps
Properties for defining a Function
.
See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-fc3-function
Initializer
import ros_cdk_fc3
ros_cdk_fc3.FunctionProps(
function_name: typing.Union[str, IResolvable],
handler: typing.Union[str, IResolvable],
runtime: typing.Union[str, IResolvable],
code: typing.Union[IResolvable, CodeProperty] = None,
cpu: typing.Union[typing.Union[int, float], IResolvable] = None,
custom_container_config: typing.Union[IResolvable, CustomContainerConfigProperty] = None,
custom_dns: typing.Union[IResolvable, CustomDnsProperty] = None,
custom_runtime_config: typing.Union[IResolvable, CustomRuntimeConfigProperty] = None,
description: typing.Union[str, IResolvable] = None,
disk_size: typing.Union[typing.Union[int, float], IResolvable] = None,
environment_variables: typing.Union[IResolvable, typing.Mapping[typing.Any]] = None,
gpu_config: typing.Union[IResolvable, GpuConfigProperty] = None,
instance_concurrency: typing.Union[typing.Union[int, float], IResolvable] = None,
instance_lifecycle_config: typing.Union[IResolvable, InstanceLifecycleConfigProperty] = None,
internet_access: typing.Union[bool, IResolvable] = None,
layers: typing.Union[IResolvable, typing.List[typing.Union[str, IResolvable]]] = None,
log_config: typing.Union[IResolvable, LogConfigProperty] = None,
memory_size: typing.Union[typing.Union[int, float], IResolvable] = None,
nas_config: typing.Union[IResolvable, NasConfigProperty] = None,
oss_mount_config: typing.Union[IResolvable, OssMountConfigProperty] = None,
role: typing.Union[str, IResolvable] = None,
timeout: typing.Union[typing.Union[int, float], IResolvable] = None,
tracing_config: typing.Union[IResolvable, TracingConfigProperty] = None,
vpc_config: typing.Union[IResolvable, VpcConfigProperty] = None
)
Properties
Name | Type | Description |
---|---|---|
function_name |
typing.Union[str, ros_cdk_core.IResolvable] |
Property functionName: The name of the function. |
handler |
typing.Union[str, ros_cdk_core.IResolvable] |
Property handler: The handler of the function. |
runtime |
typing.Union[str, ros_cdk_core.IResolvable] |
Property runtime: The programming language of the function. |
code |
typing.Union[ros_cdk_core.IResolvable, CodeProperty] |
Property code: Function code ZIP package. |
cpu |
typing.Union[typing.Union[int, float], 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. |
custom_container_config |
typing.Union[ros_cdk_core.IResolvable, CustomContainerConfigProperty] |
Property customContainerConfig: Custom container configuration. |
custom_dns |
typing.Union[ros_cdk_core.IResolvable, CustomDnsProperty] |
Property customDns: Custom DNS configuration. |
custom_runtime_config |
typing.Union[ros_cdk_core.IResolvable, CustomRuntimeConfigProperty] |
Property customRuntimeConfig: Custom runtime configuration. |
description |
typing.Union[str, ros_cdk_core.IResolvable] |
Property description: Function description. |
disk_size |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property diskSize: The disk size of the function, in MB. |
environment_variables |
typing.Union[ros_cdk_core.IResolvable, typing.Mapping[typing.Any]] |
Property environmentVariables: The environment variables of the function. |
gpu_config |
typing.Union[ros_cdk_core.IResolvable, GpuConfigProperty] |
Property gpuConfig: The GPU configuration of the function. |
instance_concurrency |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property instanceConcurrency: The maximum number of concurrent instances of the function. |
instance_lifecycle_config |
typing.Union[ros_cdk_core.IResolvable, InstanceLifecycleConfigProperty] |
Property instanceLifecycleConfig: The instance lifecycle configuration of the function. |
internet_access |
typing.Union[bool, ros_cdk_core.IResolvable] |
Property internetAccess: Whether the function can access the Internet. |
layers |
typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[str, ros_cdk_core.IResolvable]]] |
Property layers: The layers of the function. |
log_config |
typing.Union[ros_cdk_core.IResolvable, LogConfigProperty] |
Property logConfig: The log configuration of the function. |
memory_size |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property memorySize: The memory size of the function, in MB. |
nas_config |
typing.Union[ros_cdk_core.IResolvable, NasConfigProperty] |
Property nasConfig: The NAS configuration of the function. |
oss_mount_config |
typing.Union[ros_cdk_core.IResolvable, OssMountConfigProperty] |
Property ossMountConfig: The OSS mount configuration of the function. |
role |
typing.Union[str, ros_cdk_core.IResolvable] |
Property role: The user is authorized to the RAM role of Function Compute. |
timeout |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property timeout: The timeout of the function. |
tracing_config |
typing.Union[ros_cdk_core.IResolvable, TracingConfigProperty] |
Property tracingConfig: The tracing configuration of the function. |
vpc_config |
typing.Union[ros_cdk_core.IResolvable, VpcConfigProperty] |
Property vpcConfig: The VPC configuration of the function. |
function_name
Required
function_name: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property functionName: The name of the function.
handler
Required
handler: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property handler: The handler of the function.
runtime
Required
runtime: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property runtime: The programming language of the function.
code
Optional
code: typing.Union[IResolvable, CodeProperty]
- Type: typing.Union[ros_cdk_core.IResolvable, CodeProperty]
Property code: Function code ZIP package.
Choose one of Code and CustomContainerConfig.
cpu
Optional
cpu: typing.Union[typing.Union[int, float], IResolvable]
- Type: typing.Union[typing.Union[int, float], 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.
custom_container_config
Optional
custom_container_config: typing.Union[IResolvable, CustomContainerConfigProperty]
- Type: typing.Union[ros_cdk_core.IResolvable, CustomContainerConfigProperty]
Property customContainerConfig: Custom container configuration.
Choose one of Code and CustomContainerConfig.
custom_dns
Optional
custom_dns: typing.Union[IResolvable, CustomDnsProperty]
- Type: typing.Union[ros_cdk_core.IResolvable, CustomDnsProperty]
Property customDns: Custom DNS configuration.
custom_runtime_config
Optional
custom_runtime_config: typing.Union[IResolvable, CustomRuntimeConfigProperty]
- Type: typing.Union[ros_cdk_core.IResolvable, CustomRuntimeConfigProperty]
Property customRuntimeConfig: Custom runtime configuration.
description
Optional
description: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property description: Function description.
disk_size
Optional
disk_size: typing.Union[typing.Union[int, float], IResolvable]
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property diskSize: The disk size of the function, in MB.
environment_variables
Optional
environment_variables: typing.Union[IResolvable, typing.Mapping[typing.Any]]
- Type: typing.Union[ros_cdk_core.IResolvable, typing.Mapping[typing.Any]]
Property environmentVariables: The environment variables of the function.
gpu_config
Optional
gpu_config: typing.Union[IResolvable, GpuConfigProperty]
- Type: typing.Union[ros_cdk_core.IResolvable, GpuConfigProperty]
Property gpuConfig: The GPU configuration of the function.
instance_concurrency
Optional
instance_concurrency: typing.Union[typing.Union[int, float], IResolvable]
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property instanceConcurrency: The maximum number of concurrent instances of the function.
instance_lifecycle_config
Optional
instance_lifecycle_config: typing.Union[IResolvable, InstanceLifecycleConfigProperty]
- Type: typing.Union[ros_cdk_core.IResolvable, InstanceLifecycleConfigProperty]
Property instanceLifecycleConfig: The instance lifecycle configuration of the function.
internet_access
Optional
internet_access: typing.Union[bool, IResolvable]
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property internetAccess: Whether the function can access the Internet.
layers
Optional
layers: typing.Union[IResolvable, typing.List[typing.Union[str, IResolvable]]]
- Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[str, ros_cdk_core.IResolvable]]]
Property layers: The layers of the function.
log_config
Optional
log_config: typing.Union[IResolvable, LogConfigProperty]
- Type: typing.Union[ros_cdk_core.IResolvable, LogConfigProperty]
Property logConfig: The log configuration of the function.
memory_size
Optional
memory_size: typing.Union[typing.Union[int, float], IResolvable]
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property memorySize: The memory size of the function, in MB.
nas_config
Optional
nas_config: typing.Union[IResolvable, NasConfigProperty]
- Type: typing.Union[ros_cdk_core.IResolvable, NasConfigProperty]
Property nasConfig: The NAS configuration of the function.
oss_mount_config
Optional
oss_mount_config: typing.Union[IResolvable, OssMountConfigProperty]
- Type: typing.Union[ros_cdk_core.IResolvable, OssMountConfigProperty]
Property ossMountConfig: The OSS mount configuration of the function.
role
Optional
role: typing.Union[str, IResolvable]
- Type: typing.Union[str, 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
timeout: typing.Union[typing.Union[int, float], IResolvable]
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property timeout: The timeout of the function.
tracing_config
Optional
tracing_config: typing.Union[IResolvable, TracingConfigProperty]
- Type: typing.Union[ros_cdk_core.IResolvable, TracingConfigProperty]
Property tracingConfig: The tracing configuration of the function.
vpc_config
Optional
vpc_config: typing.Union[IResolvable, VpcConfigProperty]
- Type: typing.Union[ros_cdk_core.IResolvable, VpcConfigProperty]
Property vpcConfig: The VPC configuration of the function.