创建私网DNS终端节点
接口说明
使用本接口创建一条对经过 NAT 防火墙流量放行、拒绝或观察的策略。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| AccessInstanceName |
string |
是 |
私有实例名称。 |
测试 |
| PrivateDnsType |
string |
是 |
私有 DNS 类型。取值:
|
Custom |
| RegionNo |
string |
是 |
实例所在的地域 ID。 |
cn-hangzhou |
| VpcId |
string |
是 |
VPC 实例 ID。 |
vpc-uf6b5lyul0x****** |
| PrimaryVSwitchId |
string |
否 |
主交换机 id。 |
vsw-uf6b0dkyryer8****** |
| StandbyVSwitchId |
string |
否 |
备交换机 id。 |
vsw-8vb6jk75wfcwn****** |
| PrimaryVSwitchIp |
string |
否 |
主交换机 ip。 |
10.1.1.1 |
| StandbyVSwitchIp |
string |
否 |
备交换机 ip。 |
10.2.2.2 |
| IpProtocol |
string |
否 |
IP 协议。取值:
|
UDP |
| Port |
integer |
否 |
端口号。 |
80 |
| FirewallType |
array |
是 |
云防火墙类型。取值:
|
|
|
string |
否 |
云防火墙类型。取值:
|
[ "internet", "vpc", "nat" ] |
|
| PrimaryDns |
string |
否 |
主 DNS。 |
1.1.1.1 |
| StandbyDns |
string |
否 |
备 DNS。 |
1.1.1.2 |
| MemberUid |
integer |
否 |
阿里云成员账号的 UID。 |
258039427902**** |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| RequestId |
string |
Id of the request |
850A84D6************00090125EEB1 |
| AccessInstanceId |
string |
实例 ID |
pd-12345 |
| TaskId |
string |
任务 Id,任务的唯一标识。 |
132 |
示例
正常返回示例
JSON格式
{
"RequestId": "850A84D6************00090125EEB1",
"AccessInstanceId": "pd-12345",
"TaskId": "132"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | ErrorPrivateDnsType | private dns type error. | 私有DNS类型错误 |
| 400 | ErrorPrivateDnsPrivateZoneConfigure | private dns parameter error. | 私有DNS配置参数错误 |
| 400 | ErrorVswitchId | vswitch id error. | 交换机错误 |
| 400 | ErrorVswitchIpAddress | vswitch ip error. | 交换机IP错误 |
| 400 | ErrorPrivateDnsIpAddress | private dns ip address error. | 私有DNS IP错误 |
| 400 | ErrorVswitchNoAvailableIP | the vswitch has no available ip. | 指定的交换机无可用IP |
| 400 | ErrorVfwVpcNoAvailable | the vpc is cloud firewall vpc, please reselect vpc. | 指定的VPC是云防火墙自动创建的VPC, 请重新选择VPC |
| 400 | ErrorProxyVswitchNoAvailable | the vswitch is cloud firewall vswitch, please reselect vswitch. | 指定的交换机是NAT防火墙自动创建的交换机, 请重新选择交换机 |
| 400 | ErrorFirewallTypeDuplicates | firewallType duplicates. | 选择的防火墙边界已存在私有DNS终端节点 |
| 400 | ErrorPrivateDnsIpSame | the primary and backup DNS IP cannot be the same. | 私有DNS的主备DNS IP不能相同 |
| 400 | ErrorPrivateDnsEndpointQuotaExceeded | Private DNS endpoint resource exceeds the quota limit. | 私网DNS同步节点资源超过配额限制。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。