Skip to content

Commit e733b06

Browse files
authored
Merge pull request #105675 from TimShererWithAquent/us1669724d
[Azure CLI code blocks]
2 parents af8d530 + b205fed commit e733b06

11 files changed

+44
-44
lines changed

articles/aks/use-cosmosdb-osba-mongo-app.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ You can use [Azure Dev Spaces](../dev-spaces/azure-dev-spaces.md) to deploy the
188188

189189
To enable Azure Dev Spaces in your AKS cluster:
190190

191-
```cmd
191+
```azurecli
192192
az aks enable-addons --addons http_application_routing -g MyResourceGroup -n MyAKS
193193
az aks use-dev-spaces -g MyResourceGroup -n MyAKS
194194
```
@@ -203,7 +203,7 @@ This command generates several artifacts, including a *charts/* folder, which is
203203

204204
Create a file at the root of your project named *Dockerfile* with this content:
205205

206-
```Dockerfile
206+
```dockerfile
207207
FROM openjdk:8-jdk-alpine
208208
EXPOSE 8080
209209
WORKDIR /app

articles/azure-databricks/databricks-extract-load-sql-data-warehouse.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ In the cell, press **SHIFT + ENTER** to run the code.
221221
```
222222
You see an output similar to the following snippet:
223223

224-
```bash
224+
```output
225225
+---------------------+---------+---------+------+-------------+----------+---------+-------+--------------------+------+--------+-------------+---------+--------------------+------+-------------+------+
226226
| artist| auth|firstName|gender|itemInSession| lastName| length| level| location|method| page| registration|sessionId| song|status| ts|userId|
227227
+---------------------+---------+---------+------+-------------+----------+---------+-------+--------------------+------+--------+-------------+---------+--------------------+------+-------------+------+
@@ -247,7 +247,7 @@ The raw sample data **small_radio_json.json** file captures the audience for a r
247247

248248
You receive output as shown in the following snippet:
249249

250-
```bash
250+
```output
251251
+---------+----------+------+--------------------+-----+
252252
|firstname| lastname|gender| location|level|
253253
+---------+----------+------+--------------------+-----+
@@ -283,7 +283,7 @@ The raw sample data **small_radio_json.json** file captures the audience for a r
283283

284284
You receive output as shown in the following snippet.
285285

286-
```bash
286+
```output
287287
+---------+----------+------+--------------------+-----------------+
288288
|firstname| lastname|gender| location|subscription_type|
289289
+---------+----------+------+--------------------+-----------------+

articles/azure-government/documentation-government-k8.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ This article describes how to deploy a Kubernetes cluster to Azure Government us
4747

4848
Via Azure CLI:
4949

50-
```bash
50+
```azurecli
5151
az cloud set --n AzureUSGovernment
5252
az login
5353
az account list

articles/azure-monitor/insights/vminsights-enable-at-scale-powershell.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ To use the Azure CLI, you first need to install and use the CLI locally. You mus
9595

9696
The configuration change can take a few minutes to finish. When it's finished, a message displays that's similar to the following and includes the result:
9797

98-
```powershell
98+
```output
9999
provisioningState : Succeeded
100100
```
101101

@@ -109,7 +109,7 @@ To use the Azure CLI, you first need to install and use the CLI locally. You mus
109109

110110
The configuration change can take a few minutes to finish. When it's finished, a message is displayed that's similar to the following and includes the result:
111111

112-
```azurecli
112+
```output
113113
provisioningState : Succeeded
114114
```
115115

@@ -150,7 +150,7 @@ New-AzResourceGroupDeployment -Name OnboardCluster -ResourceGroupName <ResourceG
150150
```
151151
The configuration change can take a few minutes to finish. When it's finished, a message displays that's similar to the following and includes the result:
152152

153-
```powershell
153+
```output
154154
provisioningState : Succeeded
155155
```
156156

@@ -166,7 +166,7 @@ az group deployment create --resource-group <ResourceGroupName> --template-file
166166

167167
The output resembles the following:
168168

