你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Microsoft.Network 网络配置文件 2023-06-01

Bicep 资源定义

可以使用目标操作部署 networkProfiles 资源类型:

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.Network/networkProfiles 资源,请将以下 Bicep 添加到模板。

resource symbolicname 'Microsoft.Network/networkProfiles@2023-06-01' = {
  location: 'string'
  name: 'string'
  properties: {
    containerNetworkInterfaceConfigurations: [
      {
        id: 'string'
        name: 'string'
        properties: {
          containerNetworkInterfaces: [
            {
              id: 'string'
            }
          ]
          ipConfigurations: [
            {
              id: 'string'
              name: 'string'
              properties: {
                subnet: {
                  id: 'string'
                  name: 'string'
                  properties: {
                    addressPrefix: 'string'
                    addressPrefixes: [
                      'string'
                    ]
                    applicationGatewayIPConfigurations: [
                      {
                        id: 'string'
                        name: 'string'
                        properties: {
                          subnet: {
                            id: 'string'
                          }
                        }
                      }
                    ]
                    defaultOutboundAccess: bool
                    delegations: [
                      {
                        id: 'string'
                        name: 'string'
                        properties: {
                          serviceName: 'string'
                        }
                        type: 'string'
                      }
                    ]
                    ipAllocations: [
                      {
                        id: 'string'
                      }
                    ]
                    natGateway: {
                      id: 'string'
                    }
                    networkSecurityGroup: {
                      id: 'string'
                      location: 'string'
                      properties: {
                        flushConnection: bool
                        securityRules: [
                          {
                            id: 'string'
                            name: 'string'
                            properties: {
                              access: 'string'
                              description: 'string'
                              destinationAddressPrefix: 'string'
                              destinationAddressPrefixes: [
                                'string'
                              ]
                              destinationApplicationSecurityGroups: [
                                {
                                  id: 'string'
                                  location: 'string'
                                  properties: {}
                                  tags: {
                                    {customized property}: 'string'
                                  }
                                }
                              ]
                              destinationPortRange: 'string'
                              destinationPortRanges: [
                                'string'
                              ]
                              direction: 'string'
                              priority: int
                              protocol: 'string'
                              sourceAddressPrefix: 'string'
                              sourceAddressPrefixes: [
                                'string'
                              ]
                              sourceApplicationSecurityGroups: [
                                {
                                  id: 'string'
                                  location: 'string'
                                  properties: {}
                                  tags: {
                                    {customized property}: 'string'
                                  }
                                }
                              ]
                              sourcePortRange: 'string'
                              sourcePortRanges: [
                                'string'
                              ]
                            }
                            type: 'string'
                          }
                        ]
                      }
                      tags: {
                        {customized property}: 'string'
                      }
                    }
                    privateEndpointNetworkPolicies: 'string'
                    privateLinkServiceNetworkPolicies: 'string'
                    routeTable: {
                      id: 'string'
                      location: 'string'
                      properties: {
                        disableBgpRoutePropagation: bool
                        routes: [
                          {
                            id: 'string'
                            name: 'string'
                            properties: {
                              addressPrefix: 'string'
                              nextHopIpAddress: 'string'
                              nextHopType: 'string'
                            }
                            type: 'string'
                          }
                        ]
                      }
                      tags: {
                        {customized property}: 'string'
                      }
                    }
                    serviceEndpointPolicies: [
                      {
                        id: 'string'
                        location: 'string'
                        properties: {
                          contextualServiceEndpointPolicies: [
                            'string'
                          ]
                          serviceAlias: 'string'
                          serviceEndpointPolicyDefinitions: [
                            {
                              id: 'string'
                              name: 'string'
                              properties: {
                                description: 'string'
                                service: 'string'
                                serviceResources: [
                                  'string'
                                ]
                              }
                              type: 'string'
                            }
                          ]
                        }
                        tags: {
                          {customized property}: 'string'
                        }
                      }
                    ]
                    serviceEndpoints: [
                      {
                        locations: [
                          'string'
                        ]
                        service: 'string'
                      }
                    ]
                  }
                  type: 'string'
                }
              }
            }
          ]
        }
      }
    ]
  }
  tags: {
    {customized property}: 'string'
  }
}

属性值

Microsoft.Network/networkProfiles

名字 描述 价值
位置 资源位置。 字符串
名字 资源名称 string (必需)
性能 网络配置文件属性。 NetworkProfilePropertiesFormat
标签 资源标记 标记名称和值的字典。 请参阅模板 中的 标记

ApplicationGatewayIPConfiguration

名字 描述 价值
身份证 资源 ID。 字符串
名字 应用程序网关中唯一的 IP 配置的名称。 字符串
性能 应用程序网关 IP 配置的属性。 ApplicationGatewayIPConfigurationPropertiesFormat

ApplicationGatewayIPConfigurationPropertiesFormat

名字 描述 价值
对子网资源的引用。 应用程序网关从中获取其专用地址的子网。 子资源

ApplicationSecurityGroup 应用程序安全组

名字 描述 价值
身份证 资源 ID。 字符串
位置 资源位置。 字符串
性能 应用程序安全组的属性。 ApplicationSecurityGroupPropertiesFormat
标签 资源标记。 资源标签

ApplicationSecurityGroupPropertiesFormat

名字 描述 价值

ContainerNetworkInterfaceConfiguration

