Get-AzVirtualNetworkGatewayNatRule
Gets a Virtual Network Gateway NatRule.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
Get-AzVirtualNetworkGatewayNatRule
-ResourceGroupName <String>
-ParentResourceName <String>
[-Name <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzVirtualNetworkGatewayNatRule
-ParentObject <PSVirtualNetworkGateway>
[-Name <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzVirtualNetworkGatewayNatRule
-ParentResourceId <String>
[-Name <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Get-AzVirtualNetworkGatewayNatRule cmdlet returns a virtual network gateway nat rule object of your virtual network gateway based on Name and ParentResourceName.
Examples
Example 1
PS C:\Users> get-azVirtualNetworkGatewayNatRule -ResourceGroupName "rg1" -Name "natRule1" -ParentResourceName gw1
Name : natRule1
ProvisioningState : Succeeded
Type : Static
Mode : IngressSnat
InternalMappings : [
{
"AddressSpace": "25.0.0.0/16"
}
]
ExternalMappings : [
{
"AddressSpace": "30.0.0.0/16"
}
]
IpConfigurationId :
Id : /subscriptions/7afd8f92-c220-4f53-886e-1df53a69afd4/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/gw1/natRules/natRule1
Etag : W/"5150d788-e165-42ba-99c4-8138a545fce9"
Example 2:
PS C:\Users\khbaheti> get-azVirtualNetworkGatewayNatRule -ResourceGroupName "rg1" -ParentResourceName "gw1"
Name : natRule1
ProvisioningState : Succeeded
Type : Static
Mode : IngressSnat
InternalMappings : [
{
"AddressSpace": "25.0.0.0/16"
}
]
ExternalMappings : [
{
"AddressSpace": "30.0.0.0/16"
}
]
IpConfigurationId :
Id : /subscriptions/7afd8f92-c220-4f53-886e-1df53a69afd4/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/gw1/natRules/natRule1
Etag : W/"5150d788-e165-42ba-99c4-8138a545fce9"
Name : natRule2
ProvisioningState : Succeeded
Type : Static
Mode : EgressSnat
InternalMappings : [
{
"AddressSpace": "20.0.0.0/16"
}
]
ExternalMappings : [
{
"AddressSpace": "50.0.0.0/16"
}
]
IpConfigurationId :
Id : /subscriptions/7afd8f92-c220-4f53-886e-1df53a69afd4/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/gw1/natRules/natRule2
Etag : W/"5150d788-e165-42ba-99c4-8138a545fce9"
Parameters
The credentials, account, tenant, and subscription used for communication with Azure.
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The resource name.
| Type: | String |
| Aliases: | ResourceName, VirtualNetworkGatewayNatRuleName |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The parent VirtualNetworkGateway for this VirtualNetworkGatewayNatRule.
| Type: | PSVirtualNetworkGateway |
| Aliases: | ParentVirtualNetworkGateway, VirtualNetworkGateway |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
The resource id of the parent VirtualNetworkGateway for this VirtualNetworkGatewayNatRule.
| Type: | String |
| Aliases: | ParentVirtualNetworkGatewayId, VirtualNetworkGatewayId |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
The parent resource name.
| Type: | String |
| Aliases: | ParentVirtualNetworkGatewayName, VirtualNetworkGatewayName |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The resource group name.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Inputs
Outputs
PSVirtualNetworkGatewayNatRule