Skip to content

Commit ddf11a5

Browse files
authored
Update result
1 parent 123831e commit ddf11a5

File tree

1 file changed

+10
-16
lines changed

1 file changed

+10
-16
lines changed

articles/machine-learning/how-to-access-resources-from-endpoints-managed-identities.md

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -488,14 +488,11 @@ storage_account_parameters = StorageAccountCreateParameters(
488488
sku=Sku(name="Standard_LRS"), kind="Storage", location=workspace_location
489489
)
490490

491-
poller = storage_client.storage_accounts.begin_create(
491+
storage_account = storage_client.storage_accounts.begin_create(
492492
resource_group_name=resource_group,
493493
account_name=storage_account_name,
494494
parameters=storage_account_parameters,
495-
)
496-
poller.wait()
497-
498-
storage_account = poller.result()
495+
).result()
499496
```
500497

501498
Next, create the blob container in the storage account:
@@ -555,14 +552,11 @@ storage_account_parameters = StorageAccountCreateParameters(
555552
sku=Sku(name="Standard_LRS"), kind="Storage", location=workspace_location
556553
)
557554

558-
poller = storage_client.storage_accounts.begin_create(
555+
storage_account = storage_client.storage_accounts.begin_create(
559556
resource_group_name=resource_group,
560557
account_name=storage_account_name,
561558
parameters=storage_account_parameters,
562-
)
563-
poller.wait()
564-
565-
storage_account = poller.result()
559+
).result()
566560
```
567561

568562
Next, create the blob container in the storage account:
@@ -635,7 +629,7 @@ If you encounter any issues, see [Troubleshooting online endpoints deployment an
635629
When you create an online endpoint, a system-assigned managed identity is created for the endpoint by default.
636630

637631
```python
638-
endpoint = ml_client.online_endpoints.begin_create_or_update(endpoint)
632+
endpoint = ml_client.online_endpoints.begin_create_or_update(endpoint).result()
639633
```
640634

641635
Check the status of the endpoint via the details of the deployed endpoint object with the following code:
@@ -670,7 +664,7 @@ endpoint = ManagedOnlineEndpoint(
670664
),
671665
)
672666

673-
ml_client.online_endpoints.begin_create_or_update(endpoint)
667+
ml_client.online_endpoints.begin_create_or_update(endpoint).result()
674668
```
675669

676670
Check the status of the endpoint via the details of the deployed endpoint object with the following code:
@@ -954,7 +948,7 @@ To check the init method output, see the deployment log with the following code.
954948
First, create the deployment:
955949

956950
```python
957-
deployment = ml_client.online_deployments.begin_create_or_update(deployment)
951+
deployment = ml_client.online_deployments.begin_create_or_update(deployment).result()
958952
```
959953

960954
Once deployment completes, check its status and confirm its identity details:
@@ -980,7 +974,7 @@ Now that the deployment is confirmed, set the traffic to 100%:
980974

981975
```python
982976
endpoint.traffic = {str(deployment.name): 100}
983-
ml_client.begin_create_or_update(endpoint)
977+
ml_client.begin_create_or_update(endpoint).result()
984978
```
985979

986980
# [User-assigned (Python)](#tab/user-identity-python)
@@ -994,7 +988,7 @@ deployment.environment_variables['UAI_CLIENT_ID'] = uai_client_id
994988
Now, create the deployment:
995989

996990
```python
997-
deployment = ml_client.online_deployments.begin_create_or_update(deployment)
991+
deployment = ml_client.online_deployments.begin_create_or_update(deployment).result()
998992
```
999993

1000994
Once deployment completes, check its status and confirm its identity details:
@@ -1019,7 +1013,7 @@ Now that the deployment is confirmed, set the traffic to 100%:
10191013

10201014
```python
10211015
endpoint.traffic = {str(deployment.name): 100}
1022-
ml_client.begin_create_or_update(endpoint)
1016+
ml_client.begin_create_or_update(endpoint).result()
10231017
```
10241018

10251019
---

0 commit comments

Comments
 (0)