Property | Type | Required | Editable | Description | Constraint |
Initializer | String | No | Yes | The handler of the initializer function. | The format of the value varies based on the programming language. |
InitializationTimeout | Integer | No | Yes | The timeout period for the execution of the initializer function. | Valid values: 1 to 300. Unit: seconds. Default value: 3. When the timeout period ends, Function Compute terminates the execution of the initializer function. |
Code | Map | No | Yes | The ZIP package of the function code. | For more information, see Code properties. |
InstanceType | String | No | Yes | The type of the function instance. | Valid values: e1: elastic instance c1: performance instance
|
Description | String | No | Yes | The description of the function. | None. |
ServiceName | String | Yes | No | The name of the service in Function Compute. | The name must be 1 to 128 characters in length. |
MemorySize | Integer | No | Yes | The memory size of the function. | Valid values for an elastic instance: multiples of 64 that range from 128 to 3072. Valid values for a performance instance: 4096, 8192, 16384, and 32768.
Unit: MB. |
InstanceConcurrency | Integer | No | Yes | The instance concurrency value. | Valid values: 1 to 100. |
EnvironmentVariables | Map | No | Yes | The environment variables that you want to configure for the function. | None. |
Handler | String | Yes | Yes | The handler of the function. | For example, if you set Handler to index.handler when you create a Python function, the file name is index.py and the function name is handler. The format of the value varies based on the programming language. |
Timeout | Integer | No | Yes | The timeout period for the execution of the function. | Valid values: 1 to 600. Default value: 3. Unit: seconds. When the timeout period ends, Function Compute terminates the execution of the function. |
Runtime | String | Yes | Yes | The runtime of the function. | Valid values: nodejs6, nodejs8, nodejs10, nodejs12, python3, java8, custom, and custom-container. For more information, see Runtimes that are supported by Function Compute. |
FunctionName | String | Yes | No | The name of the function. | The name must be 1 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). It must start with a letter or an underscore (_). |
CustomContainerConfig | Map | No | Yes | The configurations of the Custom Container runtime if you set Runtime to custom-container. After you specify the configurations, you can use a custom container image to invoke the function. | For more information, see CustomContainerConfig properties. |
CAPort | Integer | No | Yes | The port on which the custom HTTP server listens. | Default value: 9000. Note This property takes effect when Runtime is set to custom or custom-container. |
AsyncConfiguration | Map | No | Yes | The asynchronous invocation configurations. | For more information, see AsyncConfiguration properties. |
Cpu | Number | No | Yes | The number of vCPUs of the function. | None. |
CustomRuntimeConfig | Map | No | Yes | The configurations of the custom runtime of the function. | None. |
GpuMemorySize | Integer | No | Yes | The GPU memory size of the function. | Valid values: multiples of 1024. Unit: MB. |
InstanceSoftConcurrency | Integer | No | Yes | The instance soft concurrency value. You can use this property to implement graceful scale-ups for instances. | When the instance concurrency value is greater than the instance soft concurrency value, an instance scale-up is triggered. For example, if your instance requires a long period of time to start, you can specify an appropriate soft concurrency value to start the instance in advance. The value of InstanceSoftConcurrency must be less than or equal to the value of InstanceConcurrency. |
DiskSize | Integer | No | Yes | The disk size of the function. | Unit: MB. Valid values: 512 and 10240. |
InstanceLifecycleConfig | Map | No | Yes | The instance lifecycle configurations of the function. | For more information, see InstanceLifecycleConfig properties. |
CustomDNS | Map | No | Yes | The custom Domain Name System (DNS) configurations of the function. | For more information, see CustomDNS properties. |
CustomHealthCheckConfig | Map | No | Yes | The health check configurations of the custom and Custom Container runtimes. | For more information, see CustomHealthCheckConfig properties. |