Listák azokat a végpontokat, amelyeket az ebben a Batch-fiókban lévő Batch számítási csomópont meghívhat a Batch-szolgáltatásfelügyelet részeként. Ha egy készletet helyez üzembe egy megadott virtuális hálózaton belül, győződjön meg arról, hogy a hálózat engedélyezi a kimenő hozzáférést ezekhez a végpontokhoz. Ha nem engedélyezi a hozzáférést ezekhez a végpontokhoz, előfordulhat, hogy a Batch használhatatlanként jelöli meg az érintett csomópontokat. A virtuális hálózaton belüli készlet létrehozásával kapcsolatos további információkért lásd: 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-paraméterek
Name |
In |
Kötelező |
Típus |
Description |
accountName
|
path |
True
|
string
|
A Batch-fiók neve.
Regex pattern: ^[a-zA-Z0-9]+$
|
resourceGroupName
|
path |
True
|
string
|
A Batch-fiókot tartalmazó erőforráscsoport neve.
|
subscriptionId
|
path |
True
|
string
|
Az Azure-előfizetés azonosítója. Ez egy GUID formátumú sztring (pl. 00000000-0000-0000-0000-0000000000000)
|
api-version
|
query |
True
|
string
|
A HTTP-kéréshez használandó API-verzió.
|
Válaszok
Name |
Típus |
Description |
200 OK
|
OutboundEnvironmentEndpointCollection
|
A művelet sikeres volt. A válasz tartalmazza a kimenő hálózati függőségek listáját.
|
Other Status Codes
|
CloudError
|
Hibaválasz, amely leírja, hogy a művelet miért hiúsult meg.
|
Biztonság
azure_auth
Microsoft Entra OAuth 2.0 hitelesítési kódfolyamata
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name |
Description |
user_impersonation
|
felhasználói fiók megszemélyesítése
|
Példák
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
}
]
}
]
}
]
}
Definíciók
CloudError
Hibaválasz a Batch szolgáltatástól.
Name |
Típus |
Description |
error
|
CloudErrorBody
|
A hibaválasz törzse.
|
CloudErrorBody
Hibaválasz a Batch szolgáltatástól.
Name |
Típus |
Description |
code
|
string
|
A hiba azonosítója. A kódok invariánsak, és programozott módon használhatók.
|
details
|
CloudErrorBody[]
|
A hibával kapcsolatos további részletek listája.
|
message
|
string
|
A hibát leíró üzenet, amely alkalmas a felhasználói felületen való megjelenítésre.
|
target
|
string
|
Az adott hiba célja. Például a hibás tulajdonság neve.
|
EndpointDependency
Egy függőség eléréséhez használt tartománynév és kapcsolati adatok.
Name |
Típus |
Description |
description
|
string
|
Emberi olvasásra alkalmas kiegészítő információk a függőségről és annak alkalmazhatóságáról.
|
domainName
|
string
|
A függőség tartományneve. A tartománynevek teljes mértékben minősítettek lehetnek, vagy * helyettesítő karaktert tartalmazhatnak.
|
endpointDetails
|
EndpointDetail[]
|
A végpont kapcsolati adatainak listája.
|
EndpointDetail
A Batch szolgáltatás és a végpont közötti kapcsolat részletei.
Name |
Típus |
Description |
port
|
integer
|
Az a port, amelyhez a végpont csatlakozik.
|
OutboundEnvironmentEndpoint
Kapcsolódó végpontok gyűjteménye ugyanabból a szolgáltatásból, amelyhez a Batch szolgáltatás kimenő hozzáférést igényel.
Name |
Típus |
Description |
category
|
string
|
Az a szolgáltatástípus, amelyhez a Batch szolgáltatás csatlakozik.
|
endpoints
|
EndpointDependency[]
|
A szolgáltatás végpontjai, amelyekre a Batch szolgáltatás kimenő hívásokat hajt végre.
|
OutboundEnvironmentEndpointCollection
A Lista művelet által visszaadott értékek.
Name |
Típus |
Description |
nextLink
|
string
|
A folytatási jogkivonat.
|
value
|
OutboundEnvironmentEndpoint[]
|
A listázási művelet által visszaadott kimenő hálózati függőségi végpontok gyűjteménye.
|