Skip to main content

clusters

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

Overview

Nameclusters
TypeResource
Idazure.hdinsight.clusters

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_azure_async_operation_statusselectresource_group_name, cluster_name, operation_id, subscription_idThe the async operation status.
getselectresource_group_name, cluster_name, subscription_idGets the specified cluster.
list_by_resource_groupselectresource_group_name, subscription_idLists the HDInsight clusters in a resource group.
listselectsubscription_idLists all the HDInsight clusters under the subscription.
createinsertresource_group_name, cluster_name, subscription_idCreates a new HDInsight cluster with the specified parameters.
updateupdateresource_group_name, cluster_name, subscription_idPatch HDInsight cluster with the specified parameters.
deletedeleteresource_group_name, cluster_name, subscription_idDeletes the specified HDInsight cluster.
get_gateway_settingsexecresource_group_name, cluster_name, subscription_idGets the gateway settings for the specified cluster.
resizeexecresource_group_name, cluster_name, role_name, subscription_idResizes the specified HDInsight cluster to the specified size.
update_auto_scale_configurationexecresource_group_name, cluster_name, role_name, subscription_idUpdates the Autoscale Configuration for HDInsight cluster.
rotate_disk_encryption_keyexecresource_group_name, cluster_name, subscription_idRotate disk encryption key of the specified HDInsight cluster.
update_gateway_settingsexecresource_group_name, cluster_name, subscription_idConfigures the gateway settings on the specified cluster.
update_identity_certificateexecresource_group_name, cluster_name, subscription_idUpdates the cluster identity certificate.
execute_script_actionsexecresource_group_name, cluster_name, subscription_id, persistOnSuccessExecutes script actions on the specified HDInsight cluster.

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.
role_namestringThe constant value for the roleName. "workernode" Required.
subscription_idstring

SELECT examples

The the async operation status.

SELECT
error,
status
FROM azure.hdinsight.clusters
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
;

INSERT examples

Creates a new HDInsight cluster with the specified parameters.

INSERT INTO azure.hdinsight.clusters (
location,
tags,
zones,
properties,
identity,
resource_group_name,
cluster_name,
subscription_id
)
SELECT
'{{ location }}',
'{{ tags }}',
'{{ zones }}',
'{{ properties }}',
'{{ identity }}',
'{{ resource_group_name }}',
'{{ cluster_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
identity,
location,
properties,
systemData,
tags,
type,
zones
;

UPDATE examples

Patch HDInsight cluster with the specified parameters.

UPDATE azure.hdinsight.clusters
SET
tags = '{{ tags }}',
identity = '{{ identity }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND cluster_name = '{{ cluster_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
identity,
location,
properties,
systemData,
tags,
type,
zones;

DELETE examples

Deletes the specified HDInsight cluster.

DELETE FROM azure.hdinsight.clusters
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND cluster_name = '{{ cluster_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Gets the gateway settings for the specified cluster.

EXEC azure.hdinsight.clusters.get_gateway_settings 
@resource_group_name='{{ resource_group_name }}' --required,
@cluster_name='{{ cluster_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;