创建EIP DNAT规则 | 大装置帮助中心
跳到主要内容

创建EIP DNAT规则

名称

sco eip dnat create - 创建EIP DNAT规则

说明

eip dnat create <eip_name> <dnat_rule_name> -d <dnat_rule> [flags]

描述

创建EIP DNAT规则。

命令行标志

可选参数

  • --subscription=*SUBSCRIPTION*: 额外指定subscription信息
  • --resource-group=*RESOURCE_GROUP*: 额外指定resource group信息
  • --zone=*ZONE*: 额外指定zone信息
  • --debug: 输出调试信息

参数

  • <eip_name>: eip实例名。
  • <dnat_rule_name>: dnat规则名。
  • <dnat_rule>: dnat规则详情, 以json字符串形式指定。

示例

创建EIP eip-utvk9tc4 dnat-test1-ab019f9b规则:

sco eip dnat create eip-utvk9tc4 dnat-test1-ab019f9b -d '{
"id": "/resourceGroups/default/zones/cn-sh-01a/eips/eip-bosontest1-dc1b51d0/dnatRules/dnat-test1-ab019f9b",
"name": "dnat-test1-ab019f9b",
"display_name": "dnat-test1-ab019f9b",
"description": "",
"uid": "ab019f9a-ce3c-48b8-a174-d782e4943fbb",
"resource_type": "network.eip.v1.dnatRule",
"creator_id": "79663873-078a-4961-922a-744b3308e042",
"owner_id": "79663873-078a-4961-922a-744b3308e042",
"tenant_id": "f5e41c2b-9859-4c10-8b0a-78c02bf2a748",
"zone": "cn-sh-01a",
"state": "ACTIVE",
"sku_id": "",
"tags": {},
"properties": {
"nat_gateway_id": "16057f37-b99e-4b18-ac37-fbb6166887e1",
"eip_id": "0677bc17-b9d8-11ee-b15d-7678638a6e6f",
"external_ip": "47.113.76.77",
"external_port": "34",
"protocol": "tcp",
"internal_ip": "",
"internal_port": "2223",
"priority": 1,
"instance_type": "",
"internal_instance_name": "1c8e7972-a0b0-11ee-af11-da2e02cf27a2"
}
}'