Skip to content

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_nameRequired

function_name: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property functionName: The name of the function.


handlerRequired

handler: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property handler: The handler of the function.


runtimeRequired

runtime: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property runtime: The programming language of the function.


codeOptional

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.


cpuOptional

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_configOptional

custom_container_config: typing.Union[IResolvable, CustomContainerConfigProperty]

Property customContainerConfig: Custom container configuration.

Choose one of Code and CustomContainerConfig.


custom_dnsOptional

custom_dns: typing.Union[IResolvable, CustomDnsProperty]

Property customDns: Custom DNS configuration.


custom_runtime_configOptional

custom_runtime_config: typing.Union[IResolvable, CustomRuntimeConfigProperty]

Property customRuntimeConfig: Custom runtime configuration.


descriptionOptional

description: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property description: Function description.


disk_sizeOptional

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_variablesOptional

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_configOptional

gpu_config: typing.Union[IResolvable, GpuConfigProperty]

Property gpuConfig: The GPU configuration of the function.


instance_concurrencyOptional

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_configOptional

instance_lifecycle_config: typing.Union[IResolvable, InstanceLifecycleConfigProperty]

Property instanceLifecycleConfig: The instance lifecycle configuration of the function.


internet_accessOptional

internet_access: typing.Union[bool, IResolvable]
  • Type: typing.Union[bool, ros_cdk_core.IResolvable]

Property internetAccess: Whether the function can access the Internet.


layersOptional

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_configOptional

log_config: typing.Union[IResolvable, LogConfigProperty]

Property logConfig: The log configuration of the function.


memory_sizeOptional

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_configOptional

nas_config: typing.Union[IResolvable, NasConfigProperty]

Property nasConfig: The NAS configuration of the function.


oss_mount_configOptional

oss_mount_config: typing.Union[IResolvable, OssMountConfigProperty]

Property ossMountConfig: The OSS mount configuration of the function.


roleOptional

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.


timeoutOptional

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_configOptional

tracing_config: typing.Union[IResolvable, TracingConfigProperty]

Property tracingConfig: The tracing configuration of the function.


vpc_configOptional

vpc_config: typing.Union[IResolvable, VpcConfigProperty]

Property vpcConfig: The VPC configuration of the function.