Выводит список конечных точек, которые узел вычислений пакетной службы в этой учетной записи пакетной службы может вызываться в рамках администрирования пакетной службы. При развертывании пула в указанной виртуальной сети необходимо убедиться, что сеть разрешает исходящий доступ к этим конечным точкам. Сбой разрешения доступа к этим конечным точкам может привести к тому, что пакетная служба помечает затронутые узлы как неиспользуемые. Дополнительные сведения о создании пула в виртуальной сети см. в 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
Имя |
В |
Обязательно |
Тип |
Описание |
accountName
|
path |
True
|
string
|
Имя учетной записи пакетной службы.
Шаблон регулярного выражения: ^[a-zA-Z0-9]+$
|
resourceGroupName
|
path |
True
|
string
|
Имя группы ресурсов, содержащей учетную запись пакетной службы.
|
subscriptionId
|
path |
True
|
string
|
Идентификатор подписки Azure. Это строка с форматом GUID (например, 000000000-0000-0000-0000-0000-000000000000000000000)
|
api-version
|
query |
True
|
string
|
Версия API, используемая с HTTP-запросом.
|
Ответы
Безопасность
azure_auth
Поток кода проверки подлинности Microsoft Entra OAuth 2.0
Тип:
oauth2
Flow:
implicit
URL-адрес авторизации:
https://login.microsoftonline.com/common/oauth2/authorize
Области
Имя |
Описание |
user_impersonation
|
олицетворения учетной записи пользователя
|
Примеры
ListOutboundNetworkDependencies
Образец запроса
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
Пример ответа
{
"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
}
]
}
]
}
]
}
Определения
CloudError
Ответ на ошибку из пакетной службы.
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[]
|
Коллекция конечных точек исходящей сети, возвращаемых операцией перечисления.
|