CreatePrivateDnsEndpoint
Creates a private DNS endpoint.
Operation description
Creates a private DNS firewall endpoint. When you call this operation, you must specify PrimaryVSwitchId. The region and zone of the primary and secondary vSwitches must support private DNS firewalls.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-cloudfirewall:CreatePrivateDnsEndpoint |
create |
*PrivateDNS
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| AccessInstanceName |
string |
Yes |
The name of the private instance. |
test |
| PrivateDnsType |
string |
Yes |
The private DNS type. If PrivateDnsType is set to Custom, Port and IpProtocol are conditionally required. If PrivateDnsType is set to PrivateZone, the backend automatically populates the values with 53 and the default protocol. Valid values:
|
Custom |
| RegionNo |
string |
Yes |
The region ID of the instance. |
cn-hangzhou |
| VpcId |
string |
Yes |
The VPC-connected instance ID. |
vpc-uf6b5lyul0x****** |
| PrimaryVSwitchId |
string |
No |
The ID of the primary vSwitch. This parameter is required. If this parameter is not specified, the error code -200103 is returned. The region and zone of the primary and secondary vSwitches specified by PrimaryVSwitchId and StandbyVSwitchId must support private DNS firewalls. |
vsw-uf6b0dkyryer8****** |
| StandbyVSwitchId |
string |
No |
The ID of the secondary vSwitch. The zones of the primary and secondary vSwitches specified by PrimaryVSwitchId and StandbyVSwitchId must support private DNS. Otherwise, the error code -200534 is returned. The region must also be in the supported list. |
vsw-8vb6jk75wfcwn****** |
| PrimaryVSwitchIp |
string |
No |
The IP address of the primary vSwitch. |
10.1.1.1 |
| StandbyVSwitchIp |
string |
No |
The IP address of the secondary vSwitch. |
10.2.2.2 |
| IpProtocol |
string |
No |
The IP protocol. Valid values:
|
UDP |
| Port |
integer |
No |
The port number. |
80 |
| FirewallType |
array |
Yes |
The Cloud Firewall type. Valid values:
|
|
|
string |
No |
The Cloud Firewall type. Valid values:
|
[ "internet", "vpc", "nat" ] |
|
| PrimaryDns |
string |
No |
The primary DNS server. Note
If PrivateDnsType is set to Custom, you must provide PrimaryDns and StandbyDns. |
1.1.1.1 |
| StandbyDns |
string |
No |
The secondary DNS server. Note
If PrivateDnsType is set to Custom, you must provide PrimaryDns and StandbyDns. |
1.1.1.2 |
| MemberUid |
integer |
No |
The UID of the Alibaba Cloud member accounts. |
258039427902**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
Id of the request |
850A84D6************00090125EEB1 |
| AccessInstanceId |
string |
The instance ID. |
pd-12345 |
| TaskId |
string |
The task ID, which uniquely identifies the task. |
132 |
Examples
Success response
JSON format
{
"RequestId": "850A84D6************00090125EEB1",
"AccessInstanceId": "pd-12345",
"TaskId": "132"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | ErrorPrivateDnsType | private dns type error. | Private DNS type error |
| 400 | ErrorPrivateDnsPrivateZoneConfigure | private dns parameter error. | Private DNS configuration parameter error |
| 400 | ErrorVswitchId | vswitch id error. | Switch Error |
| 400 | ErrorVswitchIpAddress | vswitch ip error. | Switch IP Error |
| 400 | ErrorPrivateDnsIpAddress | private dns ip address error. | Private DNS IP Error |
| 400 | ErrorVswitchNoAvailableIP | the vswitch has no available ip. | No IP available for the specified switch |
| 400 | ErrorVfwVpcNoAvailable | the vpc is cloud firewall vpc, please reselect vpc. | The specified VPC is automatically created by Cloud Firewall. Select a new VPC. |
| 400 | ErrorProxyVswitchNoAvailable | the vswitch is cloud firewall vswitch, please reselect vswitch. | The specified switch is a switch automatically created by the NAT firewall, please reselect the switch |
| 400 | ErrorFirewallTypeDuplicates | firewallType duplicates. | firewallType duplicates. |
| 400 | ErrorPrivateDnsIpSame | the primary and backup DNS IP cannot be the same. | The primary and secondary IP addresses of a private DNS cannot be the same. |
| 400 | ErrorPrivateDnsEndpointQuotaExceeded | Private DNS endpoint resource exceeds the quota limit. | The resources of the private network DNS synchronization node exceed the quota limit. |
| 400 | ErrorPrivateDnsPort | private dns port error | |
| 400 | ErrorPrivateDnsAzNotSupport | private dns is not supported in this availability zone |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.