All Products
Search
Document Center

Function Compute:Function

Last Updated:Jul 03, 2025
ParameterTypeDescriptionExample
object

The function configurations.

handlerstring

The handler of the function. The format of the handler is related to the runtime you use.

index.handler
lastModifiedTimestring

The last time the function was updated.

2023-05-01T08:15:27Z
rolestring

The Resource Access Management (RAM) role that is assigned to the function. Function Compute assumes the role to obtain a Security Token Service (STS) token, which serves as a temporary key for your function to access other Alibaba Cloud services, such as Object Storage Service (OSS) and Tablestore.

acs:ram::188077086902****:role/fc-test
tracingConfigTracingConfig

The configurations of Managed Service for OpenTelemetry. After Function Compute is integrated with Managed Service for OpenTelemetry, you can record the invocation duration of a request, view the cold start duration of a function, and track the execution duration of the function.

lastUpdateStatusReasonCodestring

The reason code for the most recent update that was executed on the function.

ImageOptimizing
nasConfigNASConfig

The File Storage NAS (NAS) configurations. The configurations allow the function to access the specified NAS file system.

descriptionstring

The description of the function.

my function
stateReasonCodestring

The reason code for the current state of the function.

Creating
stateReasonstring

The reason for the current state of the function.

Function creating
codeSizelong

The size of the function code package returned by the system. Unit: bytes.

412
timeoutinteger

The timeout period for function execution. Unit: seconds. Default value: 3. Valid values: 1 to 86400. The execution of the function is terminated when the timeout period expires.

60
codeChecksumstring

The CRC-64 value of the function code package.

2825179536350****
diskSizeinteger

The disk size of the function. Unit: MB. Valid values: 512 and 10240.

512
functionIdstring

The globally unique ID generated by the system for the function.

aa715851-1c20-4b89-a8fb-***
lastUpdateStatusReasonstring

The reason for the most recent update that was executed on the function.

The system is currently processing the acceleration optimization for the image.
internetAccessboolean

Specifies whether to allow the function to access the Internet. Default value: true.

true
layersarray

The layers.

FunctionLayer

The layer information.

ossMountConfigOSSMountConfig

The OSS mounting configurations.

createdTimestring

The time when the function was created.

2023-04-01T08:15:27Z
statestring

The current state of the function.

Pending
functionArnstring

The identifier of the function resource.

acs:fc:cn-shanghai:123:functions/functionName
customRuntimeConfigCustomRuntimeConfig

The configurations of the custom runtime.

logConfigLogConfig

The logging configurations. Logs generated by the function are written to the specified Logstore.

functionNamestring

The name of the function.

my-function-1
instanceLifecycleConfigInstanceLifecycleConfig

The configurations of instance lifecycle hooks.

gpuConfigGPUConfig

The GPU configurations of the function.

cpufloat

The CPU power allocated to the function. Unit: vCPUs. The value must be a multiple of 0.05. The minimum value is 0.05 and the maximum value is 16. The ratio of cpu to memorySize (in GB) must be from 1:1 to 1:4.

1
runtimestring

The runtime of the function. Valid values: nodejs8, nodejs10, nodejs12, nodejs14, nodejs16, nodejs18, nodejs20, go1, python3, python3.9, python3.10, java8, java11, php7.2, dotnetcore3.1, custom, custom.debian10, and custom-container.

python3.10
customContainerConfigCustomContainerConfig

The configurations of the Custom Container runtime. After you configure a Custom Container runtime for your function, Function Compute can execute the function in a custom container image. Configure either code or customContainerConfig.

instanceConcurrencyinteger

The maximum number of requests that a function instance can process at a time.

1
tagsarray

The tags.

Tag

The tag information.

memorySizeinteger

The memory capacity for the function. Unit: MB. The value must be a multiple of 64. The minimum capacity is 128 MB and the maximum capacity is 32 GB. The ratio of cpu to memorySize (in GB) must be from 1:1 to 1:4.

512
customDNSCustomDNS

The custom DNS settings of the function.

environmentVariablesobject

The environment variables of the function. You can access the specified environment variables in the runtime.

string

The value of the environment variable.

value1
lastUpdateStatusstring

The status of the most recent update that was executed on the function. The initial value for this parameter is Successful once the function has been successfully created. Valid values: Successful, Failed, and InProgress.

InProgress
vpcConfigVPCConfig

The Virtual Private Cloud (VPC) configurations. The configurations allow the function to access the specified VPC resources.