名字 描述 价值
身份证 资源 ID。 字符串
名字 资源的名称。 此名称可用于访问资源。 字符串
性能 容器网络接口配置属性。 ContainerNetworkInterfaceConfigurationPropertiesFormat

ContainerNetworkInterfaceConfigurationPropertiesFormat

名字 描述 价值
containerNetwork接口 从此容器网络接口配置创建的容器网络接口的列表。 子资源[]
ip配置 容器网络接口配置的 IP 配置列表。 IPConfigurationProfile[]

代表团

名字 描述 价值
身份证 资源 ID。 字符串
名字 子网中唯一的资源的名称。 此名称可用于访问资源。 字符串
性能 子网的属性。 ServiceDelegationPropertiesFormat
类型 资源类型。 字符串

IPConfigurationProfile

名字 描述 价值
身份证 资源 ID。 字符串
名字 资源的名称。 此名称可用于访问资源。 字符串
性能 IP 配置文件的属性。 IPConfigurationProfilePropertiesFormat

IPConfigurationProfilePropertiesFormat

名字 描述 价值
对用于创建容器网络接口 IP 配置的子网资源的引用。 子网

NetworkProfilePropertiesFormat

名字 描述 价值
containerNetworkInterface配置 chid 容器网络接口配置列表。 ContainerNetworkInterfaceConfiguration[]

网络安全组

名字 描述 价值
身份证 资源 ID。 字符串
位置 资源位置。 字符串
性能 网络安全组的属性。 NetworkSecurityGroupPropertiesFormat
标签 资源标记。 资源标签

NetworkSecurityGroupPropertiesFormat

名字 描述 价值
flush连接 启用后,当规则更新时,将从网络安全组连接创建的流重新评估。 初始启用将触发重新评估。 布尔
securityRules 安全规则 网络安全组的安全规则集合。 SecurityRule[]

资源标签

名字 描述 价值

资源标签

名字 描述 价值

资源标签

名字 描述 价值

资源标签

名字 描述 价值

资源标签

名字 描述 价值

路线

名字 描述 价值
身份证 资源 ID。 字符串
名字 资源组中唯一的资源的名称。 此名称可用于访问资源。 字符串
性能 路由的属性。 RoutePropertiesFormat
类型 资源的类型。 字符串

RoutePropertiesFormat

名字 描述 价值
addressPrefix 的 路由应用到的目标 CIDR。 字符串
nextHopIp地址 IP 地址数据包应转发到。 只有在下一跃点类型为 VirtualAppliance 的路由中才允许下一跃点值。 字符串
nextHopType 应将数据包发送到的 Azure 跃点的类型。 “Internet”
“None”
“VirtualAppliance”
“VirtualNetworkGateway”
“VnetLocal”(必需)

路由表

名字 描述 价值
身份证 资源 ID。 字符串
位置 资源位置。 字符串
性能 路由表的属性。 RouteTablePropertiesFormat
标签 资源标记。 资源标签

RouteTablePropertiesFormat

名字 描述 价值
禁用 BgpRoutePropagation 是否禁用 BGP 在该路由表上学习的路由。 True 表示禁用。 布尔
路线 路由表中包含的路由的集合。 路由[]

SecurityRule 安全规则

名字 描述 价值
身份证 资源 ID。 字符串
名字 资源组中唯一的资源的名称。 此名称可用于访问资源。 字符串
性能 安全规则的属性。 SecurityRulePropertiesFormat
类型 资源的类型。 字符串

SecurityRulePropertiesFormat

名字 描述 价值
访问 允许或拒绝网络流量。 “允许”
“拒绝”(必需)
描述 此规则的说明。 限制为 140 个字符。 字符串
destinationAddressPrefix 的 目标地址前缀。 CIDR 或目标 IP 范围。 星号“*”还可用于匹配所有源 IP。 也可以使用默认标记,例如“VirtualNetwork”、“AzureLoadBalancer”和“Internet”。 字符串
destinationAddress前缀 目标地址前缀。 CIDR 或目标 IP 范围。 字符串[]
destinationApplicationSecurityGroups 指定为目标的应用程序安全组。 ApplicationSecurityGroup[]
destinationPortRange 目标端口或范围。 介于 0 和 65535 之间的整数或范围。 星号“*”也可用于匹配所有端口。 字符串
destinationPortRanges 目标端口范围。 字符串[]
方向 规则的方向。 该方向指定在传入或传出流量上是否评估规则。 “Inbound”
“出站”(必需)
优先权 规则的优先级。 该值可以介于 100 和 4096 之间。 对于集合中的每个规则,优先级编号必须是唯一的。 优先级编号越低,规则优先级越高。 int (必需)
协议 此规则适用于的网络协议。 '*'
“Ah”
“Esp”
“Icmp”
“Tcp”
“Udp”(必需)
sourceAddressPrefix 的 CIDR 或源 IP 范围。 星号“*”还可用于匹配所有源 IP。 也可以使用默认标记,例如“VirtualNetwork”、“AzureLoadBalancer”和“Internet”。 如果这是入口规则,则指定网络流量的来源。 字符串
sourceAddress前缀 CIDR 或源 IP 范围。 字符串[]
sourceApplicationSecurityGroups 指定为源的应用程序安全组。 ApplicationSecurityGroup[]
sourcePortRange 源端口或范围。 介于 0 和 65535 之间的整数或范围。 星号“*”也可用于匹配所有端口。 字符串
sourcePort范围 源端口范围。 字符串[]

