azure-resource-manager

Check If Azure Resource Group Exist - Azure Powershell

霸气de小男生 提交于 2019-12-06 17:29:02
问题 I'm trying to verify if ResourceGroup exist or not so i thought that following code should return true or false, but it doesn't output anything. $RSGtest = Find-AzureRmResource | Format-List ResourceGroupName | get-unique $RSGtest -Match "$myResourceGroupName" Why am I not getting any output? 回答1: There is a Get-AzureRmResourceGroup cmdlet: Get-AzureRmResourceGroup -Name $myResourceGroupName -ErrorVariable notPresent -ErrorAction SilentlyContinue if ($notPresent) { # ResourceGroup doesn't

How to use an Environment variable in an Azure Resource Management Template

半世苍凉 提交于 2019-12-06 15:55:00
I have searched and read the documentation of Resource Management Template, but i couldn't find any information over Environment variables. I tried to define 2 environment variables in a variable object, but it didn't work. variables": { "mailPass": "TYUl5491", "SlackToken": "hrtu-12546233785-55454578422-56454412348-87845155121ht5621552521er55547123" } Is there any way to define environment variables in an Azure Resource Management Template and then use it for the web app or api app? Yes, for a WebApp you can do that, here's the snippet of a full WebApp resource, replace values and names with

How to connect to an azure subscription using a connection token?

痞子三分冷 提交于 2019-12-06 14:05:43
问题 I am trying to connect to my azure subscription , I have a code which allow me to get the Token var authContext = new AuthenticationContext(string.Format ("https://login.windows.net/{0}", tenantId)); var credential = new ClientCredential(applicationId, password); AuthenticationResult token = authContext.AcquireTokenAsync ("https://management.core.windows.net/", credential).Result; if (token == null) { Console.WriteLine("Failed to obtain the token"); return; } from this step i don't know how

What DNS Name Label should I give my Azure Virtual Machine?

烈酒焚心 提交于 2019-12-06 13:41:55
In my ongoing effort to wrap my head around Azure's new Resource Group model (see previous questions here and here ), I am now trying to create a new Virtual Machine that will be used as a web server. I have thee questions: Question One: Assuming I eventually want this VM to host the website woodswild.com, what DNS Name Label should I give this VM? Does it matter? All I know for sure is that it needs to be globally unique. Does it need to reflect the domain I want to host (woodswild.com)? Question Two: Do I even need to set the DNS name at all? Question Three: And, now that I've already

Add a Azure WebApp to an Existing VPN using a Point-to-Site connection (RM Powershell)

我的未来我决定 提交于 2019-12-06 11:58:55
问题 I have hunted around for an answer to this, but I am not having much luck. All the articles I can find are either setting up a Point-to-Site or are instructions for classic Azure, not Azure 2.0 (Resource Group) Currently, we are dialing up a whole new resource group everytime we do a new built. This consists of Web apps and SQL DBs. When we have a new build we start up the new and del the old resource group. Simple. To minimize the start-up time we have a static resource group that isn't

Manage versioned API in Azure API Manager

喜夏-厌秋 提交于 2019-12-06 11:02:20
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 to API Manager I have to give a path which must be unique for the API Im adding. So for version v1 I

Azure Logic Apps - ARM template to deploy filesystem API connection

六月ゝ 毕业季﹏ 提交于 2019-12-06 09:56:28
I am trying to deploy file system API connection using ARM template. I could not find the parametersValue schema for this connection and so tried with naming the parameters as they appear on Azure portal Edit API Connection Screen shot on Azure Portal 1 { "apiVersion": "2016-06-01", "name": "filesystem", "type": "Microsoft.Web/connections", "location": "[resourceGroup().location]", "properties": { "api": { "id": "[concat(subscription().id,'/providers/Microsoft.Web/locations/westus/managedApis/filesystem')]" }, "parameterValues": { "displayName": "FileSyetem", "rootFolder": "[parameters(

How to deploy to Azure Resource Group using VSTS release management

做~自己de王妃 提交于 2019-12-06 08:15:40
问题 I am new to Visual Studio Team Services Release Management. My goal is to automate a deployment of an ASP.NET MVC application to the Azure App Service. Trying different approaches, I created a Service Endpoint that is certificate based and one that uses a service principal (SPN). My build definition already builds a web deploy package, and the release definition is linked against that and can use this artifact. Success 1: A deployment of the app using the Azure Web App Deployment Task already

Azure Resource Group Template for App Services “Mobile App”

无人久伴 提交于 2019-12-06 07:40:14
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 You can just add the "kind" property to a website resource, e.g. { "name": "[parameters('siteName')]", "type": "Microsoft.Web/sites", "location": "[resourceGroup().location]", "apiVersion": "2014-06-01", "kind": "mobileapp" ... 来源: https:/

Azure - Update Resource Property with REST API

你离开我真会死。 提交于 2019-12-06 06:29:25
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, newHostName.com" } } It is possible that my JSON is wrong, but I tried many formats and no one works. I