title | description | ms.topic | ms.date |
---|---|---|---|
Manage private endpoint connections with Azure Batch accounts |
Learn how to manage private endpoint connections with Azure Batch accounts, including list, approve, reject and remove. |
how-to |
05/26/2022 |
You can query and manage all existing private endpoint connections for your Batch account. Supported management operations include:
- Approve a pending connection.
- Reject a connection (either in pending or approved state).
- Remove a connection, which will remove the connection from Batch account and mark the associated private endpoint resource as Disconnected state.
-
Go to your Batch account in Azure portal.
-
In Settings, select Networking and go to tab Private Access.
-
Select the private connection, then perform the Approve/Reject/Remove operation.
:::image type="content" source="media/private-connectivity/manage-private-connections.png" alt-text="Screenshot of managing private endpoint connections.":::
Examples using Az PowerShell module Az.Network
:
$accountResourceId = "/subscriptions/<subscription>/resourceGroups/<rg>/providers/Microsoft.Batch/batchAccounts/<account>"
$pecResourceId = "$accountResourceId/privateEndpointConnections/<pe-connection-name>"
# List all private endpoint connections for Batch account
Get-AzPrivateEndpointConnection -PrivateLinkResourceId $accountResourceId
# Show the specified private endpoint connection
Get-AzPrivateEndpointConnection -ResourceId $pecResourceId
# Approve connection
Approve-AzPrivateEndpointConnection -Description "Approved!" -ResourceId $pecResourceId
# Reject connection
Deny-AzPrivateEndpointConnection -Description "Rejected!" -ResourceId $pecResourceId
# Remove connection
Remove-AzPrivateEndpointConnection -ResourceId $pecResourceId
Examples using Azure CLI (az network private-endpoint
):
accountResourceId="/subscriptions/<subscription>/resourceGroups/<rg>/providers/Microsoft.Batch/batchAccounts/<account>"
pecResourceId="$accountResourceId/privateEndpointConnections/<pe-connection-name>"
# List all private endpoint connections for Batch account
az network private-endpoint-connection list --id $accountResourceId
# Show the specified private endpoint connection
az network private-endpoint-connection show --id $pecResourceId
# Approve connection
az network private-endpoint-connection approve --description "Approved!" --id $pecResourceId
# Reject connection
az network private-endpoint-connection reject --description "Rejected!" --id $pecResourceId
# Remove connection
az network private-endpoint-connection delete --id $pecResourceId