컴퓨팅에 있는 모든 컴퓨팅 노드의 세부 정보(예: IP 주소, 포트 등)를 가져옵니다.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listNodes?api-version=2024-04-01
URI 매개 변수
Name |
In(다음 안에) |
필수 |
형식 |
Description |
computeName
|
path |
True
|
string
|
Azure Machine Learning 컴퓨팅의 이름입니다.
|
resourceGroupName
|
path |
True
|
string
|
리소스 그룹의 이름. 이름은 대소문자를 구분하지 않습니다.
|
subscriptionId
|
path |
True
|
string
|
대상 구독의 ID입니다.
|
workspaceName
|
path |
True
|
string
|
Azure Machine Learning 작업 영역의 이름입니다.
regex 패턴: ^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$
|
api-version
|
query |
True
|
string
|
이 작업에 사용할 API 버전입니다.
|
응답
보안
azure_auth
Azure Active Directory OAuth2 Flow.
형식:
oauth2
Flow:
implicit
권한 부여 URL:
https://login.microsoftonline.com/common/oauth2/authorize
범위
Name |
Description |
user_impersonation
|
사용자 계정 가장
|
예제
샘플 요청
POST https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123/listNodes?api-version=2024-04-01
/**
* Samples for Compute ListNodes.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/
* examples/Compute/listNodes.json
*/
/**
* Sample code: Get compute nodes information for a compute.
*
* @param manager Entry point to MachineLearningManager.
*/
public static void getComputeNodesInformationForACompute(
com.azure.resourcemanager.machinelearning.MachineLearningManager manager) {
manager.computes().listNodes("testrg123", "workspaces123", "compute123", 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
package armmachinelearning_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v4"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/listNodes.json
func ExampleComputeClient_NewListNodesPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewComputeClient().NewListNodesPager("testrg123", "workspaces123", "compute123", nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Nodes {
// 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.AmlComputeNodesInformation = armmachinelearning.AmlComputeNodesInformation{
// Nodes: []*armmachinelearning.AmlComputeNodeInformation{
// {
// NodeID: to.Ptr("tvm-3601533753_1-20170719t162906z"),
// NodeState: to.Ptr(armmachinelearning.NodeStateRunning),
// Port: to.Ptr[int32](50000),
// PrivateIPAddress: to.Ptr("13.84.190.124"),
// PublicIPAddress: to.Ptr("13.84.190.134"),
// RunID: to.Ptr("2f378a44-38f2-443a-9f0d-9909d0b47890"),
// },
// {
// NodeID: to.Ptr("tvm-3601533753_2-20170719t162906z"),
// NodeState: to.Ptr(armmachinelearning.NodeStateIdle),
// Port: to.Ptr[int32](50001),
// PrivateIPAddress: to.Ptr("13.84.190.124"),
// PublicIPAddress: to.Ptr("13.84.190.134"),
// }},
// }
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { AzureMachineLearningServicesManagementClient } = require("@azure/arm-machinelearning");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get the details (e.g IP address, port etc) of all the compute nodes in the compute.
*
* @summary Get the details (e.g IP address, port etc) of all the compute nodes in the compute.
* x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/listNodes.json
*/
async function getComputeNodesInformationForACompute() {
const subscriptionId =
process.env["MACHINELEARNING_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
const resourceGroupName = process.env["MACHINELEARNING_RESOURCE_GROUP"] || "testrg123";
const workspaceName = "workspaces123";
const computeName = "compute123";
const credential = new DefaultAzureCredential();
const client = new AzureMachineLearningServicesManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.computeOperations.listNodes(
resourceGroupName,
workspaceName,
computeName,
)) {
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 System.Xml;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MachineLearning.Models;
using Azure.ResourceManager.MachineLearning;
// Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/listNodes.json
// this example is just showing the usage of "Compute_ListNodes" 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 MachineLearningComputeResource created on azure
// for more information of creating MachineLearningComputeResource, please refer to the document of MachineLearningComputeResource
string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
string resourceGroupName = "testrg123";
string workspaceName = "workspaces123";
string computeName = "compute123";
ResourceIdentifier machineLearningComputeResourceId = MachineLearningComputeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, computeName);
MachineLearningComputeResource machineLearningCompute = client.GetMachineLearningComputeResource(machineLearningComputeResourceId);
// invoke the operation and iterate over the result
await foreach (AmlComputeNodeInformation item in machineLearningCompute.GetNodesAsync())
{
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
샘플 응답
{
"nodes": [
{
"nodeId": "tvm-3601533753_1-20170719t162906z",
"privateIpAddress": "13.84.190.124",
"publicIpAddress": "13.84.190.134",
"port": 50000,
"nodeState": "running",
"runId": "2f378a44-38f2-443a-9f0d-9909d0b47890"
},
{
"nodeId": "tvm-3601533753_2-20170719t162906z",
"privateIpAddress": "13.84.190.124",
"publicIpAddress": "13.84.190.134",
"port": 50001,
"nodeState": "idle"
}
],
"nextLink": "nextLink"
}
정의
AmlCompute와 관련된 컴퓨팅 노드 정보입니다.
Name |
형식 |
Description |
nodeId
|
string
|
노드 ID입니다.
컴퓨팅 노드의 ID입니다.
|
nodeState
|
nodeState
|
컴퓨팅 노드의 상태입니다. 값은 유휴 상태, 실행 중, 준비 중, 사용할 수 없음, 출발 및 선점입니다.
|
port
|
number
|
포트.
노드의 SSH 포트 번호입니다.
|
privateIpAddress
|
string
|
개인 IP 주소입니다.
컴퓨팅 노드의 개인 IP 주소입니다.
|
publicIpAddress
|
string
|
공용 IP 주소.
컴퓨팅 노드의 공용 IP 주소입니다.
|
runId
|
string
|
실행 ID입니다.
노드에서 실행되는 실험의 ID입니다(다른 null인 경우).
|
AmlCompute 노드의 결과
ErrorAdditionalInfo
리소스 관리 오류 추가 정보입니다.
Name |
형식 |
Description |
info
|
object
|
추가 정보입니다.
|
type
|
string
|
추가 정보 유형입니다.
|
ErrorDetail
오류 세부 정보입니다.
Name |
형식 |
Description |
additionalInfo
|
ErrorAdditionalInfo[]
|
오류 추가 정보입니다.
|
code
|
string
|
오류 코드입니다.
|
details
|
ErrorDetail[]
|
오류 세부 정보입니다.
|
message
|
string
|
오류 메시지입니다.
|
target
|
string
|
오류 대상입니다.
|
ErrorResponse
오류 응답
nodeState
컴퓨팅 노드의 상태입니다. 값은 유휴 상태, 실행 중, 준비 중, 사용할 수 없음, 출발 및 선점입니다.
Name |
형식 |
Description |
idle
|
string
|
|
leaving
|
string
|
|
preempted
|
string
|
|
preparing
|
string
|
|
running
|
string
|
|
unusable
|
string
|
|