Parameter | Type | Description | Example |
---|---|---|---|
object | The request parameters for updating the function. | ||
code | InputCodeLocation | The code of the function. The code must be packaged into a ZIP file. You must configure one of the code parameter and the customContainerConfig parameter. | |
cpu | float | The number of vCPUs of the function. The value is a multiple of 0.05. | 1 |
customContainerConfig | CustomContainerConfig | The configurations of the Custom Container runtime. After you configure the Custom Container runtime, Function Compute can execute the function in a custom container image. You must configure one of the code parameter and the customContainerConfig parameter. | |
customDNS | CustomDNS | The custom DNS settings. | |
customRuntimeConfig | CustomRuntimeConfig | The configurations of the custom runtime. | |
description | string | The description of the function. | my function |
diskSize | integer | The disk size of the function. Unit: MB. Valid values: 512 and 10240. | 512 |
environmentVariables | object | The environment variables of the function. You can access the environment variables configured in the runtime. | |
string | value1 | ||
gpuConfig | GPUConfig | The GPU configurations of the function. | |
handler | string | The handler of the function. The format of the handler is related to the runtime you use. | index.handler |
instanceConcurrency | integer | The number of requests that can be concurrently processed by the instance. | 1 |
instanceLifecycleConfig | InstanceLifecycleConfig | The configurations of instance lifecycle hooks. | |
internetAccess | boolean | Specifies whether to allow the function to access the Internet. | true |
layers | array | An array that consists of the information of layers. Multiple layers are merged based on the order of array subscripts. The content of a layer with a smaller subscript overwrites the file that has the same name as a layer with a larger subscript. | |
string | The Alibaba Cloud Resource Name (ARN) of the layer. | acs:fc:cn-beijing:186824xxxxxx:layers/fc_layer/versions/1 | |
logConfig | LogConfig | The log configurations. Function Compute writes function execution logs to the specified Logstore. | |
memorySize | integer | The memory size of the function. Unit: MB. The value must be a multiple of 64. The memory size varies based on the function instance type. | 512 |
nasConfig | NASConfig | The configuration of the NAS file system. The configurations allow functions in the specified service to access the NAS file system. | |
ossMountConfig | OSSMountConfig | The mount configurations of Object Storage Service (OSS). | |
role | string | The Resource Access Management (RAM) role that is used to grant the required permissions to Function Compute. You can use the RAM role in the following scenarios: 1. Send the logs that the function generates to your Logstore. 2. Generate temporary tokens that are used to access other cloud resources during function execution. | acs:ram::188077086902****:role/fc-test |
runtime | string | The runtime of the function. | nodejs14 |
timeout | integer | The timeout period for the execution of the function. Unit: seconds. Default value: 3. Minimum value: 1. When this period is elapsed, the function execution is terminated. | 60 |
tracingConfig | TracingConfig | The configuration of Tracing Analysis. After Function Compute is integrated with Managed Service for OpenTelemetry, you can record the duration of a request in Function Compute, view the cold start duration of a function, and record the execution duration of a function. | |
vpcConfig | VPCConfig | The VPC configurations. The configurations allow functions in the specified service to access the specified VPC. |