ServiceDelegationPropertiesFormat

名字 描述 价值
服务名称 应向其委托子网的服务的名称(例如Microsoft.Sql/servers)。 字符串

ServiceEndpointPolicy

名字 描述 价值
身份证 资源 ID。 字符串
位置 资源位置。 字符串
性能 服务终结点策略的属性。 ServiceEndpointPolicyPropertiesFormat
标签 资源标记。 资源标签

ServiceEndpointPolicyDefinition

名字 描述 价值
身份证 资源 ID。 字符串
名字 资源组中唯一的资源的名称。 此名称可用于访问资源。 字符串
性能 服务终结点策略定义的属性。 ServiceEndpointPolicyDefinitionPropertiesFormat
类型 资源的类型。 字符串

ServiceEndpointPolicyDefinitionPropertiesFormat

名字 描述 价值
描述 此规则的说明。 限制为 140 个字符。 字符串
服务 服务终结点名称。 字符串
服务资源 服务资源列表。 字符串[]

ServiceEndpointPolicyPropertiesFormat

名字 描述 价值
contextualServiceEndpoint策略 上下文服务终结点策略的集合。 字符串[]
service别名 指示策略是否属于服务的别名 字符串
serviceEndpointPolicyDefinitions 服务终结点策略的服务终结点策略定义的集合。 ServiceEndpointPolicyDefinition[]

ServiceEndpointPropertiesFormat

名字 描述 价值
地点 位置列表。 字符串[]
服务 终结点服务的类型。 字符串

名字 描述 价值
身份证 资源 ID。 字符串
名字 资源组中唯一的资源的名称。 此名称可用于访问资源。 字符串
性能 子网的属性。 SubnetPropertiesFormat
类型 资源类型。 字符串

SubnetPropertiesFormat

名字 描述 价值
addressPrefix 的 子网的地址前缀。 字符串
address前缀 子网的地址前缀列表。 字符串[]
applicationGatewayIPConfigurations 虚拟网络资源的应用程序网关 IP 配置。 ApplicationGatewayIPConfiguration[]
defaultOutboundAccess 将此属性设置为 false,以禁用子网中所有 VM 的默认出站连接。 此属性只能在创建子网时设置,并且不能为现有子网更新。 布尔
代表团 对子网上的委派的引用数组。 委派[]
IP 分配 引用此子网的 IpAllocation 数组。 子资源[]
natGateway 网关 与此子网关联的 Nat 网关。 子资源
networkSecurityGroup 对 NetworkSecurityGroup 资源的引用。 网络安全组
privateEndpointNetwork策略 在子网中的专用终结点上启用或禁用应用网络策略。 “Disabled”
“Enabled”
privateLinkServiceNetwork策略 在子网中的专用链接服务上启用或禁用应用网络策略。 “Disabled”
“Enabled”
routeTable 对 RouteTable 资源的引用。 路由表
serviceEndpoint策略 服务终结点策略数组。 ServiceEndpointPolicy[]
serviceEndpoints 服务终结点数组。 ServiceEndpointPropertiesFormat[]

子资源

名字 描述 价值
身份证 资源 ID。 字符串

用法示例

Azure 快速入门示例

以下 Azure 快速入门模板 包含用于部署此资源类型的 Bicep 示例。

Bicep 文件 描述
Azure Cloud Shell - VNet 此模板将 Azure Cloud Shell 资源部署到 Azure 虚拟网络。
Azure 容器实例 - VNet 将容器实例部署到 Azure 虚拟网络。
使用容器实例和应用程序网关 Front Door 此模板使用容器组和应用程序网关创建 Front Door 标准版/高级版。

ARM 模板资源定义

可以使用目标操作部署 networkProfiles 资源类型:

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.Network/networkProfiles 资源,请将以下 JSON 添加到模板。

