Списки конечные точки, которые вычислительный узел пакетной службы в этой учетной записи пакетной службы может вызывать в рамках администрирования пакетной службы. При развертывании пула в указанной виртуальной сети необходимо убедиться, что сеть разрешает исходящий доступ к этим конечным точкам. Сбой при доступе к этим конечным точкам может привести к тому, что пакетная служба помечает затронутые узлы как непригодные для использования. Дополнительные сведения о создании пула в виртуальной сети см. в разделе 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
Имя |
В |
Обязательно |
Тип |
Описание |
accountName
|
path |
True
|
string
|
Имя учетной записи пакетной службы.
Regex pattern: ^[a-zA-Z0-9]+$
|
resourceGroupName
|
path |
True
|
string
|
Имя группы ресурсов, содержащей учетную запись пакетной службы.
|
subscriptionId
|
path |
True
|
string
|
Идентификатор подписки Azure. Это строка в формате GUID (например, 0000000-0000-0000-0000-0000-000000000000000).
|
api-version
|
query |
True
|
string
|
Версия API, используемая с HTTP-запросом.
|
Ответы
Имя |
Тип |
Описание |
200 OK
|
OutboundEnvironmentEndpointCollection
|
Операция выполнена успешно. Ответ содержит список исходящих сетевых зависимостей.
|
Other Status Codes
|
CloudError
|
Ответ об ошибке, описывающий причину сбоя операции.
|
Безопасность
azure_auth
Microsoft Entra поток кода проверки подлинности OAuth 2.0
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Имя |
Описание |
user_impersonation
|
олицетворения учетной записи пользователя
|
Примеры
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
}
]
}
]
}
]
}
Определения
CloudError
Ответ об ошибке от пакетной службы.
Имя |
Тип |
Описание |
error
|
CloudErrorBody
|
Текст ответа об ошибке.
|
CloudErrorBody
Ответ об ошибке от пакетной службы.
Имя |
Тип |
Описание |
code
|
string
|
Идентификатор ошибки. Коды инвариантны и предназначены для программного использования.
|
details
|
CloudErrorBody[]
|
Список дополнительных сведений об ошибке.
|
message
|
string
|
Сообщение с описанием ошибки, предназначенное для отображения в пользовательском интерфейсе.
|
target
|
string
|
Целевой объект конкретной ошибки. Например, имя свойства в ошибке.
|
EndpointDependency
Доменное имя и сведения о подключении, используемые для доступа к зависимости.
Имя |
Тип |
Описание |
description
|
string
|
Доступные для чтения дополнительные сведения о зависимости и ее применимости.
|
domainName
|
string
|
Доменное имя зависимости. Доменные имена могут быть полными или содержать подстановочный знак * .
|
endpointDetails
|
EndpointDetail[]
|
Список сведений о подключении для этой конечной точки.
|
EndpointDetail
Сведения о подключении между пакетной службой и конечной точкой.
Имя |
Тип |
Описание |
port
|
integer
|
Порт, к которому подключена конечная точка.
|
OutboundEnvironmentEndpoint
Коллекция связанных конечных точек из той же службы, для которой пакетной службе требуется исходящий доступ.
Имя |
Тип |
Описание |
category
|
string
|
Тип службы, к которому подключается пакетная служба.
|
endpoints
|
EndpointDependency[]
|
Конечные точки для этой службы, к которым пакетная служба выполняет исходящие вызовы.
|
OutboundEnvironmentEndpointCollection
Значения, возвращаемые операцией List.
Имя |
Тип |
Описание |
nextLink
|
string
|
Токен продолжения.
|
value
|
OutboundEnvironmentEndpoint[]
|
Коллекция конечных точек исходящих сетевых зависимостей, возвращаемых операцией перечисления.
|