Listen die Endpunkte, die ein Batchcomputeknoten unter diesem Batch-Konto im Rahmen der Batch-Dienstverwaltung aufrufen kann. Wenn Sie einen Pool in einem von Ihnen angegebenen virtuellen Netzwerk bereitstellen, müssen Sie sicherstellen, dass Ihr Netzwerk ausgehenden Zugriff auf diese Endpunkte zulässt. Wenn sie den Zugriff auf diese Endpunkte nicht zulassen, kann dies dazu führen, dass Batch die betroffenen Knoten als nicht verwendbar markiert. Weitere Informationen zum Erstellen eines Pools innerhalb eines virtuellen Netzwerks finden Sie unter https://docs.microsoft.com/en-us/azure/batch/batch-virtual-network.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/outboundNetworkDependenciesEndpoints?api-version=2024-02-01
URI-Parameter
Name |
In |
Erforderlich |
Typ |
Beschreibung |
accountName
|
path |
True
|
string
|
Der Name des Batch-Kontos.
Regex pattern: ^[a-zA-Z0-9]+$
|
resourceGroupName
|
path |
True
|
string
|
Der Name der Ressourcengruppe, die das Batch-Konto enthält.
|
subscriptionId
|
path |
True
|
string
|
Die Azure-Abonnement-ID. Dies ist eine GUID-formatierte Zeichenfolge (z. B. 0000000-0000-0000-0000-000000000000000000)
|
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 wurde durchgeführt. Die Antwort enthält eine Liste der ausgehenden Netzwerkabhängigkeiten.
|
Other Status Codes
|
CloudError
|
Fehlerantwort mit Beschreibung des Grunds für den Fehler.
|
Sicherheit
azure_auth
Microsoft Entra OAuth 2.0-Authentifizierungscodeflow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name |
Beschreibung |
user_impersonation
|
Identitätswechsel Ihres Benutzerkontos
|
Beispiele
ListOutboundNetworkDependencies
Sample Request
GET https://management.azure.com/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/outboundNetworkDependenciesEndpoints?api-version=2024-02-01
/**
* Samples for BatchAccount ListOutboundNetworkDependenciesEndpoints.
*/
public final class Main {
/*
* x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-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-02-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/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-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-02-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 System;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.Batch;
using Azure.ResourceManager.Batch.Models;
using Azure.ResourceManager.Resources;
// Generated from example definition: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-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
Sample Response
{
"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://docs.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://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.",
"endpointDetails": [
{
"port": 443
}
]
}
]
}
]
}
Definitionen
CloudError
Eine Fehlerantwort des Batch-Diensts.
Name |
Typ |
Beschreibung |
error
|
CloudErrorBody
|
Der Text der Fehlerantwort.
|
CloudErrorBody
Eine Fehlerantwort des Batch-Diensts.
Name |
Typ |
Beschreibung |
code
|
string
|
Ein Bezeichner für den Fehler. Codes sind unveränderlich und sollten programmgesteuert verwendet werden.
|
details
|
CloudErrorBody[]
|
Eine Liste mit zusätzlichen Details zum Fehler.
|
message
|
string
|
Eine Meldung, die den Fehler beschreibt, die für die Anzeige in einer Benutzeroberfläche geeignet sein soll.
|
target
|
string
|
Das Ziel des bestimmten Fehlers. Beispiel: Der Name der -Eigenschaft, die einen Fehler aufweist.
|
EndpointDependency
Ein Domänenname und Verbindungsdetails, die für den Zugriff auf eine Abhängigkeit verwendet werden.
Name |
Typ |
Beschreibung |
description
|
string
|
Lesbare ergänzende Informationen über die Abhängigkeit und wann sie anwendbar ist.
|
domainName
|
string
|
Der Domänenname der Abhängigkeit. Domänennamen können voll qualifiziert sein oder ein * -Wildcard enthalten.
|
endpointDetails
|
EndpointDetail[]
|
Die Liste der Verbindungsdetails für diesen Endpunkt.
|
EndpointDetail
Details zur Verbindung zwischen dem Batch-Dienst und dem Endpunkt.
Name |
Typ |
Beschreibung |
port
|
integer
|
Der Port, mit dem ein Endpunkt verbunden ist.
|
OutboundEnvironmentEndpoint
Eine Sammlung verwandter Endpunkte desselben Diensts, für den der Batch-Dienst ausgehenden Zugriff erfordert.
Name |
Typ |
Beschreibung |
category
|
string
|
Der Diensttyp, mit dem der Batch-Dienst eine Verbindung herstellt.
|
endpoints
|
EndpointDependency[]
|
Die Endpunkte für diesen Dienst, an die der Batch-Dienst ausgehende Aufrufe durchführt.
|
OutboundEnvironmentEndpointCollection
Vom Listenvorgang zurückgegebene Werte.
Name |
Typ |
Beschreibung |
nextLink
|
string
|
Das Fortsetzungstoken.
|
value
|
OutboundEnvironmentEndpoint[]
|
Die Sammlung ausgehender Netzwerkabhängigkeitsendpunkte, die vom Listenvorgang zurückgegeben werden.
|