调用ListCustomDomains接口获取自定义域名列表。
请求头
该接口使用公共请求头,无特殊请求头。请参见公共请求参数文档。
请求语法
GET /custom-domains
请求参数
名称 | 类型 | 位置 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|---|
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)按字母排序的第一个开始返回。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
nextToken | String | fc-thinkphp-demo.functioncompute.com |
用来返回更多结果。第一次查询不需要提供这个参数,后续查询的Token从返回结果中获取。 |
customDomains | Array |
自定义域名。 |
|
accountId | String | 1986114****4305 |
账号ID。 |
apiVersion | String | 2016-08-15 |
API的版本。 |
certConfig | CertConfig |
HTTPS证书的配置信息。 |
|
createdTime | String | 2020-07-27T08:02:19Z |
域名的创建时间。 |
domainName | String | example.com |
域名。 |
lastModifiedTime | String | 2020-07-27T08:02:19Z |
域名上一次被更新的时间。 |
protocol | String | HTTP |
域名支持的协议类型。
|
routeConfig | RouteConfig |
路由表:定义域名访问时的PATH到Function的映射。 |
示例
请求示例
GET /2016-08-15/custom-domains HTTP/1.1
公共请求头
{
"startKey":"next_service",
"nextToken":"next_service",
"prefix":"prefix_text",
"limit":"20"
}
正常返回示例
JSON
格式
HTTP/1.1 200 OK
公共响应头
{
"customDomains": [
{
"domainName": "example.com",
"accountId": "1986114****4305",
"protocol": "HTTP",
"certConfig": {
"certName":/login/,
"privateKey":-----BEGIN RSA PRIVATE KEY-----xxxxx-----END RSA PRIVATE KEY-----,
"certificate":-----BEGIN CERTIFICATE-----xxxxx-----END CERTIFICATE-----
},
"apiVersion": "2016-08-15",
"routeConfig": {
"routes": [
{
"path": "/login/*",
"serviceName": "service_name",
"functionName": "function_name",
"qualifier":test,
"methods":GET
}
]
},
"createdTime": "2020-07-27T08:02:19Z",
"lastModifiedTime": "2020-07-27T08:02:19Z"
},
{
"domainName": "example.com",
"accountId": "1986114****4305",
"protocol": "HTTP",
"certConfig": {
"certName":/login/,
"privateKey":-----BEGIN RSA PRIVATE KEY-----xxxxx-----END RSA PRIVATE KEY-----,
"certificate":-----BEGIN CERTIFICATE-----xxxxx-----END CERTIFICATE-----
},
"apiVersion": "2016-08-15",
"routeConfig": {
"routes": [
{
"path": "/1",
"serviceName": "service_name1",
"functionName": "function_name1",
"qualifier": "LATEST",
"methods":GET
},
{
"path": "/*",
"serviceName": "service_name2",
"functionName": "function_name2",
"qualifier": "LATEST",
"methods":GET
}
]
},
"createdTime": "2020-03-16T07:04:39Z",
"lastModifiedTime": "2020-05-06T01:24:30Z"
}
],
"nextToken": "fc-thinkphp-demo.functioncompute.com"
}