Map<String, String> templateParameters) throws URISyntaxException, IOException, ServiceException { DeploymentProperties deploymentProperties = new DeploymentProperties(); deploymentProperties.setMode(deploymentMode); TemplateLink templateLink = new TemplateLink(new URI(templateUri)); templateLink.setContentVersion(templateContentVersion); deploymentProperties.setTemplateLink(templateLink); parameters.put(entry.getKey(), new ParameterValue(entry.getValue())); deploymentProperties.setParameters(new Gson().toJson(parameters)); Deployment deployment = new Deployment(); deployment.setProperties(deploymentProperties); .getDeployment();
public static void createOrUpdateResourceGroup( ResourceManagementClient resourceManagementClient, ResourceContext context) throws ServiceException, IOException, URISyntaxException { //make sure the rg exist resourceManagementClient.getResourceGroupsOperations().createOrUpdate(context.getResourceGroupName(), new ResourceGroup(context.getLocation())); }