in src/extension/src/azure/azure-app-service/appServiceProvider.ts [34:63]
public async createWebApp(selections: AppServiceSelections, appPath: string): Promise<string | undefined> {
const template = this.getAppServiceARMTemplate();
const parameters = this.getAppServiceARMParameter(selections);
const deploymentParams = parameters.parameters;
try {
const options: ResourceManagementModels.Deployment = {
properties: {
mode: "Incremental",
parameters: deploymentParams,
template: template,
},
};
const azureResourceClient: ResourceManagementClient = new ResourceManager().getResourceManagementClient(
selections.subscriptionItem
);
this.writeARMTemplatesToApp(appPath, template, parameters);
const deploymentName = (selections.siteName + APP_SERVICE_DEPLOYMENT_SUFFIX).substr(
0,
CONSTANTS.DEPLOYMENT_NAME.MAX_LENGTH
);
const result = await azureResourceClient.deployments.createOrUpdate(
selections.resourceGroupItem.name,
deploymentName,
options
);
return result.id;
} catch (error) {
throw new DeploymentError(error.message);
}
}