Skip to content

Commit bd972f9

Browse files
authored
Update how-to-manage-workspace.md
1 parent 7197d0d commit bd972f9

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

articles/machine-learning/v1/how-to-manage-workspace.md

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -92,34 +92,6 @@ You can create a workspace [directly in Azure Machine Learning studio](../quicks
9292
)
9393
```
9494

95-
* **Use existing Azure resources**. You can also create a workspace that uses existing Azure resources with the Azure resource ID format. Find the specific Azure resource IDs in the Azure portal or with the SDK. This example assumes that the resource group, storage account, key vault, App Insights, and container registry already exist.
96-
97-
[!INCLUDE [sdk v1](../includes/machine-learning-sdk-v1.md)]
98-
99-
```python
100-
import os
101-
from azureml.core import Workspace
102-
from azureml.core.authentication import ServicePrincipalAuthentication
103-
104-
service_principal_password = os.environ.get("AZUREML_PASSWORD")
105-
106-
service_principal_auth = ServicePrincipalAuthentication(
107-
tenant_id="<tenant-id>",
108-
username="<application-id>",
109-
password=service_principal_password)
110-
111-
auth=service_principal_auth,
112-
subscription_id='<azure-subscription-id>',
113-
resource_group='myresourcegroup',
114-
create_resource_group=False,
115-
location='eastus2',
116-
friendly_name='My workspace',
117-
storage_account='subscriptions/<azure-subscription-id>/resourcegroups/myresourcegroup/providers/microsoft.storage/storageaccounts/mystorageaccount',
118-
key_vault='subscriptions/<azure-subscription-id>/resourcegroups/myresourcegroup/providers/microsoft.keyvault/vaults/mykeyvault',
119-
app_insights='subscriptions/<azure-subscription-id>/resourcegroups/myresourcegroup/providers/microsoft.insights/components/myappinsights',
120-
container_registry='subscriptions/<azure-subscription-id>/resourcegroups/myresourcegroup/providers/microsoft.containerregistry/registries/mycontainerregistry',
121-
exist_ok=False)
122-
```
12395

12496
For more information, see [Workspace SDK reference](/python/api/azureml-core/azureml.core.workspace.workspace).
12597

0 commit comments

Comments
 (0)