Help & DocumentationAPIsAPI GatewayService APIsService modifies custom domain name

Service modifies custom domain name

Last updated: 2020-02-21 16:20:39

Interface description

This API (ModifySubDomain) is used to modify the path mapping in the custom domain name settings of the service. You can modify the path mapping rules before binding the custom domain name.

Input Parameter

The following request parameter list only lists the API request parameters. For other parameters, please see Common Request Parameters .

Parameter name Required Type Description
ServiceId Yes String The service is a unique ID.
SubDomain Yes String The custom domain name of the path mapping to be modified.
IsDefaultMapping Yes String Whether to change to use the default path mapping. Use the default path mapping for the TRUE, representation and the custom path mapping for the FALSE, representation.
PathMappingSet.n.path No Object The path of the modified custom path map.
PathMappingSet.n.environment No Object The environment name of the modified custom path map.
Protocol No String The modified custom domain name Protocol type.
CertificateId No String This field should be passed when the certificate ID, Protocol contains HTTPS.

Output Parameter

Parameter name Type Description
Code Int Common error code, 0 indicates success, other values indicate failure. For more information, please see the error code page Common error code .
CodeDesc String Error code on the business side. If a Success, error is returned on success, the cause of the business error is returned.
Message String Module error message description, related to the interface.

Example

Sample input:

https://apigateway.api.qcloud.com/v2/index.php?
&<Common request parameters>
&Action=ModifySubDomain
&serviceId=service-XXXX
&subDomain=testSubDomain
&isDefaultMapping=FALSE
&pathMapping.0.path=/test
&pathMapping.0.environment=release

Sample output:

{
    "code":"0",
    "message":"",
    "codeDesc":"Success"
}