Microsoft.Network virtualNetworkGateways/natRules 2022-05-01

Bicep resource definition

The virtualNetworkGateways/natRules resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Network/virtualNetworkGateways/natRules resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.Network/virtualNetworkGateways/natRules@2022-05-01' = {
  name: 'string'
  properties: {
    externalMappings: [
      {
        addressSpace: 'string'
        portRange: 'string'
      }
    ]
    internalMappings: [
      {
        addressSpace: 'string'
        portRange: 'string'
      }
    ]
    ipConfigurationId: 'string'
    mode: 'string'
    type: 'string'
  }
}

Property values

Microsoft.Network/virtualNetworkGateways/natRules

Name Description Value
name The resource name string (required)
parent In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource.

For more information, see Child resource outside parent resource.
Symbolic name for resource of type: virtualNetworkGateways
properties Properties of the Virtual Network Gateway NAT rule. VirtualNetworkGatewayNatRuleProperties

VirtualNetworkGatewayNatRuleProperties

Name Description Value
externalMappings The private IP address external mapping for NAT. VpnNatRuleMapping[]
internalMappings The private IP address internal mapping for NAT. VpnNatRuleMapping[]
ipConfigurationId The IP Configuration ID this NAT rule applies to. string
mode The Source NAT direction of a VPN NAT. 'EgressSnat'
'IngressSnat'
type The type of NAT rule for VPN NAT. 'Dynamic'
'Static'

VpnNatRuleMapping

Name Description Value
addressSpace Address space for Vpn NatRule mapping. string
portRange Port range for Vpn NatRule mapping. string

ARM template resource definition

The virtualNetworkGateways/natRules resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Network/virtualNetworkGateways/natRules resource, add the following JSON to your template.

{
  "type": "Microsoft.Network/virtualNetworkGateways/natRules",
  "apiVersion": "2022-05-01",
  "name": "string",
  "properties": {
    "externalMappings": [
      {
        "addressSpace": "string",
        "portRange": "string"
      }
    ],
    "internalMappings": [
      {
        "addressSpace": "string",
        "portRange": "string"
      }
    ],
    "ipConfigurationId": "string",
    "mode": "string",
    "type": "string"
  }
}

Property values

Microsoft.Network/virtualNetworkGateways/natRules

Name Description Value
apiVersion The api version '2022-05-01'
name The resource name string (required)
properties Properties of the Virtual Network Gateway NAT rule. VirtualNetworkGatewayNatRuleProperties
type The resource type 'Microsoft.Network/virtualNetworkGateways/natRules'

VirtualNetworkGatewayNatRuleProperties

Name Description Value
externalMappings The private IP address external mapping for NAT. VpnNatRuleMapping[]
internalMappings The private IP address internal mapping for NAT. VpnNatRuleMapping[]
ipConfigurationId The IP Configuration ID this NAT rule applies to. string
mode The Source NAT direction of a VPN NAT. 'EgressSnat'
'IngressSnat'
type The type of NAT rule for VPN NAT. 'Dynamic'
'Static'

VpnNatRuleMapping

Name Description Value
addressSpace Address space for Vpn NatRule mapping. string
portRange Port range for Vpn NatRule mapping. string

Terraform (AzAPI provider) resource definition

The virtualNetworkGateways/natRules resource type can be deployed with operations that target:

  • Resource groups

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Network/virtualNetworkGateways/natRules resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Network/virtualNetworkGateways/natRules@2022-05-01"
  name = "string"
  body = jsonencode({
    properties = {
      externalMappings = [
        {
          addressSpace = "string"
          portRange = "string"
        }
      ]
      internalMappings = [
        {
          addressSpace = "string"
          portRange = "string"
        }
      ]
      ipConfigurationId = "string"
      mode = "string"
      type = "string"
    }
  })
}

Property values

Microsoft.Network/virtualNetworkGateways/natRules

Name Description Value
name The resource name string (required)
parent_id The ID of the resource that is the parent for this resource. ID for resource of type: virtualNetworkGateways
properties Properties of the Virtual Network Gateway NAT rule. VirtualNetworkGatewayNatRuleProperties
type The resource type "Microsoft.Network/virtualNetworkGateways/natRules@2022-05-01"

VirtualNetworkGatewayNatRuleProperties

Name Description Value
externalMappings The private IP address external mapping for NAT. VpnNatRuleMapping[]
internalMappings The private IP address internal mapping for NAT. VpnNatRuleMapping[]
ipConfigurationId The IP Configuration ID this NAT rule applies to. string
mode The Source NAT direction of a VPN NAT. 'EgressSnat'
'IngressSnat'
type The type of NAT rule for VPN NAT. 'Dynamic'
'Static'

VpnNatRuleMapping

Name Description Value
addressSpace Address space for Vpn NatRule mapping. string
portRange Port range for Vpn NatRule mapping. string