Workspace Class

Azure ML workspace.

Creating a Workspace object.


   from azure.ai.ml.entities import Workspace

   ws = Workspace(name="sample-ws", location="eastus", description="a sample workspace object")

Inheritance
azure.ai.ml.entities._resource.Resource
Workspace

Constructor

Workspace(*, name: str, description: str | None = None, tags: Dict[str, str] | None = None, display_name: str | None = None, location: str | None = None, resource_group: str | None = None, hbi_workspace: bool = False, storage_account: str | None = None, container_registry: str | None = None, key_vault: str | None = None, application_insights: str | None = None, customer_managed_key: CustomerManagedKey | None = None, image_build_compute: str | None = None, public_network_access: str | None = None, identity: IdentityConfiguration | None = None, primary_user_assigned_identity: str | None = None, managed_network: ManagedNetwork | None = None, enable_data_isolation: bool = False, workspace_hub: str | None = None, serverless_compute: ServerlessComputeSettings | None = None, **kwargs: Any)

Parameters

Name Description
name
Required
str

Name of the workspace.

description
Required
str

Description of the workspace.

tags
Required

Tags of the workspace.

display_name
Required
str

Display name for the workspace. This is non-unique within the resource group.

location
Required
str

The location to create the workspace in. If not specified, the same location as the resource group will be used.

resource_group
Required
str

Name of resource group to create the workspace in.

hbi_workspace
Required

Whether the customer data is of high business impact (HBI), containing sensitive business information. For more information, see https://docs.microsoft.com/azure/machine-learning/concept-data-encryption#encryption-at-rest.

storage_account
Required
str

The resource ID of an existing storage account to use instead of creating a new one.

container_registry
Required
str

The resource ID of an existing container registry to use instead of creating a new one.

key_vault
Required
str

The resource ID of an existing key vault to use instead of creating a new one.

application_insights
Required
str

The resource ID of an existing application insights to use instead of creating a new one.

customer_managed_key
Required

Key vault details for encrypting data with customer-managed keys. If not specified, Microsoft-managed keys will be used by default.

image_build_compute
Required
str

The name of the compute target to use for building environment Docker images with the container registry is behind a VNet.

public_network_access
Required
str

Whether to allow public endpoint connectivity when a workspace is private link enabled.

identity
Required

workspace's Managed Identity (user assigned, or system assigned)

primary_user_assigned_identity
Required
str

The workspace's primary user assigned identity

managed_network
Required

workspace's Managed Network configuration

enable_data_isolation
Required

A flag to determine if workspace has data isolation enabled. The flag can only be set at the creation phase, it can't be updated.

workspace_hub
Required
str

The resource ID of an existing workspace hub to help create project workspace

serverless_compute
Required

The serverless compute settings for the workspace.

kwargs
Required

A dictionary of additional configuration parameters.

Keyword-Only Parameters

Name Description
name
Required
description
Required
tags
Required
display_name
Required
location
Required
resource_group
Required
hbi_workspace
Required
storage_account
Required
container_registry
Required
key_vault
Required
application_insights
Required
customer_managed_key
Required
image_build_compute
Required
public_network_access
Required
identity
Required
primary_user_assigned_identity
Required
managed_network
Required
enable_data_isolation
Required
workspace_hub
Required
serverless_compute
Required

Methods

dump

Dump the workspace spec into a file in yaml format.

dump

Dump the workspace spec into a file in yaml format.

dump(dest: str | PathLike | IO, **kwargs: Any) -> None

Parameters

Name Description
dest
Required
Union[<xref:PathLike>, str, IO[AnyStr]]

The destination to receive this workspace's spec. Must be either a path to a local file, or an already-open file stream. If dest is a file path, a new file will be created, and an exception is raised if the file exists. If dest is an open file, the file will be written to directly, and an exception will be raised if the file is not writable.

Attributes

base_path

The base path of the resource.

Returns

Type Description
str

The base path of the resource.

creation_context

The creation context of the resource.

Returns

Type Description

The creation metadata for the resource.

discovery_url

Backend service base URLs for the workspace.

Returns

Type Description
str

Backend service URLs of the workspace

id

The resource ID.

Returns

Type Description

The global ID of the resource, an Azure Resource Manager (ARM) ID.

mlflow_tracking_uri

MLflow tracking uri for the workspace.

Returns

Type Description
str

Returns mlflow tracking uri of the workspace.