Skip to main content

virtual_machines

Creates, updates, deletes, gets or lists a virtual_machines resource.

Overview

Namevirtual_machines
TypeResource
Idazure.hdinsight.virtual_machines

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
errorobjectThe error message associated with the cluster creation.
statusstringThe async operation state. Known values are: "InProgress", "Succeeded", and "Failed". (InProgress, Succeeded, Failed)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_async_operation_statusselectresource_group_name, cluster_name, operation_id, subscription_idGets the async operation status.
list_hostsselectresource_group_name, cluster_name, subscription_idLists the HDInsight clusters hosts.
restart_hostsexecresource_group_name, cluster_name, subscription_idRestarts 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.

NameDatatypeDescription
cluster_namestringThe name of the cluster. Required.
operation_idstringThe long running operation id. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

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
;

Lifecycle Methods

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
;