You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/resource-group-overview.md
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ ms.devlang: na
11
11
ms.topic: overview
12
12
ms.tgt_pltfrm: na
13
13
ms.workload: na
14
-
ms.date: 05/24/2019
14
+
ms.date: 05/31/2019
15
15
ms.author: tomfitz
16
16
17
17
---
@@ -47,14 +47,16 @@ Resource Manager provides several benefits:
47
47
* You can apply tags to resources to logically organize all the resources in your subscription.
48
48
* You can clarify your organization's billing by viewing costs for a group of resources sharing the same tag.
49
49
50
-
## Understand management scope
50
+
## Understand scope
51
51
52
-
Azure provides four levels of management scope: [management groups](../governance/management-groups/index.md), subscriptions, [resource groups](#resource-groups), and resources. The following image shows an example of these layers.
52
+
Azure provides four levels of scope: [management groups](../governance/management-groups/index.md), subscriptions, [resource groups](#resource-groups), and resources. The following image shows an example of these layers.
You apply management settings at any of these levels of scope. The level you select determines how widely the setting is applied. Lower levels inherit settings from higher levels. For example, when you apply a [policy](../governance/policy/overview.md) to the subscription, the policy is applied to all resource groups and resources in your subscription. When you apply a policy on the resource group, that policy is applied the resource group and all its resources. However, another resource group does not have that policy assignment.
57
57
58
+
You can deploy templates to management groups, subscriptions, or resource groups.
59
+
58
60
## Guidance
59
61
60
62
The following suggestions help you take full advantage of Resource Manager when working with your solutions.
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/resource-group-template-deploy-cli.md
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,8 @@ To deploy to a **subscription**, use [az deployment create](/cli/azure/deploymen
39
39
az deployment create --location <location> --template-file <path-to-template>
40
40
```
41
41
42
+
Currently, management group deployments are only supported through the REST API. See [Deploy resources with Resource Manager templates and Resource Manager REST API](resource-group-template-deploy-rest.md).
43
+
42
44
The examples in this article use resource group deployments. For more information about subscription deployments, see [Create resource groups and resources at the subscription level](deploy-to-subscription.md).
43
45
44
46
## Deploy local template
@@ -98,11 +100,11 @@ az group deployment create --resource-group examplegroup \
98
100
99
101
## Redeploy when deployment fails
100
102
101
-
This feature is also known as *Rollback on error*. When a deployment fails, you can automatically redeploy an earlier, successful deployment from your deployment history. To specify redeployment, use the `--rollback-on-error` parameter in the deployment command. This functionality is useful if you have got a known good state for your infrastructure deployment and want this to be reverted to. There are a number of caveats and restrictions:
103
+
This feature is also known as *Rollback on error*. When a deployment fails, you can automatically redeploy an earlier, successful deployment from your deployment history. To specify redeployment, use the `--rollback-on-error` parameter in the deployment command. This functionality is useful if you've got a known good state for your infrastructure deployment and want to revert to this state. There are a number of caveats and restrictions:
102
104
103
-
- The redeployment is run exactly as it was run previously with the same parameters. You can not change the parameters.
105
+
- The redeployment is run exactly as it was run previously with the same parameters. You can't change the parameters.
104
106
- The previous deployment is run using the [complete mode](./deployment-modes.md#complete-mode). Any resources not included in the previous deployment are deleted, and any resource configurations are set to their previous state. Make sure you fully understand the [deployment modes](./deployment-modes.md).
105
-
- The redeployment only affects the resources, any data changes are not affected.
107
+
- The redeployment only affects the resources, any data changes aren't affected.
106
108
- This feature is only supported on Resource Group deployments, not subscription level deployments. For more information about subscription level deployment, see [Create resource groups and resources at the subscription level](./deploy-to-subscription.md).
107
109
108
110
To use this option, your deployments must have unique names so they can be identified in the history. If you don't have unique names, the current failed deployment might overwrite the previously successful deployment in the history. You can only use this option with root level deployments. Deployments from a nested template aren't available for redeployment.
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/resource-group-template-deploy-rest.md
+32-24Lines changed: 32 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,12 @@
1
1
---
2
2
title: Deploy resources with REST API and template | Microsoft Docs
3
3
description: Use Azure Resource Manager and Resource Manager REST API to deploy resources to Azure. The resources are defined in a Resource Manager template.
4
-
services: azure-resource-manager
5
-
documentationcenter: na
6
4
author: tfitzmac
7
5
8
6
ms.assetid: 1d8fbd4c-78b0-425b-ba76-f2b7fd260b45
9
7
ms.service: azure-resource-manager
10
-
ms.devlang: na
11
8
ms.topic: conceptual
12
-
ms.tgt_pltfrm: na
13
-
ms.workload: na
14
-
ms.date: 03/28/2019
9
+
ms.date: 05/31/2019
15
10
ms.author: tomfitz
16
11
17
12
---
@@ -23,11 +18,25 @@ You can either include your template in the request body or link to a file. When
23
18
24
19
## Deployment scope
25
20
26
-
You can target your deployment to either an Azure subscription or a resource group within a subscription. In most cases, you'll target deployment to a resource group. Use subscription deployments to apply policies and role assignments across the subscription. You also use subscription deployments to create a resource group and deploy resources to it. Depending on the scope of the deployment, you use different commands.
21
+
You can target your deployment to a management group, an Azure subscription, or a resource group. In most cases, you'll target deployments to a resource group. Use management group or subscription deployments to apply policies and role assignments across the specified scope. You also use subscription deployments to create a resource group and deploy resources to it. Depending on the scope of the deployment, you use different commands.
27
22
28
-
To deploy to a **resource group**, use [Deployments - Create](/rest/api/resources/deployments/createorupdate).
23
+
To deploy to a **resource group**, use [Deployments - Create](/rest/api/resources/deployments/createorupdate). The request is sent to:
29
24
30
-
To deploy to a **subscription**, use [Deployments - Create At Subscription Scope](/rest/api/resources/deployments/createorupdateatsubscriptionscope).
25
+
```HTTP
26
+
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}?api-version=2019-05-01
27
+
```
28
+
29
+
To deploy to a **subscription**, use [Deployments - Create At Subscription Scope](/rest/api/resources/deployments/createorupdateatsubscriptionscope). The request is sent to:
30
+
31
+
```HTTP
32
+
PUT https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}?api-version=2019-05-01
33
+
```
34
+
35
+
To deploy to a **management group**, use Deployments - Create At Management Group Scope. The request is sent to:
36
+
37
+
```HTTP
38
+
PUT https://management.azure.com/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}
39
+
```
31
40
32
41
The examples in this article use resource group deployments. For more information about subscription deployments, see [Create resource groups and resources at the subscription level](deploy-to-subscription.md).
33
42
@@ -38,7 +47,7 @@ The examples in this article use resource group deployments. For more informatio
38
47
1. If you don't have an existing resource group, create a resource group. Provide your subscription ID, the name of the new resource group, and location that you need for your solution. For more information, see [Create a resource group](/rest/api/resources/resourcegroups/createorupdate).
39
48
40
49
```HTTP
41
-
PUT https://management.azure.com/subscriptions/<YourSubscriptionId>/resourcegroups/<YourResourceGroupName>?api-version=2018-05-01
50
+
PUT https://management.azure.com/subscriptions/<YourSubscriptionId>/resourcegroups/<YourResourceGroupName>?api-version=2019-05-01
42
51
```
43
52
44
53
With a request body like:
@@ -54,13 +63,13 @@ The examples in this article use resource group deployments. For more informatio
54
63
55
64
1. Validate your deployment before executing it by running the [Validate a template deployment](/rest/api/resources/deployments/validate) operation. When testing the deployment, provide parameters exactly as you would when executing the deployment (shown in the next step).
56
65
57
-
1.Create a deployment. Provide your subscription ID, the name of the resource group, the name of the deployment, and a link to your template. For information about the template file, see [Parameter file](#parameter-file). For more information about the REST API to create a resource group, see [Create a template deployment](/rest/api/resources/deployments/createorupdate). Notice the **mode** is set to **Incremental**. To run a complete deployment, set **mode** to **Complete**. Be careful when using the complete mode as you can inadvertently delete resources that aren't in your template.
66
+
1.To deploy a template, provide your subscription ID, the name of the resource group, the name of the deployment in the request URI.
58
67
59
68
```HTTP
60
-
PUT https://management.azure.com/subscriptions/<YourSubscriptionId>/resourcegroups/<YourResourceGroupName>/providers/Microsoft.Resources/deployments/<YourDeploymentName>?api-version=2018-05-01
69
+
PUT https://management.azure.com/subscriptions/<YourSubscriptionId>/resourcegroups/<YourResourceGroupName>/providers/Microsoft.Resources/deployments/<YourDeploymentName>?api-version=2019-05-01
61
70
```
62
71
63
-
With a request body like:
72
+
In the request body, provide a link to your template and parameter file. Notice the **mode** is set to **Incremental**. To run a complete deployment, set **mode** to **Complete**. Be careful when using the complete mode as you can inadvertently delete resources that aren't in your template.
64
73
65
74
```json
66
75
{
@@ -69,11 +78,11 @@ The examples in this article use resource group deployments. For more informatio
@@ -101,7 +110,7 @@ The examples in this article use resource group deployments. For more informatio
101
110
102
111
You can set up your storage account to use a shared access signature (SAS) token. For more information, see [Delegating Access with a Shared Access Signature](https://docs.microsoft.com/rest/api/storageservices/delegating-access-with-a-shared-access-signature).
103
112
104
-
1. Instead of linking to files for the template and parameters, you can include them in the request body.
113
+
1. Instead of linking to files for the template and parameters, you can include them in the request body. The following example shows the request body with the template and parameter inline:
105
114
106
115
```json
107
116
{
@@ -164,19 +173,19 @@ The examples in this article use resource group deployments. For more informatio
164
173
}
165
174
```
166
175
167
-
1.Get the status of the template deployment. For more information, see [Get information about a template deployment](/rest/api/resources/deployments/get).
176
+
1.To get the status of the template deployment, use [Deployments - Get](/rest/api/resources/deployments/get).
168
177
169
178
```HTTP
170
179
GET https://management.azure.com/subscriptions/<YourSubscriptionId>/resourcegroups/<YourResourceGroupName>/providers/Microsoft.Resources/deployments/<YourDeploymentName>?api-version=2018-05-01
171
180
```
172
181
173
182
## Redeploy when deployment fails
174
183
175
-
This feature is also known as *Rollback on error*. When a deployment fails, you can automatically redeploy an earlier, successful deployment from your deployment history. To specify redeployment, use the `onErrorDeployment` property in the request body. This functionality is useful if you have got a known good state for your infrastructure deployment and want this to be reverted to. There are a number of caveats and restrictions:
184
+
This feature is also known as *Rollback on error*. When a deployment fails, you can automatically redeploy an earlier, successful deployment from your deployment history. To specify redeployment, use the `onErrorDeployment` property in the request body. This functionality is useful if you've got a known good state for your infrastructure deployment and want to revert to this state. There are a number of caveats and restrictions:
176
185
177
-
- The redeployment is run exactly as it was run previously with the same parameters. You can not change the parameters.
186
+
- The redeployment is run exactly as it was run previously with the same parameters. You cannot change the parameters.
178
187
- The previous deployment is run using the [complete mode](./deployment-modes.md#complete-mode). Any resources not included in the previous deployment are deleted, and any resource configurations are set to their previous state. Make sure you fully understand the [deployment modes](./deployment-modes.md).
179
-
- The redeployment only affects the resources, any data changes are not affected.
188
+
- The redeployment only affects the resources, any data changes aren't affected.
180
189
- This feature is only supported on Resource Group deployments, not subscription level deployments. For more information about subscription level deployment, see [Create resource groups and resources at the subscription level](./deploy-to-subscription.md).
181
190
182
191
To use this option, your deployments must have unique names so they can be identified in the history. If you don't have unique names, the current failed deployment might overwrite the previously successful deployment in the history. You can only use this option with root level deployments. Deployments from a nested template aren't available for redeployment.
@@ -264,6 +273,5 @@ If you need to provide a sensitive value for a parameter (such as a password), a
264
273
265
274
- To specify how to handle resources that exist in the resource group but aren't defined in the template, see [Azure Resource Manager deployment modes](deployment-modes.md).
266
275
- To learn about handling asynchronous REST operations, see [Track asynchronous Azure operations](resource-manager-async-operations.md).
267
-
- For an example of deploying resources through the .NET client library, see [Deploy resources using .NET libraries and a template](../virtual-machines/windows/csharp-template.md?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
268
-
- To define parameters in template, see [Authoring templates](resource-group-authoring-templates.md#parameters).
269
-
- For guidance on how enterprises can use Resource Manager to effectively manage subscriptions, see [Azure enterprise scaffold - prescriptive subscription governance](/azure/architecture/cloud-adoption-guide/subscription-governance).
276
+
- To learn more about templates, see [Understand the structure and syntax of Azure Resource Manager templates](resource-group-authoring-templates.md).
Currently, management group deployments are only supported through the REST API. See [Deploy resources with Resource Manager templates and Resource Manager REST API](resource-group-template-deploy-rest.md).
34
+
33
35
The examples in this article use resource group deployments. For more information about subscription deployments, see [Create resource groups and resources at the subscription level](deploy-to-subscription.md).
34
36
35
37
## Prerequisites
@@ -94,7 +96,7 @@ To paste the code into the shell, right-click inside the shell and then select *
94
96
95
97
This feature is also known as *Rollback on error*. When a deployment fails, you can automatically redeploy an earlier, successful deployment from your deployment history. To specify redeployment, use either the `-RollbackToLastDeployment` or `-RollBackDeploymentName` parameter in the deployment command. This functionality is useful if you've got a known good state for your infrastructure deployment and want to revert to this state. There are a number of caveats and restrictions:
96
98
97
-
- The redeployment is run exactly as it was run previously with the same parameters. You cannot change the parameters.
99
+
- The redeployment is run exactly as it was run previously with the same parameters. You can't change the parameters.
98
100
- The previous deployment is run using the [complete mode](./deployment-modes.md#complete-mode). Any resources not included in the previous deployment are deleted, and any resource configurations are set to their previous state. Make sure you fully understand the [deployment modes](./deployment-modes.md).
99
101
- The redeployment only affects the resources, any data changes aren't affected.
100
102
- This feature is only supported on Resource Group deployments, not subscription level deployments. For more information about subscription level deployment, see [Create resource groups and resources at the subscription level](./deploy-to-subscription.md).
0 commit comments