AddResolverRule
Creates a forwarding rule.
Operation description
Precautions
If the outbound VPC and the inbound VPC are the same VPC, the IP address of the external DNS system in the forwarding rule associated with the outbound endpoint cannot be the same as the IP address of the inbound endpoint service. Otherwise, a request loop occurs and causes resolution failures.
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 |
No |
The name of the forwarding rule. Specify a name based on your business requirements and the business meaning. |
test |
| Type |
string |
No |
The type of the forwarding rule. Valid values:
Note
You cannot change this value after the forwarding rule is created. |
OUTBOUND |
| ZoneName |
string |
Yes |
The domain name (zone) for which DNS resolution requests need to be forwarded. 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 is used to forward DNS query traffic to the IP addresses specified in the destination IP address list. |
hr**** |
| ForwardIp |
array<object> |
Yes |
The IP addresses and ports of the external DNS system. The IP addresses and ports of the destination servers to which DNS query traffic is forwarded. You can specify up to 6 IP addresses and ports. Both private and private IP addresses are supported. Note
If the external DNS server you specify uses a private IP address and the ECS instances in the VPC of the outbound endpoint do not have private IP addresses, activate a NAT gateway and configure SNAT entries for the VPC NAT gateway. |
|
|
object |
No |
The information about the forwarding destination. |
||
| Ip |
string |
Yes |
The IP address of the forwarding destination. Note
IP addresses in the following CIDR blocks are reserved for the system and cannot be configured as IP addresses of the external DNS system: 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 forwarding destination. |
8080 |
| Lang |
string |
No |
The language of the response. Valid values:
Default value: en. |
en |
| Vpcs |
array<object> |
No |
The list of VPCs associated with the forwarding rule. |
|
|
object |
No |
|||
| VpcUserId |
integer |
No |
The ID of the user to which the VPC belongs. |
1344387 |
| VpcType |
string |
No |
The type of the VPC. |
STANDARD |
| RegionId |
string |
No |
The ID of the region where the VPC resides. |
cn-shenzhen |
| VpcId |
string |
No |
The ID of the VPC. |
vpc-bp1abcdefghijklmno |
| EdgeDnsClusters |
array<object> |
No |
The list of self-managed DNS clusters associated with the forwarding rule. |
|
|
object |
No |
|||
| ClusterId |
string |
No |
The ID of the self-managed DNS cluster. |
ec-1234567890123456789 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. |
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****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.