{
  "type": "Microsoft.Network/networkProfiles",
  "apiVersion": "2023-06-01",
  "name": "string",
  "location": "string",
  "properties": {
    "containerNetworkInterfaceConfigurations": [
      {
        "id": "string",
        "name": "string",
        "properties": {
          "containerNetworkInterfaces": [
            {
              "id": "string"
            }
          ],
          "ipConfigurations": [
            {
              "id": "string",
              "name": "string",
              "properties": {
                "subnet": {
                  "id": "string",
                  "name": "string",
                  "properties": {
                    "addressPrefix": "string",
                    "addressPrefixes": [ "string" ],
                    "applicationGatewayIPConfigurations": [
                      {
                        "id": "string",
                        "name": "string",
                        "properties": {
                          "subnet": {
                            "id": "string"
                          }
                        }
                      }
                    ],
                    "defaultOutboundAccess": "bool",
                    "delegations": [
                      {
                        "id": "string",
                        "name": "string",
                        "properties": {
                          "serviceName": "string"
                        },
                        "type": "string"
                      }
                    ],
                    "ipAllocations": [
                      {
                        "id": "string"
                      }
                    ],
                    "natGateway": {
                      "id": "string"
                    },
                    "networkSecurityGroup": {
                      "id": "string",
                      "location": "string",
                      "properties": {
                        "flushConnection": "bool",
                        "securityRules": [
                          {
                            "id": "string",
                            "name": "string",
                            "properties": {
                              "access": "string",
                              "description": "string",
                              "destinationAddressPrefix": "string",
                              "destinationAddressPrefixes": [ "string" ],
                              "destinationApplicationSecurityGroups": [
                                {
                                  "id": "string",
                                  "location": "string",
                                  "properties": {
                                  },
                                  "tags": {
                                    "{customized property}": "string"
                                  }
                                }
                              ],
                              "destinationPortRange": "string",
                              "destinationPortRanges": [ "string" ],
                              "direction": "string",
                              "priority": "int",
                              "protocol": "string",
                              "sourceAddressPrefix": "string",
                              "sourceAddressPrefixes": [ "string" ],
                              "sourceApplicationSecurityGroups": [
                                {
                                  "id": "string",
                                  "location": "string",
                                  "properties": {
                                  },
                                  "tags": {
                                    "{customized property}": "string"
                                  }
                                }
                              ],
                              "sourcePortRange": "string",
                              "sourcePortRanges": [ "string" ]
                            },
                            "type": "string"
                          }
                        ]
                      },
                      "tags": {
                        "{customized property}": "string"
                      }
                    },
                    "privateEndpointNetworkPolicies": "string",
                    "privateLinkServiceNetworkPolicies": "string",
                    "routeTable": {
                      "id": "string",
                      "location": "string",
                      "properties": {
                        "disableBgpRoutePropagation": "bool",
                        "routes": [
                          {
                            "id": "string",
                            "name": "string",
                            "properties": {
                              "addressPrefix": "string",
                              "nextHopIpAddress": "string",
                              "nextHopType": "string"
                            },
                            "type": "string"
                          }
                        ]
                      },
                      "tags": {
                        "{customized property}": "string"
                      }
                    },
                    "serviceEndpointPolicies": [
                      {
                        "id": "string",
                        "location": "string",
                        "properties": {
                          "contextualServiceEndpointPolicies": [ "string" ],
                          "serviceAlias": "string",
                          "serviceEndpointPolicyDefinitions": [
                            {
                              "id": "string",
                              "name": "string",
                              "properties": {
                                "description": "string",
                                "service": "string",
                                "serviceResources": [ "string" ]
                              },
                              "type": "string"
                            }
                          ]
                        },
                        "tags": {
                          "{customized property}": "string"
                        }
                      }
                    ],
                    "serviceEndpoints": [
                      {
                        "locations": [ "string" ],
                        "service": "string"
                      }
                    ]
                  },
                  "type": "string"
                }
              }
            }
          ]
        }
      }
    ]
  },
  "tags": {
    "{customized property}": "string"
  }
}

属性值

Microsoft.Network/networkProfiles

名字 描述 价值
apiVersion API 版本 '2023-06-01'
位置 资源位置。 字符串
名字 资源名称 string (必需)
性能 网络配置文件属性。 NetworkProfilePropertiesFormat
标签 资源标记 标记名称和值的字典。 请参阅模板 中的 标记
类型 资源类型 “Microsoft.Network/networkProfiles”

ApplicationGatewayIPConfiguration

名字 描述 价值
身份证 资源 ID。 字符串
名字 应用程序网关中唯一的 IP 配置的名称。 字符串
性能 应用程序网关 IP 配置的属性。 ApplicationGatewayIPConfigurationPropertiesFormat

ApplicationGatewayIPConfigurationPropertiesFormat

名字 描述 价值
对子网资源的引用。 应用程序网关从中获取其专用地址的子网。 子资源

ApplicationSecurityGroup 应用程序安全组

名字 描述 价值
身份证 资源 ID。 字符串
位置 资源位置。 字符串
性能 应用程序安全组的属性。 ApplicationSecurityGroupPropertiesFormat
标签 资源标记。 资源标签

ApplicationSecurityGroupPropertiesFormat

名字 描述 价值

ContainerNetworkInterfaceConfiguration

名字 描述 价值
身份证 资源 ID。 字符串
名字 资源的名称。 此名称可用于访问资源。 字符串
性能 容器网络接口配置属性。 ContainerNetworkInterfaceConfigurationPropertiesFormat

ContainerNetworkInterfaceConfigurationPropertiesFormat

名字 描述 价值
containerNetwork接口 从此容器网络接口配置创建的容器网络接口的列表。 子资源[]
ip配置 容器网络接口配置的 IP 配置列表。 IPConfigurationProfile[]

代表团

名字 描述 价值
身份证 资源 ID。 字符串
名字 子网中唯一的资源的名称。 此名称可用于访问资源。 字符串
性能 子网的属性。 ServiceDelegationPropertiesFormat
类型 资源类型。 字符串

IPConfigurationProfile

名字 描述 价值
身份证 资源 ID。 字符串
名字 资源的名称。 此名称可用于访问资源。 字符串
性能 IP 配置文件的属性。 IPConfigurationProfilePropertiesFormat

IPConfigurationProfilePropertiesFormat

名字 描述 价值
对用于创建容器网络接口 IP 配置的子网资源的引用。 子网

NetworkProfilePropertiesFormat

名字 描述 价值
containerNetworkInterface配置 chid 容器网络接口配置列表。 ContainerNetworkInterfaceConfiguration[]

网络安全组

名字 描述 价值
身份证 资源 ID。 字符串
位置 资源位置。 字符串
性能 网络安全组的属性。 NetworkSecurityGroupPropertiesFormat
标签 资源标记。 资源标签

NetworkSecurityGroupPropertiesFormat

