The AddResolverRule operation adds a forwarding rule.
Operation description
If the outbound VPC and the inbound VPC are the same, the IP address of the external DNS system in the forwarding rule for the outbound endpoint cannot be the same as the IP address of the inbound endpoint service. This is because if the IP addresses are the same, a request loopback occurs and DNS resolution fails.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
pvtz:AddResolverRule |
create |
*Endpoint
*Rule
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Name |
string |
Yes |
The name of the forwarding rule. Name the rule as needed. |
test |
| Type |
string |
No |
The type of the forwarding rule. The only valid value is OUTBOUND. This value indicates that DNS queries are forwarded to an external IP address. Note
You cannot change this value after the forwarding rule is created. |
OUTBOUND |
| ZoneName |
string |
Yes |
The domain name (zone) for which you want to forward DNS queries. Note
You cannot change this value after the forwarding rule is created. |
example.com |
| EndpointId |
string |
No |
The ID of the outbound endpoint. The outbound endpoint forwards DNS queries to the specified destination IP addresses. |
hr**** |
| ForwardIp |
array<object> |
Yes |
The IP addresses and ports of the destination servers in the external DNS system to which DNS queries are forwarded. You can specify up to 6 destination servers. Both private and public IP addresses are supported. Note
If you specify public IP addresses for the external DNS servers, and the Elastic Compute Service (ECS) instances in the VPC of the outbound endpoint do not have public IP addresses, enable a NAT Gateway and configure SNAT entries. |
|
|
object |
No |
The information about the destination server. |
||
| Ip |
string |
Yes |
The IP address of the destination server. Note
The IP addresses in the following ranges are reserved by the system and cannot be used as the IP addresses of external DNS systems: 100.100.2.136 to 100.100.2.138 and 100.100.2.116 to 100.100.2.118. |
172.16.XX.XX |
| Port |
integer |
Yes |
The port number of the destination server. |
8080 |
| Lang |
string |
No |
The language of the response. Valid values:
Default value: en. |
en |
| Vpcs |
array<object> |
No |
||
|
object |
No |
|||
| VpcUserId |
integer |
No |
||
| VpcType |
string |
No |
||
| RegionId |
string |
No |
||
| VpcId |
string |
No |
||
| EdgeDnsClusters |
array<object> |
No |
||
|
object |
No |
|||
| ClusterId |
string |
No |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
725B8BED-901F-480C-BBAC-FA59A18580C1 |
| RuleId |
string |
The ID of the forwarding rule. |
hr**** |
Examples
Success response
JSON format
{
"RequestId": "725B8BED-901F-480C-BBAC-FA59A18580C1",
"RuleId": "hr****\n"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.