Skip to main content

virtual_network_gateway_nat_rules

Creates, updates, deletes, gets or lists a virtual_network_gateway_nat_rules resource.

Overview

Namevirtual_network_gateway_nat_rules
TypeResource
Idazure.network.virtual_network_gateway_nat_rules

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringResource ID.
namestringName of the resource.
etagstringA unique read-only string that changes whenever the resource is updated.
externalMappingsarrayThe private IP address external mapping for NAT.
internalMappingsarrayThe private IP address internal mapping for NAT.
ipConfigurationIdstringThe IP Configuration ID this NAT rule applies to.
modestringThe Source NAT direction of a VPN NAT. Known values are: "EgressSnat" and "IngressSnat". (EgressSnat, IngressSnat)
provisioningStatestringThe provisioning state of the NAT Rule resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting)
typestringResource type.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, virtual_network_gateway_name, nat_rule_name, subscription_idRetrieves the details of a nat rule.
list_by_virtual_network_gatewayselectresource_group_name, virtual_network_gateway_name, subscription_idRetrieves all nat rules for a particular virtual network gateway.
create_or_updateinsertresource_group_name, virtual_network_gateway_name, nat_rule_name, subscription_idCreates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing nat rules.
create_or_updatereplaceresource_group_name, virtual_network_gateway_name, nat_rule_name, subscription_idCreates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing nat rules.
deletedeleteresource_group_name, virtual_network_gateway_name, nat_rule_name, subscription_idDeletes a nat rule.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
nat_rule_namestringThe name of the resource that is unique within a resource group. This name can be used to access the resource. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
virtual_network_gateway_namestringThe name of the virtual network gateway. Required.

SELECT examples

Retrieves the details of a nat rule.

SELECT
id,
name,
etag,
externalMappings,
internalMappings,
ipConfigurationId,
mode,
provisioningState,
type
FROM azure.network.virtual_network_gateway_nat_rules
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND virtual_network_gateway_name = '{{ virtual_network_gateway_name }}' -- required
AND nat_rule_name = '{{ nat_rule_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing nat rules.

INSERT INTO azure.network.virtual_network_gateway_nat_rules (
id,
name,
properties,
resource_group_name,
virtual_network_gateway_name,
nat_rule_name,
subscription_id
)
SELECT
'{{ id }}',
'{{ name }}',
'{{ properties }}',
'{{ resource_group_name }}',
'{{ virtual_network_gateway_name }}',
'{{ nat_rule_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
properties,
type
;

REPLACE examples

Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing nat rules.

REPLACE azure.network.virtual_network_gateway_nat_rules
SET
id = '{{ id }}',
name = '{{ name }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND virtual_network_gateway_name = '{{ virtual_network_gateway_name }}' --required
AND nat_rule_name = '{{ nat_rule_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
properties,
type;

DELETE examples

Deletes a nat rule.

DELETE FROM azure.network.virtual_network_gateway_nat_rules
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND virtual_network_gateway_name = '{{ virtual_network_gateway_name }}' --required
AND nat_rule_name = '{{ nat_rule_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;