名字 描述 价值
flush连接 启用后,当规则更新时,将从网络安全组连接创建的流重新评估。 初始启用将触发重新评估。 布尔
securityRules 安全规则 网络安全组的安全规则集合。 SecurityRule[]

资源标签

名字 描述 价值

资源标签

名字 描述 价值

资源标签

名字 描述 价值

资源标签

名字 描述 价值

资源标签

名字 描述 价值

路线

名字 描述 价值
身份证 资源 ID。 字符串
名字 资源组中唯一的资源的名称。 此名称可用于访问资源。 字符串
性能 路由的属性。 RoutePropertiesFormat
类型 资源的类型。 字符串

RoutePropertiesFormat

名字 描述 价值
addressPrefix 的 路由应用到的目标 CIDR。 字符串
nextHopIp地址 IP 地址数据包应转发到。 只有在下一跃点类型为 VirtualAppliance 的路由中才允许下一跃点值。 字符串
nextHopType 应将数据包发送到的 Azure 跃点的类型。 “Internet”
“None”
“VirtualAppliance”
“VirtualNetworkGateway”
“VnetLocal”(必需)

路由表

名字 描述 价值
身份证 资源 ID。 字符串
位置 资源位置。 字符串
性能 路由表的属性。 RouteTablePropertiesFormat
标签 资源标记。 资源标签

RouteTablePropertiesFormat

名字 描述 价值
禁用 BgpRoutePropagation 是否禁用 BGP 在该路由表上学习的路由。 True 表示禁用。 布尔
路线 路由表中包含的路由的集合。 路由[]

SecurityRule 安全规则

名字 描述 价值
身份证 资源 ID。 字符串
名字 资源组中唯一的资源的名称。 此名称可用于访问资源。 字符串
性能 安全规则的属性。 SecurityRulePropertiesFormat
类型 资源的类型。 字符串

SecurityRulePropertiesFormat

名字 描述 价值
访问 允许或拒绝网络流量。 “允许”
“拒绝”(必需)
描述 此规则的说明。 限制为 140 个字符。 字符串
destinationAddressPrefix 的 目标地址前缀。 CIDR 或目标 IP 范围。 星号“*”还可用于匹配所有源 IP。 也可以使用默认标记,例如“VirtualNetwork”、“AzureLoadBalancer”和“Internet”。 字符串
destinationAddress前缀 目标地址前缀。 CIDR 或目标 IP 范围。 字符串[]
destinationApplicationSecurityGroups 指定为目标的应用程序安全组。 ApplicationSecurityGroup[]
destinationPortRange 目标端口或范围。 介于 0 和 65535 之间的整数或范围。 星号“*”也可用于匹配所有端口。 字符串
destinationPortRanges 目标端口范围。 字符串[]
方向 规则的方向。 该方向指定在传入或传出流量上是否评估规则。 “Inbound”
“出站”(必需)
优先权 规则的优先级。 该值可以介于 100 和 4096 之间。 对于集合中的每个规则,优先级编号必须是唯一的。 优先级编号越低,规则优先级越高。 int (必需)
协议 此规则适用于的网络协议。 '*'
“Ah”
“Esp”
“Icmp”
“Tcp”
“Udp”(必需)
sourceAddressPrefix 的 CIDR 或源 IP 范围。 星号“*”还可用于匹配所有源 IP。 也可以使用默认标记,例如“VirtualNetwork”、“AzureLoadBalancer”和“Internet”。 如果这是入口规则,则指定网络流量的来源。 字符串
sourceAddress前缀 CIDR 或源 IP 范围。 字符串[]
sourceApplicationSecurityGroups 指定为源的应用程序安全组。 ApplicationSecurityGroup[]
sourcePortRange 源端口或范围。 介于 0 和 65535 之间的整数或范围。 星号“*”也可用于匹配所有端口。 字符串
sourcePort范围 源端口范围。 字符串[]

ServiceDelegationPropertiesFormat

名字 描述 价值
服务名称 应向其委托子网的服务的名称(例如Microsoft.Sql/servers)。 字符串

ServiceEndpointPolicy

名字 描述 价值
身份证 资源 ID。 字符串
位置 资源位置。 字符串
性能 服务终结点策略的属性。 ServiceEndpointPolicyPropertiesFormat
标签 资源标记。 资源标签

ServiceEndpointPolicyDefinition

名字 描述 价值
身份证 资源 ID。 字符串
名字 资源组中唯一的资源的名称。 此名称可用于访问资源。 字符串
性能 服务终结点策略定义的属性。 ServiceEndpointPolicyDefinitionPropertiesFormat
类型 资源的类型。 字符串

ServiceEndpointPolicyDefinitionPropertiesFormat

名字 描述 价值
描述 此规则的说明。 限制为 140 个字符。 字符串
服务 服务终结点名称。 字符串
服务资源 服务资源列表。 字符串[]

ServiceEndpointPolicyPropertiesFormat

名字 描述 价值
contextualServiceEndpoint策略 上下文服务终结点策略的集合。 字符串[]
service别名 指示策略是否属于服务的别名 字符串
serviceEndpointPolicyDefinitions 服务终结点策略的服务终结点策略定义的集合。 ServiceEndpointPolicyDefinition[]

ServiceEndpointPropertiesFormat

名字 描述 价值
地点 位置列表。 字符串[]
服务 终结点服务的类型。 字符串

