Queries services.
Debugging
Request headers
This operation uses only the common request header. For more information, see the topic about common request parameters.
Request syntax
GET /services HTTP/1.1
Request parameters
Parameter | Type | Position | Required | Example | Description |
limit | Integer | Query | No | 20 | The maximum number of services to be returned. Default value: 20. Maximum value: 100. The number of returned services is less than or equal to the specified number. |
nextToken | String | Query | No | nextService | The token used to obtain more results. If the number of services exceeds the limit, the nextToken parameter is returned. You can include the parameter in subsequent invocations to obtain more results. You do not need to provide this parameter in the first invocation. |
prefix | String | Query | No | prefix_text | The prefix that the names of returned services must contain. For example, if you set the parameter to a, the names of all the returned services start with a. |
startKey | String | Query | No | nextService | The position from which the list begins. Results are sorted in alphabetical order and those results following startKey (inclusive) are listed. |
Response parameters
Parameter | Type | Example | Description |
nextToken | String | _FUN_NAS-classify | The token used to obtain more results. Note If this parameter is not returned, all services are returned. |
services | Array | An array that consists of the information of services. | |
createdTime | String | 2020-04-03T05:57:28Z | The time when the service was created. |
description | String | test_description | The description of the service. |
internetAccess | Boolean | true | Indicates whether functions were allowed to access the Internet. Valid values:
|
lastModifiedTime | String | 2020-04-03T05:57:28Z | The last time when the service was updated. |
logConfig | The log configuration, which specifies a Logstore to store function execution logs. | ||
nasConfig | The configuration of the File Storage NAS file system, which allows functions in the specified service in Function Compute to access the NAS file system. | ||
role | String | acs:ram::198613743****:role/fc-public-test | The Alibaba Cloud Resource Name (ARN) of the RAM role that is used to grant required permissions to Function Compute. The RAM role is used in the following scenarios:
|
serviceId | String | c910061f-****-44e6-b659-***c | The unique ID generated by the system for the service. |
serviceName | String | service_name | The name of the service. |
vpcConfig | The virtual private cloud (VPC) configuration, which allows functions in the specified service in Function Compute to access the specified VPC. | ||
tracingConfig | The configuration of Tracing Analysis. After you configure Tracing Analysis for a service in Function Compute, you can record the execution duration of a request, view the amount of the cold start time for a function, and record the execution duration of a function. For more information, see Overview. |
Examples
Sample requests
GET /2016-08-15/services HTTP/1.1
Common request parameters
Sample success responses
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"nextToken" : "_FUN_NAS-classify",
"services" : [ {
"createdTime" : "2020-04-03T05:57:28Z",
"description" : "test_description",
"internetAccess" : true,
"lastModifiedTime" : "2020-04-03T05:57:28Z",
"logConfig" : {
"logstore" : "test-prj",
"project" : "test-logstore",
"enableRequestMetrics" : true,
"logBeginRule" : "DefaultRegex"
},
"nasConfig" : {
"groupId" : "100",
"mountPoints" : [ {
"mountDir" : "/home/test",
"serverAddr" : "***-uni85.cn-hangzhou.nas.aliyuncs.com:/"
} ],
"userId" : "100"
},
"role" : "acs:ram::198613743****:role/fc-public-test",
"serviceId" : "c910061f-****-44e6-b659-***c",
"serviceName" : "service_name",
"vpcConfig" : {
"securityGroupId" : "sg-bp18hj1wtxgy3b0***",
"vSwitchIds" : [ "vsw-bp1ozpcrdc6r****" ],
"vpcId" : "vpc-***"
},
"tracingConfig" : {
"type" : "Jaeger"
}
} ]
}
Error codes
For a list of error codes, visit the API Error Center.