Microsoft.Network.PublicIpAddressCombo UI 元素Microsoft.Network.PublicIpAddressCombo UI element

一组用于选择新的或现有公共 IP 地址的控件。A group of controls for selecting a new or existing public IP address.

UI 示例UI sample

Microsoft.Network.PublicIpAddressCombo

  • 如果用户针对公共 IP 地址选择了“None”,则域名标签文本框会被隐藏。If the user selects 'None' for public IP address, the domain name label text box is hidden.
  • 如果用户选择了一个现有公共 IP 地址,则域名标签文本框会被禁用。If the user selects an existing public IP address, the domain name label text box is disabled. 它的值是所选 IP 地址的域名标签。Its value is the domain name label of the selected IP address.
  • 域名后缀(例如 chinanorth.cloudapp.chinacloudapi.cn)会基于所选位置自动更新。The domain name suffix (for example, chinanorth.cloudapp.chinacloudapi.cn) updates automatically based on the selected location.

架构Schema

{
  "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
}

示例输出Sample output

如果用户未选择公共 IP 地址,则控件返回以下输出:If the user selects no public IP address, the control returns the following output:

{
  "newOrExistingOrNone": "none"
}

如果用户选择了新的或现有 IP 地址,则控件返回以下输出:If the user selects a new or existing IP address, the control returns the following output:

{
  "name": "ip01",
  "resourceGroup": "rg01",
  "domainNameLabel": "mydomain",
  "publicIPAllocationMethod": "Dynamic",
  "sku": "Basic",
  "newOrExistingOrNone": "new"
}
  • options.hideNone 指定为 true 时,newOrExistingOrNone 将仅具有值 newexistingWhen options.hideNone is specified as true, newOrExistingOrNone will only have a value of new or existing.
  • options.hideDomainNameLabel 指定为 true 时,将取消声明 domainNameLabelWhen options.hideDomainNameLabel is specified as true, domainNameLabel is undeclared.

备注Remarks

  • 如果 constraints.required.domainNameLabel 设置为 true,则用户在创建新的公共 IP 地址时必须提供域名标签。If constraints.required.domainNameLabel is set to true, the user must provide a domain name label when creating a new public IP address. 没有标签的现有公共 IP 地址不可供选择。Existing public IP addresses without a label aren't available for selection.
  • 如果 options.hideNone 设置为 true,则用于为公共 IP 地址选择 None 的选项会被隐藏。If options.hideNone is set to true, then the option to select None for the public IP address is hidden. 默认值是 false秒。The default value is false.
  • 如果 options.hideDomainNameLabel 设置为 true,则域名标签的文本框会被隐藏。If options.hideDomainNameLabel is set to true, then the text box for domain name label is hidden. 默认值是 false秒。The default value is false.
  • 如果 options.hideExisting 为 true,则用户无法选择现有的公共 IP 地址。If options.hideExisting is true, then the user isn't able to choose an existing public IP address. 默认值是 false秒。The default value is false.
  • 对于 zone,仅指定区域的公共 IP 地址或区域复原公共 IP 地址可用。For zone, only public IP addresses for the specified zone or zone resilient public IP addresses are available.

后续步骤Next steps