0

I have an ARM template with the "subscription" scope, I can deploy it using the Azure CLI and the command: az deployment sub create

How do I use the Azure Java SDK to deploy this template? I have found this command that takes a resource group (or create a new one):

      azureResourceManager.deployments().define(deploymentName)
                .withExistingResourceGroup(rgName)  //OR .withNewResourceGroup(rgName)
                .withTemplate(templateJson)
                .withParameters("{}")
                .withMode(DeploymentMode.INCREMENTAL)
                .create();

But I don't find a way to deploy at the subscription level. I know about the REST API but is there a way to do it using this Azure Java SDK?

iteal
  • 441
  • 7
  • 14

1 Answers1

1

But I don't find a way to deploy at the subscription level. I know about the REST API but is there a way to do it using this Azure Java SDK?

As per the Azure Documentation,To deploy ARM templates at the subscription level it is suggested to use Azure CLI, PowerShell,REST API or the portal.

enter image description here

Here is the reference github link on how to deploy resource with Azure resource manager templates using JAVA sdk

VenkateshDodda
  • 4,723
  • 1
  • 3
  • 12