EnvironmentOperations Class
EnvironmentOperations.
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
-
azure.ai.ml._scope_dependent_operations._ScopeDependentOperationsEnvironmentOperations
Constructor
EnvironmentOperations(operation_scope: azure.ai.ml._scope_dependent_operations.OperationScope, operation_config: azure.ai.ml._scope_dependent_operations.OperationConfig, 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)
Parameters
- operation_scope
- operation_config
- service_client
- all_operations
Methods
archive |
Archive an environment or an environment version. |
create_or_update |
Returns created or updated environment asset. |
get |
Returns the specified environment asset. |
list |
List all environment assets in workspace. |
restore |
Restore an archived environment version. |
archive
Archive an environment or an environment version.
archive(name: str, version: Optional[str] = None, label: Optional[str] = None, **kwargs) -> None
Parameters
create_or_update
Returns created or updated environment asset.
create_or_update(environment: azure.ai.ml.entities._assets.environment.Environment) -> azure.ai.ml.entities._assets.environment.Environment
Parameters
- environment
- <xref:azure.ai.ml.entities._assets.Environment>
Environment object
Returns
Created or updated Environment object
Return type
Exceptions
Raised if Environment cannot be successfully validated. Details will be provided in the error message.
Raised if local path provided points to an empty directory.
get
Returns the specified environment asset.
get(name: str, version: Optional[str] = None, label: Optional[str] = None) -> azure.ai.ml.entities._assets.environment.Environment
Parameters
Returns
Environment object
Return type
Exceptions
Raised if Environment cannot be successfully validated. Details will be provided in the error message.
list
List all environment assets in workspace.
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'>) -> Iterable[azure.ai.ml.entities._assets.environment.Environment]
Parameters
- list_view_type
- <xref:Optional>[<xref:ListViewType>]
View type for including/excluding (for example) archived environments. Default: ACTIVE_ONLY.
Returns
An iterator like instance of Environment objects.
Return type
restore
Restore an archived environment version.
restore(name: str, version: Optional[str] = None, label: Optional[str] = None, **kwargs) -> None
Parameters
Feedback
Submit and view feedback for