Skip to content

Commit 883810a

Browse files
authored
Merge pull request #188022 from dksimpson/azure-docs-pr-20220126-validation-3
Validation bulk update: Fix code tags for Azure CLI code blocks - batch 2
2 parents 522114e + 74c578b commit 883810a

File tree

7 files changed

+48
-36
lines changed

7 files changed

+48
-36
lines changed

articles/api-management/api-management-howto-aad.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@ In this article, you'll learn how to:
2626
## Prerequisites
2727

2828
- Complete the [Create an Azure API Management instance](get-started-create-service-instance.md) quickstart.
29+
2930
- [Import and publish](import-and-publish.md) an Azure API Management instance.
3031

32+
[!INCLUDE [azure-cli-prepare-your-environment-no-header.md](../../includes/azure-cli-prepare-your-environment-no-header.md)]
33+
3134
[!INCLUDE [premium-dev-standard.md](../../includes/api-management-availability-premium-dev-standard.md)]
3235

3336
## Authorize developer accounts by using Azure AD
@@ -104,8 +107,9 @@ Follow these steps to grant:
104107
* `Directory.Read.All` application permission for Microsoft Graph API and Azure Active Directory Graph API.
105108
* `User.Read` delegated permission for Microsoft Graph API.
106109

107-
1. Update the first 3 lines of the following PowerShell script to match your environment and run it.
108-
```powershell
110+
1. Update the first 3 lines of the following Azure CLI script to match your environment and run it.
111+
112+
```azurecli
109113
$subId = "Your Azure subscription ID" #e.g. "1fb8fadf-03a3-4253-8993-65391f432d3a"
110114
$tenantId = "Your Azure AD Tenant or Organization ID" #e.g. 0e054eb4-e5d0-43b8-ba1e-d7b5156f6da8"
111115
$appObjectID = "Application Object ID that has been registered in AAD" #e.g. "2215b54a-df84-453f-b4db-ae079c0d2619"
@@ -115,9 +119,10 @@ Follow these steps to grant:
115119
#Assign the following permissions: Microsoft Graph Delegated Permission: User.Read, Microsoft Graph Application Permission: Directory.ReadAll, Azure Active Directory Graph Application Permission: Directory.ReadAll (legacy)
116120
az rest --method PATCH --uri "https://graph.microsoft.com/v1.0/$($tenantId)/applications/$($appObjectID)" --body "{'requiredResourceAccess':[{'resourceAccess': [{'id': 'e1fe6dd8-ba31-4d61-89e7-88639da4683d','type': 'Scope'},{'id': '7ab1d382-f21e-4acd-a863-ba3e13f7da61','type': 'Role'}],'resourceAppId': '00000003-0000-0000-c000-000000000000'},{'resourceAccess': [{'id': '5778995a-e1bf-45b8-affa-663a9f3f4d04','type': 'Role'}], 'resourceAppId': '00000002-0000-0000-c000-000000000000'}]}"
117121
```
122+
118123
2. Log out and log back in to the Azure portal.
119124
3. Navigate to the App Registration page for the application you registered in [the previous section](#authorize-developer-accounts-by-using-azure-ad).
120-
4. Click **API Permissions**. You should see the permissions granted by the PowerShell script in step 1.
125+
4. Click **API Permissions**. You should see the permissions granted by the Azure CLI script in step 1.
121126
5. Select **Grant admin consent for {tenantname}** so that you grant access for all users in this directory.
122127

123128
Now you can add external Azure AD groups from the **Groups** tab of your API Management instance.

articles/app-service/environment/management-addresses.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ ms.custom: seodec18, references_regions, devx-track-azurecli
1414
> This article is about the App Service Environment v2 which is used with Isolated App Service plans
1515
>
1616
17+
[!INCLUDE [azure-cli-prepare-your-environment.md](../../../includes/azure-cli-prepare-your-environment.md)]
18+
19+
## Summary
20+
1721
The App Service Environment (ASE) is a single tenant deployment of the Azure App Service that runs in your Azure Virtual Network (VNet). While the ASE does run in your VNet, it must still be accessible from a number of dedicated IP addresses that are used by the Azure App Service to manage the service. In the case of an ASE, the management traffic traverses the user-controlled network. If this traffic is blocked or misrouted, the ASE will become suspended. For details on the ASE networking dependencies, read [Networking considerations and the App Service Environment][networking]. For general information on the ASE, you can start with [Introduction to the App Service Environment][intro].
1822

1923
All ASEs have a public VIP which management traffic comes into. The incoming management traffic from these addresses comes in from to ports 454 and 455 on the public VIP of your ASE. This document lists the App Service source addresses for management traffic to the ASE. These addresses are also in the IP Service Tag named AppServiceManagement.
@@ -38,7 +42,7 @@ With Network Security Groups, you do not need to worry about the individual addr
3842

3943
The management addresses can be placed in a route table with a next hop of internet to ensure that all inbound management traffic is able to go back through the same path. These routes are needed when configuring forced tunneling. To create the route table, you can use the portal, PowerShell or Azure CLI. The commands to create a route table using Azure CLI from a PowerShell prompt are below.
4044

41-
```azurepowershell-interactive
45+
```azurecli
4246
$rg = "resource group name"
4347
$rt = "route table name"
4448
$location = "azure location"

articles/app-service/quickstart-html-uiex.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ ROBOTS: NOINDEX,NOFOLLOW
1414

1515
This quickstart shows how to deploy a basic HTML+CSS site to <abbr title="An HTTP-based service for hosting web applications, REST APIs, and mobile back-end applications.">Azure App Service</abbr>. You'll complete this quickstart in [Cloud Shell](../cloud-shell/overview.md), but you can also run these commands locally with [Azure CLI](/cli/azure/install-azure-cli).
1616

17+
[!INCLUDE [azure-cli-prepare-your-environment.md](../../includes/azure-cli-prepare-your-environment.md)]
18+
1719
## 1. Prepare your environment
1820

1921
[!INCLUDE [quickstarts-free-trial-note](../../includes/quickstarts-free-trial-note.md)]
@@ -35,9 +37,9 @@ git clone https://github.com/Azure-Samples/html-docs-hello-world.git
3537

3638
## 2. Create a web app
3739

38-
Change to the directory that contains the sample code and run the `az webapp up` command. **Replace** `<app-name>` with a globally unique name.
40+
Change to the directory that contains the sample code and run the [az webapp up](/cli/azure/webapp#az-webapp-up) command. **Replace** `<app-name>` with a globally unique name.
3941

40-
```bash
42+
```azurecli
4143
cd html-docs-hello-world
4244
4345
az webapp up --location westeurope --name <app_name> --html
@@ -50,7 +52,7 @@ az webapp up --location westeurope --name <app_name> --html
5052
<li>Replace <code>&lt;app-name&gt;</code> with a name that's unique across all of Azure (<em>valid characters are <code>a-z</code>, <code>0-9</code>, and <code>-</code></em>). A good pattern is to use a combination of your company name and an app identifier.</li>
5153
<li>The <code>--sku F1</code> argument creates the web app on the Free pricing tier. Omit this argument to use a faster premium tier, which incurs an hourly cost.</li>
5254
<li>The <code>--html</code> argument says to treat all folder content as static content and disable build automation.</li>
53-
<li>You can optionally include the argument <code>--location &lt;location-name&gt;</code> where <code>&lt;location-name&gt;</code> is an available Azure region. You can retrieve a list of allowable regions for your Azure account by running the <a href="/cli/azure/appservice#az_appservice_list_locations"><code>az account list-locations</code></a> command.</li>
55+
<li>You can optionally include the argument <code>--location &lt;location-name&gt;</code> where <code>&lt;location-name&gt;</code> is an available Azure region. You can retrieve a list of allowable regions for your Azure account by running the <a href="/cli/azure/appservice#az-appservice-list-locations"><code>az account list-locations</code></a> command.</li>
5456
</ul>
5557
</details>
5658

@@ -113,7 +115,7 @@ In the `<h1>` heading tag, change "Azure App Service - Sample Static HTML Site"
113115

114116
Redeploy the app with `az webapp up` command.
115117

116-
```bash
118+
```azurecli
117119
az webapp up --html
118120
```
119121

