Poul K. Sørensen
Poul K. Sørensen

Reputation: 17570

How to Scale Azure cloud service up and down from Rest API with WebAPI

I am creating a demo where I need to be able to scale up my cloud service deployment from a WebAPI.

I went over the rest API documentation and didn't seem to find what I need.

Is it possible to use Service Management API to scale a cloud service up and down ?

Alternative I will just enable auto scale on a queue and then post messages to the queue to get it to scale up :)

Upvotes: 5

Views: 1512

Answers (1)

Gaurav Mantri
Gaurav Mantri

Reputation: 136336

As such there's no such function in Service Management REST API for scaling. Since the number of instances for a particular role is stored in the service configuration file, what you would need to do is read this configuration information using Get Deployment operation, locate the Instances node and change the value of count attribute. Then you would need to call Change Deployment Configuration for new instance count to be effective.

Upvotes: 1

Related Questions