|
Parameter |
Type |
Description |
Example |
|---|---|---|---|
|
object |
The request parameters for updating a function. |
||
| code | InputCodeLocation |
The ZIP package that contains the function's code. You must specify either |
|
| cpu |
number |
The CPU specification for the function, in vCPUs. The value must be a multiple of 0.05. |
1 |
| customContainerConfig | CustomContainerConfig |
The configuration for the custom container runtime. If you configure this parameter, the function uses a custom container image for execution. You must specify either |
|
| customDNS | CustomDNS |
The custom DNS configuration. |
|
| customRuntimeConfig | CustomRuntimeConfig |
The configuration for the custom runtime. |
|
| description |
string |
A description of the function. |
my function |
| diskSize |
integer |
The disk size for the function, in megabytes (MB). Valid values are 512 and 10,240. |
512 |
| environmentVariables |
object |
The environment variables that are available to the function at runtime. |
|
|
string |
value1 |
||
| gpuConfig | GPUConfig |
The GPU configuration for the function. |
|
| handler |
string |
The function handler, which is the entry point for execution. The format varies by runtime. |
index.handler |
| instanceConcurrency |
integer |
The maximum number of concurrent requests that a single function instance can process. |
1 |
| instanceLifecycleConfig | InstanceLifecycleConfig |
The configuration for instance lifecycle hooks. |
|
| internetAccess |
boolean |
Specifies whether the function can access the internet. |
true |
| layers |
array |
A list of layer ARNs to apply to the function. Files in a layer with a lower array index overwrite files with the same name from a layer with a higher array index. |
|
|
string |
The layer ARN. |
acs:fc:cn-beijing:186824xxxxxx:layers/fc_layer/versions/1 |
|
| logConfig | LogConfig |
The logging configuration. Function-generated logs are written to the specified Logstore. |
|
| memorySize |
integer |
The memory size for the function, in megabytes (MB). The value must be a multiple of 64. The available memory options depend on the function's instance type. |
512 |
| nasConfig | NASConfig |
The NAS configuration. This allows the function to access specified NAS resources. |
|
| ossMountConfig | OSSMountConfig |
The OSS mount configuration. |
|
| role |
string |
The ARN of the RAM role that Function Compute assumes to get permissions to access other cloud services. For example, Function Compute requires permissions to write function logs to your Logstore or to obtain an STS token for the function to access other services. |
acs:ram::188077086902****:role/fc-test |
| runtime |
string |
The function's runtime. |
nodejs14 |
| timeout |
integer |
The execution timeout for the function, in seconds. The value must be at least 1. The default is 3. If the timeout is reached, Function Compute terminates the execution. |
60 |
| tracingConfig | TracingConfig |
The tracing configuration. This allows you to record request latency, view function cold start time, and trace time spent on code execution. |
|
| vpcConfig | VPCConfig |
The VPC configuration. This allows the function to access resources in the specified VPC. |
|
| disableOndemand |
boolean |
Specifies whether to disable on-demand instances for the function. If set to true, Function Compute will only use provisioned instances to run the function. |
|
| sessionAffinity |
string |
The session affinity policy for function invocation requests. Use |
MCP_SSE |
| enableLongLiving |
boolean |
Specifies whether to enable long-living provisioned instances for GPU-accelerated functions. If this feature is enabled, Function Compute does not inject an STS token into the function instances. |
|
| instanceIsolationMode |
string |
The instance isolation mode. |
|
| sessionAffinityConfig |
string |
The configuration for the specified |
{\"sseEndpointPath\":\"/sse\", \"sessionConcurrencyPerInstance\":20} |
| idleTimeout |
integer |
The idle timeout for the function instance, in seconds. An instance is terminated after being idle for this duration. |
100 |
| disableInjectCredentials |
string |
Specifies whether to disable STS token injection. Valid values: |
|
| polarFsConfig | PolarFsConfig |
The PolarFS configuration. This allows the function to access specified PolarFS resources. |
|
| juiceFsConfig | JuiceFsConfig |
The JuiceFS configuration. This allows the function to access specified JuiceFS resources. |
该文章对您有帮助吗?