Queries the information about a function.
Authorization information
There is currently no authorization information disclosed in the API.
Request syntax
GET /2021-04-06/services/{serviceName}/functions/{functionName}
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
serviceName | string | Yes | The name of the function. | service_name |
qualifier | string | No | The ID of your Alibaba Cloud account. | demoQualifier |
functionName | string | Yes | The time on which the function is invoked. The format of the value is: EEE,d MMM yyyy HH:mm:ss GMT. | function_name |
X-Fc-Account-Id | string | No | The custom request ID. | 188077086902**** |
X-Fc-Date | string | No | The value that is used to ensure that the modified function is consistent with the function that is expected to be modified. | Wed, 11 May 2022 09:00:00 GMT |
X-Fc-Trace-Id | string | No | The definition of the function. | asdf**** |
Response parameters
Examples
Sample success responses
JSON
format
{
"codeChecksum": "2825179536350****",
"codeSize": 421,
"createdTime": "2020-04-01T08:15:27Z",
"description": "test_description",
"environmentVariables": {
"key": "{\"key\":\"value\"}"
},
"functionId": "aa715851-1c20-4b89-a8fb-***",
"functionName": "function_name",
"handler": "index.handler",
"lastModifiedTime": "2020-04-01T08:15:27Z",
"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-xxxxxxxxxx",
"webServerMode": true
},
"layers": [
"02f81d283888f5ec63442a88fe82b260#Layer-name#1"
],
"instanceConcurrency": 10,
"instanceSoftConcurrency": 5,
"instanceType": "e1",
"instanceLifecycleConfig": {
"preFreeze": {
"handler": "index.preStop",
"timeout": 10
},
"preStop": {
"handler": "index.preStop",
"timeout": 10
}
},
"customDNS": {
"nameServers": [
"8.8.x.x"
],
"searches": [
"ns1.svc.cluster-domain.example"
],
"dnsOptions": [
{
"name": "ndots",
"value": "2"
}
]
},
"customRuntimeConfig": {
"command": [
"/code/myBootstrap"
],
"args": [
"args1"
]
},
"customHealthCheckConfig": {
"httpGetUrl": "/ready",
"initialDelaySeconds": 1,
"periodSeconds": 1,
"timeoutSeconds": 2,
"failureThreshold": 1,
"successThreshold": 2
},
"layersArnV2": [
"acs:fc:{region}:{accountID}:layers/{layerName}/versions/{layerVersion}"
],
"cpu": 1.5,
"diskSize": 512,
"gpuMemorySize": 2048
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2021-06-30 | The input parameters of the API operation change. | |||||||||||||||
| ||||||||||||||||
2021-06-30 | The input parameters of the API operation change.,The response structure of the API operation changes. | |||||||||||||||
| ||||||||||||||||
2021-06-30 | The input parameters of the API operation change.,The response structure of the API operation changes. | |||||||||||||||
|