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
1. [Configure](../active-directory/managed-identities-azure-resources/qs-configure-portal-windows-vmss.md#user-assigned-managed-identity) a User Managed Identity for the VM.
227
-
1. Grant this identity the [required permissions](../active-directory/managed-identities-azure-resources/howto-assign-access-portal.md) within the Subscription to perform its tasks.
227
+
1. Grant this identity the [required permissions](/entra/identity/managed-identities-azure-resources/manage-user-assigned-managed-identities-azure-portal) within the Subscription to perform its tasks.
228
228
1. Update the runbook to use the [Connect-AzAccount](/powershell/module/az.accounts/connect-azaccount) cmdlet with the `Identity ` and `AccountID` parameters to authenticate to Azure resources. This configuration reduces the need to use a Run As account and perform the associated account management.
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/management/lock-resources.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -478,7 +478,7 @@ az lock delete --ids $lockid
478
478
479
479
### Python
480
480
481
-
To lock deployed resources with Python, use the [`ManagementLockClient.management_locks.create_or_update_at_resource_group_level`](/python/api/azure-mgmt-resource/azure.mgmt.resource.locks.v2016_09_01.operations.managementlocksoperations#azure-mgmt-resource-locks-v2016-09-01-operations-managementlocksoperations-create-or-update-at-resource-group-level) command.
481
+
To lock deployed resources with Python, use the [`ManagementLockClient.management_locks.create_or_update_at_resource_group_level`](/python/api/azure-mgmt-resource-locks/azure.mgmt.resource.locks.operations.managementlocksoperations#azure-mgmt-resource-locks-operations-managementlocksoperations-create-or-update-at-resource-group-level) command.
482
482
483
483
To lock a resource, provide the resource name, resource type, and resource group name.
To get information about all locks in your subscription, use [ManagementLockClient.management_locks.get](/python/api/azure-mgmt-resource/azure.mgmt.resource.locks.v2016_09_01.operations.managementlocksoperations#azure-mgmt-resource-locks-v2016-09-01-operations-managementlocksoperations-list-at-subscription-level).
529
+
To get information about all locks in your subscription, use [ManagementLockClient.management_locks.list_at_subscription_level](/python/api/azure-mgmt-resource-locks/azure.mgmt.resource.locks.operations.managementlocksoperations#azure-mgmt-resource-locks-operations-managementlocksoperations-list-at-subscription-level).
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/management/manage-resource-groups-python.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,7 +73,7 @@ The resource group stores metadata about the resources. When you specify a locat
73
73
74
74
## Create resource groups
75
75
76
-
To create a resource group, use [ResourceManagementClient.resource_groups.create_or_update](/python/api/azure-mgmt-resource/azure.mgmt.resource.resources.v2022_09_01.operations.resourcegroupsoperations#azure-mgmt-resource-resources-v2022-09-01-operations-resourcegroupsoperations-create-or-update).
76
+
To create a resource group, use [ResourceManagementClient.resource_groups.create_or_update](/python/api/azure-mgmt-resource/azure.mgmt.resource.resources.operations.resourcegroupsoperations#azure-mgmt-resource-resources-operations-resourcegroupsoperations-create-or-update).
77
77
78
78
```python
79
79
import os
@@ -97,7 +97,7 @@ print(f"Provisioned resource group with ID: {rg_result.id}")
97
97
98
98
## List resource groups
99
99
100
-
To list the resource groups in your subscription, use [ResourceManagementClient.resource_groups.list](/python/api/azure-mgmt-resource/azure.mgmt.resource.resources.v2022_09_01.operations.resourcegroupsoperations#azure-mgmt-resource-resources-v2022-09-01-operations-resourcegroupsoperations-list).
100
+
To list the resource groups in your subscription, use [ResourceManagementClient.resource_groups.list](/python/api/azure-mgmt-resource/azure.mgmt.resource.resources.operations.resourcegroupsoperations#azure-mgmt-resource-resources-operations-resourcegroupsoperations-list).
101
101
102
102
```python
103
103
import os
@@ -115,7 +115,7 @@ for rg in rg_list:
115
115
print(rg.name)
116
116
```
117
117
118
-
To get one resource group, use [ResourceManagementClient.resource_groups.get](/python/api/azure-mgmt-resource/azure.mgmt.resource.resources.v2022_09_01.operations.resourcegroupsoperations#azure-mgmt-resource-resources-v2022-09-01-operations-resourcegroupsoperations-get) and provide the name of the resource group.
118
+
To get one resource group, use [ResourceManagementClient.resource_groups.get](/python/api/azure-mgmt-resource/azure.mgmt.resource.resources.operations.resourcegroupsoperations#azure-mgmt-resource-resources-operations-resourcegroupsoperations-get) and provide the name of the resource group.
119
119
120
120
```python
121
121
import os
@@ -134,7 +134,7 @@ print(f"Retrieved resource group {rg_result.name} in the {rg_result.location} re
134
134
135
135
## Delete resource groups
136
136
137
-
To delete a resource group, use [ResourceManagementClient.resource_groups.begin_delete](/python/api/azure-mgmt-resource/azure.mgmt.resource.resources.v2022_09_01.operations.resourcegroupsoperations#azure-mgmt-resource-resources-v2022-09-01-operations-resourcegroupsoperations-begin-delete).
137
+
To delete a resource group, use [ResourceManagementClient.resource_groups.begin_delete](/python/api/azure-mgmt-resource/azure.mgmt.resource.resources.operations.resourcegroupsoperations#azure-mgmt-resource-resources-operations-resourcegroupsoperations-begin-delete).
To deploy an ARM template, use [ResourceManagementClient.deployments.begin_create_or_update](/python/api/azure-mgmt-resource/azure.mgmt.resource.resources.v2022_09_01.operations.deploymentsoperations#azure-mgmt-resource-resources-v2022-09-01-operations-deploymentsoperations-begin-create-or-update). The following example requires a local template named `storage.json`.
190
+
To deploy an ARM template, use [ResourceManagementClient.deployments.begin_create_or_update](/python/api/azure-mgmt-resource-deployments/azure.mgmt.resource.deployments.operations.deploymentsoperations#azure-mgmt-resource-deployments-operations-deploymentsoperations-begin-create-or-update). The following example requires a local template named `storage.json`.
191
191
192
192
```python
193
193
import os
@@ -261,7 +261,7 @@ For more information about deploying an ARM template, see [Deploy resources with
261
261
262
262
Locking prevents other users in your organization from accidentally deleting or modifying critical resources.
263
263
264
-
To prevent a resource group and its resources from being deleted, use [ManagementLockClient.management_locks.create_or_update_at_resource_group_level](/python/api/azure-mgmt-resource/azure.mgmt.resource.locks.v2016_09_01.operations.managementlocksoperations#azure-mgmt-resource-locks-v2016-09-01-operations-managementlocksoperations-create-or-update-at-resource-group-level).
264
+
To prevent a resource group and its resources from being deleted, use [ManagementLockClient.management_locks.create_or_update_at_resource_group_level](/python/api/azure-mgmt-resource-locks/azure.mgmt.resource.locks.operations.managementlocksoperations#azure-mgmt-resource-locks-operations-managementlocksoperations-create-or-update-at-resource-group-level).
To get the locks for a resource group, use [ManagementLockClient.management_locks.list_at_resource_group_level](/python/api/azure-mgmt-resource/azure.mgmt.resource.locks.v2016_09_01.operations.managementlocksoperations#azure-mgmt-resource-locks-v2016-09-01-operations-managementlocksoperations-list-at-resource-group-level).
285
+
To get the locks for a resource group, use [ManagementLockClient.management_locks.list_at_resource_group_level](/python/api/azure-mgmt-resource-locks/azure.mgmt.resource.locks.operations.managementlocksoperations#azure-mgmt-resource-locks-operations-managementlocksoperations-list-at-resource-group-level).
To delete a lock on a resource group, use [ManagementLockClient.management_locks.delete_at_resource_group_level](/python/api/azure-mgmt-resource/azure.mgmt.resource.locks.v2016_09_01.operations.managementlocksoperations#azure-mgmt-resource-locks-v2016-09-01-operations-managementlocksoperations-delete-at-resource-group-level).
302
+
To delete a lock on a resource group, use [ManagementLockClient.management_locks.delete_at_resource_group_level](/python/api/azure-mgmt-resource-locks/azure.mgmt.resource.locks.operations.managementlocksoperations#azure-mgmt-resource-locks-operations-managementlocksoperations-delete-at-resource-group-level).
To deploy an ARM template, use [ResourceManagementClient.deployments.begin_create_or_update](/python/api/azure-mgmt-resource/azure.mgmt.resource.resources.v2022_09_01.operations.deploymentsoperations#azure-mgmt-resource-resources-v2022-09-01-operations-deploymentsoperations-begin-create-or-update). The following example deploys a [remote template](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.storage/storage-account-create). That template creates a storage account.
52
+
To deploy an ARM template, use [ResourceManagementClient.deployments.begin_create_or_update](/python/api/azure-mgmt-resource-deployments/azure.mgmt.resource.deployments.operations.deploymentsoperations#azure-mgmt-resource-deployments-operations-deploymentsoperations-begin-create-or-update). The following example deploys a [remote template](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.storage/storage-account-create). That template creates a storage account.
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/management/move-resource-group-and-subscription.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -267,7 +267,7 @@ To move to a new subscription, include a value for the `DestinationSubscriptionI
267
267
268
268
#### Validate
269
269
270
-
To test your move scenario without actually moving resources in real time, use the [`ResourceManagementClient.resources.begin_validate_move_resources`](/python/api/azure-mgmt-resource/azure.mgmt.resource.resources.v2022_09_01.operations.resourcesoperations#azure-mgmt-resource-resources-v2022-09-01-operations-resourcesoperations-begin-validate-move-resources) method. Use this method only when you need to model the results without following through.
270
+
To test your move scenario without actually moving resources in real time, use the [`ResourceManagementClient.resources.begin_validate_move_resources`](/python/api/azure-mgmt-resource/azure.mgmt.resource.resources.operations.resourcesoperations#azure-mgmt-resource-resources-operations-resourcesoperations-begin-validate-move-resources) method. Use this method only when you need to model the results without following through.
271
271
272
272
```python
273
273
import os
@@ -307,7 +307,7 @@ An output doesn't display if the validation succeeds. However, if the validation
307
307
308
308
#### Move
309
309
310
-
To move existing resources to another resource group or subscription, use the [`ResourceManagementClient.resources.begin_move_resources`](/python/api/azure-mgmt-resource/azure.mgmt.resource.resources.v2022_09_01.operations.resourcesoperations#azure-mgmt-resource-resources-v2022-09-01-operations-resourcesoperations-begin-move-resources) method in Python. The following example shows how to move several resources to a new resource group.
310
+
To move existing resources to another resource group or subscription, use the [`ResourceManagementClient.resources.begin_move_resources`](/python/api/azure-mgmt-resource/azure.mgmt.resource.resources.operations.resourcesoperations#azure-mgmt-resource-resources-operations-resourcesoperations-begin-move-resources) method in Python. The following example shows how to move several resources to a new resource group.
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/management/tag-resources-python.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,7 @@ This article describes how to use Python to tag resources, resource groups, and
66
66
67
67
## Apply tags
68
68
69
-
Azure Python offers the [ResourceManagementClient.tags.begin_create_or_update_at_scope](/python/api/azure-mgmt-resource/azure.mgmt.resource.resources.v2022_09_01.operations.tagsoperations#azure-mgmt-resource-resources-v2022-09-01-operations-tagsoperations-begin-create-or-update-at-scope) method to apply tags. It replaces all tags on the resource, resource group, or subscription. When you call the command, pass the resource ID of the entity you want to tag.
69
+
Azure Python offers the [ResourceManagementClient.tags.begin_create_or_update_at_scope](/python/api/azure-mgmt-resource/azure.mgmt.resource.resources.operations.tagsoperations#azure-mgmt-resource-resources-operations-tagsoperations-begin-create-or-update-at-scope) method to apply tags. It replaces all tags on the resource, resource group, or subscription. When you call the command, pass the resource ID of the entity you want to tag.
70
70
71
71
The following example applies a set of tags to a storage account:
72
72
@@ -112,7 +112,7 @@ tags = {
112
112
}
113
113
```
114
114
115
-
To add tags to a resource that already has tags, use [ResourceManagementClient.tags.begin_update_at_scope](/python/api/azure-mgmt-resource/azure.mgmt.resource.resources.v2022_09_01.operations.tagsoperations#azure-mgmt-resource-resources-v2022-09-01-operations-tagsoperations-begin-update-at-scope). On the [TagsPatchResource](/python/api/azure-mgmt-resource/azure.mgmt.resource.resources.v2022_09_01.models.tagspatchresource) object, set the `operation` parameter to `Merge`.
115
+
To add tags to a resource that already has tags, use [ResourceManagementClient.tags.begin_update_at_scope](/python/api/azure-mgmt-resource/azure.mgmt.resource.resources.operations.tagsoperations#azure-mgmt-resource-resources-operations-tagsoperations-begin-update-at-scope). On the [TagsPatchResource](/python/api/azure-mgmt-resource/azure.mgmt.resource.resources.models.tagspatchresource) object, set the `operation` parameter to `Merge`.
116
116
117
117
```python
118
118
import os
@@ -349,7 +349,7 @@ for resource in resources:
349
349
350
350
## List tags
351
351
352
-
To get the tags for a resource, resource group, or subscription, use the [ResourceManagementClient.tags.get_at_scope](/python/api/azure-mgmt-resource/azure.mgmt.resource.resources.v2022_09_01.operations.tagsoperations#azure-mgmt-resource-resources-v2022-09-01-operations-tagsoperations-get-at-scope) method and pass the resource ID of the entity.
352
+
To get the tags for a resource, resource group, or subscription, use the [ResourceManagementClient.tags.get_at_scope](/python/api/azure-mgmt-resource/azure.mgmt.resource.resources.operations.tagsoperations#azure-mgmt-resource-resources-operations-tagsoperations-get-at-scope) method and pass the resource ID of the entity.
353
353
354
354
To see the tags for a resource, use:
355
355
@@ -505,7 +505,7 @@ print(f"Tags {tag_patch_resource.properties.tags} were removed from resource: {r
505
505
506
506
The specified tags are removed.
507
507
508
-
To remove all tags, use the [ResourceManagementClient.tags.begin_delete_at_scope](/python/api/azure-mgmt-resource/azure.mgmt.resource.resources.v2022_09_01.operations.tagsoperations#azure-mgmt-resource-resources-v2022-09-01-operations-tagsoperations-begin-delete-at-scope) method.
508
+
To remove all tags, use the [ResourceManagementClient.tags.begin_delete_at_scope](/python/api/azure-mgmt-resource/azure.mgmt.resource.resources.operations.tagsoperations#azure-mgmt-resource-resources-operations-tagsoperations-begin-delete-at-scope) method.
0 commit comments