|
Parameter |
Type |
Description |
Example |
|---|---|---|---|
|
object |
The function update request parameters. |
||
| code | InputCodeLocation |
The ZIP package of the function code. Specify either code or customContainerConfig. |
|
| cpu |
number |
The CPU specification of the function. Unit: vCPU. The value must be a multiple of 0.05 vCPU. |
1 |
| customContainerConfig | CustomContainerConfig |
The configuration of the custom container runtime. After this parameter is configured, the function can use a custom container image for execution. Specify either code or customContainerConfig. |
|
| customDNS | CustomDNS |
The custom DNS configuration. |
|
| customRuntimeConfig | CustomRuntimeConfig |
The custom runtime configuration. |
|
| description |
string |
The description of the function. |
my function |
| diskSize |
integer |
The disk specification of the function. Unit: MB. Valid values: 512 and 10240. |
512 |
| environmentVariables |
object |
The environment variables of the function. You can access the configured environment variables in the runtime environment. |
|
|
string |
value1 |
||
| gpuConfig | GPUConfig |
The GPU configuration of the function. |
|
| handler |
string |
The function entry point. The specific format depends on the runtime. |
index.handler |
| instanceConcurrency |
integer |
The maximum concurrency of an instance. |
1 |
| instanceLifecycleConfig | InstanceLifecycleConfig |
The instance lifecycle hook configuration. |
|
| internetAccess |
boolean |
Specifies whether to allow access to the Internet. |
true |
| layers |
array |
The list of layers. Multiple layers are merged in descending order of array index. Files in a layer with a smaller index overwrite files with the same name in a layer with a larger index. |
|
|
string |
层 ARN。 |
acs:fc:cn-beijing:186824xxxxxx:layers/fc_layer/versions/1 |
|
| logConfig | LogConfig |
The log configuration. Logs generated by the function are written to the configured Logstore. |
|
| memorySize |
integer |
The memory specification of the function. Unit: MB. The value must be a multiple of 64 MB. The memory specification varies based on the function instance type. |
512 |
| nasConfig | NASConfig |
The NAS configuration. After this parameter is configured, the function can access the specified NAS resources. |
|
| ossMountConfig | OSSMountConfig |
The OSS mount configuration. |
|
| role |
string |
The Alibaba Cloud Resource Access Management (RAM) role that grants Function Compute the required permissions. Scenarios include: 1. Sending logs generated by the function to your Logstore. 2. Generating temporary access tokens for the function to access other cloud resources during the execute procedure. |
acs:ram::188077086902****:role/fc-test |
| runtime |
string |
The runtime environment of the function. |
nodejs14 |
| timeout |
integer |
The timeout period for function execution. Unit: seconds. Minimum value: 1. Default value: 3. The function is terminated if it exceeds this time limit. |
60 |
| tracingConfig | TracingConfig |
The Tracing Analysis configuration. After Function Compute is integrated with Tracing Analysis, you can record the time consumed by requests in Function Compute, view the cold start time of functions, and record the time consumed by internal function operations. |
|
| vpcConfig | VPCConfig |
The VPC configuration. After this parameter is configured, the function can access the specified VPC resources. |
|
| disableOndemand |
boolean |
Specifies whether to disable the creation of on-demand instances. If this feature is enabled, on-demand instances are not created, and only provisioned instances can be used. |
|
| sessionAffinity |
string |
The affinity policy for Function Compute invocation requests. To implement request affinity for the MCP SSE protocol, set this parameter to MCP_SSE. To use cookie-based affinity, set this parameter to GENERATED_COOKIE. To use header-based affinity, set this parameter to HEADER_FIELD. If this parameter is not set or is set to NONE, no affinity is applied, and requests are routed based on the default scheduling policy of Function Compute. |
MCP_SSE |
| enableLongLiving |
boolean |
Specifies whether to allow provisioned instances of GPU functions to be long-running. When this feature is enabled, function instances that are created are not injected with STS tokens. |
|
| instanceIsolationMode |
string |
The instance isolation mode. |
|
| sessionAffinityConfig |
string |
The affinity configuration that corresponds to the sessionAffinity type. For MCP_SSE affinity, configure MCPSSESessionAffinityConfig. For cookie-based affinity, configure CookieSessionAffinityConfig. For header field affinity, configure HeaderFieldSessionAffinityConfig. |
{\"sseEndpointPath\":\"/sse\", \"sessionConcurrencyPerInstance\":20} |
| idleTimeout |
integer |
The deferred release time of the instance. |
100 |
| disableInjectCredentials |
string |
Specifies whether to disable STS token injection. Valid values:
|
Env |
| polarFsConfig | PolarFsConfig |
The PolarFs configuration. After this parameter is configured, the function can access the specified PolarFs resources. |
|
| juiceFsConfig | JuiceFsConfig |
The JuiceFS configuration. This allows the function to access specified JuiceFS resources. |
|
| microSandboxConfig | MicroSandboxConfig |