Get-AzNatGateway
依名稱或 NatGateway 識別符或資源群組中的所有 Nat 閘道資源,取得資源群組中的 Nat 閘道資源。
語法
Get-AzNatGateway
[-ResourceGroupName <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzNatGateway
-ResourceGroupName <String>
-Name <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzNatGateway
-ResourceId <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
依名稱或 NatGateway 識別符或資源群組中的所有 Nat 閘道資源,取得資源群組中的 Nat 閘道資源。
範例
範例 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
參數
-DefaultProfile
用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。
類型: | IAzureContextContainer |
別名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Name
nat 閘道的名稱。
類型: | String |
別名: | ResourceName |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-ResourceGroupName
nat 閘道的資源組名。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-ResourceId
Nat 閘道識別碼
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |