Creates a forwarding rule.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | AddResolverRule |
The operation that you want to perform. Set the value to AddResolverRule. |
Lang | String | Yes | en |
The language. |
Name | String | Yes | Test |
The name of the forwarding rule. |
Type | String | Yes | OUTBOUND |
The type of the forwarding rule. Valid value:
|
ZoneName | String | Yes | example.com |
The domain name that requires DNS traffic forwarding. |
EndpointId | String | Yes | hra0** |
The ID of the endpoint. |
ForwardIp.N.Ip | String | Yes | 172.16.xx.xx |
The IP address of the destination external server. |
ForwardIp.N.Port | Integer | Yes | 8080 |
The port number of the destination external server. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 725B8BED-901F-480C-BBAC-FA59A18580C1 |
The ID of the request. |
RuleId | String | hra0** |
The ID of the forwarding rule. |
Examples
Sample request
http(s)://pvtz.aliyuncs.com/?Action=AddResolverRule
&Lang=en
&Name=Test
&Type=OUTBOUND
&ZoneName=example.com
&EndpointId=hra0**
&ForwardIp=[{"Ip":"172.16.xx.xx","Port":8080}]
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<AddResolverRuleResponse>
<RequestId>725B8BED-901F-480C-BBAC-FA59A18580C1</RequestId>
<RuleId>hra0**</RuleId>
</AddResolverRuleResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "725B8BED-901F-480C-BBAC-FA59A18580C1",
"RuleId" : "hra0**"
}
Error codes
For a list of error codes, visit the API Error Center.