Skip to main content

nat_rules

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

Overview

Namenat_rules
TypeResource
Idazure.network.nat_rules

Fields

NameDatatypeDescription
idtextResource ID.
nametextThe name of the resource that is unique within a resource group. This name can be used to access the resource.
egress_vpn_site_link_connectionstextfield from the properties object
etagtextA unique read-only string that changes whenever the resource is updated.
external_mappingstextfield from the properties object
gatewayNametextfield from the properties object
ingress_vpn_site_link_connectionstextfield from the properties object
internal_mappingstextfield from the properties object
ip_configuration_idtextfield from the properties object
modetextfield from the properties object
natRuleNametextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
subscriptionIdtextfield from the properties object
typetextResource type.

Methods

NameAccessible byRequired ParamsDescription
getSELECTgatewayName, natRuleName, resourceGroupName, subscriptionIdRetrieves the details of a nat ruleGet.
list_by_vpn_gatewaySELECTgatewayName, resourceGroupName, subscriptionIdRetrieves all nat rules for a particular virtual wan vpn gateway.
create_or_updateINSERTgatewayName, natRuleName, resourceGroupName, subscriptionIdCreates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules.
deleteDELETEgatewayName, natRuleName, resourceGroupName, subscriptionIdDeletes a nat rule.

SELECT examples

Retrieves all nat rules for a particular virtual wan vpn gateway.

SELECT
id,
name,
egress_vpn_site_link_connections,
etag,
external_mappings,
gatewayName,
ingress_vpn_site_link_connections,
internal_mappings,
ip_configuration_id,
mode,
natRuleName,
provisioning_state,
resourceGroupName,
subscriptionId,
type
FROM azure.network.vw_nat_rules
WHERE gatewayName = '{{ gatewayName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new nat_rules resource.

/*+ create */
INSERT INTO azure.network.nat_rules (
gatewayName,
natRuleName,
resourceGroupName,
subscriptionId,
properties,
name,
id
)
SELECT
'{{ gatewayName }}',
'{{ natRuleName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}',
'{{ name }}',
'{{ id }}'
;

DELETE example

Deletes the specified nat_rules resource.

/*+ delete */
DELETE FROM azure.network.nat_rules
WHERE gatewayName = '{{ gatewayName }}'
AND natRuleName = '{{ natRuleName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';