@@ -149,7 +151,7 @@ The left menu provides different pages for configuring your app.
149151

150152
In the preceding steps, you created Azure resources in a resource group. If you don't expect to need these resources in the future, delete the resource group by running the following command in the Cloud Shell. Remember that the resource group name was automatically generated for you in the [create a web app](#2-create-a-web-app) step.
151153

152-
```bash
154+
```azurecli
153155
az group delete --name appsvc_rg_Windows_westeurope
154156
```
155157

articles/app-service/quickstart-html.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ adobe-target-content: ./quickstart-html-uiex
2121

2222
[!INCLUDE [quickstarts-free-trial-note](../../includes/quickstarts-free-trial-note.md)]
2323

24-
[!INCLUDE [cloud-shell-try-it.md](../../includes/cloud-shell-try-it.md)]
24+
[!INCLUDE [azure-cli-prepare-your-environment.md](../../includes/azure-cli-prepare-your-environment.md)]
2525

2626
## Download the sample
2727

@@ -41,9 +41,9 @@ git clone https://github.com/Azure-Samples/html-docs-hello-world.git
4141

4242
## Create a web app
4343

44-
Change to the directory that contains the sample code and run the `az webapp up` command. In the following example, replace <app_name> with a unique app name. Static content is indicated by the `--html` flag.
44+
Change to the directory that contains the sample code and run the [az webapp up](/cli/azure/webapp#az-webapp-up) command. In the following example, replace <app_name> with a unique app name. Static content is indicated by the `--html` flag.
4545

46-
```bash
46+
```azurecli
4747
cd html-docs-hello-world
4848
4949
az webapp up --location westeurope --name <app_name> --html
@@ -97,7 +97,7 @@ Save your changes and exit nano. Use the command `^O` to save and `^X` to exit.
9797

9898
You'll now redeploy the app with the same `az webapp up` command.
9999

100-
```bash
100+
```azurecli
101101
az webapp up --location westeurope --name <app_name> --html
102102
```
103103

