Domain name for API request: teo.intl.tencentcloudapi.com.
This API is on an earlier version. If you want to call it, switch to the latest version. For details, see [Create Layer 4 Proxy Forwarding Rule].
](https://www.tencentcloud.com/document/product/1552/103416?from_cn_redirect=1) .
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: CreateApplicationProxyRule. |
| Version | Yes | String | Common Params. The value used for this API: 2022-09-01. |
| Region | No | String | Common Params. This parameter is not required. |
| ZoneId | Yes | String | Site ID. |
| ProxyId | Yes | String | Proxy ID. |
| Proto | Yes | String | Protocol. Valid values: |
| Port.N | Yes | Array of String | Port. Supported formats: |
| OriginType | Yes | String | Origin server type. Valid values:custom: Manually added; |
| OriginValue.N | Yes | Array of String | Details of the origin server:["8.8.8.8","9.9.9.9"] or OriginValue=["test.com"]; |
| ForwardClientIp | No | String | Passing the client IP address. Valid values: |
| SessionPersist | No | Boolean | Whether to enable session persistence. Valid values: |
| SessionPersistTime | No | Integer | Duration for session persistence, in seconds. The value takes effect only when SessionPersist is true. |
| OriginPort | No | String | Origin server port. Supported formats: |
| RuleTag | No | String | Rule tag. The default value is an empty string. |
| Parameter Name | Type | Description |
|---|---|---|
| RuleId | String | Rule ID |
| 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. |
Create an application proxy rule
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateApplicationProxyRule
<Common request parameters>
{
"ZoneId": "zone-21xfqlh4qjee",
"ProxyId": "proxy-19389e5dwwxfs",
"Proto": "TCP",
"Port": [
"99-110"
],
"OriginType": "custom",
"OriginValue": [
"1.1.1.1"
],
"OriginPort": "99-110",
"ForwardClientIp": "TOA",
"SessionPersist": false,
"RuleTag": "rule-service-1"
}
{
"Response": {
"RequestId": "3df3e931-3159-4337-adc7-7604e01e0fa9",
"RuleId": "rule-a8f0d49a-33d7-11ed-9b89-52540005c111"
}
}
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. |
| InternalError.ProxyServer | Unknown error occurs on the real server. |
| InvalidParameter.InvalidOriginIp | Private IP addresses or loopback addresses are not supported as the origin server address. |
| InvalidParameter.InvalidRuleProto | Rule protocol error. (TCP/UDP). |
| InvalidParameter.ParameterError | Parameter error: invalid "end time", not in the allowed query range: [start time, start + 7 days] |
| InvalidParameter.RuleOriginFormatError | Rule origin server information format error. |
| InvalidParameter.RuleOriginMultiDomain | The rule source does not support multiple domains. |
| InvalidParameter.RuleOriginPortInteger | Rule origin server port must be an integer. |
| InvalidParameter.RuleOriginValueError | Rule origin site error. |
| InvalidParameter.RulePortDuplicating | Rule port duplication. |
| InvalidParameter.RulePortGroup | Rule port range error. |
| InvalidParameter.RulePortInteger | Rule port must be an integer. |
| OperationDenied | Operation denied. |
| ResourceNotFound | The resource does not exist. |
| UnauthorizedOperation.CamUnauthorized | Unauthorized Cam operation. |
フィードバック