WorkspaceHub Class

Note

This is an experimental class, and may change at any time. Please see https://aka.ms/azuremlexperimental for more information.

WorkspaceHub.

Creating a WorkspaceHub object.


   from azure.ai.ml.entities import WorkspaceHub

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

Inheritance
azure.ai.ml.entities._workspace.workspace.Workspace
WorkspaceHub

Constructor

WorkspaceHub(*, 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, managed_network: ManagedNetwork | None = None, storage_account: str | None = None, key_vault: str | None = None, container_registry: str | None = None, existing_workspaces: List[str] | None = None, customer_managed_key: CustomerManagedKey | None = None, public_network_access: str | None = None, identity: IdentityConfiguration | None = None, primary_user_assigned_identity: str | None = None, enable_data_isolation: bool = False, workspace_hub_config: WorkspaceHubConfig | None = None, **kwargs: Any)

Parameters

Name Description
name
Required
str

Name of the WorkspaceHub.

description
Required
str

Description of the WorkspaceHub.

tags
Required

Tags of the WorkspaceHub.

display_name
Required
str

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

location
Required
str

The location to create the WorkspaceHub 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 WorkspaceHub in.

managed_network
Required

WorkspaceHub's Managed Network configuration

storage_account
Required
str

The resource ID of an existing storage account 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.

container_registry
Required
str

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

existing_workspaces
Required

List of existing workspaces to convert to use this workspaceHub's shared resources.

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

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

identity
Required

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

primary_user_assigned_identity
Required
str

The workspaceHub's primary user assigned identity

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.

kwargs
Required

A dictionary of additional configuration parameters.

Methods

dump

Dump the workspace spec into a file in yaml format.

set_associated_workspaces

Sets the workspaces associated with the hub, not meant for use by the user.

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.

set_associated_workspaces

Sets the workspaces associated with the hub, not meant for use by the user.

set_associated_workspaces(value: List[str]) -> None

Parameters

Name Description
value
Required

List of workspace ARM ids.

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.