Get-AzNatGateway
Gets a Nat Gateway resource in a resource group by name or NatGateway Id or all Nat Gateway resources in a resource group.
Syntax
ListParameterSet (Default)
Get-AzNatGateway
[-ResourceGroupName <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
GetByNameParameterSet
Get-AzNatGateway
-ResourceGroupName <String>
-Name <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
GetByResourceIdParameterSet
Get-AzNatGateway
-ResourceId <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Gets a Nat Gateway resource in a resource group by name OR NatGateway Id OR all Nat Gateway resources in a resource group.
Examples
Example 1
Get-AzNatGateway -ResourceGroupName "natgateway_test"
IdleTimeoutInMinutes : 4
ProvisioningState : Succeeded
Sku : Microsoft.Azure.Commands.Network.Models.PSNatGatewaySku
PublicIpAddresses : {/subscriptions/<subid>/resourceGroups/natgateway_test/providers/Microsoft.Network/publicIPAddresses/Test_Pip}
PublicIpPrefixes : {}
SkuText : {
"Name": "Standard"
}
PublicIpAddressesText : [
{
"Id": "/subscriptions/<subid>/resourceGroups/natgateway_test/providers/Microsoft.Network/publicIPAddresses/Test_Pip"
}
]
PublicIpPrefixesText : []
ResourceGroupName : natgateway_test
Location : eastus2
ResourceGuid :
Type : Microsoft.Network/natGateways
Tag :
TagsTable :
Name : nat_gateway
Etag : W/"178470d2-7b86-4ddd-b954-e0cd3ab30a90"
Id : /subscriptions/<subid>/resourceGroups/natgateway_test/providers/Microsoft.Network/natGateways/nat_gateway
IdleTimeoutInMinutes : 4
ProvisioningState : Succeeded
Sku : Microsoft.Azure.Commands.Network.Models.PSNatGatewaySku
PublicIpAddresses : {}
PublicIpPrefixes : {}
SkuText : {
"Name": "Standard"
}
PublicIpAddressesText : []
PublicIpPrefixesText : []
ResourceGroupName : natgateway_test
Location : eastus2
ResourceGuid :
Type : Microsoft.Network/natGateways
Tag :
TagsTable :
Name : ng1
Etag : W/"bdf98e30-d6c6-4af2-8f62-10d1fdaa6e84"
Id : /subscriptions/<subid>/resourceGroups/natgateway_test/providers/Microsoft.Network/natGateways/ng1
Get-AzNatGateway -ResourceGroupName "natgateway_test" -Name "nat_gateway"
IdleTimeoutInMinutes : 4
ProvisioningState : Succeeded
Sku : Microsoft.Azure.Commands.Network.Models.PSNatGatewaySku
PublicIpAddresses : {/subscriptions/<subid>/resourceGroups/natgateway_test/providers/Microsoft.Network/publicIPAddresses/Test_Pip}
PublicIpPrefixes : {}
SkuText : {
"Name": "Standard"
}
PublicIpAddressesText : [
{
"Id": "/subscriptions/<subid>/resourceGroups/natgateway_test/providers/Microsoft.Network/publicIPAddresses/Test_Pip"
}
]
PublicIpPrefixesText : []
ResourceGroupName : natgateway_test
Location : eastus2
ResourceGuid :
Type : Microsoft.Network/natGateways
Tag :
TagsTable :
Name : nat_gateway
Etag : W/"178470d2-7b86-4ddd-b954-e0cd3ab30a90"
Id : /subscriptions/<subid>/resourceGroups/natgateway_test/providers/Microsoft.Network/natGateways/nat_gateway
Get-AzNatGateway -ResourceId "/subscriptions/<subid>/resourceGroups/natgateway_test/providers/Microsoft.Network/natGateways/nat_gateway"
IdleTimeoutInMinutes : 4
ProvisioningState : Succeeded
Sku : Microsoft.Azure.Commands.Network.Models.PSNatGatewaySku
PublicIpAddresses : {/subscriptions/<subid>/resourceGroups/natgateway_test/providers/Microsoft.Network/publicIPAddresses/Test_Pip}
PublicIpPrefixes : {}
SkuText : {
"Name": "Standard"
}
PublicIpAddressesText : [
{
"Id": "/subscriptions/<subid>/resourceGroups/natgateway_test/providers/Microsoft.Network/publicIPAddresses/Test_Pip"
}
]
PublicIpPrefixesText : []
ResourceGroupName : natgateway_test
Location : eastus2
ResourceGuid :
Type : Microsoft.Network/natGateways
Tag :
TagsTable :
Name : nat_gateway
Etag : W/"178470d2-7b86-4ddd-b954-e0cd3ab30a90"
Id : /subscriptions/<subid>/resourceGroups/natgateway_test/providers/Microsoft.Network/natGateways/nat_gateway
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
The name of the nat gateway.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: ResourceName
Parameter sets
GetByNameParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
The resource group name of the nat gateway.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ListParameterSet
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceId
Nat Gateway Id
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
GetByResourceIdParameterSet
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs