Virtual Machines - List Hosts

Lists the HDInsight clusters hosts

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/listHosts?api-version=2021-06-01

URI Parameters

Name In Required Type Description
clusterName
path True

string

The name of the cluster.

resourceGroupName
path True

string

The name of the resource group.

subscriptionId
path True

string

The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

api-version
query True

string

The HDInsight client API Version.

Responses

Name Type Description
200 OK

HostInfo[]

OK response definition.

Other Status Codes

ErrorResponse

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

Get All hosts in the cluster

Sample request

POST https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1/listHosts?api-version=2021-06-01

Sample response

[
  {
    "name": "gateway1"
  },
  {
    "name": "gateway3"
  },
  {
    "name": "headnode0"
  },
  {
    "name": "headnode3"
  },
  {
    "name": "workernode0"
  },
  {
    "name": "workernode1"
  },
  {
    "name": "zookeepernode0"
  },
  {
    "name": "zookeepernode2"
  },
  {
    "name": "zookeepernode3"
  }
]

Definitions

Name Description
ErrorResponse

Describes the format of Error response.

HostInfo

The cluster host information.

ErrorResponse

Describes the format of Error response.

Name Type Description
code

string

Error code

message

string

Error message indicating why the operation failed.

HostInfo

The cluster host information.

Name Type Description
effectiveDiskEncryptionKeyUrl

string

The effective disk encryption key URL used by the host

fqdn

string

The Fully Qualified Domain Name of host

name

string

The host name