Domain name for API request: clb.intl.tencentcloudapi.com.
An HTTPS:443 listener needs to be created first, along with a forwarding rule. When this API is called, an HTTP:80 listener will be created automatically if it did not exist and a forwarding rule corresponding to Domains (specified in the input parameter) under the HTTPS:443 listener will also be created. After successful creation, access requests to an HTTP:80 address will be redirected to an HTTPS:443 address automatically.
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: AutoRewrite. |
| Version | Yes | String | Common Params. The value used for this API: 2018-03-17. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
| LoadBalancerId | Yes | String | CLB instance ID |
| ListenerId | Yes | String | HTTPS:443 listener ID |
| Domains.N | No | Array of String | The domain name to be redirected under the listener HTTPS:443. If it is left empty, all domain names under the listener HTTPS:443 will be configured with redirects. |
| RewriteCodes.N | No | Array of Integer | Redirection status code. Valid values: 301, 302, and 307. |
| TakeUrls.N | No | Array of Boolean | Whether the matched URL is carried in redirection. |
| Parameter Name | Type | Description |
|---|---|---|
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
lbl-lmeeyb1q is an HTTPS:443 listener. www.abc.com is a domain name of a forwarding rule under this listener.
https://clb.intl.tencentcloudapi.com/?Action=AutoRewrite
&LoadBalancerId=lb-r6nx1iby
&ListenerId=lbl-lmeeyb1q
&Domains.0=www.abc.com
&<Common request parameters>
{
"Response": {
"RequestId": "e351bfdb-147a-4648-b9fe-bbcacff68789"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| FailedOperation | Operation failed. |
| FailedOperation.InvalidLBStatus | LB status exception. |
| InternalError | Internal error. |
| InvalidParameter | Parameter error. |
| InvalidParameter.FormatError | Incorrect parameter format. |
| InvalidParameter.LBIdNotFound | CLB instance ID error. |
| InvalidParameter.ListenerIdNotFound | Listener ID error. |
| InvalidParameter.LocationNotFound | Unable to find eligible forwarding rules. |
| InvalidParameter.PortCheckFailed | Listener port check due to port conflicts or other reasons. |
| InvalidParameter.ProtocolCheckFailed | Listener protocol check failed because, for example, the protocol used is incompatible with the corresponding operation. |
| InvalidParameter.RewriteAlreadyExist | The forwarding rule has been bound to a redirection relationship. |
| InvalidParameterValue | Parameter value error. |
| InvalidParameterValue.Length | Invalid parameter length. |
| LimitExceeded | The quota limit is exceeded. |
| ResourceInsufficient | Insufficient resources. |
| UnauthorizedOperation | Unauthorized operation. |
文档反馈