Listet die Endpunkte auf, die ein Batch-Computeknoten unter diesem Batchkonto als Teil der Batchdienstverwaltung aufrufen kann. Wenn Sie einen Pool innerhalb eines von Ihnen angegebenen virtuellen Netzwerks bereitstellen, müssen Sie sicherstellen, dass Ihr Netzwerk ausgehenden Zugriff auf diese Endpunkte zulässt. Fehler beim Zulassen des Zugriffs auf diese Endpunkte können dazu führen, dass Batch die betroffenen Knoten als unbrauchbar kennzeichnet. Weitere Informationen zum Erstellen eines Pools innerhalb eines virtuellen Netzwerks finden Sie unter https://learn.microsoft.com/azure/batch/batch-virtual-network.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/outboundNetworkDependenciesEndpoints?api-version=2024-07-01
URI-Parameter
Name |
In |
Erforderlich |
Typ |
Beschreibung |
accountName
|
path |
True
|
string
|
Der Name des Batchkontos.
RegEx-Muster: ^[a-zA-Z0-9]+$
|
resourceGroupName
|
path |
True
|
string
|
Der Name der Ressourcengruppe, die das Batchkonto enthält.
|
subscriptionId
|
path |
True
|
string
|
Die Azure-Abonnement-ID. Dies ist eine GUID-formatierte Zeichenfolge (z. B. 0000000-0000-0000-0000-0000000000000)
|
api-version
|
query |
True
|
string
|
Die API-Version, die mit der HTTP-Anforderung verwendet werden soll.
|
Antworten
Name |
Typ |
Beschreibung |
200 OK
|
OutboundEnvironmentEndpointCollection
|
Der Vorgang war erfolgreich. Die Antwort enthält eine Liste der ausgehenden Netzwerkabhängigkeiten.
|
Other Status Codes
|
CloudError
|
Fehlerantwort, die beschreibt, warum der Vorgang fehlgeschlagen ist.
|
Sicherheit
azure_auth
Microsoft Entra OAuth 2.0-Authentifizierungscodefluss
Typ:
oauth2
Ablauf:
implicit
Autorisierungs-URL:
https://login.microsoftonline.com/common/oauth2/authorize
Bereiche
Name |
Beschreibung |
user_impersonation
|
Identitätswechsel ihres Benutzerkontos
|
Beispiele
ListOutboundNetworkDependencies
Beispielanforderung
GET https://management.azure.com/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/outboundNetworkDependenciesEndpoints?api-version=2024-07-01
/**
* Samples for BatchAccount ListOutboundNetworkDependenciesEndpoints.
*/
public final class Main {
/*
* x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/
* BatchAccountListOutboundNetworkDependenciesEndpoints.json
*/
/**
* Sample code: ListOutboundNetworkDependencies.
*
* @param manager Entry point to BatchManager.
*/
public static void listOutboundNetworkDependencies(com.azure.resourcemanager.batch.BatchManager manager) {
manager.batchAccounts().listOutboundNetworkDependenciesEndpoints("default-azurebatch-japaneast", "sampleacct",
com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.batch import BatchManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-batch
# USAGE
python batch_account_list_outbound_network_dependencies_endpoints.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = BatchManagementClient(
credential=DefaultAzureCredential(),
subscription_id="subid",
)
response = client.batch_account.list_outbound_network_dependencies_endpoints(
resource_group_name="default-azurebatch-japaneast",
account_name="sampleacct",
)
for item in response:
print(item)
# x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountListOutboundNetworkDependenciesEndpoints.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armbatch_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountListOutboundNetworkDependenciesEndpoints.json
func ExampleAccountClient_NewListOutboundNetworkDependenciesEndpointsPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armbatch.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewAccountClient().NewListOutboundNetworkDependenciesEndpointsPager("default-azurebatch-japaneast", "sampleacct", nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page.OutboundEnvironmentEndpointCollection = armbatch.OutboundEnvironmentEndpointCollection{
// Value: []*armbatch.OutboundEnvironmentEndpoint{
// {
// Category: to.Ptr("Azure Batch"),
// Endpoints: []*armbatch.EndpointDependency{
// {
// Description: to.Ptr("Applicable to job manager tasks, tasks that use job scoped authentication, or any task that makes calls to Batch."),
// DomainName: to.Ptr("sampleacct.japaneast.batch.azure.com"),
// EndpointDetails: []*armbatch.EndpointDetail{
// {
// Port: to.Ptr[int32](443),
// }},
// },
// {
// Description: to.Ptr("Applicable to all Azure Batch pools."),
// DomainName: to.Ptr("japaneast.service.batch.azure.com"),
// EndpointDetails: []*armbatch.EndpointDetail{
// {
// Port: to.Ptr[int32](443),
// }},
// }},
// },
// {
// Category: to.Ptr("Azure Storage"),
// Endpoints: []*armbatch.EndpointDependency{
// {
// Description: to.Ptr("AutoStorage endpoint for this Batch account. Applicable to all Azure Batch pools under this account."),
// DomainName: to.Ptr("autostorageaccountname.blob.core.windows.net"),
// EndpointDetails: []*armbatch.EndpointDetail{
// {
// Port: to.Ptr[int32](443),
// }},
// },
// {
// Description: to.Ptr("Applicable to all Azure Batch pools."),
// DomainName: to.Ptr("*.blob.core.windows.net"),
// EndpointDetails: []*armbatch.EndpointDetail{
// {
// Port: to.Ptr[int32](443),
// }},
// },
// {
// Description: to.Ptr("Applicable to all Azure Batch pools."),
// DomainName: to.Ptr("*.table.core.windows.net"),
// EndpointDetails: []*armbatch.EndpointDetail{
// {
// Port: to.Ptr[int32](443),
// }},
// },
// {
// Description: to.Ptr("Applicable to all Azure Batch pools."),
// DomainName: to.Ptr("*.queue.core.windows.net"),
// EndpointDetails: []*armbatch.EndpointDetail{
// {
// Port: to.Ptr[int32](443),
// }},
// }},
// },
// {
// Category: to.Ptr("Microsoft Package Repository"),
// Endpoints: []*armbatch.EndpointDependency{
// {
// Description: to.Ptr("Only applicable to pools containing a Mount Configuration. Learn about Mount Configurations in Batch at https://docs.microsoft.com/azure/batch/virtual-file-mount."),
// DomainName: to.Ptr("packages.microsoft.com"),
// EndpointDetails: []*armbatch.EndpointDetail{
// {
// Port: to.Ptr[int32](443),
// }},
// }},
// },
// {
// Category: to.Ptr("Azure Key Vault"),
// Endpoints: []*armbatch.EndpointDependency{
// {
// Description: to.Ptr("Only applicable to pools containing a Disk Encryption Configuration and whose VM size does not support encryption at host. Learn more about disk encryption in Azure Batch at https://docs.microsoft.com/azure/batch/disk-encryption. Learn more about encryption at host and supported VM sizes at https://docs.microsoft.com/azure/virtual-machines/disks-enable-host-based-encryption-portal."),
// DomainName: to.Ptr("*.vault.azure.net"),
// EndpointDetails: []*armbatch.EndpointDetail{
// {
// Port: to.Ptr[int32](443),
// }},
// }},
// }},
// }
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { BatchManagementClient } = require("@azure/arm-batch");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Lists the endpoints that a Batch Compute Node under this Batch Account may call as part of Batch service administration. If you are deploying a Pool inside of a virtual network that you specify, you must make sure your network allows outbound access to these endpoints. Failure to allow access to these endpoints may cause Batch to mark the affected nodes as unusable. For more information about creating a pool inside of a virtual network, see https://docs.microsoft.com/azure/batch/batch-virtual-network.
*
* @summary Lists the endpoints that a Batch Compute Node under this Batch Account may call as part of Batch service administration. If you are deploying a Pool inside of a virtual network that you specify, you must make sure your network allows outbound access to these endpoints. Failure to allow access to these endpoints may cause Batch to mark the affected nodes as unusable. For more information about creating a pool inside of a virtual network, see https://docs.microsoft.com/azure/batch/batch-virtual-network.
* x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountListOutboundNetworkDependenciesEndpoints.json
*/
async function listOutboundNetworkDependencies() {
const subscriptionId = process.env["BATCH_SUBSCRIPTION_ID"] || "subid";
const resourceGroupName = process.env["BATCH_RESOURCE_GROUP"] || "default-azurebatch-japaneast";
const accountName = "sampleacct";
const credential = new DefaultAzureCredential();
const client = new BatchManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.batchAccountOperations.listOutboundNetworkDependenciesEndpoints(
resourceGroupName,
accountName,
)) {
resArray.push(item);
}
console.log(resArray);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Batch.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Batch;
// Generated from example definition: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountListOutboundNetworkDependenciesEndpoints.json
// this example is just showing the usage of "BatchAccount_ListOutboundNetworkDependenciesEndpoints" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this BatchAccountResource created on azure
// for more information of creating BatchAccountResource, please refer to the document of BatchAccountResource
string subscriptionId = "subid";
string resourceGroupName = "default-azurebatch-japaneast";
string accountName = "sampleacct";
ResourceIdentifier batchAccountResourceId = BatchAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName);
BatchAccountResource batchAccount = client.GetBatchAccountResource(batchAccountResourceId);
// invoke the operation and iterate over the result
await foreach (BatchAccountOutboundEnvironmentEndpoint item in batchAccount.GetOutboundNetworkDependenciesEndpointsAsync())
{
Console.WriteLine($"Succeeded: {item}");
}
Console.WriteLine($"Succeeded");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Beispiel für eine Antwort
{
"value": [
{
"category": "Azure Batch",
"endpoints": [
{
"domainName": "sampleacct.japaneast.batch.azure.com",
"description": "Applicable to job manager tasks, tasks that use job scoped authentication, or any task that makes calls to Batch.",
"endpointDetails": [
{
"port": 443
}
]
},
{
"domainName": "japaneast.service.batch.azure.com",
"description": "Applicable to all Azure Batch pools.",
"endpointDetails": [
{
"port": 443
}
]
}
]
},
{
"category": "Azure Storage",
"endpoints": [
{
"domainName": "autostorageaccountname.blob.core.windows.net",
"description": "AutoStorage endpoint for this Batch account. Applicable to all Azure Batch pools under this account.",
"endpointDetails": [
{
"port": 443
}
]
},
{
"domainName": "*.blob.core.windows.net",
"description": "Applicable to all Azure Batch pools.",
"endpointDetails": [
{
"port": 443
}
]
},
{
"domainName": "*.table.core.windows.net",
"description": "Applicable to all Azure Batch pools.",
"endpointDetails": [
{
"port": 443
}
]
},
{
"domainName": "*.queue.core.windows.net",
"description": "Applicable to all Azure Batch pools.",
"endpointDetails": [
{
"port": 443
}
]
}
]
},
{
"category": "Microsoft Package Repository",
"endpoints": [
{
"domainName": "packages.microsoft.com",
"description": "Only applicable to pools containing a Mount Configuration. Learn about Mount Configurations in Batch at https://learn.microsoft.com/azure/batch/virtual-file-mount.",
"endpointDetails": [
{
"port": 443
}
]
}
]
},
{
"category": "Azure Key Vault",
"endpoints": [
{
"domainName": "*.vault.azure.net",
"description": "Only applicable to pools containing a Disk Encryption Configuration and whose VM size does not support encryption at host. Learn more about disk encryption in Azure Batch at https://learn.microsoft.com/azure/batch/disk-encryption. Learn more about encryption at host and supported VM sizes at https://learn.microsoft.com/azure/virtual-machines/disks-enable-host-based-encryption-portal.",
"endpointDetails": [
{
"port": 443
}
]
}
]
}
]
}
Definitionen
CloudError
Eine Fehlerantwort des Batchdiensts.
Name |
Typ |
Beschreibung |
error
|
CloudErrorBody
|
Der Textkörper der Fehlerantwort.
|
CloudErrorBody
Eine Fehlerantwort des Batchdiensts.
Name |
Typ |
Beschreibung |
code
|
string
|
Ein Bezeichner für den Fehler. Codes sind unveränderlich und sollen programmgesteuert genutzt werden.
|
details
|
CloudErrorBody[]
|
Eine Liste mit zusätzlichen Details zum Fehler.
|
message
|
string
|
Eine Meldung, die den Fehler beschreibt, der für die Anzeige in einer Benutzeroberfläche geeignet ist.
|
target
|
string
|
Das Ziel des bestimmten Fehlers. Beispielsweise der Name der Eigenschaft im Fehler.
|
EndpointDependency
Ein Domänenname und Verbindungsdetails, die für den Zugriff auf eine Abhängigkeit verwendet werden.
Name |
Typ |
Beschreibung |
description
|
string
|
Menschlichen lesbare ergänzende Informationen über die Abhängigkeit und gegebenenfalls.
|
domainName
|
string
|
Der Domänenname der Abhängigkeit. Domänennamen können vollqualifizierte oder einen * -Wildcard enthalten.
|
endpointDetails
|
EndpointDetail[]
|
Die Liste der Verbindungsdetails für diesen Endpunkt.
|
EndpointDetail
Details zur Verbindung zwischen dem Batchdienst und dem Endpunkt.
Name |
Typ |
Beschreibung |
port
|
integer
|
Der Port, mit dem ein Endpunkt verbunden ist.
|
OutboundEnvironmentEndpoint
Eine Sammlung verwandter Endpunkte aus demselben Dienst, für den der Batchdienst ausgehenden Zugriff erfordert.
Name |
Typ |
Beschreibung |
category
|
string
|
Der Diensttyp, mit dem der Batchdienst eine Verbindung herstellt.
|
endpoints
|
EndpointDependency[]
|
Die Endpunkte für diesen Dienst, an die der Batchdienst ausgehende Anrufe durchführt.
|
OutboundEnvironmentEndpointCollection
Vom Listenvorgang zurückgegebene Werte.
Name |
Typ |
Beschreibung |
nextLink
|
string
|
Das Fortsetzungstoken.
|
value
|
OutboundEnvironmentEndpoint[]
|
Die Sammlung von ausgehenden Netzwerkabhängigkeitsendpunkten, die vom Eintragsvorgang zurückgegeben werden.
|