|
Parameter |
Type |
Description |
Example |
|---|---|---|---|
|
object |
The function configuration information. |
||
| codeChecksum |
string |
The CRC-64 value of the function code package. |
2825179536350**** |
| codeSize |
integer |
The size of the function code package returned by the system, in bytes. |
412 |
| cpu |
number |
The CPU specification of the function, in vCPUs, in multiples of 0.05 vCPU. The minimum value is 0.05 and the maximum value is 16. The ratio of cpu to memorySize (in GB) must be between 1:1 and 1:4. |
1 |
| createdTime |
string |
The creation time of the function. |
2023-04-01T08:15:27Z |
| customContainerConfig | CustomContainerConfig |
The custom container runtime configuration. After successful configuration, the function can use a custom container image to execute the function. Either code or customContainerConfig must be specified. |
|
| 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, which can be accessed in the runtime environment. |
|
|
string |
The value of the environment variable. |
value1 |
|
| functionArn |
string |
The function resource identifier. |
acs:fc:cn-shanghai:123:functions/functionName |
| functionId |
string |
The globally unique ID generated by the system for each function. |
aa715851-1c20-4b89-a8fb-*** |
| functionName |
string |
The name of the function. |
my-function-1 |
| gpuConfig | GPUConfig |
The GPU configuration of the function. |
|
| handler |
string |
The function entry point for execution. The specific format depends on the runtime. |
index.handler |
| instanceConcurrency |
integer |
The maximum instance concurrency. |
1 |
| instanceLifecycleConfig | InstanceLifecycleConfig |
The instance lifecycle hook method configuration. |
|
| internetAccess |
boolean |
Specifies whether the function is allowed to access the Internet. Default value: true. |
true |
| lastModifiedTime |
string |
The time when the function was last updated. |
2023-05-01T08:15:27Z |
| lastUpdateStatus |
string |
The status of the most recent function update operation. When a function is created, this value is Successful. Valid values: Successful, Failed, and InProgress. |
InProgress |
| lastUpdateStatusReason |
string |
The reason why the most recent function update operation has the current status. |
The system is currently processing the acceleration optimization for the image. |
| lastUpdateStatusReasonCode |
string |
The status code of the reason why the most recent function update operation has the current status. |
ImageOptimizing |
| layers |
array |
The list of layers. |
|
| FunctionLayer |
The layer information. |
||
| 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, in multiples of 64 MB. The minimum value is 128 MB and the maximum value is 32 GB. The ratio of cpu to memorySize (in GB) must be between 1:1 and 1:4. |
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 granted by the user to Function Compute. After this parameter is set, Function Compute assumes this role to generate temporary access credentials. You can use the temporary access credentials of this role in the function to access specified Alibaba Cloud services, such as OSS and OTS. |
acs:ram::188077086902****:role/fc-test |
| runtime |
string |
The runtime environment of the function. Currently supported runtime environments include: nodejs12, nodejs14, nodejs16, nodejs18, nodejs20, go1, python3, python3.9, python3.10, python3.12, java8, java11, php7.2, dotnetcore3.1, custom, custom.debian10, custom.debian11, custom.debian12, and custom-container. |
python3.10 |
| state |
string |
The current state of the function. |
Pending |
| stateReason |
string |
The reason why the function is in the current state. |
Function creating |
| stateReasonCode |
string |
The status code of the reason why the function is in the current state. |
Creating |
| timeout |
integer |
The timeout period for function execution, in seconds. The minimum value is 1, the maximum value is 86400, and the default value is 3. The function is terminated if it exceeds this time limit. |
60 |
| tracingConfig | TracingConfig |
The tracing 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. |
|
| tags |
array |
The list of tags. |
|
| Tag |
The tag information. |
||
| disableOndemand |
boolean |
Specifies whether to disable the creation of on-demand instances. When enabled, on-demand instances are not created and only provisioned instances can be used. |
|
| invocationRestriction | FunctionRestriction | ||
| sessionAffinity |
string |
The session affinity policy for Function Compute invocation requests. To implement request affinity for the MCP SSE protocol, set this to MCP_SSE. To use cookie-based affinity, set this to GENERATED_COOKIE. To use header-based affinity, set this to HEADER_FIELD. If not set or set to NONE, no affinity is applied and requests are routed based on the default Function Compute scheduling policy. |
MCP_SSE |
| enableLongLiving |
boolean |
When a sessionAffinity type is set, the corresponding affinity configuration must be specified. For MCP_SSE affinity, configure MCPSSESessionAffinityConfig. For cookie-based affinity, configure CookieSessionAffinityConfig. For header field affinity, configure HeaderFieldSessionAffinityConfig. |
|
| resourceGroupId |
string |
The resource group ID. |
|
| instanceIsolationMode |
string |
The instance isolation mode. |
|
| sessionAffinityConfig |
string |
When a sessionAffinity type is set, the corresponding affinity configuration must be specified. 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 instance deferred release time. |
100 |
| disableInjectCredentials |
string |
Specifies whether to disable STS token injection. Valid values: None: Injects STS tokens in all ways. Env: Does not inject STS tokens through environment variables. Request: Does not inject STS tokens through requests, including context and headers. All: Does not inject STS tokens in any way. |
Env |
| polarFsConfig | PolarFsConfig |
The PolarFs configuration. After you configure this parameter, the function can access the specified PolarFs resource. |
|
| lockInfo | FunctionLockInfo |
The function lock information. |
{"lockedBy":"AgentRun","lockedAt":"2025-04-05T10:00:00Z","lockedResources":["function","trigger","version","alias"]} |
| juiceFsConfig | JuiceFsConfig |
The JuiceFs mount configuration. |
|
| microSandboxConfig | MicroSandboxConfig |