virtual_machines
Creates, updates, deletes, gets or lists a virtual_machines resource.
Overview
| Name | virtual_machines |
| Type | Resource |
| Id | azure.hdinsight.virtual_machines |
Fields
The following fields are returned by SELECT queries:
- get_async_operation_status
- list_hosts
| Name | Datatype | Description |
|---|---|---|
error | object | The error message associated with the cluster creation. |
status | string | The async operation state. Known values are: "InProgress", "Succeeded", and "Failed". (InProgress, Succeeded, Failed) |
| Name | Datatype | Description |
|---|---|---|
name | string | The host name. |
effectiveDiskEncryptionKeyUrl | string | The effective disk encryption key URL used by the host. |
fqdn | string | The Fully Qualified Domain Name of host. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_async_operation_status | select | resource_group_name, cluster_name, operation_id, subscription_id | Gets the async operation status. | |
list_hosts | select | resource_group_name, cluster_name, subscription_id | Lists the HDInsight clusters hosts. | |
restart_hosts | exec | resource_group_name, cluster_name, subscription_id | Restarts the specified HDInsight cluster hosts. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
cluster_name | string | The name of the cluster. Required. |
operation_id | string | The long running operation id. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string |
SELECT examples
- get_async_operation_status
- list_hosts
Gets the async operation status.
SELECT
error,
status
FROM azure.hdinsight.virtual_machines
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND cluster_name = '{{ cluster_name }}' -- required
AND operation_id = '{{ operation_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Lists the HDInsight clusters hosts.
SELECT
name,
effectiveDiskEncryptionKeyUrl,
fqdn
FROM azure.hdinsight.virtual_machines
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND cluster_name = '{{ cluster_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Lifecycle Methods
- restart_hosts
Restarts the specified HDInsight cluster hosts.
EXEC azure.hdinsight.virtual_machines.restart_hosts
@resource_group_name='{{ resource_group_name }}' --required,
@cluster_name='{{ cluster_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;