调用GetFunction接口获取函数信息。
请求头
该接口无特殊请求头,关于公共请求头信息,请参见公共参数。
请求语法
GET /services/{serviceName.qualifier}/functions/{functionName} HTTP/1.1
请求参数
名称 | 类型 | 位置 | 是否必选 | 示例值 | 描述 |
---|
名称 | 类型 | 位置 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|---|
serviceName | String | Path | 是 | service_name |
服务的名称。 |
qualifier | String | Path | 否 | test |
服务的版本或别名。 |
functionName | String | Path | 是 | function_name |
函数的名称。 |
返回数据
示例
请求示例
GET /services/{serviceName.qualifier}/functions/function_name HTTP/1.1
Host:fc-ram.aliyuncs.com
Content-Type:application/json
正常返回示例
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"codeChecksum" : "2825179536350****",
"codeSize" : 421,
"createdTime" : "2020-04-01T08:15:27Z",
"description" : "test_description",
"functionId" : "aa715851-1c20-4b89-a8fb-***",
"functionName" : "function_name",
"handler" : "index.handler",
"memorySize" : 256,
"runtime" : "python3",
"timeout" : 60,
"initializationTimeout" : 60,
"initializer" : "index.handler",
"caPort" : 9000,
"customContainerConfig" : {
"args" : "[\"-arg1\", \"value1\"]",
"command" : "[\"/code/myserver\"]",
"image" : "registry-vpc.cn-hangzhou.aliyuncs.com/fc-demo/helloworld:v1beta1",
"accelerationType" : "Default",
"accelerationInfo" : {
"status" : "Preparing"
},
"instanceID" : "cri-xxxxxx"
},
"layers" : [ "02f81d283888f5ec63442a88fe82b260#Layer-name#1" ]
}