|
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 in vCPU. The value must be a multiple of 0.05 vCPU. |
1 |
| customContainerConfig | CustomContainerConfig |
The custom container runtime configuration. 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 in 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 is related to the runtime. |
index.handler |
| instanceConcurrency |
integer |
The maximum concurrency of an instance. |
1 |
| instanceLifecycleConfig | InstanceLifecycleConfig |
The instance lifecycle hook method 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. Content from a layer with a smaller index overwrites files with the same name from a layer with a larger index. |
|
|
string |
The layer 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 in MB. The value must be a multiple of 64 MB. The memory specification varies depending 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 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, in 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. After this feature is enabled, on-demand instances are not created, and only provisioned instances can be used. |
|
| sessionAffinity |
string |
The session 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 session affinity configuration that corresponds to the sessionAffinity type. For MCP_SSE affinity, populate the MCPSSESessionAffinityConfig configuration. For cookie-based affinity, populate the CookieSessionAffinityConfig configuration. For header field affinity, populate the HeaderFieldSessionAffinityConfig configuration. |
{\"sseEndpointPath\":\"/sse\", \"sessionConcurrencyPerInstance\":20} |
| idleTimeout |
integer |
The delayed 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 mount configuration. |
|
| microSandboxConfig | MicroSandboxConfig |