Skip to content

Commit c3d572e

Browse files
Merge pull request #235492 from MicrosoftDocs/main
merge main to live, Sunday April 23, 4 PM
2 parents 130b0ba + 3423eae commit c3d572e

File tree

46 files changed

+782
-124
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+782
-124
lines changed

articles/active-directory-b2c/saml-service-provider.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ manager: CelesteDG
99
ms.service: active-directory
1010
ms.workload: identity
1111
ms.topic: how-to
12-
ms.date: 12/16/2022
12+
ms.date: 04/24/2023
1313
ms.author: kengaderdus
1414
ms.subservice: B2C
1515
ms.custom: fasttrack-edit
@@ -327,7 +327,7 @@ The following example shows the `entityID` value in the SAML metadata:
327327
The `identifierUris` property will accept URLs only on the domain `tenant-name.onmicrosoft.com`.
328328

329329
```json
330-
"identifierUris":"https://tenant-name.onmicrosoft.com",
330+
"identifierUris":"https://tenant-name.onmicrosoft.com/app-name",
331331
```
332332

333333
#### Share the application's metadata with Azure AD B2C

articles/active-directory-b2c/tokens-overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ manager: CelesteDG
88
ms.service: active-directory
99
ms.workload: identity
1010
ms.topic: conceptual
11-
ms.date: 03/09/2023
11+
ms.date: 04/24/2023
1212
ms.author: kengaderdus
1313
ms.subservice: B2C
1414
ms.custom: b2c-support
@@ -24,7 +24,7 @@ Azure AD B2C supports the [OAuth 2.0 and OpenID Connect protocols](protocols-ove
2424

2525
The following tokens are used in communication with Azure AD B2C:
2626

27-
- **ID token** - A JWT that contains claims that you can use to identify users in your application. This token is securely sent in HTTP requests for communication between two components of the same application or service. You can use the claims in an ID token as you see fit. They're commonly used to display account information or to make access control decisions in an application. ID tokens are signed, but they're not encrypted. When your application or API receives an ID token, it must validate the signature to prove that the token is authentic. Your application or API must also validate a few claims in the token to prove that it's valid. Depending on the scenario requirements, the claims validated by an application can vary, but your application must perform some common claim validations in every scenario.
27+
- **ID token** - A JWT that contains claims that you can use to identify users in your application. This token is securely sent in HTTP requests for communication between two components of the same application or service. You can use the claims in an ID token as you see fit. They're commonly used to display account information or to make access control decisions in an application. The ID tokens issued by Azure AD B2C are signed, but they're not encrypted. When your application or API receives an ID token, it must validate the signature to prove that the token is authentic. Your application or API must also validate a few claims in the token to prove that it's valid. Depending on the scenario requirements, the claims validated by an application can vary, but your application must perform some common claim validations in every scenario.
2828

2929
- **Access token** - A JWT that contains claims that you can use to identify the granted permissions to your APIs. Access tokens are signed, but they aren't encrypted. Access tokens are used to provide access to APIs and resource servers. When your API receives an access token, it must validate the signature to prove that the token is authentic. Your API must also validate a few claims in the token to prove that it's valid. Depending on the scenario requirements, the claims validated by an application can vary, but your application must perform some common claim validations in every scenario.
3030

articles/automation/troubleshoot/update-agent-issues-linux.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ To fix this issue, you must start the OMS Agent service by using the following c
8080
To validate you can perform process check using the below command:
8181

8282
```
83-
process_name = "omsagent"
84-
ps aux | grep %s | grep -v grep" % (process_name)
83+
process_name="omsagent"
84+
ps aux | grep %s | grep -v grep" % (process_name)"
8585
```
8686

8787
For more information, see [Troubleshoot issues with the Log Analytics agent for Linux](../../azure-monitor/agents/agent-linux-troubleshoot.md)

articles/azure-monitor/alerts/alerts-common-schema.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ If the custom properties are not set in the Alert rule, this field will be null.
8383
"metricValue": 7.727
8484
}
8585
]
86+
}
8687
},
8788
"customProperties":{
8889
"Key1": "Value1",
8990
"Key2": "Value2"
90-
}
9191
}
9292
}
9393
}

