Get-AzPrivateEndpoint
取得私人端點
語法
Get-AzPrivateEndpoint
[-Name <String>]
[-ResourceGroupName <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzPrivateEndpoint
-Name <String>
-ResourceGroupName <String>
-ExpandResource <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Get-AzPrivateEndpoint Cmdlet 會取得一或多個私人端點。
範例
範例 1:擷取私人端點
Get-AzPrivateEndpoint -Name MyPrivateEndpoint1 -ResourceGroupName TestResourceGroup
Name : MyPrivateEndpoint1
ResourceGroupName : TestResourceGroup
Location : eastus2euap
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TestResourceGroup/provi
ders/Microsoft.Network/privateEndpoints/MyPrivateEndpoint1
Etag : W/"00000000-0000-0000-0000-000000000000"
ProvisioningState : Succeeded
Subnet : {
"Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TestResourceGroup/providers/Microsoft.Network/virtualNetworks/MyVirtualNetwork1/subnets/backendSubnet",
}
NetworkInterfaces : [
{
"Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TestResourceGroup/providers/Microsoft.Network/networkInterfaces/MyNic1",
}
]
PrivateLinkServiceConnections : []
ManualPrivateLinkServiceConnections : [
{
"Name": "MyPrivateLinkServiceConnection",
"Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TestResourceGroup/providers/Microsoft.Network/privateEndpoints/MyPrivateEndpoint1/manualPrivateLinkServi
ceConnections/MyPrivateLinkServiceConnection",
"PrivateLinkServiceId": "/subscriptions/00000000-0000-0000-0000-000000000000/
resourceGroups/TestResourceGroup/providers/Microsoft.Network/priv
ateLinkServices/MyPrivateLinkService",
"PrivateLinkServiceConnectionState": {
"Status": "Pending",
"Description": "Awaiting approval"
}
}
]
此命令會取得資源群組 TestResourceGroup 中名為 MyPrivateEndpoint1 的私人端點
範例 2:列出 ResourceGroup 中的所有私人端點
Get-AzPrivateEndpoint -ResourceGroupName TestResourceGroup
Name : MyPrivateEndpoint1
ResourceGroupName : TestResourceGroup
Location : eastus2euap
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TestResourceGroup/provi
ders/Microsoft.Network/privateEndpoints/MyPrivateEndpoint1
Etag : W/"00000000-0000-0000-0000-000000000000"
ProvisioningState : Succeeded
Subnet : {
"Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TestResourceGroup/providers/Microsoft.Network/virtualNetworks/MyVirtualNetwork1/subnets/backendSubnet",
}
NetworkInterfaces : [
{
"Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TestResourceGroup/providers/Microsoft.Network/networkInterfaces/MyNic1",
}
]
PrivateLinkServiceConnections : []
ManualPrivateLinkServiceConnections : [
{
"Name": "MyPrivateLinkServiceConnection",
"Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TestResourceGroup/providers/Microsoft.Network/privateEndpoints/MyPrivateEndpoint1/manualPrivateLinkServi
ceConnections/MyPrivateLinkServiceConnection",
"PrivateLinkServiceId": "/subscriptions/00000000-0000-0000-0000-000000000000/
resourceGroups/TestResourceGroup/providers/Microsoft.Network/priv
ateLinkServices/MyPrivateLinkService",
"PrivateLinkServiceConnectionState": {
"Status": "Pending",
"Description": "Awaiting approval"
}
}
]
此命令會取得資源群組 TestResourceGroup 中的所有私人端點
參數
-DefaultProfile
用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。
類型: | IAzureContextContainer |
別名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ExpandResource
要展開的資源參考。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-Name
資源名稱。
類型: | String |
別名: | ResourceName |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | True |
-ResourceGroupName
資源組名。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | True |