名字 描述 价值
身份证 资源 ID。 字符串
名字 资源组中唯一的资源的名称。 此名称可用于访问资源。 字符串
性能 子网的属性。 SubnetPropertiesFormat
类型 资源类型。 字符串

SubnetPropertiesFormat

名字 描述 价值
addressPrefix 的 子网的地址前缀。 字符串
address前缀 子网的地址前缀列表。 字符串[]
applicationGatewayIPConfigurations 虚拟网络资源的应用程序网关 IP 配置。 ApplicationGatewayIPConfiguration[]
defaultOutboundAccess 将此属性设置为 false,以禁用子网中所有 VM 的默认出站连接。 此属性只能在创建子网时设置,并且不能为现有子网更新。 布尔
代表团 对子网上的委派的引用数组。 委派[]
IP 分配 引用此子网的 IpAllocation 数组。 子资源[]
natGateway 网关 与此子网关联的 Nat 网关。 子资源
networkSecurityGroup 对 NetworkSecurityGroup 资源的引用。 网络安全组
privateEndpointNetwork策略 在子网中的专用终结点上启用或禁用应用网络策略。 “Disabled”
“Enabled”
privateLinkServiceNetwork策略 在子网中的专用链接服务上启用或禁用应用网络策略。 “Disabled”
“Enabled”
routeTable 对 RouteTable 资源的引用。 路由表
serviceEndpoint策略 服务终结点策略数组。 ServiceEndpointPolicy[]
serviceEndpoints 服务终结点数组。 ServiceEndpointPropertiesFormat[]

子资源

名字 描述 价值
身份证 资源 ID。 字符串

用法示例

Azure 快速入门模板

以下 Azure 快速入门模板 部署此资源类型。

模板 描述
Azure Cloud Shell - VNet

部署到 Azure
此模板将 Azure Cloud Shell 资源部署到 Azure 虚拟网络。
Azure 容器实例 - VNet

部署到 Azure
将容器实例部署到 Azure 虚拟网络。
在虚拟网络中创建 WordPress 站点

部署到 Azure
此模板在虚拟网络中的容器实例上创建 WordPress 站点。 并输出可访问 WordPress 站点的公共站点 FQDN。
使用容器实例和应用程序网关 Front Door

部署到 Azure
此模板使用容器组和应用程序网关创建 Front Door 标准版/高级版。

Terraform (AzAPI 提供程序)资源定义

可以使用目标操作部署 networkProfiles 资源类型:

  • 资源组

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.Network/networkProfiles 资源,请将以下 Terraform 添加到模板。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Network/networkProfiles@2023-06-01"
  name = "string"
  parent_id = "string"
  location = "string"
  tags = {
    {customized property} = "string"
  }
  body = {
    properties = {
      containerNetworkInterfaceConfigurations = [
        {
          id = "string"
          name = "string"
          properties = {
            containerNetworkInterfaces = [
              {
                id = "string"
              }
            ]
            ipConfigurations = [
              {
                id = "string"
                name = "string"
                properties = {
                  subnet = {
                    id = "string"
                    name = "string"
                    properties = {
                      addressPrefix = "string"
                      addressPrefixes = [
                        "string"
                      ]
                      applicationGatewayIPConfigurations = [
                        {
                          id = "string"
                          name = "string"
                          properties = {
                            subnet = {
                              id = "string"
                            }
                          }
                        }
                      ]
                      defaultOutboundAccess = bool
                      delegations = [
                        {
                          id = "string"
                          name = "string"
                          properties = {
                            serviceName = "string"
                          }
                          type = "string"
                        }
                      ]
                      ipAllocations = [
                        {
                          id = "string"
                        }
                      ]
                      natGateway = {
                        id = "string"
                      }
                      networkSecurityGroup = {
                        id = "string"
                        location = "string"
                        properties = {
                          flushConnection = bool
                          securityRules = [
                            {
                              id = "string"
                              name = "string"
                              properties = {
                                access = "string"
                                description = "string"
                                destinationAddressPrefix = "string"
                                destinationAddressPrefixes = [
                                  "string"
                                ]
                                destinationApplicationSecurityGroups = [
                                  {
                                    id = "string"
                                    location = "string"
                                    properties = {
                                    }
                                    tags = {
                                      {customized property} = "string"
                                    }
                                  }
                                ]
                                destinationPortRange = "string"
                                destinationPortRanges = [
                                  "string"
                                ]
                                direction = "string"
                                priority = int
                                protocol = "string"
                                sourceAddressPrefix = "string"
                                sourceAddressPrefixes = [
                                  "string"
                                ]
                                sourceApplicationSecurityGroups = [
                                  {
                                    id = "string"
                                    location = "string"
                                    properties = {
                                    }
                                    tags = {
                                      {customized property} = "string"
                                    }
                                  }
                                ]
                                sourcePortRange = "string"
                                sourcePortRanges = [
                                  "string"
                                ]
                              }
                              type = "string"
                            }
                          ]
                        }
                        tags = {
                          {customized property} = "string"
                        }
                      }
                      privateEndpointNetworkPolicies = "string"
                      privateLinkServiceNetworkPolicies = "string"
                      routeTable = {
                        id = "string"
                        location = "string"
                        properties = {
                          disableBgpRoutePropagation = bool
                          routes = [
                            {
                              id = "string"
                              name = "string"
                              properties = {
                                addressPrefix = "string"
                                nextHopIpAddress = "string"
                                nextHopType = "string"
                              }
                              type = "string"
                            }
                          ]
                        }
                        tags = {
                          {customized property} = "string"
                        }
                      }
                      serviceEndpointPolicies = [
                        {
                          id = "string"
                          location = "string"
                          properties = {
                            contextualServiceEndpointPolicies = [
                              "string"
                            ]
                            serviceAlias = "string"
                            serviceEndpointPolicyDefinitions = [
                              {
                                id = "string"
                                name = "string"
                                properties = {
                                  description = "string"
                                  service = "string"
                                  serviceResources = [
                                    "string"
                                  ]
                                }
                                type = "string"
                              }
                            ]
                          }
                          tags = {
                            {customized property} = "string"
                          }
                        }
                      ]
                      serviceEndpoints = [
                        {
                          locations = [
                            "string"
                          ]
                          service = "string"
                        }
                      ]
                    }
                    type = "string"
                  }
                }
              }
            ]
          }
        }
      ]
    }
  }
}

