调用ListFunctions接口获取函数列表。
请求头
该接口无特殊请求头,关于公共请求头信息,请参见公共参数。
请求语法
GET /services/{serviceName.qualifier}/functions HTTP/1.1
请求参数
名称 | 类型 | 位置 | 是否必选 | 示例值 | 描述 |
---|
名称 | 类型 | 位置 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|---|
serviceName | String | Path | 否 | service_name |
服务的名称。 |
qualifier | String | Path | 否 | test |
服务的版本或别名。 |
limit | Integer | Query | 否 | 20 |
限定此次返回资源的数量。如果不设定,默认返回20,最大不能超过100。返回结果可以小于指定的数量,但不能多于指定的数量。 |
nextToken | String | Query | 否 | next_service |
用来返回更多结果。第一次查询不需要提供这个参数,后续查询的Token从返回结果中获取。 |
prefix | String | Query | 否 | prefix_text |
限定返回的资源名称必须以Prefix作为前缀。 |
startKey | String | Query | 否 | next_service |
设定结果从startKey之后(包括startKey)按字母排序的第一个开始返回。 |
返回数据
示例
请求示例
GET /services/{serviceName.qualifier}/functions?limit=20&nextToken=next_service&prefix=prefix_text&startKey=next_service HTTP/1.1
Host:fc-ram.aliyuncs.com
Content-Type:application/json
正常返回示例
JSON
格式
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-xxxxxxxx"
},
"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"
}