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:

NameDatatypeDescription
idstringResource ID.
namestringResource name.
etagstringA unique read-only string that changes whenever the resource is updated.
idleTimeoutInMinutesintegerThe idle timeout of the nat gateway.
locationstringResource location.
nat64stringWhether Nat64 is enabled for the NAT gateway resource. Known values are: "None", "Enabled", and "Disabled". (None, Enabled, Disabled)
provisioningStatestringThe provisioning state of the NAT gateway resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting)
publicIpAddressesarrayAn array of public ip addresses V4 associated with the nat gateway resource.
publicIpAddressesV6arrayAn array of public ip addresses V6 associated with the nat gateway resource.
publicIpPrefixesarrayAn array of public ip prefixes V4 associated with the nat gateway resource.
publicIpPrefixesV6arrayAn array of public ip prefixes V6 associated with the nat gateway resource.
resourceGuidstringThe resource GUID property of the NAT gateway resource.
serviceGatewayobjectReference to another subresource.
skuobjectThe nat gateway SKU.
sourceVirtualNetworkobjectReference to another subresource.
subnetsarrayAn array of references to the subnets using this nat gateway resource.
tagsobjectResource tags.
typestringResource type.
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
getselectresource_group_name, nat_gateway_name, subscription_id$expandGets the specified nat gateway in a specified resource group.
listselectresource_group_name, subscription_idGets all nat gateways in a resource group.
list_allselectsubscription_idGets all the Nat Gateways in a subscription.
create_or_updateinsertresource_group_name, nat_gateway_name, subscription_idCreates or updates a nat gateway.
update_tagsupdateresource_group_name, nat_gateway_name, subscription_idUpdates nat gateway tags.
create_or_updatereplaceresource_group_name, nat_gateway_name, subscription_idCreates or updates a nat gateway.
deletedeleteresource_group_name, nat_gateway_name, subscription_idDeletes the specified nat gateway.

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_gateway_namestringThe name of the nat gateway. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
$expandstringExpands referenced resources. Default value is None.

SELECT examples

Gets the specified nat gateway in a specified resource group.

SELECT
id,
name,
etag,
idleTimeoutInMinutes,
location,
nat64,
provisioningState,
publicIpAddresses,
publicIpAddressesV6,
publicIpPrefixes,
publicIpPrefixesV6,
resourceGuid,
serviceGateway,
sku,
sourceVirtualNetwork,
subnets,
tags,
type,
zones
FROM azure.network.nat_gateways
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND nat_gateway_name = '{{ nat_gateway_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $expand = '{{ $expand }}'
;

INSERT examples

Creates or updates a nat gateway.

INSERT INTO azure.network.nat_gateways (
id,
location,
tags,
properties,
sku,
zones,
resource_group_name,
nat_gateway_name,
subscription_id
)
SELECT
'{{ id }}',
'{{ location }}',
'{{ tags }}',
'{{ properties }}',
'{{ sku }}',
'{{ zones }}',
'{{ resource_group_name }}',
'{{ nat_gateway_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
location,
properties,
sku,
tags,
type,
zones
;

UPDATE examples

Updates nat gateway tags.

UPDATE azure.network.nat_gateways
SET
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND nat_gateway_name = '{{ nat_gateway_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
location,
properties,
sku,
tags,
type,
zones;

REPLACE examples

Creates or updates a nat gateway.

REPLACE azure.network.nat_gateways
SET
id = '{{ id }}',
location = '{{ location }}',
tags = '{{ tags }}',
properties = '{{ properties }}',
sku = '{{ sku }}',
zones = '{{ zones }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND nat_gateway_name = '{{ nat_gateway_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
location,
properties,
sku,
tags,
type,
zones;

DELETE examples

Deletes the specified nat gateway.

DELETE FROM azure.network.nat_gateways
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND nat_gateway_name = '{{ nat_gateway_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;