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
str
Required

Name of the workspace.

description
str
Required

Description of the workspace.

tags
dict
Required

Tags of the workspace.

display_name
str
Required

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

location
str
Required

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

resource_group
str
Required

Name of resource group to create the workspace in.

hbi_workspace
bool
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
str
Required

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

container_registry
str
Required

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

key_vault
str
Required

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

application_insights
str
Required

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

customer_managed_key
CustomerManagedKey
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
str
Required

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

public_network_access
str
Required

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

identity
IdentityConfiguration
Required

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

primary_user_assigned_identity
str
Required

The workspace's primary user assigned identity

managed_network
ManagedNetwork
Required

workspace's Managed Network configuration

enable_data_isolation
bool
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
str
Required

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

serverless_compute
Required

The serverless compute settings for the workspace.

kwargs
dict
Required

A dictionary of additional configuration parameters.

Keyword-Only Parameters

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

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

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

The base path of the resource.

Return type

str

creation_context

The creation context of the resource.

Returns

The creation metadata for the resource.

Return type

discovery_url

Backend service base URLs for the workspace.

Returns

Backend service URLs of the workspace

Return type

str

id

The resource ID.

Returns

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

Return type

mlflow_tracking_uri

MLflow tracking uri for the workspace.

Returns

Returns mlflow tracking uri of the workspace.

Return type

str