articles/azure-resource-manager/management/manage-resources-cli.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,14 @@
11
---
22
title: Manage resources - Azure CLI
33
description: Use Azure CLI and Azure Resource Manager to manage your resources. Shows how to deploy and delete resources.
4-
author: mumian
54
ms.topic: conceptual
65
ms.date: 02/11/2019
7-
ms.author: jgao
86
ms.custom: devx-track-azurecli, devx-track-arm-template
97
---
108
# Manage Azure resources by using Azure CLI
119

1210
Learn how to use Azure CLI with [Azure Resource Manager](overview.md) to manage your Azure resources. For managing resource groups, see [Manage Azure resource groups by using Azure CLI](manage-resource-groups-cli.md).
1311

14-
Other articles about managing resources:
15-
16-
- [Manage Azure resources by using the Azure portal](manage-resources-portal.md)
17-
- [Manage Azure resources by using Azure PowerShell](manage-resources-powershell.md)
18-
1912
## Deploy resources to an existing resource group
2013

2114
You can deploy Azure resources directly by using Azure CLI, or deploy a Resource Manager template to create Azure resources.

articles/azure-resource-manager/management/manage-resources-portal.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,14 @@
11
---
22
title: Manage resources - Azure portal
33
description: Use the Azure portal and Azure Resource Manager to manage your resources. Shows how to deploy and delete resources.
4-
author: mumian
54
ms.topic: conceptual
65
ms.custom: devx-track-arm-template
76
ms.date: 02/11/2019
8-
ms.author: jgao
97
---
108
# Manage Azure resources by using the Azure portal
119

