Machines - List
Gets a list of machines in the specified agent pool.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines?api-version=2025-02-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
agent
|
path | True |
string minLength: 1maxLength: 12 pattern: ^[a-z][a-z0-9]{0,11}$ |
The name of the agent pool. |
resource
|
path | True |
string minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
resource
|
path | True |
string minLength: 1maxLength: 63 pattern: ^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$ |
The name of the managed cluster resource. |
subscription
|
path | True |
string (uuid) |
The ID of the target subscription. The value must be an UUID. |
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK |
|
Other Status Codes |
Error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
List Machines in an Agentpool by Managed Cluster
Sample request
Sample response
{
"value": [
{
"id": "/subscriptions/26fe00f8-9173-4872-9134-bb1d2e00343a/resourceGroups/dummyRG/providers/Microsoft.ContainerService/managedClusters/round/agentPools/nodepool1/machines/aks-nodepool1-25481572-vmss000000",
"name": "aks-nodepool1-25481572-vmss000000",
"type": "Microsoft.ContainerService/managedClusters/agentPools/machines",
"properties": {
"network": {
"ipAddresses": [
{
"ip": "172.20.2.4",
"family": "IPv4"
},
{
"ip": "10.0.0.1",
"family": "IPv4"
}
]
},
"resourceId": "/subscriptions/26fe00f8-9173-4872-9134-bb1d2e00343a/resourceGroups/dummyRG/providers/Microsoft.Compute/virtualMachineScaleSets/aks-nodepool1-25481572-vmss/virtualMachines/0"
}
}
],
"nextLink": "http://xxxx.azure.com?encodedToken=c2tpcFRva2VuPTE"
}
Definitions
Name | Description |
---|---|
Cloud |
An error response from the Container service. |
Cloud |
An error response from the Container service. |
IPFamily |
To determine if address belongs IPv4 or IPv6 family |
Machine |
A machine. Contains details about the underlying virtual machine. A machine may be visible here but not in kubectl get nodes; if so it may be because the machine has not been registered with the Kubernetes API Server yet. |
Machine |
The machine IP address details. |
Machine |
The response from the List Machines operation. |
Machine |
network properties of the machine |
Machine |
The properties of the machine |
CloudError
An error response from the Container service.
Name | Type | Description |
---|---|---|
error |
Details about the error. |
CloudErrorBody
An error response from the Container service.
Name | Type | Description |
---|---|---|
code |
string |
An identifier for the error. Codes are invariant and are intended to be consumed programmatically. |
details |
A list of additional details about the error. |
|
message |
string |
A message describing the error, intended to be suitable for display in a user interface. |
target |
string |
The target of the particular error. For example, the name of the property in error. |
IPFamily
To determine if address belongs IPv4 or IPv6 family
Value | Description |
---|---|
IPv4 |
IPv4 family |
IPv6 |
IPv6 family |
Machine
A machine. Contains details about the underlying virtual machine. A machine may be visible here but not in kubectl get nodes; if so it may be because the machine has not been registered with the Kubernetes API Server yet.
Name | Type | Description |
---|---|---|
id |
string |
Resource ID. |
name |
string |
The name of the resource that is unique within a resource group. This name can be used to access the resource. |
properties |
The properties of the machine |
|
type |
string |
Resource type |
MachineIpAddress
The machine IP address details.
Name | Type | Description |
---|---|---|
family |
To determine if address belongs IPv4 or IPv6 family |
|
ip |
string |
IPv4 or IPv6 address of the machine |
MachineListResult
The response from the List Machines operation.
Name | Type | Description |
---|---|---|
nextLink |
string (uri) |
The URL to get the next set of machine results. |
value |
Machine[] |
The list of Machines in cluster. |
MachineNetworkProperties
network properties of the machine
Name | Type | Description |
---|---|---|
ipAddresses |
IPv4, IPv6 addresses of the machine |
MachineProperties
The properties of the machine
Name | Type | Description |
---|---|---|
network |
network properties of the machine |
|
resourceId |
string (arm-id) |
Azure resource id of the machine. It can be used to GET underlying VM Instance |