Skip to content

Commit a848253

Browse files
authored
Merge pull request #123911 from J-Silvestre/patch-4
Update how-to-connection.md
2 parents 1759a90 + f284af6 commit a848253

File tree

1 file changed

+5
-17
lines changed

1 file changed

+5
-17
lines changed

articles/machine-learning/how-to-connection.md

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ The following example creates a Python feed connection. A Personal Access Token
440440

441441
```python
442442
from azure.ai.ml.entities import WorkspaceConnection
443-
from azure.ai.ml.entities import UsernamePasswordConfiguration, ManagedIdentityConfiguration
443+
from azure.ai.ml.entities import UsernamePasswordConfiguration, PatTokenConfiguration
444444

445445

446446
name = "my_pfeed_conn"
@@ -465,24 +465,12 @@ You can't create a Python feed connection in studio.
465465

466466
---
467467

468-
### Azure Container Registry
468+
### Container Registry
469469

470470
# [Azure CLI](#tab/cli)
471471

472472
Create a connection to an Azure Container Registry with one of following YAML files. Be sure to update the appropriate values:
473473

474-
* Connect using Microsoft Entra ID authentication:
475-
476-
```yml
477-
name: test_ws_conn_cr_managed
478-
type: container_registry
479-
target: https://test-feed.com
480-
credentials:
481-
type: managed_identity
482-
client_id: client_id
483-
resource_id: resource_id
484-
```
485-
486474
* Connect using a username and password:
487475

488476
```yml
@@ -507,7 +495,7 @@ The following example creates an Azure Container Registry connection. A managed
507495

508496
```python
509497
from azure.ai.ml.entities import WorkspaceConnection
510-
from azure.ai.ml.entities import UsernamePasswordConfiguration, PatTokenConfiguration
498+
from azure.ai.ml.entities import UsernamePasswordConfiguration
511499

512500

513501
name = "my_acr_conn"
@@ -518,7 +506,7 @@ wps_connection = WorkspaceConnection(
518506
name=name,
519507
type="container_registry",
520508
target=target,
521-
credentials=ManagedIdentityConfiguration (client_id="xxxxx", resource_id="xxxxx"),
509+
credentials=UsernamePasswordConfiguration(username="xxxxx", password="xxxxx"),
522510
)
523511
ml_client.connections.create_or_update(workspace_connection=wps_connection)
524512
```
@@ -556,4 +544,4 @@ ml_client.connections.create_or_update(workspace_connection=wps_connection)
556544
If you use a data connection (Snowflake DB, Amazon S3, or Azure SQL DB), these articles offer more information:
557545

558546
- [Import data assets](how-to-import-data-assets.md)
559-
- [Schedule data import jobs](how-to-schedule-data-import.md)
547+
- [Schedule data import jobs](how-to-schedule-data-import.md)

0 commit comments

Comments
 (0)