Skip to main content

nat_gateways

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

Overview

Namenat_gateways
TypeResource
Idazure.network.nat_gateways

Fields

The following fields are returned by SELECT queries:

Request successful. The operation returns the resulting NatGateway resource.

NameDatatypeDescription
idstring (arm-id)Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
namestringThe name of the resource
etagstringA unique read-only string that changes whenever the resource is updated.
propertiesobjectNat Gateway properties.
skuobjectThe nat gateway SKU.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
zonesarrayA list of availability zones denoting the zone in which Nat Gateway should be deployed.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, natGatewayName, subscriptionId$expandGets the specified nat gateway in a specified resource group.
listselectresourceGroupName, subscriptionIdGets all nat gateways in a resource group.
list_allselectsubscriptionIdGets all the Nat Gateways in a subscription.
create_or_updateinsertresourceGroupName, natGatewayName, subscriptionIdCreates or updates a nat gateway.
deletedeleteresourceGroupName, natGatewayName, subscriptionIdDeletes the specified nat gateway.
update_tagsexecresourceGroupName, natGatewayName, subscriptionIdUpdates nat gateway tags.

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
natGatewayNamestringThe name of the nat gateway.
resourceGroupNamestringThe name of the resource group.
subscriptionIdstring (uuid)The ID of the target subscription. The value must be an UUID.
$expandstringExpands referenced resources.

SELECT examples

Gets the specified nat gateway in a specified resource group.

SELECT
id,
name,
etag,
properties,
sku,
systemData,
type,
zones
FROM azure.network.nat_gateways
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND natGatewayName = '{{ natGatewayName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND $expand = '{{ $expand }}'
;

INSERT examples

Creates or updates a nat gateway.

INSERT INTO azure.network.nat_gateways (
data__sku,
data__properties,
data__zones,
resourceGroupName,
natGatewayName,
subscriptionId
)
SELECT
'{{ sku }}',
'{{ properties }}',
'{{ zones }}',
'{{ resourceGroupName }}',
'{{ natGatewayName }}',
'{{ subscriptionId }}'
RETURNING
id,
name,
etag,
properties,
sku,
systemData,
type,
zones
;

DELETE examples

Deletes the specified nat gateway.

DELETE FROM azure.network.nat_gateways
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND natGatewayName = '{{ natGatewayName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;

Lifecycle Methods

Updates nat gateway tags.

EXEC azure.network.nat_gateways.update_tags 
@resourceGroupName='{{ resourceGroupName }}' --required,
@natGatewayName='{{ natGatewayName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"tags": "{{ tags }}"
}'
;