All Products
Search
Document Center

Function Compute:ListFunctions

更新时间:Aug 20, 2025

Views the list of functions.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. You can use OpenAPI Explorer to search for API operations, call API operations, and dynamically generate SDK sample codes.

Request headers

This operation uses only common request headers. For more information, see Common parameters.

Request syntax

GET /services/{serviceName.qualifier}/functions HTTP/1.1

Request parameters

ParameterTypePositionRequiredExampleDescription
serviceNameStringPathNoservice_name

The name of the service.

qualifierStringPathNotest

The version or alias of the service.

limitIntegerQueryNo20

The maximum number of resources to be returned. Default value: 20. The value cannot exceed 100. The number of returned resources is smaller than or equal to the specified number.

nextTokenStringQueryNonext_service

The token used to obtain more results. If the number of resources exceeds the limit, the nextToken parameter is returned. Include this parameter in subsequent invocations to obtain more results. You do not need to provide this parameter in the first invocation.

prefixStringQueryNoprefix_text

The prefix that the names of returned resources must contain.

startKeyStringQueryNonext_service

The starting position of the result list. Results are sorted in the alphabetical order and those results following startKey (inclusive) are listed.

Response parameters

ParameterTypeExampleDescription
functionsArray

An array that consists of the information of functions.

codeChecksumString282517953635042****

The CRC-64 value of the function code package.

codeSizeLong421

The size of the function code package. Unit: byte.

createdTimeString2020-04-01T08:14:58Z

The time when the function was created.

customContainerConfigCustomContainerConfig

The configuration of the custom container. After you configure the custom container runtime, you can use custom container images to execute functions.

descriptionStringtest_description

The description of the function.

environmentVariablesMap

The environment variables configured for the function. The values of the environment variables are obtained from the function. For more information, see Overview.

functionIdStringe68905d5-f81c***

The ID generated by the system for each function. It must be globally unique.

functionNameStringfunction_name

The name of the function.

handlerStringindex.handler

The handler of the function. The format is determined by the programming language. For more information, see Function handlers.

lastModifiedTimeLong2020-04-01T08:14:58Z

The last time when the function was updated.

memorySizeInteger256

The memory size of the function. Unit: MB. The memory size is a multiple of 64 MB. Instance types have different memory specifications. For more information, see Instance types.

runtimeStringpython3

The runtime environment of the function. For more information about the runtime environments that are supported by Function Compute, see Supported function runtime environments.

timeoutInteger60

The timeout period for the execution of the function. Unit: seconds. Default value: 60. Valid values: 1 to 86400. When this period expires, the execution of the function is terminated.

initializationTimeoutInteger60

The timeout period for the execution of the initializer function. Unit: seconds. Default value: 3. Valid values: 1 to 300. When this period expires, the execution of the initializer function is terminated.

initializerStringindex.handler

The handler of the initializer function. The format is determined by the programming language. For more information, see Initializer function.

caPortInteger9000

The port on which the HTTP server listens for the custom runtime or custom container runtime.

nextTokenStringnext_service

The token used to obtain more results. If this value is not returned, all results are returned.

Examples

Sample requests

GET /2016-08-15/services/service_name.test/functions HTTP/1.1 
Common request headers
 {
    "startKey":"next_service",
    "nextToken":"next_service",
    "prefix":"prefix_text",
    "qualifier":"test",
    "limit":"20",
    "serviceName":"service_name"
}

Sample success responses

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "functions" : [ {
    "codeChecksum" : "282517953635042****",
    "codeSize" : 421,
    "createdTime" : "2020-04-01T08:14:58Z",
    "customContainerConfig" : {
      "args" : "[\"-arg1\", \"value1\"]",
      "command" : "[\"/code/myserver\"]",
      "image" : "registry-vpc.cn-hangzhou.aliyuncs.com/fc-demo/helloworld:v1beta1",
      "accelerationType" : "Default",
      "instanceID" : "cri-xxxxxx"
    },
    "description" : "test_description",
    "functionId" : "e68905d5-f81c***",
    "functionName" : "function_name",
    "handler" : "index.handler",
    "memorySize" : 256,
    "runtime" : "python3",
    "timeout" : 60,
    "initializationTimeout" : 60,
    "initializer" : "index.handler",
    "caPort" : 9000
  } ],
  "nextToken" : "next_service"
}

Error codes

For a list of error codes, visit the API Error Center.