属性值

Microsoft.Network/networkProfiles

名字 描述 价值
位置 资源位置。 字符串
名字 资源名称 string (必需)
性能 网络配置文件属性。 NetworkProfilePropertiesFormat
标签 资源标记 标记名称和值的字典。
类型 资源类型 “Microsoft.Network/networkProfiles@2023-06-01”

ApplicationGatewayIPConfiguration

名字 描述 价值
身份证 资源 ID。 字符串
名字 应用程序网关中唯一的 IP 配置的名称。 字符串
性能 应用程序网关 IP 配置的属性。 ApplicationGatewayIPConfigurationPropertiesFormat

ApplicationGatewayIPConfigurationPropertiesFormat

名字 描述 价值
对子网资源的引用。 应用程序网关从中获取其专用地址的子网。 子资源

ApplicationSecurityGroup 应用程序安全组

名字 描述 价值
身份证 资源 ID。 字符串
位置 资源位置。 字符串
性能 应用程序安全组的属性。 ApplicationSecurityGroupPropertiesFormat
标签 资源标记。 资源标签

ApplicationSecurityGroupPropertiesFormat

名字 描述 价值

ContainerNetworkInterfaceConfiguration

名字 描述 价值
身份证 资源 ID。 字符串
名字 资源的名称。 此名称可用于访问资源。 字符串
性能 容器网络接口配置属性。 ContainerNetworkInterfaceConfigurationPropertiesFormat

ContainerNetworkInterfaceConfigurationPropertiesFormat

名字 描述 价值
containerNetwork接口 从此容器网络接口配置创建的容器网络接口的列表。 子资源[]
ip配置 容器网络接口配置的 IP 配置列表。 IPConfigurationProfile[]

代表团

名字 描述 价值
身份证 资源 ID。 字符串
名字 子网中唯一的资源的名称。 此名称可用于访问资源。 字符串
性能 子网的属性。 ServiceDelegationPropertiesFormat
类型 资源类型。 字符串

IPConfigurationProfile

名字 描述 价值
身份证 资源 ID。 字符串
名字 资源的名称。 此名称可用于访问资源。 字符串
性能 IP 配置文件的属性。 IPConfigurationProfilePropertiesFormat

IPConfigurationProfilePropertiesFormat

名字 描述 价值
对用于创建容器网络接口 IP 配置的子网资源的引用。 子网

NetworkProfilePropertiesFormat

名字 描述 价值
containerNetworkInterface配置 chid 容器网络接口配置列表。 ContainerNetworkInterfaceConfiguration[]

网络安全组

名字 描述 价值
身份证 资源 ID。 字符串
位置 资源位置。 字符串
性能 网络安全组的属性。 NetworkSecurityGroupPropertiesFormat
标签 资源标记。 资源标签

NetworkSecurityGroupPropertiesFormat

名字 描述 价值
flush连接 启用后,当规则更新时,将从网络安全组连接创建的流重新评估。 初始启用将触发重新评估。 布尔
securityRules 安全规则 网络安全组的安全规则集合。 SecurityRule[]

资源标签

名字 描述 价值

资源标签

名字 描述 价值

资源标签

名字 描述 价值

资源标签

名字 描述 价值

资源标签

名字 描述 价值

路线

名字 描述 价值
身份证 资源 ID。 字符串
名字 资源组中唯一的资源的名称。 此名称可用于访问资源。 字符串
性能 路由的属性。 RoutePropertiesFormat
类型 资源的类型。 字符串

RoutePropertiesFormat

名字 描述 价值
addressPrefix 的 路由应用到的目标 CIDR。 字符串
nextHopIp地址 IP 地址数据包应转发到。 只有在下一跃点类型为 VirtualAppliance 的路由中才允许下一跃点值。 字符串
nextHopType 应将数据包发送到的 Azure 跃点的类型。 “Internet”
“None”
“VirtualAppliance”
“VirtualNetworkGateway”
“VnetLocal”(必需)

路由表

名字 描述 价值
身份证 资源 ID。 字符串
位置 资源位置。 字符串
性能 路由表的属性。 RouteTablePropertiesFormat
标签 资源标记。 资源标签

RouteTablePropertiesFormat

名字 描述 价值
禁用 BgpRoutePropagation 是否禁用 BGP 在该路由表上学习的路由。 True 表示禁用。 布尔
路线 路由表中包含的路由的集合。 路由[]

SecurityRule 安全规则

