azure.ai.ml.operations package¶
-
class
azure.ai.ml.operations.
BatchDeploymentOperations
(operation_scope: azure.ai.ml._scope_dependent_operations.OperationScope, service_client_05_2022: azure.ai.ml._restclient.v2022_05_01._azure_machine_learning_workspaces.AzureMachineLearningWorkspaces, service_client_09_2020_dataplanepreview: azure.ai.ml._restclient.v2020_09_01_dataplanepreview._azure_machine_learning_workspaces.AzureMachineLearningWorkspaces, all_operations: azure.ai.ml._scope_dependent_operations.OperationsContainer, local_endpoint_helper: azure.ai.ml.operations._local_endpoint_helper._LocalEndpointHelper, credentials: Optional[azure.identity._credentials.chained.ChainedTokenCredential] = None, **kwargs: Dict)[source]¶ 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.
-
begin_create_or_update
(deployment: azure.ai.ml.entities._deployment.batch_deployment.BatchDeployment, **kwargs: Any) → Union[azure.ai.ml.entities._deployment.batch_deployment.BatchDeployment, azure.core.polling._poller.LROPoller][source]¶ Create or update a batch deployment
- Parameters
endpoint (BatchDeployment) – The deployment entity.
- Returns
A poller to track the operation status.
- Return type
LROPoller
-
begin_delete
(name: str, endpoint_name: str, **kwargs: Any) → Union[None, azure.core.polling._poller.LROPoller][source]¶ Delete a batch deployment.
- Parameters
name (str) – Name of the batch endpoint.
- Returns
A poller to track the operation status.
- Return type
Optional[LROPoller]
-
get
(name: str, endpoint_name: str) → azure.ai.ml.entities._deployment.batch_deployment.BatchDeployment[source]¶ Get a deployment resource
- Parameters
- Returns
a deployment entity
- Return type
-
list
(endpoint_name: str) → azure.core.paging.ItemPaged[azure.ai.ml.entities._deployment.batch_deployment.BatchDeployment][source]¶ List a deployment resource
- Parameters
endpoint_name (str) – The name of the endpoint
- Returns
an iterator of deployment entities
- Return type
Iterable[BatchDeployment]
-
-
class
azure.ai.ml.operations.
BatchEndpointOperations
(operation_scope: azure.ai.ml._scope_dependent_operations.OperationScope, service_client_05_2022: azure.ai.ml._restclient.v2022_05_01._azure_machine_learning_workspaces.AzureMachineLearningWorkspaces, service_client_09_2020_dataplanepreview: azure.ai.ml._restclient.v2020_09_01_dataplanepreview._azure_machine_learning_workspaces.AzureMachineLearningWorkspaces, all_operations: azure.ai.ml._scope_dependent_operations.OperationsContainer, credentials: Optional[azure.identity._credentials.chained.ChainedTokenCredential] = None, **kwargs: Dict)[source]¶ 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.
-
begin_create_or_update
(endpoint: azure.ai.ml.entities._endpoint.batch_endpoint.BatchEndpoint, **kwargs: Any) → Union[azure.ai.ml.entities._endpoint.batch_endpoint.BatchEndpoint, azure.core.polling._poller.LROPoller][source]¶ Create or update a batch endpoint
- Parameters
endpoint (Endpoint) – The endpoint entity.
- Returns
A poller to track the operation status.
- Return type
LROPoller
-
begin_delete
(name: str = None, **kwargs: Any) → Union[None, azure.core.polling._poller.LROPoller][source]¶ Delete a batch Endpoint.
- Parameters
name (str) – Name of the batch endpoint.
- Returns
A poller to track the operation status.
- Return type
Optional[LROPoller]
-
get
(name: str) → azure.ai.ml.entities._endpoint.batch_endpoint.BatchEndpoint[source]¶ Get a Endpoint resource.
- Parameters
name (str) – Name of the endpoint.
- Returns
Endpoint object retrieved from the service.
- Return type
-
invoke
(endpoint_name: str, deployment_name: str = None, input: azure.ai.ml.entities._inputs_outputs.Input = None, params_override=None, **kwargs) → azure.ai.ml._restclient.v2020_09_01_dataplanepreview.models._models_py3.BatchJobResource[source]¶ Invokes the batch endpoint with the provided payload
- Parameters
endpoint_name (str) – the endpoint name
optional) deployment_name ((str,) – Name of a specific deployment to invoke. This is optional. By default requests are routed to any of the deployments according to the traffic rules.
optional) input ((Input,) – To use a existing data asset, public uri file, or folder pass in a Input object, for batch endpoints only.
optional) params_override ((List,) – Used to overwrite deployment configurations, for batch endpoints only.
- Returns
Prediction output for online endpoints or details of batch prediction job.
- Return type
Union[str, BatchJobResource]
-
-
class
azure.ai.ml.operations.
ComponentOperations
(operation_scope: azure.ai.ml._scope_dependent_operations.OperationScope, service_client: Union[azure.ai.ml._restclient.v2022_05_01._azure_machine_learning_workspaces.AzureMachineLearningWorkspaces, azure.ai.ml._restclient.v2021_10_01_dataplanepreview._azure_machine_learning_workspaces.AzureMachineLearningWorkspaces], all_operations: azure.ai.ml._scope_dependent_operations.OperationsContainer, **kwargs: Dict)[source]¶ 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.
-
archive
(name: str, version: str = None, label: str = None) → None[source]¶ Archive a component. :param name: Name of the component. :type name: str :param version: Version of the component. :type version: str :param label: Label of the component. (mutually exclusive with version) :type label: str
-
create_or_update
(component: Union[azure.ai.ml.entities._component.component.Component, function], **kwargs) → azure.ai.ml.entities._component.component.Component[source]¶ Create or update a specified component. if there’re inline defined entities, e.g. Environment, Code, they’ll be created together with the component.
- Parameters
component (Union[Component, types.FunctionType]) – The component object or a mldesigner component function that generates component object
-
get
(name: str, version: str = None, label: str = None) → azure.ai.ml.entities._component.component.Component[source]¶ Returns information about the specified component.
-
list
(name: Optional[str] = None, *, list_view_type: azure.ai.ml._restclient.v2022_05_01.models._azure_machine_learning_workspaces_enums.ListViewType = <ListViewType.ACTIVE_ONLY: 'ActiveOnly'>) → Iterable[Union[azure.ai.ml.entities._component.component.Component, azure.ai.ml._restclient.v2022_05_01.models._models_py3.ComponentContainerDetails]][source]¶ List specific component or components of the workspace.
- Parameters
name (Optional[str]) – Component name, if not set, list all components of the workspace
list_view_type (Optional[ListViewType]) – View type for including/excluding (for example) archived components. Default: ACTIVE_ONLY.
- Returns
An iterator like instance of component objects
- Return type
-
restore
(name: str, version: str = None, label: str = None) → None[source]¶ Restore an archived component. :param name: Name of the component. :type name: str :param version: Version of the component. :type version: str :param label: Label of the component. (mutually exclusive with version) :type label: str
-
validate
(component: Union[azure.ai.ml.entities._component.component.Component, function], raise_on_failure: bool = False, **kwargs) → azure.ai.ml.entities._validation.ValidationResult[source]¶ validate a specified component. if there are inline defined entities, e.g. Environment, Code, they won’t be created.
-
-
class
azure.ai.ml.operations.
ComputeOperations
(operation_scope: azure.ai.ml._scope_dependent_operations.OperationScope, service_client: azure.ai.ml._restclient.v2021_10_01._azure_machine_learning_workspaces.AzureMachineLearningWorkspaces, **kwargs: Dict)[source]¶ 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.
-
attach
(compute: azure.ai.ml.entities._compute.compute.Compute, **kwargs: Any) → azure.core.polling._poller.LROPoller[source]¶ Attaches a compute to the workspace.
- Parameters
compute (Compute) – Compute definition.
- Returns
A poller to track the operation status.
- Return type
LROPoller
-
begin_create_or_update
(compute: azure.ai.ml.entities._compute.compute.Compute, **kwargs: Any) → azure.core.polling._poller.LROPoller[source]¶ Create a compute
- Parameters
compute (Compute) – Compute definition.
- Returns
A poller to track the operation status.
- Return type
LROPoller
-
begin_delete
(name: str, *, action: str = 'Delete', **kwargs: Any) → azure.core.polling._poller.LROPoller[source]¶ Delete a compute
-
begin_restart
(name: str, **kwargs: Any) → azure.core.polling._poller.LROPoller[source]¶ Restart a compute
- Parameters
name (str) – The name of the compute.
- Returns
A poller to track the operation status.
- Return type
LROPoller
-
begin_start
(name: str, **kwargs: Any) → azure.core.polling._poller.LROPoller[source]¶ Start a compute
- Parameters
name (str) – The name of the compute.
- Returns
A poller to track the operation status.
- Return type
LROPoller
-
begin_stop
(name: str, **kwargs: Any) → azure.core.polling._poller.LROPoller[source]¶ Stop a compute.
- Parameters
name (str) – The name of the compute.
- Returns
A poller to track the operation status.
- Return type
LROPoller
-
begin_update
(compute: azure.ai.ml.entities._compute.compute.Compute, **kwargs: Any) → azure.core.polling._poller.LROPoller[source]¶ Update a compute. Currently only valid for AmlCompute.
- Parameters
compute (Compute) – Compute resource.
- Returns
A poller to track the operation status.
- Return type
LROPoller
-
list
(compute_type: str = None) → Iterable[azure.ai.ml.entities._compute.compute.Compute][source]¶ List computes of the workspace
-
list_nodes
(name: str) → Iterable[azure.ai.ml.entities._compute._aml_compute_node_info.AmlComputeNodeInfo][source]¶ Get a compute resource nodes
- Parameters
name (str) – Name of the compute
- Returns
An iterator over aml compute node information objects
- Return type
-
list_sizes
(*, location: str = None, compute_type: str = None) → Iterable[azure.ai.ml.entities._compute._vm_size.VmSize][source]¶ Returns supported VM Sizes in a location.
-
list_usage
(*, location: str = None) → Iterable[azure.ai.ml.entities._compute._usage.Usage][source]¶ Gets the current usage information as well as limits for AML resources for given subscription and location. :param location: The location for which resource usage is queried. If location not provided , defaults to workspace location :type location: str :return: An iterator over current usage info :rtype: ~azure.core.paging.ItemPaged[Usage]
-
-
class
azure.ai.ml.operations.
DataOperations
(operation_scope: azure.ai.ml._scope_dependent_operations.OperationScope, service_client: azure.ai.ml._restclient.v2022_05_01._azure_machine_learning_workspaces.AzureMachineLearningWorkspaces, datastore_operations: azure.ai.ml.operations._datastore_operations.DatastoreOperations, **kwargs: Dict)[source]¶ -
-
create_or_update
(data: azure.ai.ml.entities._assets._artifacts.data.Data) → azure.ai.ml.entities._assets._artifacts.data.Data[source]¶ Returns created or updated data asset.
If not already in storage, asset will be uploaded to the workspace’s blob storage.
- Parameters
data (Data) – Data asset object.
- Returns
Data asset object.
-
get
(name: str, version: Optional[str] = None, label: Optional[str] = None) → azure.ai.ml.entities._assets._artifacts.data.Data[source]¶ Get the specified data asset.
-
list
(name: Optional[str] = None, *, list_view_type: azure.ai.ml._restclient.v2022_02_01_preview.models._azure_machine_learning_workspaces_enums.ListViewType = <ListViewType.ACTIVE_ONLY: 'ActiveOnly'>) → azure.core.paging.ItemPaged[azure.ai.ml.entities._assets._artifacts.data.Data][source]¶ List the data assets of the workspace.
-
-
class
azure.ai.ml.operations.
DatastoreOperations
(operation_scope: azure.ai.ml._scope_dependent_operations.OperationScope, serviceclient_2022_05_01: azure.ai.ml._restclient.v2022_05_01._azure_machine_learning_workspaces.AzureMachineLearningWorkspaces, **kwargs: Dict)[source]¶ Represents a client for performing operations on Datastores
You should not instantiate this class directly. Instead, you should create MLClient and use this client via the property MLClient.datastores
-
create_or_update
(datastore: azure.ai.ml.entities._datastore.datastore.Datastore) → azure.ai.ml.entities._datastore.datastore.Datastore[source]¶ Attaches the passed in datastore to the workspace or updates the datastore if it already exists
-
delete
(name: str) → None[source]¶ Deletes a datastore reference with the given name from the workspace. This method does not delete the actual datastore or underlying data in the datastore.
- Parameters
name (str) – Name of the datastore
-
get
(name: str, *, include_secrets: bool = False) → azure.ai.ml.entities._datastore.datastore.Datastore[source]¶ Returns information about the datastore referenced by the given name
-
get_default
(*, include_secrets: bool = False) → azure.ai.ml.entities._datastore.datastore.Datastore[source]¶ Returns the workspace’s default datastore
-
-
class
azure.ai.ml.operations.
EnvironmentOperations
(operation_scope: azure.ai.ml._scope_dependent_operations.OperationScope, service_client: Union[azure.ai.ml._restclient.v2022_05_01._azure_machine_learning_workspaces.AzureMachineLearningWorkspaces, azure.ai.ml._restclient.v2021_10_01_dataplanepreview._azure_machine_learning_workspaces.AzureMachineLearningWorkspaces], all_operations: azure.ai.ml._scope_dependent_operations.OperationsContainer, **kwargs: Any)[source]¶ 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.
-
archive
(name: str, version: str = None, label: str = None) → None[source]¶ Archive an environment or an environment version. :param name: Name of the environment. :type name: str :param version: Version of the environment. :type version: str :param label: Label of the environment. (mutually exclusive with version) :type label: str
-
create_or_update
(environment: azure.ai.ml.entities._assets.environment.Environment) → azure.ai.ml.entities._assets.environment.Environment[source]¶ Returns created or updated environment asset.
- Parameters
environment (Environment) – Environment object
- Returns
Created or updated Environment object
-
get
(name: str, version: str = None, label: str = None) → azure.ai.ml.entities._assets.environment.Environment[source]¶ Returns the specified environment asset.
-
list
(name: str = None, *, list_view_type: azure.ai.ml._restclient.v2022_02_01_preview.models._azure_machine_learning_workspaces_enums.ListViewType = <ListViewType.ACTIVE_ONLY: 'ActiveOnly'>) → Iterable[azure.ai.ml.entities._assets.environment.Environment][source]¶ List all environment assets in workspace.
- Parameters
name (Optional[str]) – Name of the environment.
list_view_type (Optional[ListViewType]) – View type for including/excluding (for example) archived environments. Default: ACTIVE_ONLY.
- Returns
An iterator like instance of Environment objects.
- Return type
-
restore
(name: str, version: str = None, label: str = None, **kwargs) → None[source]¶ Restore an archived environment version. :param name: Name of the environment. :type name: str :param version: Version of the environment. :type version: str :param label: Label of the environment. (mutually exclusive with version) :type label: str
-
-
class
azure.ai.ml.operations.
JobOperations
(operation_scope: azure.ai.ml._scope_dependent_operations.OperationScope, service_client_02_2022_preview: azure.ai.ml._restclient.v2022_02_01_preview._azure_machine_learning_workspaces.AzureMachineLearningWorkspaces, all_operations: azure.ai.ml._scope_dependent_operations.OperationsContainer, credential: azure.identity._credentials.chained.ChainedTokenCredential, **kwargs: Any)[source]¶ 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.
-
archive
(name: str) → None[source]¶ Archive a job or restore an archived job.
- Parameters
name (str) – Name of the job.
- Raise
ResourceNotFoundError if can’t find a job matching provided name.
-
create_or_update
(job: Union[azure.ai.ml.entities._job.job.Job, azure.ai.ml.entities._builders.base_node.BaseNode], *, description: str = None, compute: str = None, tags: dict = None, experiment_name: str = None, **kwargs) → azure.ai.ml.entities._job.job.Job[source]¶ Create or update a job, if there’re inline defined entities, e.g. Environment, Code, they’ll be created together with the job.
- Parameters
job (Union[Job,BaseNode]) – Job definition or object which can be translate to a job.
description (str) – Description to overwrite when submitting the pipeline.
compute (str) – Compute target to overwrite when submitting the pipeline.
tags (dict) – Tags to overwrite when submitting the pipeline.
experiment_name (str) – Name of the experiment the job will be created under, if None is provided, job will be created under experiment ‘Default’.
- Returns
Created or updated job.
- Return type
-
download
(name: str, *, download_path: Union[os.PathLike, str] = PosixPath('/mnt/vss/_work/1/s/sdk/ml/azure-ai-ml'), output_name: str = None, all: bool = False) → None[source]¶ Download logs and output of a job.
-
list
(parent_job_name: str = None, *, list_view_type: azure.ai.ml._restclient.v2022_02_01_preview.models._azure_machine_learning_workspaces_enums.ListViewType = <ListViewType.ACTIVE_ONLY: 'ActiveOnly'>, schedule_defined: bool = None, scheduled_job_name: str = None) → Iterable[azure.ai.ml.entities._job.job.Job][source]¶ List jobs of the workspace.
- Parameters
parent_job_name (Optional[str]) – When provided, returns children of named job.
list_view_type (Optional[ListViewType]) – View type for including/excluding (for example) archived jobs. Default: ACTIVE_ONLY.
schedule_defined (Optional[bool]) – When provided, only jobs that initially defined a schedule will be returned.
scheduled_job_name (Optional[str]) – Name of a job that initially defined a schedule. When provided, only jobs triggered by the schedule of the given job will be returned.
- Returns
An iterator like instance of Job objects.
- Return type
-
restore
(name: str) → None[source]¶ Archive a job or restore an archived job.
- Parameters
name (str) – Name of the job.
- Raise
ResourceNotFoundError if can’t find a job matching provided name.
-
-
class
azure.ai.ml.operations.
ModelOperations
(operation_scope: azure.ai.ml._scope_dependent_operations.OperationScope, service_client: Union[azure.ai.ml._restclient.v2022_05_01._azure_machine_learning_workspaces.AzureMachineLearningWorkspaces, azure.ai.ml._restclient.v2021_10_01_dataplanepreview._azure_machine_learning_workspaces.AzureMachineLearningWorkspaces], datastore_operations: azure.ai.ml.operations._datastore_operations.DatastoreOperations, **kwargs: Dict)[source]¶ 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.
-
create_or_update
(model: azure.ai.ml.entities._assets._artifacts.model.Model) → azure.ai.ml.entities._assets._artifacts.model.Model[source]¶
-
download
(name: str, version: str, download_path: Union[os.PathLike, str] = '/mnt/vss/_work/1/s/sdk/ml/azure-ai-ml') → None[source]¶ Download files related to a model.
- Parameters
- Raise
ResourceNotFoundError if can’t find a model matching provided name.
-
get
(name: str, version: str = None, label: str = None) → azure.ai.ml.entities._assets._artifacts.model.Model[source]¶ Returns information about the specified model asset.
-
-
class
azure.ai.ml.operations.
OnlineDeploymentOperations
(operation_scope: azure.ai.ml._scope_dependent_operations.OperationScope, service_client_02_2022_preview: azure.ai.ml._restclient.v2022_02_01_preview._azure_machine_learning_workspaces.AzureMachineLearningWorkspaces, all_operations: azure.ai.ml._scope_dependent_operations.OperationsContainer, local_deployment_helper: azure.ai.ml.operations._local_deployment_helper._LocalDeploymentHelper, credentials: Optional[azure.identity._credentials.chained.ChainedTokenCredential] = None, **kwargs: Dict)[source]¶ 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.
-
begin_create_or_update
(deployment: azure.ai.ml.entities._deployment.online_deployment.OnlineDeployment, *, local: bool = False, vscode_debug: bool = False, no_wait: bool = False) → None[source]¶ Create or update a deployment
- Parameters
deployment (OnlineDeployment) – the deployment entity
local (bool, optional) – Whether deployment should be created locally, defaults to False
vscode_debug (bool, optional) – Whether to open VSCode instance to debug local deployment, defaults to False
no_wait (bool, optional) – Applied only to online deployment, defaults to False
- Returns
None
- Return type
None | OnlineDeployment
-
get
(name: str, endpoint_name: str, local: bool = False) → azure.ai.ml.entities._deployment.online_deployment.OnlineDeployment[source]¶ Get a deployment resource
- Parameters
- Returns
a deployment entity
- Return type
-
get_logs
(name: str, endpoint_name: str, lines: int, container_type: Optional[str] = None, local: bool = False) → str[source]¶ Retrive the logs from online deployment.
- Parameters
name (str) – The name of the deployment
endpoint_name (str) – The name of the endpoint
lines (int) – The maximum number of lines to tail
container_type (Optional[str], optional) – The type of container to retrieve logs from. Possible values include: “StorageInitializer”, “InferenceServer”, defaults to None
local (bool, optional) – [description], defaults to False
- Returns
the logs
- Return type
-
list
(endpoint_name: str, local: bool = False) → azure.core.paging.ItemPaged[azure.ai.ml.entities._deployment.online_deployment.OnlineDeployment][source]¶ List a deployment resource
- Parameters
- Returns
an iterator of deployment entities
- Return type
Iterable[OnlineDeployment]
-
-
class
azure.ai.ml.operations.
OnlineEndpointOperations
(operation_scope: azure.ai.ml._scope_dependent_operations.OperationScope, service_client_02_2022_preview: azure.ai.ml._restclient.v2022_02_01_preview._azure_machine_learning_workspaces.AzureMachineLearningWorkspaces, all_operations: azure.ai.ml._scope_dependent_operations.OperationsContainer, local_endpoint_helper: azure.ai.ml.operations._local_endpoint_helper._LocalEndpointHelper, credentials: Optional[azure.identity._credentials.chained.ChainedTokenCredential] = None, **kwargs: Dict)[source]¶ 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.
-
begin_create_or_update
(endpoint: azure.ai.ml.entities._endpoint.online_endpoint.OnlineEndpoint, local: bool = False, **kwargs: Any) → azure.core.polling._poller.LROPoller[source]¶ Create or update an endpoint
-
begin_delete
(name: str = None, local: bool = False, **kwargs: Any) → azure.core.polling._poller.LROPoller[source]¶ Delete an Online Endpoint.
-
begin_regenerate_keys
(name: str, key_type: str = 'primary', **kwargs: Any) → azure.core.polling._poller.LROPoller[source]¶ Regenerate keys for endpoint
- Parameters
name (The endpoint type. Defaults to ONLINE_ENDPOINT_TYPE.) – The endpoint name.
key_type (str) – One of “primary”, “secondary”. Defaults to “primary”.
- Returns
A poller to track the operation status.
- Return type
LROPoller
-
get
(name: str, local: bool = False) → azure.ai.ml.entities._endpoint.online_endpoint.OnlineEndpoint[source]¶ Get a Endpoint resource.
-
invoke
(endpoint_name: str, request_file: str = None, deployment_name: str = None, input_data: Union[str, azure.ai.ml.entities._assets._artifacts.data.Data] = None, params_override=None, local: bool = False, **kwargs) → str[source]¶ Invokes the endpoint with the provided payload
- Parameters
endpoint_name (str) – the endpoint name
optional) request_file ((str,) – File containing the request payload. This is only valid for online endpoint.
optional) deployment_name ((str,) – Name of a specific deployment to invoke. This is optional. By default requests are routed to any of the deployments according to the traffic rules.
Data], optional) input_data ((Union[str,) – To use a pre-registered data asset, pass str in format
optional) local ((bool,) – a flag to indicate whether to interact with endpoints in local Docker environment. Default: False.
- Returns
Prediction output for online endpoint.
- Return type
-
list
(local: bool = False) → Iterable[azure.ai.ml._restclient.v2022_02_01_preview.models._models_py3.OnlineEndpointTrackedResourceArmPaginatedResult][source]¶ List endpoints of the workspace.
- Parameters
optional) local ((bool,) – a flag to indicate whether to interact with endpoints in local Docker environment. Default: False.
- Returns
a list of endpoints
-
list_keys
(name: str) → Union[azure.ai.ml._restclient.v2022_02_01_preview.models._models_py3.EndpointAuthKeys, azure.ai.ml._restclient.v2022_02_01_preview.models._models_py3.EndpointAuthToken][source]¶ List the keys
- Parameters
str (name) – the endpoint name
- Raise
Exception if cannot get online credentials
- Return Union[EndpointAuthKeys, EndpointAuthToken]
depending on the auth mode in the endpoint, returns either keys or token
-
-
class
azure.ai.ml.operations.
WorkspaceConnectionsOperations
(operation_scope: azure.ai.ml._scope_dependent_operations.OperationScope, service_client: azure.ai.ml._restclient.v2022_01_01_preview._azure_machine_learning_workspaces.AzureMachineLearningWorkspaces, all_operations: azure.ai.ml._scope_dependent_operations.OperationsContainer, credentials: Optional[azure.identity._credentials.chained.ChainedTokenCredential] = None, **kwargs: Dict)[source]¶ 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.
-
create_or_update
(workspace_connection, **kwargs) → azure.ai.ml.entities._workspace.connections.workspace_connection.WorkspaceConnection[source]¶ Create or update a workspace connection.
- Parameters
workspace_connection (WorkspaceConnection) – Workspace Connection definition or object which can be translated to a workspace connection.
- Returns
Created or update workspace connection.
- Return type
-
delete
(name) → None[source]¶ Delete the workspace connection
- Parameters
name (str) – Name of the workspace connection.
-
get
(name: str, **kwargs: Dict) → azure.ai.ml.entities._workspace.connections.workspace_connection.WorkspaceConnection[source]¶ Get a workspace connection by name.
- Parameters
name (str) – Name of the workspace connection.
- Returns
The workspace connection with the provided name.
- Return type
-
list
(connection_type=None, **kwargs) → Iterable[azure.ai.ml.entities._workspace.connections.workspace_connection.WorkspaceConnection][source]¶ List all environment assets in workspace.
- Parameters
connection_type (str) – Type of workspace connection to list.
- Returns
An iterator like instance of workspace connection objects
- Return type
Iterable[WorkspaceConnection]
-
-
class
azure.ai.ml.operations.
WorkspaceOperations
(operation_scope: azure.ai.ml._scope_dependent_operations.OperationScope, service_client: azure.ai.ml._restclient.v2022_01_01_preview._azure_machine_learning_workspaces.AzureMachineLearningWorkspaces, all_operations: azure.ai.ml._scope_dependent_operations.OperationsContainer, credentials: Optional[azure.identity._credentials.chained.ChainedTokenCredential] = None, **kwargs: Dict)[source]¶ 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.
-
begin_create
(workspace: azure.ai.ml.entities._workspace.workspace.Workspace, update_dependent_resources: bool = False, **kwargs: Dict) → azure.core.polling._poller.LROPoller[source]¶ Create a new Azure Machine Learning Workspace.
Returns the workspace if already exists.
- Parameters
workspace (Workspace) – Workspace definition.
- Returns
A poller to track the operation status.
- Return type
LROPoller
-
begin_delete
(name: str, *, delete_dependent_resources: bool, **kwargs: Dict) → azure.core.polling._poller.LROPoller[source]¶ Delete a workspace
- Parameters
- Returns
A poller to track the operation status.
- Return type
LROPoller
-
begin_diagnose
(name: str, **kwargs: Dict) → azure.core.polling._poller.LROPoller[source]¶ 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 has problem or not.
- Parameters
name (str) – Name of the workspace
- Returns
A poller to track the operation status.
- Return type
LROPoller
-
begin_sync_keys
(name: str = None, **kwargs: Dict) → azure.core.polling._poller.LROPoller[source]¶ 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.
- Parameters
name (str) – Name of the 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][source]¶ Update friendly name, description or tags of a workspace.
- Parameters
workspace (Workspace) – Workspace resource.
update_dependent_resources – 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 – Application insights resource for workspace.
container_registry – Container registry resource for workspace.
- Returns
A poller to track the operation status.
- Return type
LROPoller
-
get
(name: str = None, **kwargs: Dict) → azure.ai.ml.entities._workspace.workspace.Workspace[source]¶ Get a workspace by name.
-