@@ -125,7 +125,7 @@ The left menu provides different pages for configuring your app.
125125

126126
In the preceding steps, you created Azure resources in a resource group. If you don't expect to need these resources in the future, delete the resource group by running the following command in the Cloud Shell. Remember that the resource group name was automatically generated for you in the [create a web app](#create-a-web-app) step.
127127

128-
```bash
128+
```azurecli
129129
az group delete --name appsvc_rg_Windows_westeurope
130130
```
131131

articles/app-service/tutorial-troubleshoot-monitor.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,16 @@ You can follow the steps in this tutorial on macOS, Linux, Windows.
2929
To complete this tutorial, you'll need:
3030

3131
- [Azure subscription](https://azure.microsoft.com/free/?ref=microsoft.com&utm_source=microsoft.com&utm_medium=docs&utm_campaign=visualstudio)
32-
- [Azure CLI](/cli/azure/install-azure-cli)
32+
3333
- [Git](https://git-scm.com/)
3434

35+
[!INCLUDE [azure-cli-prepare-your-environment-no-header.md](../../includes/azure-cli-prepare-your-environment-no-header.md)]
36+
3537
## Create Azure resources
3638

3739
First, you run several commands locally to setup a sample app to use with this tutorial. The commands create Azure resources, create a deployment user, and deploy the sample app to Azure. You'll be prompted for the password supplied as a part of the creation of the deployment user.
3840

39-
```bash
41+
```azurecli
4042
az group create --name myResourceGroup --location "South Central US"
4143
az webapp deployment user set --user-name <username> --password <password>
4244
az appservice plan create --name myAppServicePlan --resource-group myResourceGroup --sku B1 --is-linux
@@ -57,7 +59,7 @@ Now that you've deployed the sample app to Azure App Service, you'll configure m
5759

5860
In this step, you create a Log Analytics workspace to configure Azure Monitor with your app.
5961

60-
```bash
62+
```azurecli
6163
az monitor log-analytics workspace create --resource-group myResourceGroup --workspace-name myMonitorWorkspace
6264
```
6365