1210
Learn how to use the [Azure portal](https://portal.azure.com) with [Azure Resource Manager](overview.md) to manage your Azure resources. For managing resource groups, see [Manage Azure resource groups by using the Azure portal](manage-resource-groups-portal.md).
1311

14-
Other articles about managing resources:
15-
16-
- [Manage Azure resources by using Azure CLI](manage-resources-cli.md)
17-
- [Manage Azure resources by using Azure PowerShell](manage-resources-powershell.md)
18-
1912
[!INCLUDE [Handle personal data](../../../includes/gdpr-intro-sentence.md)]
2013

2114
## Deploy resources to a resource group
@@ -24,7 +17,7 @@ After you have created a Resource Manager template, you can use the Azure portal
2417

2518
## Open resources
2619

27-
Azure resources are organized by Azure services and by resource groups. The following procedures shows how to open a storage account called **mystorage0207**. The virtual machine resides in a resource group called **mystorage0207rg**.
20+
Azure resources are organized by Azure services and by resource groups. The following procedures show how to open a storage account called **mystorage0207**. The virtual machine resides in a resource group called **mystorage0207rg**.
2821

2922
To open a resource by the service type:
3023

articles/azure-resource-manager/management/manage-resources-powershell.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
---
22
title: Manage resources - Azure PowerShell
33
description: Use Azure PowerShell and Azure Resource Manager to manage your resources. Shows how to deploy and delete resources.
4-
author: mumian
54
ms.topic: conceptual
65
ms.date: 02/11/2019
7-
ms.author: jgao
86
ms.custom: devx-track-azurepowershell, devx-track-arm-template
97
---
108
# Manage Azure resources by using Azure PowerShell
Lines changed: 251 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,251 @@
1+
---
2+
title: Manage resources - Python
3+
description: Use Python and Azure Resource Manager to manage your resources. Shows how to deploy and delete resources.
4+
ms.topic: conceptual
5+
ms.date: 04/21/2023
6+
ms.custom: devx-track-azurepowershell, devx-track-arm-template, ai-gen-docs
7+
---
8+
9+
# Manage Azure resources by using Python
10+
11+
Learn how to use Azure Python with [Azure Resource Manager](overview.md) to manage your Azure resources. For managing resource groups, see [Manage Azure resource groups by using Python](manage-resource-groups-python.md).
12+
13+
[!INCLUDE [AI attribution](../../../includes/ai-generated-attribution.md)]
14+
15+
## Deploy resources to an existing resource group
16+
17+
You can deploy Azure resources directly by using Python, or deploy an Azure Resource Manager template (ARM template) to create Azure resources.
18+
19+
### Deploy resources by using Python classes
20+
21+
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.
22+
23+
```python
24+
import os
25+
import random
26+
from azure.identity import AzureCliCredential
27+
from azure.mgmt.storage import StorageManagementClient
28+
29+
credential = AzureCliCredential()
30+
subscription_id = os.environ["AZURE_SUBSCRIPTION_ID"]
31+
32+
random_postfix = ''.join(random.choices('abcdefghijklmnopqrstuvwxyz1234567890', k=13))
33+
storage_account_name = "demostore" + random_postfix
34+
35+
storage_client = StorageManagementClient(credential, subscription_id)
36+
37+
storage_account_result = storage_client.storage_accounts.begin_create(
38+
"exampleGroup",
39+
storage_account_name,
40+
{
41+
"location": "westus",
42+
"sku": {
43+
"name": "Standard_LRS"
44+
}
45+
}
46+
)
47+
```
48+
49+
### Deploy a template
50+
51+
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+
53+
```python
54+
import os
55+
from azure.identity import AzureCliCredential
56+
from azure.mgmt.resource import ResourceManagementClient
57+
from azure.mgmt.resource.resources.models import DeploymentMode
58+
59+
credential = AzureCliCredential()
60+
subscription_id = os.environ["AZURE_SUBSCRIPTION_ID"]
61+
62+
resource_client = ResourceManagementClient(credential, subscription_id)
63+
64+
resource_group_name = input("Enter the resource group name: ")
65+
location = input("Enter the location (i.e. centralus): ")
66+
template_uri = "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.storage/storage-account-create/azuredeploy.json"
67+
68+
rg_deployment_result = resource_client.deployments.begin_create_or_update(
69+
resource_group_name,
70+
"exampleDeployment",
71+
{
72+
"properties": {
73+
"templateLink": {
74+
"uri": template_uri
75+
},
76+
"parameters": {
77+
"location": {
78+
"value": location
79+
},
80+
},
81+
"mode": DeploymentMode.incremental
82+
}
83+
}
84+
)
85+
```
86+
87+
### Deploy a resource group and resources
88+
89+
You can create a resource group and deploy resources to the group. For more information, see [Create resource group and deploy resources](../templates/deploy-to-subscription.md#resource-groups).
90+
91+
### Deploy resources to multiple subscriptions or resource groups
92+
93+
Typically, you deploy all the resources in your template to a single resource group. However, there are scenarios where you want to deploy a set of resources together but place them in different resource groups or subscriptions. For more information, see [Deploy Azure resources to multiple subscriptions or resource groups](../templates/deploy-to-resource-group.md).
94+
95+
## Delete resources
96+
97+
The following example shows how to delete a storage account.
98+
99+
```python
100+
import os
101+
from azure.identity import AzureCliCredential
102+
from azure.mgmt.storage import StorageManagementClient
103+
104+
credential = AzureCliCredential()
105+
subscription_id = os.environ["AZURE_SUBSCRIPTION_ID"]
106+
107+
storage_client = StorageManagementClient(credential, subscription_id)
108+
109+
resource_group_name = "demoGroup"
110+
storage_account_name = "demostore"
111+
112+
storage_account = storage_client.storage_accounts.delete(
113+
resource_group_name,
114+
storage_account_name
115+
)
116+
```
117+
118+
For more information about how Azure Resource Manager orders the deletion of resources, see [Azure Resource Manager resource group deletion](delete-resource-group.md).
119+
120+
## Move resources
121+
122+
The following example shows how to move a storage account from one resource group to another resource group.
123+
124+
```python
125+
import os
126+
from azure.identity import AzureCliCredential
127+
from azure.mgmt.resource import ResourceManagementClient
128+
129+
credential = AzureCliCredential()
130+
subscription_id = os.environ["AZURE_SUBSCRIPTION_ID"]
131+
132+
resource_client = ResourceManagementClient(credential, subscription_id)
133+
134+
src_resource_group_name = "sourceGroup"
135+
dest_resource_group_name = "destinationGroup"
136+
storage_account_name = "demostore"
137+
138+
dest_resource_group = resource_client.resource_groups.get(dest_resource_group_name)
139+
140+
storage_account = resource_client.resources.get(
141+
src_resource_group_name, "Microsoft.Storage", "", "storageAccounts", storage_account_name, "2022-09-01"
142+
)
143+
144+
move_result = resource_client.resources.begin_move_resources(
145+
src_resource_group_name,
146+
{
147+
"resources": [storage_account.id],
148+
"targetResourceGroup": dest_resource_group.id,
149+
}
150+
)
151+
```
152+
153+
For more information, see [Move resources to new resource group or subscription](move-resource-group-and-subscription.md).
154+
155+
## Lock resources
156+
157+
Locking prevents other users in your organization from accidentally deleting or modifying critical resources, such as Azure subscription, resource group, or resource.
158+
159+
The following example locks a web site so it can't be deleted.
160+
161+
```python
162+
import os
163+
from azure.identity import AzureCliCredential
164+
from azure.mgmt.resource import ManagementLockClient
165+
166+
credential = AzureCliCredential()
167+
subscription_id = os.environ["AZURE_SUBSCRIPTION_ID"]
168+
169+
lock_client = ManagementLockClient(credential, subscription_id)
170+
171+
lock_result = lock_client.management_locks.create_or_update_at_resource_level(
172+
"exampleGroup",
173+
"Microsoft.Web",
174+
"",
175+
"sites",
176+
"examplesite",
177+
"lockSite",
178+
{
179+
"level": "CanNotDelete"
180+
}
181+
)
182+
```
183+
184+
The following script gets all locks for a storage account:
185+
186+
```python
187+
import os
188+
from azure.identity import AzureCliCredential
189+
from azure.mgmt.resource import ResourceManagementClient
190+
from azure.mgmt.resource.locks import ManagementLockClient
191+
192+
credential = AzureCliCredential()
193+
subscription_id = os.environ["AZURE_SUBSCRIPTION_ID"]
194+
195+
resource_client = ResourceManagementClient(credential, subscription_id)
196+
lock_client = ManagementLockClient(credential, subscription_id)
197+
198+
resource_group_name = "demoGroup"
199+
storage_account_name = "demostore"
200+
201+
resource = resource_client.resources.get_by_id(
202+
f"/subscriptions/{subscription_id}/resourceGroups/{resource_group_name}/providers/Microsoft.Storage/storageAccounts/{storage_account_name}",
203+
"2021-04-01"
204+
)
205+
206+
locks = lock_client.management_locks.list_at_resource_level(
207+
resource_group_name,
208+
"Microsoft.Storage",
209+
"",
210+
"storageAccounts",
211+
storage_account_name
212+
)
213+
214+
for lock in locks:
215+
print(f"Lock Name: {lock.name}, Lock Level: {lock.level}")
216+
```
217+
218+
The following script deletes a lock of a web site:
219+
220+
```python
221+
import os
222+
from azure.identity import AzureCliCredential
223+
from azure.mgmt.resource import ManagementLockClient
224+
225+
credential = AzureCliCredential()
226+
subscription_id = os.environ["AZURE_SUBSCRIPTION_ID"]
227+
228+
lock_client = ManagementLockClient(credential, subscription_id)
229+
230+
lock_client.management_locks.delete_at_resource_level(
231+
"exampleGroup",
232+
"Microsoft.Web",
233+
"",
234+
"sites",
235+
"examplesite",
236+
"lockSite"
237+
)
238+
```
239+
240+
For more information, see [Lock resources with Azure Resource Manager](lock-resources.md).
241+
242+
## Tag resources
243+
244+
Tagging helps organizing your resource group and resources logically. For information, see [Using tags to organize your Azure resources](tag-resources-python.md).
245+
246+
## Next steps
247+
248+
- To learn Azure Resource Manager, see [Azure Resource Manager overview](overview.md).
249+
- To learn the Resource Manager template syntax, see [Understand the structure and syntax of Azure Resource Manager templates](../templates/syntax.md).
250+
- To learn how to develop templates, see the [step-by-step tutorials](../index.yml).
251+
- To view the Azure Resource Manager template schemas, see [template reference](/azure/templates/).

articles/azure-resource-manager/management/toc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,9 @@
180180
- name: Azure PowerShell
181181
displayName: open,delete,deploy,move,lock,tag
182182
href: manage-resources-powershell.md
183+
- name: Python
184+
displayName: open,delete,deploy,move,lock,tag
185+
href: manage-resources-python.md
183186
- name: Resource providers and types
184187
href: resource-providers-and-types.md
185188
- name: Preview features

0 commit comments

Comments
 (0)