Get-AzNatGateway
依名稱或 NatGateway 識別碼取得資源群組中的 Nat 閘道資源,或資源群組中的所有 Nat 閘道資源。
語法
ListParameterSet (預設值)
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
依名稱或 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 通訊的認證、帳戶、租用戶和訂用帳戶。
參數屬性
參數集
(All)
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
-Name
nat閘道的名稱。
參數屬性
| 類型: | String
|
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
| 別名: | 資源名稱 |
參數集
GetByNameParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
-ResourceGroupName
nat 閘道的資源群組名稱。
參數屬性
| 類型: | String
|
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
ListParameterSet
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
-ResourceId
Nat 閘道識別碼
參數屬性
| 類型: | String
|
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
GetByResourceIdParameterSet
| Position: | Named |
| 必要: | True |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
CommonParameters
此 cmdlet 支援常見參數:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 如需詳細資訊,請參閱 about_CommonParameters。
輸出