Hantera privata slutpunktsanslutningar med Azure Batch-konton

Du kan fråga och hantera alla befintliga privata slutpunktsanslutningar för ditt Batch-konto. Hanteringsåtgärder som stöds är:

  • Godkänn en väntande anslutning.
  • Avvisa en anslutning (antingen i väntande eller godkänt tillstånd).
  • Ta bort en anslutning, vilket tar bort anslutningen från Batch-kontot och markerar den associerade privata slutpunktsresursen som frånkopplat tillstånd.

Azure Portal

  1. Gå till batchkontot i Azure Portal.

  2. I Inställningar väljer du Nätverk och går till fliken Privat åtkomst.

  3. Välj den privata anslutningen och utför sedan åtgärden Godkänn/Avvisa/Ta bort.

    Skärmbild av hantering av privata slutpunktsanslutningar.

Az PowerShell-modul

Exempel som använder Az PowerShell-modulen 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

Azure CLI

Exempel med 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