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:

OK response definition.

NameDatatypeDescription
etagstringThe ETag for the resource
identityobjectThe identity of the cluster, if configured.
locationstringThe geo-location where the resource lives
propertiesobjectThe properties of the cluster.
systemDataobjectMetadata pertaining to creation and last modification of the resource.
tagsobjectResource tags.
zonesarrayThe availability zones.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, clusterNameGets the specified cluster.
list_by_resource_groupselectsubscriptionId, resourceGroupNameLists the HDInsight clusters in a resource group.
listselectsubscriptionIdLists all the HDInsight clusters under the subscription.
createinsertsubscriptionId, resourceGroupName, clusterNameCreates a new HDInsight cluster with the specified parameters.
updateupdatesubscriptionId, resourceGroupName, clusterNamePatch HDInsight cluster with the specified parameters.
deletedeletesubscriptionId, resourceGroupName, clusterNameDeletes the specified HDInsight cluster.
execute_script_actionsexecsubscriptionId, resourceGroupName, clusterName, persistOnSuccessExecutes script actions on the specified HDInsight cluster.
resizeexecsubscriptionId, resourceGroupName, clusterName, roleNameResizes the specified HDInsight cluster to the specified size.
rotate_disk_encryption_keyexecsubscriptionId, resourceGroupName, clusterNameRotate disk encryption key of 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
clusterNamestringThe name of the cluster.
resourceGroupNamestringThe name of the resource group.
roleNamestringThe constant value for the roleName
subscriptionIdstringThe subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

SELECT examples

Gets the specified cluster.

SELECT
etag,
identity,
location,
properties,
systemData,
tags,
zones
FROM azure.hdinsight.clusters
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND clusterName = '{{ clusterName }}' -- required
;

INSERT examples

Creates a new HDInsight cluster with the specified parameters.

INSERT INTO azure.hdinsight.clusters (
data__location,
data__tags,
data__zones,
data__properties,
data__identity,
subscriptionId,
resourceGroupName,
clusterName
)
SELECT
'{{ location }}',
'{{ tags }}',
'{{ zones }}',
'{{ properties }}',
'{{ identity }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ clusterName }}'
RETURNING
etag,
identity,
location,
properties,
systemData,
tags,
zones
;

UPDATE examples

Patch HDInsight cluster with the specified parameters.

UPDATE azure.hdinsight.clusters
SET
data__tags = '{{ tags }}',
data__identity = '{{ identity }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND clusterName = '{{ clusterName }}' --required
RETURNING
etag,
identity,
location,
properties,
systemData,
tags,
zones;

DELETE examples

Deletes the specified HDInsight cluster.

DELETE FROM azure.hdinsight.clusters
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND clusterName = '{{ clusterName }}' --required
;

Lifecycle Methods

Executes script actions on the specified HDInsight cluster.

EXEC azure.hdinsight.clusters.execute_script_actions 
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@clusterName='{{ clusterName }}' --required
@@json=
'{
"scriptActions": "{{ scriptActions }}",
"persistOnSuccess": {{ persistOnSuccess }}
}'
;