How Can I Programatically Scale My Application Components?


In order to provide programmers with the ability to programmatically scale up/down application components, Apprenda offers a ScalingAPI which allows you to retrieve information about the different policies, workloads and components and perform different actions against them. The ScalingAPI is included as part of the Apprenda SDK in the Apprenda.API.Application dll.

Example - Deploy a New Component

The first step when using the API is to create an ApplicationManager object for your application. You can do that using the following line of code, where applicationAlias is the alias of your application.

var applicationManager = new ApplicationManager("applicationAlias");

After you have the applicationManager object, you can query it to receive a list of the components that the application has. You can then select a component an instruct a deploy or undeploy.

var component = applicationManager.GetComponents().Single(c => c.Name.Equals("Component Name")); component.Deploy(1);


The full API information can be found at:

Let us know if you have any questions.

Have more questions? Submit a request