Skip to content

Commit 6f12948

Browse files
author
SDKAuto
committed
CodeGen from PR 15432 in Azure/azure-rest-api-specs
Merge 09aaa19d69803606784bbd0b630773800f7dcb6b into 1267076
1 parent 0793492 commit 6f12948

Some content is hidden

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

58 files changed

+23265
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.. :changelog:
2+
3+
Release History
4+
===============
5+
6+
0.1.0
7+
++++++
8+
* Initial release.
Lines changed: 255 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,255 @@
1+
# Azure CLI machinelearningservices Extension #
2+
This is the extension for machinelearningservices
3+
4+
### How to use ###
5+
Install this extension using the below CLI command
6+
```
7+
az extension add --name machinelearningservices
8+
```
9+
10+
### Included Features ###
11+
#### machinelearningservices workspace ####
12+
##### Create #####
13+
```
14+
az machinelearningservices workspace create \
15+
--identity type="SystemAssigned,UserAssigned" userAssignedIdentities={"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai":{}} \
16+
--location "eastus2euap" --description "test description" \
17+
--application-insights "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/microsoft.insights/components/testinsights" \
18+
--container-registry "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ContainerRegistry/registries/testRegistry" \
19+
--identity user-assigned-identity="/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai" \
20+
--key-vault-properties identity-client-id="" key-identifier="https://testkv.vault.azure.net/keys/testkey/aabbccddee112233445566778899aabb" key-vault-arm-id="/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv" \
21+
--status "Enabled" --friendly-name "HelloName" --hbi-workspace false \
22+
--key-vault "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv" \
23+
--shared-private-link-resources name="testdbresource" private-link-resource-id="/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.DocumentDB/databaseAccounts/testdbresource/privateLinkResources/Sql" group-id="Sql" request-message="Please approve" status="Approved" \
24+
--storage-account "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccount" \
25+
--resource-group "workspace-1234" --name "testworkspace"
26+
27+
az machinelearningservices workspace wait --created --resource-group "{rg}" --name "{myWorkspace}"
28+
```
29+
##### Show #####
30+
```
31+
az machinelearningservices workspace show --resource-group "workspace-1234" --name "testworkspace"
32+
```
33+
##### List #####
34+
```
35+
az machinelearningservices workspace list --resource-group "workspace-1234"
36+
```
37+
##### Update #####
38+
```
39+
az machinelearningservices workspace update --description "new description" --friendly-name "New friendly name" \
40+
--public-network-access "Disabled" --resource-group "workspace-1234" --name "testworkspace"
41+
```
42+
##### Diagnose #####
43+
```
44+
az machinelearningservices workspace diagnose --application-insights "{}" --container-registry "{}" \
45+
--dns-resolution "{}" --key-vault "{}" --nsg "{}" --others "{}" --resource-lock "{}" --storage-account "{}" \
46+
--udr "{}" --resource-group "workspace-1234" --name "testworkspace"
47+
```
48+
##### List-key #####
49+
```
50+
az machinelearningservices workspace list-key --resource-group "testrg123" --name "workspaces123"
51+
```
52+
##### List-notebook-access-token #####
53+
```
54+
az machinelearningservices workspace list-notebook-access-token --resource-group "workspace-1234" \
55+
--name "testworkspace"
56+
```
57+
##### List-notebook-key #####
58+
```
59+
az machinelearningservices workspace list-notebook-key --resource-group "testrg123" --name "workspaces123"
60+
```
61+
##### List-outbound-network-dependency-endpoint #####
62+
```
63+
az machinelearningservices workspace list-outbound-network-dependency-endpoint --resource-group "workspace-1234" \
64+
--name "testworkspace"
65+
```
66+
##### List-storage-account-key #####
67+
```
68+
az machinelearningservices workspace list-storage-account-key --resource-group "testrg123" --name "workspaces123"
69+
```
70+
##### Prepare-notebook #####
71+
```
72+
az machinelearningservices workspace prepare-notebook --resource-group "testrg123" --name "workspaces123"
73+
```
74+
##### Resync-key #####
75+
```
76+
az machinelearningservices workspace resync-key --resource-group "testrg123" --name "workspaces123"
77+
```
78+
##### Delete #####
79+
```
80+
az machinelearningservices workspace delete --resource-group "workspace-1234" --name "testworkspace"
81+
```
82+
#### machinelearningservices usage ####
83+
##### List #####
84+
```
85+
az machinelearningservices usage list --location "eastus"
86+
```
87+
#### machinelearningservices virtual-machine-size ####
88+
##### List #####
89+
```
90+
az machinelearningservices virtual-machine-size list --location "eastus"
91+
```
92+
#### machinelearningservices quota ####
93+
##### List #####
94+
```
95+
az machinelearningservices quota list --location "eastus"
96+
```
97+
##### Update #####
98+
```
99+
az machinelearningservices quota update --location "eastus" \
100+
--value type="Microsoft.MachineLearningServices/workspaces/quotas" id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace1/quotas/Standard_DSv2_Family_Cluster_Dedicated_vCPUs" limit=100 unit="Count" \
101+
--value type="Microsoft.MachineLearningServices/workspaces/quotas" id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace2/quotas/Standard_DSv2_Family_Cluster_Dedicated_vCPUs" limit=200 unit="Count"
102+
```
103+
#### machinelearningservices compute ####
104+
##### Create #####
105+
```
106+
az machinelearningservices compute create --name "compute123" --location "eastus" \
107+
--properties "{\\"description\\":\\"some compute\\",\\"computeType\\":\\"Kubernetes\\",\\"properties\\":{\\"defaultInstanceType\\":\\"defaultInstanceType\\",\\"instanceTypes\\":{\\"defaultInstanceType\\":{\\"nodeSelector\\":null,\\"resources\\":{\\"limits\\":{\\"cpu\\":\\"1\\",\\"memory\\":\\"4Gi\\",\\"nvidia.com/gpu\\":null},\\"requests\\":{\\"cpu\\":\\"1\\",\\"memory\\":\\"4Gi\\",\\"nvidia.com/gpu\\":null}}}},\\"namespace\\":\\"default\\"},\\"resourceId\\":\\"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2\\"}" \
108+
--resource-group "testrg123" --workspace-name "workspaces123"
109+
```
110+
##### Create #####
111+
```
112+
az machinelearningservices compute create --name "compute123" --location "eastus" \
113+
--properties "{\\"computeType\\":\\"AmlCompute\\",\\"properties\\":{\\"enableNodePublicIp\\":true,\\"isolatedNetwork\\":false,\\"osType\\":\\"Windows\\",\\"remoteLoginPortPublicAccess\\":\\"NotSpecified\\",\\"scaleSettings\\":{\\"maxNodeCount\\":1,\\"minNodeCount\\":0,\\"nodeIdleTimeBeforeScaleDown\\":\\"PT5M\\"},\\"virtualMachineImage\\":{\\"id\\":\\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myImageGallery/images/myImageDefinition/versions/0.0.1\\"},\\"vmPriority\\":\\"Dedicated\\",\\"vmSize\\":\\"STANDARD_NC6\\"}}" \
114+
--resource-group "testrg123" --workspace-name "workspaces123"
115+
```
116+
##### Create #####
117+
```
118+
az machinelearningservices compute create --name "compute123" --location "eastus" \
119+
--properties "{\\"computeType\\":\\"DataFactory\\"}" --resource-group "testrg123" --workspace-name "workspaces123"
120+
```
121+
##### Create #####
122+
```
123+
az machinelearningservices compute create --name "compute123" --location "eastus" \
124+
--properties "{\\"computeType\\":\\"AKS\\"}" --resource-group "testrg123" --workspace-name "workspaces123"
125+
```
126+
##### Create #####
127+
```
128+
az machinelearningservices compute create --name "compute123" --location "eastus" \
129+
--properties "{\\"computeType\\":\\"ComputeInstance\\",\\"properties\\":{\\"applicationSharingPolicy\\":\\"Personal\\",\\"computeInstanceAuthorizationType\\":\\"personal\\",\\"personalComputeInstanceSettings\\":{\\"assignedUser\\":{\\"objectId\\":\\"00000000-0000-0000-0000-000000000000\\",\\"tenantId\\":\\"00000000-0000-0000-0000-000000000000\\"}},\\"sshSettings\\":{\\"sshPublicAccess\\":\\"Disabled\\"},\\"subnet\\":\\"test-subnet-resource-id\\",\\"vmSize\\":\\"STANDARD_NC6\\"}}" \
130+
--resource-group "testrg123" --workspace-name "workspaces123"
131+
```
132+
##### Create #####
133+
```
134+
az machinelearningservices compute create --name "compute123" --location "eastus" \
135+
--properties "{\\"computeType\\":\\"ComputeInstance\\",\\"properties\\":{\\"vmSize\\":\\"STANDARD_NC6\\"}}" \
136+
--resource-group "testrg123" --workspace-name "workspaces123"
137+
```
138+
##### Show #####
139+
```
140+
az machinelearningservices compute show --name "compute123" --resource-group "testrg123" \
141+
--workspace-name "workspaces123"
142+
```
143+
##### Show #####
144+
```
145+
az machinelearningservices compute show --name "compute123" --resource-group "testrg123" \
146+
--workspace-name "workspaces123"
147+
```
148+
##### Show #####
149+
```
150+
az machinelearningservices compute show --name "compute123" --resource-group "testrg123" \
151+
--workspace-name "workspaces123"
152+
```
153+
##### Show #####
154+
```
155+
az machinelearningservices compute show --name "compute123" --resource-group "testrg123" \
156+
--workspace-name "workspaces123"
157+
```
158+
##### List #####
159+
```
160+
az machinelearningservices compute list --resource-group "testrg123" --workspace-name "workspaces123"
161+
```
162+
##### Update #####
163+
```
164+
az machinelearningservices compute update --name "compute123" \
165+
--scale-settings max-node-count=4 min-node-count=4 node-idle-time-before-scale-down="PT5M" \
166+
--resource-group "testrg123" --workspace-name "workspaces123"
167+
```
168+
##### List-key #####
169+
```
170+
az machinelearningservices compute list-key --name "compute123" --resource-group "testrg123" \
171+
--workspace-name "workspaces123"
172+
```
173+
##### List-node #####
174+
```
175+
az machinelearningservices compute list-node --name "compute123" --resource-group "testrg123" \
176+
--workspace-name "workspaces123"
177+
```
178+
##### Restart #####
179+
```
180+
az machinelearningservices compute restart --name "compute123" --resource-group "testrg123" \
181+
--workspace-name "workspaces123"
182+
```
183+
##### Start #####
184+
```
185+
az machinelearningservices compute start --name "compute123" --resource-group "testrg123" \
186+
--workspace-name "workspaces123"
187+
```
188+
##### Stop #####
189+
```
190+
az machinelearningservices compute stop --name "compute123" --resource-group "testrg123" \
191+
--workspace-name "workspaces123"
192+
```
193+
##### Delete #####
194+
```
195+
az machinelearningservices compute delete --name "compute123" --resource-group "testrg123" \
196+
--underlying-resource-action "Delete" --workspace-name "workspaces123"
197+
```
198+
#### machinelearningservices private-endpoint-connection ####
199+
##### Create #####
200+
```
201+
az machinelearningservices private-endpoint-connection create --name "{privateEndpointConnectionName}" \
202+
--private-link-service-connection-state description="Auto-Approved" status="Approved" --resource-group "rg-1234" \
203+
--workspace-name "testworkspace"
204+
```
205+
##### Show #####
206+
```
207+
az machinelearningservices private-endpoint-connection show --name "{privateEndpointConnectionName}" \
208+
--resource-group "rg-1234" --workspace-name "testworkspace"
209+
```
210+
##### List #####
211+
```
212+
az machinelearningservices private-endpoint-connection list --resource-group "rg-1234" --workspace-name "testworkspace"
213+
```
214+
##### Delete #####
215+
```
216+
az machinelearningservices private-endpoint-connection delete --name "{privateEndpointConnectionName}" \
217+
--resource-group "rg-1234" --workspace-name "testworkspace"
218+
```
219+
#### machinelearningservices private-link-resource ####
220+
##### List #####
221+
```
222+
az machinelearningservices private-link-resource list --resource-group "rg-1234" --workspace-name "testworkspace"
223+
```
224+
#### machinelearningservices workspace-connection ####
225+
##### Create #####
226+
```
227+
az machinelearningservices workspace-connection create --connection-name "connection-1" --auth-type "PAT" \
228+
--category "ACR" --target "www.facebook.com" --value "secrets" --resource-group "resourceGroup-1" \
229+
--workspace-name "workspace-1"
230+
```
231+
##### Show #####
232+
```
233+
az machinelearningservices workspace-connection show --connection-name "connection-1" \
234+
--resource-group "resourceGroup-1" --workspace-name "workspace-1"
235+
```
236+
##### List #####
237+
```
238+
az machinelearningservices workspace-connection list --category "ACR" --resource-group "resourceGroup-1" \
239+
--target "www.facebook.com" --workspace-name "workspace-1"
240+
```
241+
##### Delete #####
242+
```
243+
az machinelearningservices workspace-connection delete --connection-name "connection-1" \
244+
--resource-group "resourceGroup-1" --workspace-name "workspace-1"
245+
```
246+
#### machinelearningservices workspace-feature ####
247+
##### List #####
248+
```
249+
az machinelearningservices workspace-feature list --resource-group "myResourceGroup" --workspace-name "testworkspace"
250+
```
251+
#### machinelearningservices workspace-sku ####
252+
##### List #####
253+
```
254+
az machinelearningservices workspace-sku list
255+
```
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
11+
from azure.cli.core import AzCommandsLoader
12+
from azext_machinelearningservices.generated._help import helps # pylint: disable=unused-import
13+
try:
14+
from azext_machinelearningservices.manual._help import helps # pylint: disable=reimported
15+
except ImportError:
16+
pass
17+
18+
19+
class AzureMachineLearningWorkspacesCommandsLoader(AzCommandsLoader):
20+
21+
def __init__(self, cli_ctx=None):
22+
from azure.cli.core.commands import CliCommandType
23+
from azext_machinelearningservices.generated._client_factory import cf_machinelearningservices_cl
24+
machinelearningservices_custom = CliCommandType(
25+
operations_tmpl='azext_machinelearningservices.custom#{}',
26+
client_factory=cf_machinelearningservices_cl)
27+
parent = super(AzureMachineLearningWorkspacesCommandsLoader, self)
28+
parent.__init__(cli_ctx=cli_ctx, custom_command_type=machinelearningservices_custom)
29+
30+
def load_command_table(self, args):
31+
from azext_machinelearningservices.generated.commands import load_command_table
32+
load_command_table(self, args)
33+
try:
34+
from azext_machinelearningservices.manual.commands import load_command_table as load_command_table_manual
35+
load_command_table_manual(self, args)
36+
except ImportError:
37+
pass
38+
return self.command_table
39+
40+
def load_arguments(self, command):
41+
from azext_machinelearningservices.generated._params import load_arguments
42+
load_arguments(self, command)
43+
try:
44+
from azext_machinelearningservices.manual._params import load_arguments as load_arguments_manual
45+
load_arguments_manual(self, command)
46+
except ImportError:
47+
pass
48+
49+
50+
COMMAND_LOADER_CLS = AzureMachineLearningWorkspacesCommandsLoader
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
# pylint: disable=wildcard-import
11+
# pylint: disable=unused-wildcard-import
12+
13+
from .generated.action import * # noqa: F403
14+
try:
15+
from .manual.action import * # noqa: F403
16+
except ImportError:
17+
pass
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"azext.isExperimental": true,
3+
"azext.minCliCoreVersion": "2.15.0"
4+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
# pylint: disable=wildcard-import
11+
# pylint: disable=unused-wildcard-import
12+
13+
from .generated.custom import * # noqa: F403
14+
try:
15+
from .manual.custom import * # noqa: F403
16+
except ImportError:
17+
pass
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)

0 commit comments

Comments
 (0)