Microsoft.Network.PublicIpAddressCombo UI 元素

一组用于选择新的或现有公共 IP 地址的控件。

UI 示例

Microsoft.Network.PublicIpAddressCombo

  • 如果用户针对公共 IP 地址选择了“None”,则域名标签文本框会被隐藏。
  • 如果用户选择了一个现有公共 IP 地址,则域名标签文本框会被禁用。 它的值是所选 IP 地址的域名标签。
  • 域名后缀(例如 chinanorth.cloudapp.chinacloudapi.cn)会基于所选位置自动更新。

架构

{
  "name": "element1",
  "type": "Microsoft.Network.PublicIpAddressCombo",
  "label": {
    "publicIpAddress": "Public IP address",
    "domainNameLabel": "Domain name label"
  },
  "toolTip": {
    "publicIpAddress": "",
    "domainNameLabel": ""
  },
  "defaultValue": {
    "publicIpAddressName": "ip01",
    "domainNameLabel": "mydomain"
  },
  "constraints": {
    "required": {
      "domainNameLabel": true
    }
  },
  "options": {
    "hideNone": false,
    "hideDomainNameLabel": false,
    "hideExisting": false,
    "zone": 3
  },
  "visible": true
}

示例输出

如果用户未选择公共 IP 地址,则控件返回以下输出:

{
  "newOrExistingOrNone": "none"
}

如果用户选择了新的或现有 IP 地址,则控件返回以下输出:

{
  "name": "ip01",
  "resourceGroup": "rg01",
  "domainNameLabel": "mydomain",
  "publicIPAllocationMethod": "Dynamic",
  "sku": "Basic",
  "newOrExistingOrNone": "new"
}
  • options.hideNone 指定为 true 时,newOrExistingOrNone 将仅具有值 newexisting
  • options.hideDomainNameLabel 指定为 true 时,将取消声明 domainNameLabel

备注

  • 如果 constraints.required.domainNameLabel 设置为 true,则用户在创建新的公共 IP 地址时必须提供域名标签。 没有标签的现有公共 IP 地址不可供选择。
  • 如果 options.hideNone 设置为 true,则用于为公共 IP 地址选择 None 的选项会被隐藏。 默认值是 false秒。
  • 如果 options.hideDomainNameLabel 设置为 true,则域名标签的文本框会被隐藏。 默认值是 false秒。
  • 如果 options.hideExisting 为 true,则用户无法选择现有的公共 IP 地址。 默认值是 false秒。
  • 对于 zone,仅指定区域的公共 IP 地址或区域复原公共 IP 地址可用。

后续步骤