WorkspaceOperations Class

WorkspaceOperations.

You should not instantiate this class directly. Instead, you should create an MLClient instance that instantiates it for you and attaches it as an attribute.

Inheritance
builtins.object
WorkspaceOperations

Constructor

WorkspaceOperations(operation_scope: azure.ai.ml._scope_dependent_operations.OperationScope, service_client: azure.ai.ml._restclient.v2022_05_01._azure_machine_learning_workspaces.AzureMachineLearningWorkspaces, all_operations: azure.ai.ml._scope_dependent_operations.OperationsContainer, credentials: Optional[azure.core.credentials.TokenCredential] = None, **kwargs: Dict)

Parameters

operation_scope
service_client
all_operations
credentials
default value: None

Methods

begin_create

Create a new Azure Machine Learning Workspace.

Returns the workspace if already exists.

begin_delete

Delete a workspace.

begin_diagnose

Diagnose workspace setup problems.

If your workspace is not working as expected, you can run this diagnosis to check if the workspace has been broken. For private endpoint workspace, it will also help check out if the network setup to this workspace and its dependent resource as problem or not.

begin_sync_keys

Triggers the workspace to immediately synchronize keys. If keys for any resource in the workspace are changed, it can take around an hour for them to automatically be updated. This function enables keys to be updated upon request. An example scenario is needing immediate access to storage after regenerating storage keys.

begin_update

Update friendly name, description, managed identities or tags of a workspace.

get

Get a workspace by name.

get_keys

Get keys for the workspace.

list

List all workspaces that the user has access to in the current resource group or subscription.

begin_create

Create a new Azure Machine Learning Workspace.

Returns the workspace if already exists.

begin_create(workspace: azure.ai.ml.entities._workspace.workspace.Workspace, update_dependent_resources: bool = False, **kwargs: Dict) -> azure.core.polling._poller.LROPoller

Parameters

workspace
Workspace
Required

Workspace definition.

Returns

A poller to track the operation status.

Return type

<xref:LROPoller>

begin_delete

Delete a workspace.

begin_delete(name: str, *, delete_dependent_resources: bool, **kwargs: Dict) -> azure.core.polling._poller.LROPoller

Parameters

name
str
Required

Name of the workspace

delete_dependent_resources
bool
Required

Whether to delete resources associated with the workspace, i.e., container registry, storage account, key vault, and application insights. The default is False. Set to True to delete these resources.

Returns

A poller to track the operation status.

Return type

<xref:LROPoller>

begin_diagnose

Diagnose workspace setup problems.

If your workspace is not working as expected, you can run this diagnosis to check if the workspace has been broken. For private endpoint workspace, it will also help check out if the network setup to this workspace and its dependent resource as problem or not.

begin_diagnose(name: str, **kwargs: Dict) -> azure.core.polling._poller.LROPoller

Parameters

name
str
Required

Name of the workspace

Returns

A poller to track the operation status.

Return type

<xref:LROPoller>

begin_sync_keys

Triggers the workspace to immediately synchronize keys. If keys for any resource in the workspace are changed, it can take around an hour for them to automatically be updated. This function enables keys to be updated upon request. An example scenario is needing immediate access to storage after regenerating storage keys.

begin_sync_keys(name: str = None, **kwargs: Dict) -> azure.core.polling._poller.LROPoller

Parameters

name
str
Required

Name of the workspace.

begin_update

Update friendly name, description, managed identities or tags of a workspace.

begin_update(workspace: azure.ai.ml.entities._workspace.workspace.Workspace, *, update_dependent_resources: bool = False, **kwargs: Dict) -> Union[azure.core.polling._poller.LROPoller, azure.ai.ml.entities._workspace.workspace.Workspace]

Parameters

workspace
Workspace
Required

Workspace resource.

update_dependent_resources
Required

gives your consent to update the workspace dependent resources. Note that updating the workspace-attached Azure Container Registry resource may break lineage of previous jobs or your ability to rerun earlier jobs in this workspace. Also, updating the workspace-attached Azure Application Insights resource may break lineage of deployed inference endpoints this workspace. Only set this argument if you are sure that you want to perform this operation. If this argument is not set, the command to update Azure Container Registry and Azure Application Insights will fail.

application_insights
Required

Application insights resource for workspace.

container_registry
Required

Container registry resource for workspace.

Returns

A poller to track the operation status.

Return type

<xref:LROPoller>

get

Get a workspace by name.

get(name: str = None, **kwargs: Dict) -> azure.ai.ml.entities._workspace.workspace.Workspace

Parameters

name
str
Required

Name of the workspace.

Returns

The workspace with the provided name.

Return type

get_keys

Get keys for the workspace.

get_keys(name: str = None) -> azure.ai.ml.entities._workspace.workspace_keys.WorkspaceKeys

Parameters

name
str
Required

Name of the workspace.

Returns

Keys of workspace dependent resources.

Return type

list

List all workspaces that the user has access to in the current resource group or subscription.

list(*, scope: str = 'resource_group') -> Iterable[azure.ai.ml.entities._workspace.workspace.Workspace]

Parameters

scope
str, <xref:optional>
Required

scope of the listing, "resource_group" or "subscription", defaults to "resource_group"

Returns

An iterator like instance of Workspace objects

Return type