Skip to content

Commit 542c199

Browse files
authored
Merge pull request #85510 from hrasheed-msft/patch-117
Update hdinsight-autoscale-clusters.md
2 parents 9d6f25f + 60ea0db commit 542c199

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

articles/hdinsight/hdinsight-autoscale-clusters.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,26 @@ You can create an HDInsight cluster with schedule-based Autoscaling an Azure Res
180180

181181
### Enable and disable Autoscale for a running cluster
182182

183+
#### Using the Azure portal
183184
To enable Autoscale on a running cluster, select **Cluster size** under **Settings**. Then click **Enable autoscale**. Select the type of Autoscale that you want and enter the options for load-based or schedule-based scaling. Finally, click **Save**.
184185

185186
![Enable worker node schedule-based autoscale option](./media/hdinsight-autoscale-clusters/hdinsight-autoscale-clusters-enable-running-cluster.png)
186187

188+
#### Using the REST API
189+
To enable or disable Autoscale on a running cluster using the REST API, make a POST request to the Autoscale endpoint as shown in the code snippet below:
190+
191+
```
192+
https://management.azure.com/subscriptions/{subscription Id}/resourceGroups/{resourceGroup Name}/providers/Microsoft.HDInsight/clusters/{CLUSTERNAME}/roles/workernode/autoscale?api-version=2018-06-01-preview
193+
```
194+
195+
Use the appropriate parameters in the request payload. The json payload below could be used to enable Autoscale. Use the payload `{autoscale: null}` to disable Autoscale.
196+
197+
```json
198+
{ autoscale: { capacity: { minInstanceCount: 1, maxInstanceCount: 2 } } }
199+
```
200+
201+
See the previous section on [enabling load-based autoscale](#load-based-autoscaling) for a full description of all payload parameters.
202+
187203
## Best practices
188204

189205
### Choosing load-based or schedule-based scaling

0 commit comments

Comments
 (0)