You can call this operation to update a custom domain name.

Request headers

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

Request syntax

PUT /custom-domains/{domainaName} 

Request parameters

Parameter Type Position Required Example Description
Object Body Yes

The definition of the domain name.

certConfig CertConfig Body Yes

The configurations of the HTTPS certificate.

domainName String Body Yes example.com

The domain name.

protocol String Body Yes HTTP

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

  • HTTP
  • HTTP,HTTPS
routeConfig RouteConfig Body Yes

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

Response parameters

Parameter Type Example Description
accountId String 1986114****4305

The account ID.

apiVersion String 2016-08-15

The version of the API.

certConfig CertConfig

The configuration 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:49:52Z

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

PUT /2016-08-15/custom-domains/example.com HTTP/1.1             

Sample success responses

JSON format

HTTP/1.1 200 OK 
Common response headers {   "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:49:52Z" }