Skip to content

Commit 9bc72d1

Browse files
Merge pull request #267803 from santiagxf/santiagxf-patch-2
Update how-to-authenticate-batch-endpoint.md
2 parents 8156a76 + 7a76087 commit 9bc72d1

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

articles/machine-learning/how-to-authenticate-batch-endpoint.md

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ In this case, we want to execute a batch endpoint using the identity of the user
5959
1. Once authenticated, use the following command to run a batch deployment job:
6060
6161
```azurecli
62-
az ml batch-endpoint invoke --name $ENDPOINT_NAME --input https://azuremlexampledata.blob.core.windows.net/data/heart-disease-uci
62+
az ml batch-endpoint invoke --name $ENDPOINT_NAME \
63+
--input https://azuremlexampledata.blob.core.windows.net/data/heart-disease-uci
6364
```
6465
6566
# [Python](#tab/sdk)
@@ -93,7 +94,9 @@ When working with REST, we recommend invoking batch endpoints using a service pr
9394
1. The simplest way to get a valid token for your user account is to use the Azure CLI. In a console, run the following command:
9495
9596
```azurecli
96-
az account get-access-token --resource https://ml.azure.com --query "accessToken" --output tsv
97+
az account get-access-token --resource https://ml.azure.com \
98+
--query "accessToken" \
99+
--output tsv
97100
```
98101
99102
1. Take note of the generated output.
@@ -114,9 +117,9 @@ When working with REST, we recommend invoking batch endpoints using a service pr
114117
{
115118
"properties": {
116119
"InputData": {
117-
"mnistinput": {
118-
"JobInputType" : "UriFolder",
119-
"Uri": "https://azuremlexampledata.blob.core.windows.net/data/heart-disease-uci"
120+
"mnistinput": {
121+
"JobInputType" : "UriFolder",
122+
"Uri": "https://azuremlexampledata.blob.core.windows.net/data/heart-disease-uci"
120123
}
121124
}
122125
}
@@ -135,13 +138,17 @@ In this case, we want to execute a batch endpoint using a service principal alre
135138
1. To authenticate using a service principal, use the following command. For more details see [Sign in with Azure CLI](/cli/azure/authenticate-azure-cli).
136139
137140
```azurecli
138-
az login --service-principal -u <app-id> -p <password-or-cert> --tenant <tenant>
141+
az login --service-principal \
142+
--tenant <tenant> \
143+
-u <app-id> \
144+
-p <password-or-cert>
139145
```
140146
141147
1. Once authenticated, use the following command to run a batch deployment job:
142148
143149
```azurecli
144-
az ml batch-endpoint invoke --name $ENDPOINT_NAME --input https://azuremlexampledata.blob.core.windows.net/data/heart-disease-uci/
150+
az ml batch-endpoint invoke --name $ENDPOINT_NAME \
151+
--input https://azuremlexampledata.blob.core.windows.net/data/heart-disease-uci/
145152
```
146153
147154
# [Python](#tab/sdk)
@@ -193,7 +200,7 @@ In this case, we want to execute a batch endpoint using a service principal alre
193200
```
194201
195202
> [!IMPORTANT]
196-
> Notice that the resource scope for invoking a batch endpoints (`https://ml.azure.com) is different from the resource scope used to manage them. All management APIs in Azure use the resource scope `https://management.azure.com`, including Azure Machine Learning.
203+
> Notice that the resource scope for invoking a batch endpoints (`https://ml.azure.com`) is different from the resource scope used to manage them. All management APIs in Azure use the resource scope `https://management.azure.com`, including Azure Machine Learning.
197204
198205
3. Once authenticated, use the query to run a batch deployment job:
199206
@@ -211,9 +218,9 @@ In this case, we want to execute a batch endpoint using a service principal alre
211218
{
212219
"properties": {
213220
"InputData": {
214-
"mnistinput": {
215-
"JobInputType" : "UriFolder",
216-
"Uri": "https://azuremlexampledata.blob.core.windows.net/data/heart-disease-uci"
221+
"mnistinput": {
222+
"JobInputType" : "UriFolder",
223+
"Uri": "https://azuremlexampledata.blob.core.windows.net/data/heart-disease-uci"
217224
}
218225
}
219226
}
@@ -237,7 +244,8 @@ az login --identity
237244
Once authenticated, use the following command to run a batch deployment job:
238245

239246
```azurecli
240-
az ml batch-endpoint invoke --name $ENDPOINT_NAME --input https://azuremlexampledata.blob.core.windows.net/data/heart-disease-uci
247+
az ml batch-endpoint invoke --name $ENDPOINT_NAME \
248+
--input https://azuremlexampledata.blob.core.windows.net/data/heart-disease-uci
241249
```
242250

243251
# [Python](#tab/sdk)

0 commit comments

Comments
 (0)