nat_rules
Creates, updates, deletes, gets or lists a nat_rules
resource.
Overview
Name | nat_rules |
Type | Resource |
Id | azure.network.nat_rules |
Fields
- vw_nat_rules
- nat_rules
Name | Datatype | Description |
---|---|---|
id | text | Resource ID. |
name | text | The name of the resource that is unique within a resource group. This name can be used to access the resource. |
egress_vpn_site_link_connections | text | field from the properties object |
etag | text | A unique read-only string that changes whenever the resource is updated. |
external_mappings | text | field from the properties object |
gatewayName | text | field from the properties object |
ingress_vpn_site_link_connections | text | field from the properties object |
internal_mappings | text | field from the properties object |
ip_configuration_id | text | field from the properties object |
mode | text | field from the properties object |
natRuleName | text | field from the properties object |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
subscriptionId | text | field from the properties object |
type | text | Resource type. |
Name | Datatype | Description |
---|---|---|
id | string | Resource ID. |
name | string | The name of the resource that is unique within a resource group. This name can be used to access the resource. |
etag | string | A unique read-only string that changes whenever the resource is updated. |
properties | object | Parameters for VpnGatewayNatRule. |
type | string | Resource type. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | gatewayName, natRuleName, resourceGroupName, subscriptionId | Retrieves the details of a nat ruleGet. |
list_by_vpn_gateway | SELECT | gatewayName, resourceGroupName, subscriptionId | Retrieves all nat rules for a particular virtual wan vpn gateway. |
create_or_update | INSERT | gatewayName, natRuleName, resourceGroupName, subscriptionId | Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. |
delete | DELETE | gatewayName, natRuleName, resourceGroupName, subscriptionId | Deletes a nat rule. |
SELECT
examples
Retrieves all nat rules for a particular virtual wan vpn gateway.
- vw_nat_rules
- nat_rules
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 }}';
SELECT
id,
name,
etag,
properties,
type
FROM azure.network.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.network.nat_rules (
gatewayName,
natRuleName,
resourceGroupName,
subscriptionId,
properties,
name,
id
)
SELECT
'{{ gatewayName }}',
'{{ natRuleName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}',
'{{ name }}',
'{{ id }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: provisioningState
value: []
- name: type
value: string
- name: mode
value: string
- name: internalMappings
value:
- - name: addressSpace
value: string
- name: portRange
value: string
- name: externalMappings
value:
- - name: addressSpace
value: string
- name: portRange
value: string
- name: ipConfigurationId
value: string
- name: egressVpnSiteLinkConnections
value:
- - name: id
value: string
- name: ingressVpnSiteLinkConnections
value:
- - name: id
value: string
- name: name
value: string
- name: etag
value: string
- name: type
value: string
- name: id
value: string
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 }}';