名字 描述 价值
身份证 资源 ID。 字符串
名字 资源组中唯一的资源的名称。 此名称可用于访问资源。 字符串
性能 安全规则的属性。 SecurityRulePropertiesFormat
类型 资源的类型。 字符串

SecurityRulePropertiesFormat

名字 描述 价值
访问 允许或拒绝网络流量。 “允许”
“拒绝”(必需)
描述 此规则的说明。 限制为 140 个字符。 字符串
destinationAddressPrefix 的 目标地址前缀。 CIDR 或目标 IP 范围。 星号“*”还可用于匹配所有源 IP。 也可以使用默认标记,例如“VirtualNetwork”、“AzureLoadBalancer”和“Internet”。 字符串
destinationAddress前缀 目标地址前缀。 CIDR 或目标 IP 范围。 字符串[]
destinationApplicationSecurityGroups 指定为目标的应用程序安全组。 ApplicationSecurityGroup[]
destinationPortRange 目标端口或范围。 介于 0 和 65535 之间的整数或范围。 星号“*”也可用于匹配所有端口。 字符串
destinationPortRanges 目标端口范围。 字符串[]
方向 规则的方向。 该方向指定在传入或传出流量上是否评估规则。 “Inbound”
“出站”(必需)
优先权 规则的优先级。 该值可以介于 100 和 4096 之间。 对于集合中的每个规则,优先级编号必须是唯一的。 优先级编号越低,规则优先级越高。 int (必需)
协议 此规则适用于的网络协议。 '*'
“Ah”
“Esp”
“Icmp”
“Tcp”
“Udp”(必需)
sourceAddressPrefix 的 CIDR 或源 IP 范围。 星号“*”还可用于匹配所有源 IP。 也可以使用默认标记,例如“VirtualNetwork”、“AzureLoadBalancer”和“Internet”。 如果这是入口规则,则指定网络流量的来源。 字符串
sourceAddress前缀 CIDR 或源 IP 范围。 字符串[]
sourceApplicationSecurityGroups 指定为源的应用程序安全组。 ApplicationSecurityGroup[]
sourcePortRange 源端口或范围。 介于 0 和 65535 之间的整数或范围。 星号“*”也可用于匹配所有端口。 字符串
sourcePort范围 源端口范围。 字符串[]

ServiceDelegationPropertiesFormat

名字 描述 价值
服务名称 应向其委托子网的服务的名称(例如Microsoft.Sql/servers)。 字符串

ServiceEndpointPolicy

名字 描述 价值
身份证 资源 ID。 字符串
位置 资源位置。 字符串
性能 服务终结点策略的属性。 ServiceEndpointPolicyPropertiesFormat
标签 资源标记。 资源标签

ServiceEndpointPolicyDefinition

名字 描述 价值
身份证 资源 ID。 字符串
名字 资源组中唯一的资源的名称。 此名称可用于访问资源。 字符串
性能 服务终结点策略定义的属性。 ServiceEndpointPolicyDefinitionPropertiesFormat
类型 资源的类型。 字符串

ServiceEndpointPolicyDefinitionPropertiesFormat

名字 描述 价值
描述 此规则的说明。 限制为 140 个字符。 字符串
服务 服务终结点名称。 字符串
服务资源 服务资源列表。 字符串[]

ServiceEndpointPolicyPropertiesFormat

名字 描述 价值
contextualServiceEndpoint策略 上下文服务终结点策略的集合。 字符串[]
service别名 指示策略是否属于服务的别名 字符串
serviceEndpointPolicyDefinitions 服务终结点策略的服务终结点策略定义的集合。 ServiceEndpointPolicyDefinition[]

ServiceEndpointPropertiesFormat

名字 描述 价值
地点 位置列表。 字符串[]
服务 终结点服务的类型。 字符串

名字 描述 价值
身份证 资源 ID。 字符串
名字 资源组中唯一的资源的名称。 此名称可用于访问资源。 字符串
性能 子网的属性。 SubnetPropertiesFormat
类型 资源类型。 字符串

SubnetPropertiesFormat

名字 描述 价值
addressPrefix 的 子网的地址前缀。 字符串
address前缀 子网的地址前缀列表。 字符串[]
applicationGatewayIPConfigurations 虚拟网络资源的应用程序网关 IP 配置。 ApplicationGatewayIPConfiguration[]
defaultOutboundAccess 将此属性设置为 false,以禁用子网中所有 VM 的默认出站连接。 此属性只能在创建子网时设置,并且不能为现有子网更新。 布尔
代表团 对子网上的委派的引用数组。 委派[]
IP 分配 引用此子网的 IpAllocation 数组。 子资源[]
natGateway 网关 与此子网关联的 Nat 网关。 子资源
networkSecurityGroup 对 NetworkSecurityGroup 资源的引用。 网络安全组
privateEndpointNetwork策略 在子网中的专用终结点上启用或禁用应用网络策略。 “Disabled”
“Enabled”
privateLinkServiceNetwork策略 在子网中的专用链接服务上启用或禁用应用网络策略。 “Disabled”
“Enabled”
routeTable 对 RouteTable 资源的引用。 路由表
serviceEndpoint策略 服务终结点策略数组。 ServiceEndpointPolicy[]
serviceEndpoints 服务终结点数组。 ServiceEndpointPropertiesFormat[]

子资源

名字 描述 价值
身份证 资源 ID。 字符串