All Products
Search
Document Center

Function Compute:ListCustomDomains

Last Updated:Aug 21, 2025

You can call this operation to view the list of custom domain names.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. You can use OpenAPI Explorer to search for API operations, call API operations, and dynamically generate SDK sample codes.

Request headers

This operation uses only common request headers. For more information, see Common parameters.

Request syntax

GET /custom-domains 

Request parameters

Parameter

Type

Position

Required

Example

Description

limit

Integer

Query

No

20

The maximum number of resources to return. Default value: 20. Maximum value: 100. The number of results is less than or equal to the specified number.

nextToken

String

Query

No

next_service

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 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 resources must contain.

startKey

String

Query

No

next_service

The starting position of the result list. Results are sorted in the alphabetical order and those results following startKey (inclusive) are listed.

Response parameters

Parameter

Type

Example

Description

nextToken

String

example.com

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 invocations to obtain more results. You do not need to provide this parameter in the first invocation.

customDomains

Array

The custom domain names.

accountId

String

1986114****4305

The account ID.

apiVersion

String

2016-08-15

The version of the API.

certConfig

CertConfig

The configurations of the HTTPS certificate.

createdTime

String

2020-07-27T08:02:19Z

The time when the domain name was created.

domainName

String

example.com

The domain name.

lastModifiedTime

String

2020-07-27T08:02:19Z

The last time when the domain name was updated.

protocol

String

HTTP

The protocol types supported by the domain name. Valid values:

  • HTTP

  • HTTP,HTTPS

routeConfig

RouteConfig

The route table that maps paths to functions when the functions are invoked by using the custom domain name.

Examples

Sample requests

GET /2016-08-15/custom-domains HTTP/1.1
            

Sample success responses

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "nextToken" : "example.com",
  "customDomains" : [ {
    "accountId" : "19861144305****",
    "apiVersion" : "2016-08-15",
    "certConfig" : {
      "certificate" : "-----BEGIN CERTIFICATE----- xxxxx -----END CERTIFICATE-----",
      "privateKey" : "-----BEGIN RSA PRIVATE KEY----- xxxxx -----END RSA PRIVATE KEY-----"
    },
    "createdTime" : "2020-07-27T08:02:19Z",
    "domainName" : "example.com",
    "lastModifiedTime" : "2020-07-27T08:02:19Z",
    "protocol" : "HTTP",
    "routeConfig" : {
      "routes" : [ {
        "functionName" : "f1",
        "methods" : [ "GET" ],
        "path" : "/login",
        "qualifier" : "prod",
        "serviceName" : "s1"
      } ]
    }
  } ]
}