azure-resource-manager

Azure - Update Resource Property with REST API

混江龙づ霸主 提交于 2019-12-22 12:48:09
问题 I'm using the REST API to create resources (WebApp + MySQL) with a template. It works fine. I want now to modify the hostnames and add one but I just receive a Bad Request (400) response. The URL I refer to is: "https://management.azure.com/subscriptions/<subscriptionId>/resourcegroups/<myResourceGroup>/providers/Microsoft.Web/sites/<instanceName>?api-version=2015-08-01" I'm doing a PUT, and sending the following JSON object. { "properties": { "HostNames":"instanceName.azurewebsites.net,

Manage versioned API in Azure API Manager

时光毁灭记忆、已成空白 提交于 2019-12-22 12:18:13
问题 I´m looking into host our web API in Azure using an API app. I am using the Azure API Manager in front of the API App to expose the developer portal to some of our consumers. The web API is built in .NET core and it has version support using the URL (https://example.com/api/v2/controller...). I have given it swagger support and one swagger.json is created for each version. These swagger files I use in my ARM templates to set up API Manager and expose this versioned API. When adding a version

Azure Resource Group Template for App Services “Mobile App”

不问归期 提交于 2019-12-22 12:18:11
问题 I'm trying to find the correct template to use for the App Service "Mobile App" for deployment via New-AzureRmResourceGroupDeployment I've had a look at the template for Web App but doesn't appear to be anything to specify a type or kind for Mobile App https://github.com/Azure/azure-resource-manager-schemas/blob/master/schemas/2015-08-01/Microsoft.Web.json 回答1: You can just add the "kind" property to a website resource, e.g. { "name": "[parameters('siteName')]", "type": "Microsoft.Web/sites",

Azure Resource Group Set Tags with SDK?

隐身守侯 提交于 2019-12-22 10:59:45
问题 I have used code similar to http://blogs.infinitesquare.com/b/tranise/archives/-azure-resource-group-une-nouvelle-facon-dorganiser-ses-environnements-dans-azure#.Vr1RrfIrLgk to create a Resource Group in Azure with C#. I am now trying to extend it by putting Tags on the Resource. Adding resourceGroupGetResult.ResourceGroup.Tags.Add("a","1") works, but a subsequent CreateOrUpdateAsync call fails with "InvalidRequestContent: The request content was invalid and could not be deserialized: 'Could

Using Azure Resource Manager to Copy Azure SQL Databases

醉酒当歌 提交于 2019-12-22 10:20:05
问题 I am currently creating an Environment Deployment Package using ARM and I want to be able copy an existing Azure SQL Database (schema and data) to another Azure SQL Database in a new Resource Group. I created a .bacpac file from the original SQL Database and uploaded it into a Storage Account. I then added a SQL Database Import Resource to my Template and pointed it at the URI of the .bacpac file I created. When I try to run the Deployment, I get this error. A project which specifies

Login-AzureRmAccount return subscription but Get-AzureSubscription return empty

佐手、 提交于 2019-12-22 04:11:11
问题 I am able to login successfully with the Login-AzureRmAccount . Also I am able to see my subscription in the return value of Login-AzureRmAccount. But after login, if I type Get-AzureSubscription it return empty. Find the below screenshot 回答1: Well, you need to use Get-AzureRmSubscription (RM), since you are using the cmdlet for ASM mode, not ARM. There are 2 deployment modes in Azure, ASM (old) and ARM (new one). 回答2: Expanding on the other answers. In Azure there is two deployment models.

Create Azure web app slot from ARM template without copying original web app configuration

冷暖自知 提交于 2019-12-21 23:09:05
问题 I am trying to create web app slots through ARM template. I was able to create those but it looks like the default behavior is to create the them as a copy of the current web app state. This result in my slot inheriting app settings, connection strings, virtual directories, .... Here a reproduction sample which demonstrate the behavior https://github.com/ggirard07/ARMSlotWebConfig. I want my slot clean and fresh instead, which is the azure portal default behavior. The portal is able to allow

Create Azure web app slot from ARM template without copying original web app configuration

℡╲_俬逩灬. 提交于 2019-12-21 22:56:32
问题 I am trying to create web app slots through ARM template. I was able to create those but it looks like the default behavior is to create the them as a copy of the current web app state. This result in my slot inheriting app settings, connection strings, virtual directories, .... Here a reproduction sample which demonstrate the behavior https://github.com/ggirard07/ARMSlotWebConfig. I want my slot clean and fresh instead, which is the azure portal default behavior. The portal is able to allow

VSTS deployment fails with “Authorization failed for … of type 'Microsoft.Storage/storageAccounts/providers/locks'”

徘徊边缘 提交于 2019-12-21 20:24:24
问题 I'm deploying an ARM template with VSTS which contains a lock (in my case lock on a Storage Account for a Function App) { "parameters": { "name": { "type": "string" }, "storageName": { "type": "string" }, "location": { "type": "string" } }, "resources": [ { "apiVersion": "2015-05-01-preview", "type": "Microsoft.Storage/storageAccounts", "name": "[parameters('storageName')]", "location": "[parameters('location')]", "properties": { "accountType": "Standard_LRS" }, "resources": [ { "type":

Easy Authentication and Authorization in Azure Function App using ARM template

╄→尐↘猪︶ㄣ 提交于 2019-12-21 17:43:39
问题 "Easy Authentication and Authorization" feature of Azure App Service works in my Azure Function app if I configure it manually. It does not work when I use an ARM Template. I used this web site to figure out the config values: https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.management.websites.models.siteauthsettings?view=azuremgmtwebsites-1.6.0-preview This is what it looks like, ideas? EDIT : after checking the resulting config at https://resources.azure.com I see that