|
| 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 | +``` |
0 commit comments