You can call this operation to view the list of services.
Debugging
Request header
This operation uses only common request headers. For more information, see Common parameters.
Request syntax
GET /services Request parameters
Parameter | Type | Position | Required | Example | Description |
limit | Integer | Query | No | 20 | The maximum number of resources to be returned. Default value: 20. Maximum value: 100. The number of returned resources is smaller than or equal to the specified number. |
nextToken | String | Query | No | nextService | 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 calls to obtain more results. You do not need to provide this parameter in the first call. |
prefix | String | Query | No | prefix_text | The prefix that the names of returned resources must contain. For example, if Prefix is a, all returned resource names 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 results 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. This parameter specifies a Logstore to store function execution logs. | ||
nasConfig | The configuration of the File Storage NAS file system, which enables a function to access the specified file system. | ||
role | String | acs:ram::19861****3743:role/fc-public-test | The RAM role that is used to grant required permissions to Function Compute. The 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 VPC configuration, which enables a function to access the specified VPC. |
Examples
Sample requests
GET /2016-08-15/services HTTP/1.1
Common request parametersSample success responses
JSON format
HTTP/1.1 200 OK
Common response headers
{
"services": [
{
"serviceName": "service_name",
"description": "test_description",
"role": "acs:ram::19861****3743:role/fc-public-test",
"logConfig": {
"enableRequestMetrics": "true",
"project": "test_project",
"logstore": "test_logstore"
},
"serviceId": "c910061f-****-44e6-b659-***c",
"createdTime": "2020-04-03T05:57:28Z",
"lastModifiedTime": "2020-04-03T05:57:28Z",
"vpcConfig": {
"vpcId": "vpc_***",
"vSwitchIds": [
"vsw_***"
],
"securityGroupId": "sg_bp18hj1wtxgy3***"
},
"internetAccess": true,
"nasConfig": {
"userId": 100,
"groupId": 100,
"mountPoints": [
{
"serverAddr": "***-uni85.cn-hangzhou.nas.aliyuncs.com:/",
"mountDir": "/home/test"
}
]
}
}
],
"nextToken": "_FUN_NAS_classify"
}Error codes
For a list of error codes, visit the API Error Center.