@@ -72,10 +74,10 @@ Diagnostic settings can be used to collect metrics for certain Azure services in
7274
You run the following commands to create diagnostic settings for AppServiceConsoleLogs (standard output/error) and AppServiceHTTPLogs (web server logs). Replace _\<app-name>_ and _\<workspace-name>_ with your values.
7375

7476
> [!NOTE]
75-
> The first two commands, `resourceID` and `workspaceID`, are variables to be used in the `az monitor diagnostic-settings create` command. See [Create diagnostic settings using Azure CLI](../azure-monitor/essentials/diagnostic-settings.md#create-using-azure-cli) for more information on this command.
77+
> The first two commands, `resourceID` and `workspaceID`, are variables to be used in the [az monitor diagnostic-settings create](/cli/azure/monitor/diagnostic-settings#az-monitor-diagnostic-settings-create) command. See [Create diagnostic settings using Azure CLI](../azure-monitor/essentials/diagnostic-settings.md#create-using-azure-cli) for more information on this command.
7678
>
7779
78-
```bash
80+
```azurecli
7981
resourceID=$(az webapp show -g myResourceGroup -n <app-name> --query id --output tsv)
8082
8183
workspaceID=$(az monitor log-analytics workspace show -g myResourceGroup --workspace-name <workspace-name> --query id --output tsv)
@@ -252,7 +254,7 @@ Converting images should not longer produce the HTTP 500 errors.
252254

253255
Delete the diagnostic setting with the following command:
254256

255-
```bash
257+
```azurecli
256258
az monitor diagnostic-settings delete --resource $resourceID -n myMonitorLogs
257259
```
258260
What you learned:

articles/azure-arc/data/create-data-controller-direct-cli.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@ This article describes how to create the Azure Arc data controller in direct con
2020

2121
Before you begin, verify that you have completed the prerequisites in [Deploy data controller - direct connect mode - prerequisites](create-data-controller-direct-prerequisites.md).
2222

23-
Creating an Azure Arc data controller in direct connectivity mode involves the following steps:
23+
- Creating an Azure Arc data controller in direct connectivity mode involves the following steps:
2424

25-
1. Create an Azure Arc-enabled data services extension.
26-
1. Create a custom location.
27-
1. Create the data controller.
25+
1. Create an Azure Arc-enabled data services extension.
26+
1. Create a custom location.
27+
1. Create the data controller.
28+
29+
[!INCLUDE [azure-cli-prepare-your-environment-no-header.md](../../../includes/azure-cli-prepare-your-environment-no-header.md)]
2830

2931
## Step 1: Create an Azure Arc-enabled data services extension
3032

@@ -81,14 +83,14 @@ The following command creates the Arc data services extension.
8183

8284
#### [Linux](#tab/linux)
8385

84-
```console
86+
```azurecli
8587
az k8s-extension create --cluster-name ${clusterName} --resource-group ${resourceGroup} --name ${adsExtensionName} --cluster-type connectedClusters --extension-type microsoft.arcdataservices --auto-upgrade false --scope cluster --release-namespace ${namespace} --config Microsoft.CustomLocation.ServiceAccount=sa-arc-bootstrapper
8688
az k8s-extension show --resource-group ${resourceGroup} --cluster-name ${resourceName} --name ${adsExtensionName} --cluster-type connectedclusters
8789
```
8890

8991
#### [Windows (PowerShell)](#tab/windows)
9092

91-
```PowerShell
93+
```azurecli
9294
az k8s-extension create --cluster-name $ENV:clusterName --resource-group $ENV:resourceGroup --name $ENV:adsExtensionName --cluster-type connectedClusters --extension-type microsoft.arcdataservices --auto-upgrade false --scope cluster --release-namespace $ENV:namespace --config Microsoft.CustomLocation.ServiceAccount=sa-arc-bootstrapper
9395
az k8s-extension show --resource-group $ENV:resourceGroup --cluster-name $ENV:clusterName --name $ENV:adsExtensionName --cluster-type connectedclusters
9496
```
@@ -151,7 +153,7 @@ When the Arc data services extension is created, Azure creates a managed identit
151153

152154
### Retrieve managed identity of the Arc data controller extension
153155

154-
```powershell
156+
```azurecli
155157
$Env:MSI_OBJECT_ID = (az k8s-extension show --resource-group <resource group> --cluster-name <connectedclustername> --cluster-type connectedClusters --name <name of extension> | convertFrom-json).identity.principalId
156158
#Example
157159
$Env:MSI_OBJECT_ID = (az k8s-extension show --resource-group myresourcegroup --cluster-name myconnectedcluster --cluster-type connectedClusters --name ads-extension | convertFrom-json).identity.principalId
@@ -174,7 +176,7 @@ A custom location is an Azure resource that is equivalent to a namespace in a Ku
174176

175177
#### [Linux](#tab/linux)
176178

177-
```bash
179+
```azurecli
178180
export clName=mycustomlocation
179181
export hostClusterId=$(az connectedk8s show --resource-group ${resourceGroup} --name ${clusterName} --query id -o tsv)
180182
export extensionId=$(az k8s-extension show --resource-group ${resourceGroup} --cluster-name ${clusterName} --cluster-type connectedClusters --name ${adsExtensionName} --query id -o tsv)
@@ -183,7 +185,7 @@ az customlocation create --resource-group ${resourceGroup} --name ${clName} --na
183185

184186
#### [Windows (PowerShell)](#tab/windows)
185187

186-
```PowerShell
188+
```azurecli
187189
$ENV:clName="mycustomlocation"
188190
$ENV:hostClusterId=(az connectedk8s show --resource-group $ENV:resourceGroup --name $ENV:clusterName --query id -o tsv)
189191
$ENV:extensionId=(az k8s-extension show --resource-group $ENV:resourceGroup --cluster-name $ENV:clusterName --cluster-type connectedClusters --name $ENV:adsExtensionName --query id -o tsv)

articles/azure-arc/data/monitor-grafana-kibana.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,16 @@ ms.topic: how-to
1515

1616
Kibana and Grafana web dashboards are provided to bring insight and clarity to the Kubernetes namespaces being used by Azure Arc-enabled data services. To access Kibana and Grafana web dashboards view service endpoints check [Azure Data Studio dashboards](./azure-data-studio-dashboards.md) documentation.
1717

18-
19-
18+
[!INCLUDE [azure-cli-prepare-your-environment.md](../../../includes/azure-cli-prepare-your-environment.md)]
2019

2120
## Monitor Azure SQL managed instances on Azure Arc
2221

2322
To access the logs and monitoring dashboards for Azure Arc-enabled SQL Managed Instance, run the following `azdata` CLI command
2423

25-
```azurecl
24+
```azurecli
2625
az sql mi-arc endpoint list -n <name of SQL instance> --use-k8s
27-
2826
```
27+
2928
The relevant Grafana dashboards are:
3029

3130
* "Azure SQL managed instance Metrics"
@@ -44,10 +43,8 @@ The relevant Grafana dashboards are:
4443

4544
To access the logs and monitoring dashboards for PostgreSQL Hyperscale, run the following `azdata` CLI command
4645

47-
```bash
48-
46+
```azurecli
4947
az postgres arc-server endpoint list -n <name of postgreSQL instance> --k8s-namespace <namespace> --use-k8s
50-
5148
```
5249

5350
The relevant postgreSQL dashboards are:

0 commit comments

Comments
 (0)