Skip to content

Commit db33092

Browse files
Merge pull request #228999 from tfitzmac/0228updgrade2
add upgrade command and links
2 parents 59b4b8f + 012fe7b commit db33092

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

articles/azure-resource-manager/management/manage-resource-groups-python.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Learn how to use Python with [Azure Resource Manager](overview.md) to manage you
2121
* azure-mgmt-resource
2222
* azure-mgmt-storage
2323

24+
If you have older versions of these packages already installed in your virtual environment, you may need to update them with `pip install --upgrade {package-name}`
25+
2426
* The examples in this article use CLI-based authentication (`AzureCliCredential`). Depending on your environment, you may need to run `az login` first to authenticate.
2527

2628
* An environment variable with your Azure subscription ID. To get your Azure subscription ID, use:
@@ -112,7 +114,7 @@ for rg in rg_list:
112114
print(rg.name)
113115
```
114116

115-
To get one resource group, provide the name of the resource group.
117+
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.
116118

117119
```python
118120
import os
@@ -150,9 +152,11 @@ For more information about how Azure Resource Manager orders the deletion of res
150152

151153
## Deploy resources
152154

153-
You can deploy Azure resources by using Python classes or by deploying an Azure Resource Manager (ARM) template.
155+
You can deploy Azure resources by using Python classes or by deploying an Azure Resource Manager template (ARM template).
156+
157+
### Deploy resources by using Python classes
154158

155-
The following example creates a storage account. The name you provide for the storage account must be unique across Azure.
159+
The following example creates a storage account by using [StorageManagementClient.storage_accounts.begin_create](/python/api/azure-mgmt-storage/azure.mgmt.storage.v2022_09_01.operations.storageaccountsoperations#azure-mgmt-storage-v2022-09-01-operations-storageaccountsoperations-begin-create). The name for the storage account must be unique across Azure.
156160

157161
```python
158162
import os
@@ -180,7 +184,9 @@ storage_account_result = storage_client.storage_accounts.begin_create(
180184
)
181185
```
182186

183-
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).
187+
### Deploy resources by using an ARM template
188+
189+
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`.
184190

185191
```python
186192
import os
@@ -214,7 +220,7 @@ rg_deployment_result = resource_client.deployments.begin_create_or_update(
214220
)
215221
```
216222

217-
The following example shows the ARM template you're deploying:
223+
The following example shows the ARM template named `storage.json` that you're deploying:
218224

219225
```json
220226
{

0 commit comments

Comments
 (0)