Skip to content

Commit 9331414

Browse files
author
fkriti
committed
use description tag and create registry using rest
1 parent c73470d commit 9331414

File tree

1 file changed

+71
-6
lines changed

1 file changed

+71
-6
lines changed

articles/machine-learning/how-to-manage-registries.md

Lines changed: 71 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
title: Create and manage registries (preview)
33
titleSuffix: Azure Machine Learning
4-
description: Learn how create registries with the CLI, Azure portal and Azure Machine Learning Studio
4+
description: Learn how create registries with the CLI, REST API, Azure portal and Azure Machine Learning Studio
55
services: machine-learning
66
ms.service: machine-learning
77
ms.subservice: mlops
8-
ms.author: mabables
9-
author: ManojBableshwar
8+
ms.author: kritifaujdar
9+
author: fkriti
1010
ms.reviewer: larryfr
11-
ms.date: 09/21/2022
11+
ms.date: 04/12/2023
1212
ms.topic: how-to
1313
ms.custom: devx-track-python, ignite-2022
1414
---
@@ -66,8 +66,8 @@ Create the YAML definition and name it `registry.yml`.
6666
6767
```YAML
6868
name: DemoRegistry1
69-
description: Basic registry with one primary region and to additional regions
7069
tags:
70+
description: Basic registry with one primary region and to additional regions
7171
foo: bar
7272
location: eastus
7373
replication_locations:
@@ -118,8 +118,73 @@ You can create registries in Azure Machine Learning studio using the following s
118118

119119
1. Review the information and select __Create__.
120120

121+
122+
123+
# [REST API](#tab/rest)
124+
125+
You will require the **curl** utility to complete this step. The **curl** program is available in the [Windows Subsystem for Linux](/windows/wsl/install-win10) or any UNIX distribution. In PowerShell, **curl** is an alias for **Invoke-WebRequest** and `curl -d "key=val" -X POST uri` becomes `Invoke-WebRequest -Body "key=val" -Method POST -Uri uri`.
126+
127+
You will also require an authentication token for your account to complete the REST API call. You can use below command to retrieve the token:
128+
129+
```azurecli
130+
az account get-access-token
131+
```
132+
133+
The response should provide an access token good for one hour. Make note of the token, as you will use it to authenticate all administrative requests. Below is a sample response:
134+
135+
```json
136+
{
137+
"access_token": "YOUR-ACCESS-TOKEN",
138+
"expiresOn": "<expiration-time>",
139+
"subscription": "<subscription-id>",
140+
"tenant": "your-tenant-id",
141+
"tokenType": "Bearer"
142+
}
143+
```
144+
145+
Run below command to create a registry. You can edit the Json to change the inputs as needed:
146+
147+
```bash
148+
curl -X PUT https://management.azure.com/subscriptions/<your-subscription-id>/resourceGroups/<your-resource-group>/providers/Microsoft.MachineLearningServices/registries/reg-from-rest?api-version=2022-12-01-preview -H "Authorization:Bearer <YOUR-ACCESS-TOKEN>" -H 'Content-Type: application/json' -d '
149+
{
150+
"properties":
151+
{
152+
"regionDetails":
153+
[
154+
{
155+
"location": "eastus",
156+
"storageAccountDetails":
157+
[
158+
{
159+
"systemCreatedStorageAccount":
160+
{
161+
"storageAccountType": "Standard_LRS"
162+
}
163+
}
164+
],
165+
"acrDetails":
166+
[
167+
{
168+
"systemCreatedAcrAccount":
169+
{
170+
"acrAccountSku": "Premium"
171+
}
172+
}
173+
]
174+
}
175+
]
176+
},
177+
"identity": {
178+
"type": "SystemAssigned"
179+
},
180+
"location": "eastus"
181+
}
182+
'
183+
```
184+
You should receive a `202 Accepted` response.
121185
---
122186

187+
123188
## Specify storage account type and SKU (optional)
124189

125190
> [!TIP]
@@ -136,8 +201,8 @@ Below is an example YAML that demonstrates this advanced storage configuration:
136201

137202
```YAML
138203
name: DemoRegistry2
139-
description: Registry with additional configuration for storage accounts
140204
tags:
205+
description: Registry with additional configuration for storage accounts
141206
foo: bar
142207
location: eastus
143208
replication_locations:

0 commit comments

Comments
 (0)