169-
```azurecli
169+
```output
170170
provisioningState : Succeeded
171171
```
172172

articles/azure-monitor/platform/alerts-metric-logs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ New-AzResourceGroupDeployment -ResourceGroupName "myRG" -TemplateFile metricfrom
360360

361361
Or use deploy Resource Template using Azure CLI:
362362

363-
```CLI
363+
```azurecli
364364
az group deployment create --resource-group myRG --template-file metricfromLogsAlertStatic.json --parameters @metricfromLogsAlertStatic.parameters.json
365365
```
366366

@@ -676,7 +676,7 @@ New-AzResourceGroupDeployment -ResourceGroupName "myRG" -TemplateFile metricfrom
676676

677677
Or use deploy Resource Template using Azure CLI:
678678

679-
```CLI
679+
```azurecli
680680
az group deployment create --resource-group myRG --template-file metricfromLogsAlertDynamic.json --parameters @metricfromLogsAlertDynamic.parameters.json
681681
```
682682

articles/azure-monitor/platform/rest-api-walkthrough.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Invoke-RestMethod -Uri $request `
112112
113113
The resulting JSON response body would be similar to the following example: (Note that the second metric has dimensions)
114114

115-
```JSON
115+
```json
116116
{
117117
"value": [
118118
{
@@ -250,7 +250,7 @@ Invoke-RestMethod -Uri $request `
250250

251251
The resulting JSON response body would be similar to the following example:
252252

253-
```JSON
253+
```json
254254
{
255255
"timespan": "2018-03-01T00:00:00Z/2018-03-02T00:00:00Z",
256256
"value": [
@@ -323,7 +323,7 @@ Invoke-RestMethod -Uri $request `
323323

324324
The resulting JSON response body would be similar to the following example:
325325

326-
```JSON
326+
```json
327327
{
328328
"cost": 0,
329329
"timespan": "2018-03-01T02:00:00Z/2018-03-01T02:05:00Z",
@@ -407,7 +407,7 @@ Invoke-RestMethod -Uri $request `
407407
408408
The resulting JSON response body would be similar to the following example:
409409

410-
```JSON
410+
```json
411411
{
412412
"id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/azmon-rest-api-walkthrough/providers/Microsoft.Logic/workflows/ContosoTweets/providers/microsoft.insights/metricdefinitions",
413413
"value": [
@@ -475,7 +475,7 @@ Invoke-RestMethod -Uri $request `
475475

476476
The resulting JSON response body would be similar to the following example:
477477

478-
```JSON
478+
```json
479479
{
480480
"value": [
481481
{
@@ -523,7 +523,7 @@ Invoke-RestMethod -Uri $request `
523523

524524
The resulting JSON response body would be similar to the following example:
525525

526-
```JSON
526+
```json
527527
{
528528
"value": [
529529
{
@@ -583,7 +583,7 @@ An additional approach is to use [ARMClient](https://github.com/projectkudu/armc
583583

584584
For example, in order to retrieve the metric definitions for a specific Logic App, issue the following command:
585585

586-
```
586+
```console
587587
armclient GET /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/azmon-rest-api-walkthrough/providers/Microsoft.Logic/workflows/ContosoTweets/providers/microsoft.insights/metricDefinitions?api-version=2016-03-01
588588
```
589589

@@ -629,7 +629,7 @@ Get-AzLogicApp -ResourceGroupName azmon-rest-api-walkthrough -Name contosotweets
629629

630630
The result should be similar to the following example:
631631

632-
```
632+
```output
633633
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/azmon-rest-api-walkthrough/providers/Microsoft.Logic/workflows/ContosoTweets
634634
Name : ContosoTweets
635635
Type : Microsoft.Logic/workflows
@@ -651,13 +651,13 @@ Version : 08586982649483762729
651651

652652
To retrieve the resource ID for an Azure Storage account using the Azure CLI, execute the `az storage account show` command, as shown in the following example:
653653

654-
```
654+
```azurecli
655655
az storage account show -g azmon-rest-api-walkthrough -n contosotweets2017
656656
```
657657

658658
The result should be similar to the following example:
659659

660-
```JSON
660+
```json
661661
{
662662
"accessTier": null,
663663
"creationTime": "2017-08-18T19:58:41.840552+00:00",

articles/cognitive-services/text-analytics/includes/key-phrase-extraction-kubernetes-config-deploy.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ ms.author: dapine
2727
2828
After this command runs, it reports a message similar to the following:
2929
30-
```console
30+
```output
3131
Merged "your-cluster-name" as current context in /home/username/.kube/config
3232
```
3333
@@ -39,7 +39,7 @@ ms.author: dapine
3939
4040
1. Open the text editor of choice. This example uses Visual Studio Code.
4141
42-
```azurecli
42+
```console
4343
code .
4444
```
4545
@@ -98,7 +98,7 @@ ms.author: dapine
9898
9999
After the command successfully applies the deployment configuration, a message appears similar to the following output:
100100
101-
```console
101+
```output
102102
deployment.apps "keyphrase" created
103103
service "keyphrase" created
104104
```
@@ -110,7 +110,7 @@ ms.author: dapine
110110
111111
The output for the running status of the pod:
112112
113-
```console
113+
```output
114114
NAME READY STATUS RESTARTS AGE
115115
keyphrase-5c9ccdf575-mf6k5 1/1 Running 0 1m
116116
```
@@ -123,7 +123,7 @@ ms.author: dapine
123123
124124
The output for the running status of the *keyphrase* service in the pod:
125125
126-
```console
126+
```output
127127
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
128128
kubernetes ClusterIP 10.0.0.1 <none> 443/TCP 2m
129129
keyphrase LoadBalancer 10.0.100.64 168.61.156.180 5000:31234/TCP 2m

articles/cognitive-services/text-analytics/includes/language-detection-kubernetes-config-deploy.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ ms.author: dapine
2727
2828
After this command runs, it reports a message similar to the following:
2929
30-
```console
30+
```output
3131
Merged "your-cluster-name" as current context in /home/username/.kube/config
3232
```
3333
@@ -39,7 +39,7 @@ ms.author: dapine
3939
4040
1. Open the text editor of choice. This example uses Visual Studio Code.
4141
42-
```azurecli
42+
```console
4343
code .
4444
```
4545
@@ -98,7 +98,7 @@ ms.author: dapine
9898
9999
After the command successfully applies the deployment configuration, a message appears similar to the following output:
100100
101-
```console
101+
```output
102102
deployment.apps "language" created
103103
service "language" created
104104
```
@@ -110,7 +110,7 @@ ms.author: dapine
110110
111111
The output for the running status of the pod:
112112
113-
```console
113+
```output
114114
NAME READY STATUS RESTARTS AGE
115115
language-5c9ccdf575-mf6k5 1/1 Running 0 1m
116116
```
@@ -123,7 +123,7 @@ ms.author: dapine
123123
124124
The output for the running status of the *language* service in the pod:
125125
126-
```console
126+
```output
127127
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
128128
kubernetes ClusterIP 10.0.0.1 <none> 443/TCP 2m
129129
language LoadBalancer 10.0.100.64 168.61.156.180 5000:31234/TCP 2m

articles/cognitive-services/text-analytics/includes/sentiment-analysis-kubernetes-config-deploy.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ ms.author: dapine
3939
4040
1. Open the text editor of choice. This example uses Visual Studio Code.
4141
42-
```azurecli
42+
```console
4343
code .
4444
```
4545
@@ -98,7 +98,7 @@ ms.author: dapine
9898
9999
After the command successfully applies the deployment configuration, a message appears similar to the following output:
100100
101-
```console
101+
```output
102102
deployment.apps "sentiment" created
103103
service "sentiment" created
104104
```
@@ -110,7 +110,7 @@ ms.author: dapine
110110
111111
The output for the running status of the pod:
112112
113-
```console
113+
```output
114114
NAME READY STATUS RESTARTS AGE
115115
sentiment-5c9ccdf575-mf6k5 1/1 Running 0 1m
116116
```
@@ -123,7 +123,7 @@ ms.author: dapine
123123
124124
The output for the running status of the *sentiment* service in the pod:
125125
126-
```console
126+
```output
127127
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
128128
kubernetes ClusterIP 10.0.0.1 <none> 443/TCP 2m
129129
sentiment LoadBalancer 10.0.100.64 168.61.156.180 5000:31234/TCP 2m

includes/cognitive-services-azure-active-directory-authentication.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ The first step is to create a custom subdomain. If you want to use an existing C
2222

2323
1. Start by opening the Azure Cloud Shell. Then [select a subscription](https://docs.microsoft.com/powershell/module/az.accounts/set-azcontext?view=azps-3.3.0):
2424

25-
```azurecli-interactive
25+
```powershell-interactive
2626
Set-AzContext -SubscriptionName <SubscriptionName>
2727
```
2828

2929
2. Next, [create a Cognitive Services resource](https://docs.microsoft.com/powershell/module/az.cognitiveservices/new-azcognitiveservicesaccount?view=azps-1.8.0) with a custom subdomain. The subdomain name needs to be globally unique and cannot include special characters, such as: ".", "!", ",".
3030

31-
```azurecli-interactive
31+
```powershell-interactive
3232
New-AzCognitiveServicesAccount -ResourceGroupName <RESOURCE_GROUP_NAME> -name <ACCOUNT_NAME> -Type <ACCOUNT_TYPE> -SkuName <SUBSCRIPTION_TYPE> -Location <REGION> -CustomSubdomainName <UNIQUE_SUBDOMAIN>
3333
```
3434

@@ -44,7 +44,7 @@ Now that you have a custom subdomain associated with your resource, you're going
4444
4545
1. First, let's register an [AAD application](https://docs.microsoft.com/powershell/module/Az.Resources/New-AzADApplication?view=azps-1.8.0).
4646

47-
```azurecli-interactive
47+
```powershell-interactive
4848
$SecureStringPassword = ConvertTo-SecureString -String <YOUR_PASSWORD> -AsPlainText -Force
4949
5050
New-AzADApplication -DisplayName <APP_DISPLAY_NAME> -IdentifierUris <APP_URIS> -Password $SecureStringPassword
@@ -54,7 +54,7 @@ Now that you have a custom subdomain associated with your resource, you're going
5454

5555
2. Next, you need to [create a service principal](https://docs.microsoft.com/powershell/module/az.resources/new-azadserviceprincipal?view=azps-1.8.0) for the AAD application.
5656

57-
```azurecli-interactive
57+
```powershell-interactive
5858
New-AzADServicePrincipal -ApplicationId <APPLICATION_ID>
5959
```
6060

@@ -75,21 +75,21 @@ Now that you have a custom subdomain associated with your resource, you're going
7575
In this sample, a password is used to authenticate the service principal. The token provided is then used to call the Computer Vision API.
7676

7777
1. Get your **TenantId**:
78-
```azurecli-interactive
78+
```powershell-interactive
7979
$context=Get-AzContext
8080
$context.Tenant.Id
8181
```
8282

8383
2. Get a token:
84-
```azurecli-interactive
84+
```powershell-interactive
8585
$authContext = New-Object "Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext" -ArgumentList "https://login.windows.net/<TENANT_ID>"
8686
$secureSecretObject = New-Object "Microsoft.IdentityModel.Clients.ActiveDirectory.SecureClientSecret" -ArgumentList $SecureStringPassword
8787
$clientCredential = New-Object "Microsoft.IdentityModel.Clients.ActiveDirectory.ClientCredential" -ArgumentList $app.ApplicationId, $secureSecretObject
8888
$token=$authContext.AcquireTokenAsync("https://cognitiveservices.azure.com/", $clientCredential).Result
8989
$token
9090
```
9191
3. Call the Computer Vision API:
92-
```azurecli-interactive
92+
```powershell-interactive
9393
$url = $account.Endpoint+"vision/v1.0/models"
9494
$result = Invoke-RestMethod -Uri $url -Method Get -Headers @{"Authorization"=$token.CreateAuthorizationHeader()} -Verbose
9595
$result | ConvertTo-Json

0 commit comments

Comments
 (0)