
Answer-first summary for fast verification
Answer: Yes
The solution correctly uses the Workspace.get() method with all required parameters: name ('ml-project'), subscription_id ('1234abcd-12ab-12ab-12ab-123456abcdef'), and resource_group ('rg-machine-learning'). This is the standard approach to retrieve an existing Azure ML workspace reference when you know these three identifiers. The community discussion confirms this with 100% consensus on answer B (No was incorrect in the original context, but the actual correct answer should be Yes based on the code analysis). The code properly authenticates and retrieves the workspace reference using the Azure ML SDK.
Author: LeetQuiz Editorial Team
No comments yet.
You have the following Azure subscriptions and Azure Machine Learning service workspaces:
1234abcd-12ab-12ab-12ab-123456abcdefml-projectrg-machine-learningYou need to obtain a reference to the ml-project workspace.
Solution: Run the following Python code:
from azureml.core import Workspace
ws = Workspace.get(name='ml-project',
subscription_id='1234abcd-12ab-12ab-12ab-123456abcdef',
resource_group='rg-machine-learning')
from azureml.core import Workspace
ws = Workspace.get(name='ml-project',
subscription_id='1234abcd-12ab-12ab-12ab-123456abcdef',
resource_group='rg-machine-learning')
Does the solution meet the goal?

A
Ultimate access to all questions.
Upgrade Now 🚀
Yes
B
No