Setting Incremental Deployment Mode for Azure Managed App Service Catalog Definition

In this article, we take a look at how to set “Incremental” deployment mode for Service Catalog Definition for Azure Managed Application.

If you are new to Azure Managed Applications, please see this article.

When developing and testing Azure Managed Applications, I usually use the “az managedapp definition create” Azure CLI command to create the service catalog definition in my Azure subscription for testing prior to publishing in Azure Marketplace. Currently, this CLI command does not provide a way to explicitly specify the Deployment Mode (i.e. Incremental or Complete), and the default mode that the managed app definition gets is “Complete”.

In addition, current documentation for the Application Definitions — Create or Update REST API does not show how to specify the deployment mode in JSON.

Therefore, below we look at an undocumented way to set the deployment mode for our managed application definition.

Create Managed App Definition

First, we create managed application using the regular Azure CLI command.

We could also skip the step of creating Managed App Definition using the Azure CLI command and directly do a PUT, but for that we would need to construct the JSON payload by hand.

Get Managed App Definition JSON

Next, we use Azure CLI “rest” command to get the JSON output of the managed app definition we created above by specifying the latest api-version=2019–07–01.

We get back JSON output that looks like the following and save the output to a text file like managedapp-definition.json so we can use it in PUT request later.

Update Managed App via REST PUT

Next, we update the JSON in the managedapp-definition.json file to include property packageFileUri which did not come back in the GET call but is required for PUT call and points to the ZIP file containing the app definition.

We also add the key snippet of JSON that sets the deployment mode to Incremental. Both of these changes are made inside of the “properties” section as follows.

The final content of managedapp-definition.json file should look something like this.

Finally, we make the PUT call via “az rest” command to update the managed app definition with our changes.

Confirm Managed App Definition was Updated

Execute one more GET REST API call to confirm that deploymentPolicy.deploymentMode JSON is in the current definition.

Thank you!

Please leave feedback and questions below or on Twitter

Principal Engineer / Architect, FastTrack for Azure at Microsoft

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store