diff options
| author | S. Solomon Darnell | 2025-03-28 21:52:21 -0500 |
|---|---|---|
| committer | S. Solomon Darnell | 2025-03-28 21:52:21 -0500 |
| commit | 4a52a71956a8d46fcb7294ac71734504bb09bcc2 (patch) | |
| tree | ee3dc5af3b6313e921cd920906356f5d4febc4ed /.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01 | |
| parent | cc961e04ba734dd72309fb548a2f97d67d578813 (diff) | |
| download | gn-ai-master.tar.gz | |
Diffstat (limited to '.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01')
69 files changed, 60166 insertions, 0 deletions
diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/__init__.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/__init__.py new file mode 100644 index 00000000..da466144 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._azure_machine_learning_workspaces import AzureMachineLearningWorkspaces +from ._version import VERSION + +__version__ = VERSION +__all__ = ['AzureMachineLearningWorkspaces'] + +# `._patch.py` is used for handwritten extensions to the generated code +# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +from ._patch import patch_sdk +patch_sdk() diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/_azure_machine_learning_workspaces.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/_azure_machine_learning_workspaces.py new file mode 100644 index 00000000..d1d0c8e0 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/_azure_machine_learning_workspaces.py @@ -0,0 +1,188 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +from . import models +from ._configuration import AzureMachineLearningWorkspacesConfiguration +from .operations import BatchDeploymentsOperations, BatchEndpointsOperations, CodeContainersOperations, CodeVersionsOperations, ComponentContainersOperations, ComponentVersionsOperations, ComputeOperations, DataContainersOperations, DataVersionsOperations, DatastoresOperations, EnvironmentContainersOperations, EnvironmentVersionsOperations, JobsOperations, ModelContainersOperations, ModelVersionsOperations, OnlineDeploymentsOperations, OnlineEndpointsOperations, Operations, PrivateEndpointConnectionsOperations, PrivateLinkResourcesOperations, QuotasOperations, UsagesOperations, VirtualMachineSizesOperations, WorkspaceConnectionsOperations, WorkspaceFeaturesOperations, WorkspacesOperations + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.rest import HttpRequest, HttpResponse + +class AzureMachineLearningWorkspaces(object): + """These APIs allow end users to operate on Azure Machine Learning Workspace resources. + + :ivar batch_endpoints: BatchEndpointsOperations operations + :vartype batch_endpoints: + azure.mgmt.machinelearningservices.operations.BatchEndpointsOperations + :ivar batch_deployments: BatchDeploymentsOperations operations + :vartype batch_deployments: + azure.mgmt.machinelearningservices.operations.BatchDeploymentsOperations + :ivar code_containers: CodeContainersOperations operations + :vartype code_containers: + azure.mgmt.machinelearningservices.operations.CodeContainersOperations + :ivar code_versions: CodeVersionsOperations operations + :vartype code_versions: azure.mgmt.machinelearningservices.operations.CodeVersionsOperations + :ivar component_containers: ComponentContainersOperations operations + :vartype component_containers: + azure.mgmt.machinelearningservices.operations.ComponentContainersOperations + :ivar component_versions: ComponentVersionsOperations operations + :vartype component_versions: + azure.mgmt.machinelearningservices.operations.ComponentVersionsOperations + :ivar data_containers: DataContainersOperations operations + :vartype data_containers: + azure.mgmt.machinelearningservices.operations.DataContainersOperations + :ivar data_versions: DataVersionsOperations operations + :vartype data_versions: azure.mgmt.machinelearningservices.operations.DataVersionsOperations + :ivar datastores: DatastoresOperations operations + :vartype datastores: azure.mgmt.machinelearningservices.operations.DatastoresOperations + :ivar environment_containers: EnvironmentContainersOperations operations + :vartype environment_containers: + azure.mgmt.machinelearningservices.operations.EnvironmentContainersOperations + :ivar environment_versions: EnvironmentVersionsOperations operations + :vartype environment_versions: + azure.mgmt.machinelearningservices.operations.EnvironmentVersionsOperations + :ivar jobs: JobsOperations operations + :vartype jobs: azure.mgmt.machinelearningservices.operations.JobsOperations + :ivar model_containers: ModelContainersOperations operations + :vartype model_containers: + azure.mgmt.machinelearningservices.operations.ModelContainersOperations + :ivar model_versions: ModelVersionsOperations operations + :vartype model_versions: azure.mgmt.machinelearningservices.operations.ModelVersionsOperations + :ivar online_endpoints: OnlineEndpointsOperations operations + :vartype online_endpoints: + azure.mgmt.machinelearningservices.operations.OnlineEndpointsOperations + :ivar online_deployments: OnlineDeploymentsOperations operations + :vartype online_deployments: + azure.mgmt.machinelearningservices.operations.OnlineDeploymentsOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.machinelearningservices.operations.Operations + :ivar workspaces: WorkspacesOperations operations + :vartype workspaces: azure.mgmt.machinelearningservices.operations.WorkspacesOperations + :ivar usages: UsagesOperations operations + :vartype usages: azure.mgmt.machinelearningservices.operations.UsagesOperations + :ivar virtual_machine_sizes: VirtualMachineSizesOperations operations + :vartype virtual_machine_sizes: + azure.mgmt.machinelearningservices.operations.VirtualMachineSizesOperations + :ivar quotas: QuotasOperations operations + :vartype quotas: azure.mgmt.machinelearningservices.operations.QuotasOperations + :ivar compute: ComputeOperations operations + :vartype compute: azure.mgmt.machinelearningservices.operations.ComputeOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: + azure.mgmt.machinelearningservices.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: + azure.mgmt.machinelearningservices.operations.PrivateLinkResourcesOperations + :ivar workspace_connections: WorkspaceConnectionsOperations operations + :vartype workspace_connections: + azure.mgmt.machinelearningservices.operations.WorkspaceConnectionsOperations + :ivar workspace_features: WorkspaceFeaturesOperations operations + :vartype workspace_features: + azure.mgmt.machinelearningservices.operations.WorkspaceFeaturesOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param base_url: Service URL. Default value is 'https://management.azure.com'. + :type base_url: str + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url="https://management.azure.com", # type: str + **kwargs # type: Any + ): + # type: (...) -> None + self._config = AzureMachineLearningWorkspacesConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.batch_endpoints = BatchEndpointsOperations(self._client, self._config, self._serialize, self._deserialize) + self.batch_deployments = BatchDeploymentsOperations(self._client, self._config, self._serialize, self._deserialize) + self.code_containers = CodeContainersOperations(self._client, self._config, self._serialize, self._deserialize) + self.code_versions = CodeVersionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.component_containers = ComponentContainersOperations(self._client, self._config, self._serialize, self._deserialize) + self.component_versions = ComponentVersionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.data_containers = DataContainersOperations(self._client, self._config, self._serialize, self._deserialize) + self.data_versions = DataVersionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.datastores = DatastoresOperations(self._client, self._config, self._serialize, self._deserialize) + self.environment_containers = EnvironmentContainersOperations(self._client, self._config, self._serialize, self._deserialize) + self.environment_versions = EnvironmentVersionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.jobs = JobsOperations(self._client, self._config, self._serialize, self._deserialize) + self.model_containers = ModelContainersOperations(self._client, self._config, self._serialize, self._deserialize) + self.model_versions = ModelVersionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.online_endpoints = OnlineEndpointsOperations(self._client, self._config, self._serialize, self._deserialize) + self.online_deployments = OnlineDeploymentsOperations(self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) + self.workspaces = WorkspacesOperations(self._client, self._config, self._serialize, self._deserialize) + self.usages = UsagesOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_machine_sizes = VirtualMachineSizesOperations(self._client, self._config, self._serialize, self._deserialize) + self.quotas = QuotasOperations(self._client, self._config, self._serialize, self._deserialize) + self.compute = ComputeOperations(self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations(self._client, self._config, self._serialize, self._deserialize) + self.workspace_connections = WorkspaceConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.workspace_features = WorkspaceFeaturesOperations(self._client, self._config, self._serialize, self._deserialize) + + + def _send_request( + self, + request, # type: HttpRequest + **kwargs # type: Any + ): + # type: (...) -> HttpResponse + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + <HttpRequest [GET], url: 'https://www.example.org/'> + >>> response = client._send_request(request) + <HttpResponse: 200 OK> + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.HttpResponse + """ + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, **kwargs) + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> AzureMachineLearningWorkspaces + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/_configuration.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/_configuration.py new file mode 100644 index 00000000..e3e0b6ff --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/_configuration.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy + +from ._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + + +class AzureMachineLearningWorkspacesConfiguration(Configuration): + """Configuration for AzureMachineLearningWorkspaces. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + super(AzureMachineLearningWorkspacesConfiguration, self).__init__(**kwargs) + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2022-05-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-machinelearningservices/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/_patch.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/_patch.py new file mode 100644 index 00000000..74e48ecd --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/_patch.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- + +# This file is used for handwritten extensions to the generated code. Example: +# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +def patch_sdk(): + pass \ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/_vendor.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/_vendor.py new file mode 100644 index 00000000..138f663c --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/_vendor.py @@ -0,0 +1,27 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.pipeline.transport import HttpRequest + +def _convert_request(request, files=None): + data = request.content if not files else None + request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) + if files: + request.set_formdata_body(files) + return request + +def _format_url_section(template, **kwargs): + components = template.split("/") + while components: + try: + return template.format(**kwargs) + except KeyError as key: + formatted_components = template.split("/") + components = [ + c for c in formatted_components if "{}".format(key.args[0]) not in c + ] + template = "/".join(components) diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/_version.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/_version.py new file mode 100644 index 00000000..eae7c95b --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/__init__.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/__init__.py new file mode 100644 index 00000000..f67ccda9 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/__init__.py @@ -0,0 +1,15 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._azure_machine_learning_workspaces import AzureMachineLearningWorkspaces +__all__ = ['AzureMachineLearningWorkspaces'] + +# `._patch.py` is used for handwritten extensions to the generated code +# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +from ._patch import patch_sdk +patch_sdk() diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/_azure_machine_learning_workspaces.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/_azure_machine_learning_workspaces.py new file mode 100644 index 00000000..028d3ad3 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/_azure_machine_learning_workspaces.py @@ -0,0 +1,184 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any, Awaitable, Optional, TYPE_CHECKING + +from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +from .. import models +from ._configuration import AzureMachineLearningWorkspacesConfiguration +from .operations import BatchDeploymentsOperations, BatchEndpointsOperations, CodeContainersOperations, CodeVersionsOperations, ComponentContainersOperations, ComponentVersionsOperations, ComputeOperations, DataContainersOperations, DataVersionsOperations, DatastoresOperations, EnvironmentContainersOperations, EnvironmentVersionsOperations, JobsOperations, ModelContainersOperations, ModelVersionsOperations, OnlineDeploymentsOperations, OnlineEndpointsOperations, Operations, PrivateEndpointConnectionsOperations, PrivateLinkResourcesOperations, QuotasOperations, UsagesOperations, VirtualMachineSizesOperations, WorkspaceConnectionsOperations, WorkspaceFeaturesOperations, WorkspacesOperations + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +class AzureMachineLearningWorkspaces: + """These APIs allow end users to operate on Azure Machine Learning Workspace resources. + + :ivar batch_endpoints: BatchEndpointsOperations operations + :vartype batch_endpoints: + azure.mgmt.machinelearningservices.aio.operations.BatchEndpointsOperations + :ivar batch_deployments: BatchDeploymentsOperations operations + :vartype batch_deployments: + azure.mgmt.machinelearningservices.aio.operations.BatchDeploymentsOperations + :ivar code_containers: CodeContainersOperations operations + :vartype code_containers: + azure.mgmt.machinelearningservices.aio.operations.CodeContainersOperations + :ivar code_versions: CodeVersionsOperations operations + :vartype code_versions: + azure.mgmt.machinelearningservices.aio.operations.CodeVersionsOperations + :ivar component_containers: ComponentContainersOperations operations + :vartype component_containers: + azure.mgmt.machinelearningservices.aio.operations.ComponentContainersOperations + :ivar component_versions: ComponentVersionsOperations operations + :vartype component_versions: + azure.mgmt.machinelearningservices.aio.operations.ComponentVersionsOperations + :ivar data_containers: DataContainersOperations operations + :vartype data_containers: + azure.mgmt.machinelearningservices.aio.operations.DataContainersOperations + :ivar data_versions: DataVersionsOperations operations + :vartype data_versions: + azure.mgmt.machinelearningservices.aio.operations.DataVersionsOperations + :ivar datastores: DatastoresOperations operations + :vartype datastores: azure.mgmt.machinelearningservices.aio.operations.DatastoresOperations + :ivar environment_containers: EnvironmentContainersOperations operations + :vartype environment_containers: + azure.mgmt.machinelearningservices.aio.operations.EnvironmentContainersOperations + :ivar environment_versions: EnvironmentVersionsOperations operations + :vartype environment_versions: + azure.mgmt.machinelearningservices.aio.operations.EnvironmentVersionsOperations + :ivar jobs: JobsOperations operations + :vartype jobs: azure.mgmt.machinelearningservices.aio.operations.JobsOperations + :ivar model_containers: ModelContainersOperations operations + :vartype model_containers: + azure.mgmt.machinelearningservices.aio.operations.ModelContainersOperations + :ivar model_versions: ModelVersionsOperations operations + :vartype model_versions: + azure.mgmt.machinelearningservices.aio.operations.ModelVersionsOperations + :ivar online_endpoints: OnlineEndpointsOperations operations + :vartype online_endpoints: + azure.mgmt.machinelearningservices.aio.operations.OnlineEndpointsOperations + :ivar online_deployments: OnlineDeploymentsOperations operations + :vartype online_deployments: + azure.mgmt.machinelearningservices.aio.operations.OnlineDeploymentsOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.machinelearningservices.aio.operations.Operations + :ivar workspaces: WorkspacesOperations operations + :vartype workspaces: azure.mgmt.machinelearningservices.aio.operations.WorkspacesOperations + :ivar usages: UsagesOperations operations + :vartype usages: azure.mgmt.machinelearningservices.aio.operations.UsagesOperations + :ivar virtual_machine_sizes: VirtualMachineSizesOperations operations + :vartype virtual_machine_sizes: + azure.mgmt.machinelearningservices.aio.operations.VirtualMachineSizesOperations + :ivar quotas: QuotasOperations operations + :vartype quotas: azure.mgmt.machinelearningservices.aio.operations.QuotasOperations + :ivar compute: ComputeOperations operations + :vartype compute: azure.mgmt.machinelearningservices.aio.operations.ComputeOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: + azure.mgmt.machinelearningservices.aio.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: + azure.mgmt.machinelearningservices.aio.operations.PrivateLinkResourcesOperations + :ivar workspace_connections: WorkspaceConnectionsOperations operations + :vartype workspace_connections: + azure.mgmt.machinelearningservices.aio.operations.WorkspaceConnectionsOperations + :ivar workspace_features: WorkspaceFeaturesOperations operations + :vartype workspace_features: + azure.mgmt.machinelearningservices.aio.operations.WorkspaceFeaturesOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param base_url: Service URL. Default value is 'https://management.azure.com'. + :type base_url: str + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: str = "https://management.azure.com", + **kwargs: Any + ) -> None: + self._config = AzureMachineLearningWorkspacesConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.batch_endpoints = BatchEndpointsOperations(self._client, self._config, self._serialize, self._deserialize) + self.batch_deployments = BatchDeploymentsOperations(self._client, self._config, self._serialize, self._deserialize) + self.code_containers = CodeContainersOperations(self._client, self._config, self._serialize, self._deserialize) + self.code_versions = CodeVersionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.component_containers = ComponentContainersOperations(self._client, self._config, self._serialize, self._deserialize) + self.component_versions = ComponentVersionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.data_containers = DataContainersOperations(self._client, self._config, self._serialize, self._deserialize) + self.data_versions = DataVersionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.datastores = DatastoresOperations(self._client, self._config, self._serialize, self._deserialize) + self.environment_containers = EnvironmentContainersOperations(self._client, self._config, self._serialize, self._deserialize) + self.environment_versions = EnvironmentVersionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.jobs = JobsOperations(self._client, self._config, self._serialize, self._deserialize) + self.model_containers = ModelContainersOperations(self._client, self._config, self._serialize, self._deserialize) + self.model_versions = ModelVersionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.online_endpoints = OnlineEndpointsOperations(self._client, self._config, self._serialize, self._deserialize) + self.online_deployments = OnlineDeploymentsOperations(self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) + self.workspaces = WorkspacesOperations(self._client, self._config, self._serialize, self._deserialize) + self.usages = UsagesOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_machine_sizes = VirtualMachineSizesOperations(self._client, self._config, self._serialize, self._deserialize) + self.quotas = QuotasOperations(self._client, self._config, self._serialize, self._deserialize) + self.compute = ComputeOperations(self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations(self._client, self._config, self._serialize, self._deserialize) + self.workspace_connections = WorkspaceConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.workspace_features = WorkspaceFeaturesOperations(self._client, self._config, self._serialize, self._deserialize) + + + def _send_request( + self, + request: HttpRequest, + **kwargs: Any + ) -> Awaitable[AsyncHttpResponse]: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + <HttpRequest [GET], url: 'https://www.example.org/'> + >>> response = await client._send_request(request) + <AsyncHttpResponse: 200 OK> + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.AsyncHttpResponse + """ + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, **kwargs) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "AzureMachineLearningWorkspaces": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/_configuration.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/_configuration.py new file mode 100644 index 00000000..7b3bb483 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/_configuration.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class AzureMachineLearningWorkspacesConfiguration(Configuration): + """Configuration for AzureMachineLearningWorkspaces. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + super(AzureMachineLearningWorkspacesConfiguration, self).__init__(**kwargs) + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2022-05-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-machinelearningservices/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/_patch.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/_patch.py new file mode 100644 index 00000000..74e48ecd --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/_patch.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- + +# This file is used for handwritten extensions to the generated code. Example: +# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +def patch_sdk(): + pass \ No newline at end of file diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/__init__.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/__init__.py new file mode 100644 index 00000000..40c788dd --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/__init__.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._batch_endpoints_operations import BatchEndpointsOperations +from ._batch_deployments_operations import BatchDeploymentsOperations +from ._code_containers_operations import CodeContainersOperations +from ._code_versions_operations import CodeVersionsOperations +from ._component_containers_operations import ComponentContainersOperations +from ._component_versions_operations import ComponentVersionsOperations +from ._data_containers_operations import DataContainersOperations +from ._data_versions_operations import DataVersionsOperations +from ._datastores_operations import DatastoresOperations +from ._environment_containers_operations import EnvironmentContainersOperations +from ._environment_versions_operations import EnvironmentVersionsOperations +from ._jobs_operations import JobsOperations +from ._model_containers_operations import ModelContainersOperations +from ._model_versions_operations import ModelVersionsOperations +from ._online_endpoints_operations import OnlineEndpointsOperations +from ._online_deployments_operations import OnlineDeploymentsOperations +from ._operations import Operations +from ._workspaces_operations import WorkspacesOperations +from ._usages_operations import UsagesOperations +from ._virtual_machine_sizes_operations import VirtualMachineSizesOperations +from ._quotas_operations import QuotasOperations +from ._compute_operations import ComputeOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations +from ._workspace_connections_operations import WorkspaceConnectionsOperations +from ._workspace_features_operations import WorkspaceFeaturesOperations + +__all__ = [ + 'BatchEndpointsOperations', + 'BatchDeploymentsOperations', + 'CodeContainersOperations', + 'CodeVersionsOperations', + 'ComponentContainersOperations', + 'ComponentVersionsOperations', + 'DataContainersOperations', + 'DataVersionsOperations', + 'DatastoresOperations', + 'EnvironmentContainersOperations', + 'EnvironmentVersionsOperations', + 'JobsOperations', + 'ModelContainersOperations', + 'ModelVersionsOperations', + 'OnlineEndpointsOperations', + 'OnlineDeploymentsOperations', + 'Operations', + 'WorkspacesOperations', + 'UsagesOperations', + 'VirtualMachineSizesOperations', + 'QuotasOperations', + 'ComputeOperations', + 'PrivateEndpointConnectionsOperations', + 'PrivateLinkResourcesOperations', + 'WorkspaceConnectionsOperations', + 'WorkspaceFeaturesOperations', +] diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_batch_deployments_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_batch_deployments_operations.py new file mode 100644 index 00000000..779b06ce --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_batch_deployments_operations.py @@ -0,0 +1,606 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._batch_deployments_operations import build_create_or_update_request_initial, build_delete_request_initial, build_get_request, build_list_request, build_update_request_initial +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class BatchDeploymentsOperations: + """BatchDeploymentsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + order_by: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.BatchDeploymentTrackedResourceArmPaginatedResult"]: + """Lists Batch inference deployments in the workspace. + + Lists Batch inference deployments in the workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Endpoint name. + :type endpoint_name: str + :param order_by: Ordering of list. + :type order_by: str + :param top: Top of list. + :type top: int + :param skip: Continuation token for pagination. + :type skip: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BatchDeploymentTrackedResourceArmPaginatedResult + or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.BatchDeploymentTrackedResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BatchDeploymentTrackedResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + order_by=order_by, + top=top, + skip=skip, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + order_by=order_by, + top=top, + skip=skip, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("BatchDeploymentTrackedResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + deployment_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + deployment_name=deployment_name, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers['x-ms-async-operation-timeout']=self._deserialize('duration', response.headers.get('x-ms-async-operation-timeout')) + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}'} # type: ignore + + + @distributed_trace_async + async def begin_delete( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + deployment_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Delete Batch Inference deployment (asynchronous). + + Delete Batch Inference deployment (asynchronous). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Endpoint name. + :type endpoint_name: str + :param deployment_name: Inference deployment identifier. + :type deployment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + deployment_name=deployment_name, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}'} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + deployment_name: str, + **kwargs: Any + ) -> "_models.BatchDeploymentData": + """Gets a batch inference deployment by id. + + Gets a batch inference deployment by id. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Endpoint name. + :type endpoint_name: str + :param deployment_name: The identifier for the Batch deployments. + :type deployment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BatchDeploymentData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.BatchDeploymentData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BatchDeploymentData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + deployment_name=deployment_name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BatchDeploymentData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}'} # type: ignore + + + async def _update_initial( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + deployment_name: str, + body: "_models.PartialBatchDeploymentPartialTrackedResource", + **kwargs: Any + ) -> Optional["_models.BatchDeploymentData"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BatchDeploymentData"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'PartialBatchDeploymentPartialTrackedResource') + + request = build_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + deployment_name=deployment_name, + content_type=content_type, + json=_json, + template_url=self._update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize('BatchDeploymentData', pipeline_response) + + if response.status_code == 202: + response_headers['x-ms-async-operation-timeout']=self._deserialize('duration', response.headers.get('x-ms-async-operation-timeout')) + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}'} # type: ignore + + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + deployment_name: str, + body: "_models.PartialBatchDeploymentPartialTrackedResource", + **kwargs: Any + ) -> AsyncLROPoller["_models.BatchDeploymentData"]: + """Update a batch inference deployment (asynchronous). + + Update a batch inference deployment (asynchronous). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Inference endpoint name. + :type endpoint_name: str + :param deployment_name: The identifier for the Batch inference deployment. + :type deployment_name: str + :param body: Batch inference deployment definition object. + :type body: + ~azure.mgmt.machinelearningservices.models.PartialBatchDeploymentPartialTrackedResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either BatchDeploymentData or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.machinelearningservices.models.BatchDeploymentData] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BatchDeploymentData"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + deployment_name=deployment_name, + body=body, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('BatchDeploymentData', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + deployment_name: str, + body: "_models.BatchDeploymentData", + **kwargs: Any + ) -> "_models.BatchDeploymentData": + cls = kwargs.pop('cls', None) # type: ClsType["_models.BatchDeploymentData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'BatchDeploymentData') + + request = build_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + deployment_name=deployment_name, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize('BatchDeploymentData', pipeline_response) + + if response.status_code == 201: + response_headers['x-ms-async-operation-timeout']=self._deserialize('duration', response.headers.get('x-ms-async-operation-timeout')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + + deserialized = self._deserialize('BatchDeploymentData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}'} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + deployment_name: str, + body: "_models.BatchDeploymentData", + **kwargs: Any + ) -> AsyncLROPoller["_models.BatchDeploymentData"]: + """Creates/updates a batch inference deployment (asynchronous). + + Creates/updates a batch inference deployment (asynchronous). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Inference endpoint name. + :type endpoint_name: str + :param deployment_name: The identifier for the Batch inference deployment. + :type deployment_name: str + :param body: Batch inference deployment definition object. + :type body: ~azure.mgmt.machinelearningservices.models.BatchDeploymentData + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either BatchDeploymentData or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.machinelearningservices.models.BatchDeploymentData] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BatchDeploymentData"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + deployment_name=deployment_name, + body=body, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('BatchDeploymentData', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}'} # type: ignore diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_batch_endpoints_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_batch_endpoints_operations.py new file mode 100644 index 00000000..daa3a681 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_batch_endpoints_operations.py @@ -0,0 +1,632 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._batch_endpoints_operations import build_create_or_update_request_initial, build_delete_request_initial, build_get_request, build_list_keys_request, build_list_request, build_update_request_initial +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class BatchEndpointsOperations: + """BatchEndpointsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workspace_name: str, + count: Optional[int] = None, + skip: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.BatchEndpointTrackedResourceArmPaginatedResult"]: + """Lists Batch inference endpoint in the workspace. + + Lists Batch inference endpoint in the workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param count: Number of endpoints to be retrieved in a page of results. + :type count: int + :param skip: Continuation token for pagination. + :type skip: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BatchEndpointTrackedResourceArmPaginatedResult or + the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.BatchEndpointTrackedResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BatchEndpointTrackedResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + count=count, + skip=skip, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + count=count, + skip=skip, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("BatchEndpointTrackedResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers['x-ms-async-operation-timeout']=self._deserialize('duration', response.headers.get('x-ms-async-operation-timeout')) + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}'} # type: ignore + + + @distributed_trace_async + async def begin_delete( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Delete Batch Inference Endpoint (asynchronous). + + Delete Batch Inference Endpoint (asynchronous). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Inference Endpoint name. + :type endpoint_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}'} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + **kwargs: Any + ) -> "_models.BatchEndpointData": + """Gets a batch inference endpoint by name. + + Gets a batch inference endpoint by name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Name for the Batch Endpoint. + :type endpoint_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BatchEndpointData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.BatchEndpointData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BatchEndpointData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BatchEndpointData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}'} # type: ignore + + + async def _update_initial( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + body: "_models.PartialBatchEndpointPartialTrackedResource", + **kwargs: Any + ) -> Optional["_models.BatchEndpointData"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BatchEndpointData"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'PartialBatchEndpointPartialTrackedResource') + + request = build_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + content_type=content_type, + json=_json, + template_url=self._update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize('BatchEndpointData', pipeline_response) + + if response.status_code == 202: + response_headers['x-ms-async-operation-timeout']=self._deserialize('duration', response.headers.get('x-ms-async-operation-timeout')) + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}'} # type: ignore + + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + body: "_models.PartialBatchEndpointPartialTrackedResource", + **kwargs: Any + ) -> AsyncLROPoller["_models.BatchEndpointData"]: + """Update a batch inference endpoint (asynchronous). + + Update a batch inference endpoint (asynchronous). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Name for the Batch inference endpoint. + :type endpoint_name: str + :param body: Mutable batch inference endpoint definition object. + :type body: + ~azure.mgmt.machinelearningservices.models.PartialBatchEndpointPartialTrackedResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either BatchEndpointData or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.machinelearningservices.models.BatchEndpointData] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BatchEndpointData"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + body=body, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('BatchEndpointData', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + body: "_models.BatchEndpointData", + **kwargs: Any + ) -> "_models.BatchEndpointData": + cls = kwargs.pop('cls', None) # type: ClsType["_models.BatchEndpointData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'BatchEndpointData') + + request = build_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize('BatchEndpointData', pipeline_response) + + if response.status_code == 201: + response_headers['x-ms-async-operation-timeout']=self._deserialize('duration', response.headers.get('x-ms-async-operation-timeout')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + + deserialized = self._deserialize('BatchEndpointData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}'} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + body: "_models.BatchEndpointData", + **kwargs: Any + ) -> AsyncLROPoller["_models.BatchEndpointData"]: + """Creates a batch inference endpoint (asynchronous). + + Creates a batch inference endpoint (asynchronous). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Name for the Batch inference endpoint. + :type endpoint_name: str + :param body: Batch inference endpoint definition object. + :type body: ~azure.mgmt.machinelearningservices.models.BatchEndpointData + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either BatchEndpointData or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.machinelearningservices.models.BatchEndpointData] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BatchEndpointData"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + body=body, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('BatchEndpointData', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}'} # type: ignore + + @distributed_trace_async + async def list_keys( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + **kwargs: Any + ) -> "_models.EndpointAuthKeys": + """Lists batch Inference Endpoint keys. + + Lists batch Inference Endpoint keys. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Inference Endpoint name. + :type endpoint_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EndpointAuthKeys, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.EndpointAuthKeys + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EndpointAuthKeys"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_list_keys_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + template_url=self.list_keys.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('EndpointAuthKeys', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/listkeys'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_code_containers_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_code_containers_operations.py new file mode 100644 index 00000000..db15fbee --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_code_containers_operations.py @@ -0,0 +1,312 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._code_containers_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class CodeContainersOperations: + """CodeContainersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workspace_name: str, + skip: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.CodeContainerResourceArmPaginatedResult"]: + """List containers. + + List containers. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param skip: Continuation token for pagination. + :type skip: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CodeContainerResourceArmPaginatedResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.CodeContainerResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CodeContainerResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + skip=skip, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + skip=skip, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("CodeContainerResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes'} # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + workspace_name: str, + name: str, + **kwargs: Any + ) -> None: + """Delete container. + + Delete container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}'} # type: ignore + + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + workspace_name: str, + name: str, + **kwargs: Any + ) -> "_models.CodeContainerData": + """Get container. + + Get container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CodeContainerData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.CodeContainerData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CodeContainerData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CodeContainerData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}'} # type: ignore + + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + workspace_name: str, + name: str, + body: "_models.CodeContainerData", + **kwargs: Any + ) -> "_models.CodeContainerData": + """Create or update container. + + Create or update container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :param body: Container entity to create or update. + :type body: ~azure.mgmt.machinelearningservices.models.CodeContainerData + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CodeContainerData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.CodeContainerData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CodeContainerData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'CodeContainerData') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('CodeContainerData', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('CodeContainerData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_code_versions_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_code_versions_operations.py new file mode 100644 index 00000000..dd78dbee --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_code_versions_operations.py @@ -0,0 +1,339 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._code_versions_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class CodeVersionsOperations: + """CodeVersionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workspace_name: str, + name: str, + order_by: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.CodeVersionResourceArmPaginatedResult"]: + """List versions. + + List versions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :param order_by: Ordering of list. + :type order_by: str + :param top: Maximum number of records to return. + :type top: int + :param skip: Continuation token for pagination. + :type skip: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CodeVersionResourceArmPaginatedResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.CodeVersionResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CodeVersionResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + order_by=order_by, + top=top, + skip=skip, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + order_by=order_by, + top=top, + skip=skip, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("CodeVersionResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions'} # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + workspace_name: str, + name: str, + version: str, + **kwargs: Any + ) -> None: + """Delete version. + + Delete version. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :param version: Version identifier. This is case-sensitive. + :type version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + version=version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}'} # type: ignore + + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + workspace_name: str, + name: str, + version: str, + **kwargs: Any + ) -> "_models.CodeVersionData": + """Get version. + + Get version. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :param version: Version identifier. This is case-sensitive. + :type version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CodeVersionData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.CodeVersionData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CodeVersionData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + version=version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CodeVersionData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}'} # type: ignore + + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + workspace_name: str, + name: str, + version: str, + body: "_models.CodeVersionData", + **kwargs: Any + ) -> "_models.CodeVersionData": + """Create or update version. + + Create or update version. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :param version: Version identifier. This is case-sensitive. + :type version: str + :param body: Version entity to create or update. + :type body: ~azure.mgmt.machinelearningservices.models.CodeVersionData + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CodeVersionData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.CodeVersionData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CodeVersionData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'CodeVersionData') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + version=version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('CodeVersionData', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('CodeVersionData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_component_containers_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_component_containers_operations.py new file mode 100644 index 00000000..99514f21 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_component_containers_operations.py @@ -0,0 +1,317 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._component_containers_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ComponentContainersOperations: + """ComponentContainersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workspace_name: str, + skip: Optional[str] = None, + list_view_type: Optional[Union[str, "_models.ListViewType"]] = None, + **kwargs: Any + ) -> AsyncIterable["_models.ComponentContainerResourceArmPaginatedResult"]: + """List component containers. + + List component containers. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param skip: Continuation token for pagination. + :type skip: str + :param list_view_type: View type for including/excluding (for example) archived entities. + :type list_view_type: str or ~azure.mgmt.machinelearningservices.models.ListViewType + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ComponentContainerResourceArmPaginatedResult or + the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.ComponentContainerResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ComponentContainerResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + skip=skip, + list_view_type=list_view_type, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + skip=skip, + list_view_type=list_view_type, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ComponentContainerResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components'} # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + workspace_name: str, + name: str, + **kwargs: Any + ) -> None: + """Delete container. + + Delete container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}'} # type: ignore + + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + workspace_name: str, + name: str, + **kwargs: Any + ) -> "_models.ComponentContainerData": + """Get container. + + Get container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ComponentContainerData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ComponentContainerData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ComponentContainerData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ComponentContainerData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}'} # type: ignore + + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + workspace_name: str, + name: str, + body: "_models.ComponentContainerData", + **kwargs: Any + ) -> "_models.ComponentContainerData": + """Create or update container. + + Create or update container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. + :type name: str + :param body: Container entity to create or update. + :type body: ~azure.mgmt.machinelearningservices.models.ComponentContainerData + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ComponentContainerData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ComponentContainerData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ComponentContainerData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'ComponentContainerData') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ComponentContainerData', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ComponentContainerData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_component_versions_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_component_versions_operations.py new file mode 100644 index 00000000..9908e719 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_component_versions_operations.py @@ -0,0 +1,344 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._component_versions_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ComponentVersionsOperations: + """ComponentVersionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workspace_name: str, + name: str, + order_by: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[str] = None, + list_view_type: Optional[Union[str, "_models.ListViewType"]] = None, + **kwargs: Any + ) -> AsyncIterable["_models.ComponentVersionResourceArmPaginatedResult"]: + """List component versions. + + List component versions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Component name. + :type name: str + :param order_by: Ordering of list. + :type order_by: str + :param top: Maximum number of records to return. + :type top: int + :param skip: Continuation token for pagination. + :type skip: str + :param list_view_type: View type for including/excluding (for example) archived entities. + :type list_view_type: str or ~azure.mgmt.machinelearningservices.models.ListViewType + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ComponentVersionResourceArmPaginatedResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.ComponentVersionResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ComponentVersionResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + order_by=order_by, + top=top, + skip=skip, + list_view_type=list_view_type, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + order_by=order_by, + top=top, + skip=skip, + list_view_type=list_view_type, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ComponentVersionResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions'} # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + workspace_name: str, + name: str, + version: str, + **kwargs: Any + ) -> None: + """Delete version. + + Delete version. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. + :type name: str + :param version: Version identifier. + :type version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + version=version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}'} # type: ignore + + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + workspace_name: str, + name: str, + version: str, + **kwargs: Any + ) -> "_models.ComponentVersionData": + """Get version. + + Get version. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. + :type name: str + :param version: Version identifier. + :type version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ComponentVersionData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ComponentVersionData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ComponentVersionData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + version=version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ComponentVersionData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}'} # type: ignore + + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + workspace_name: str, + name: str, + version: str, + body: "_models.ComponentVersionData", + **kwargs: Any + ) -> "_models.ComponentVersionData": + """Create or update version. + + Create or update version. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. + :type name: str + :param version: Version identifier. + :type version: str + :param body: Version entity to create or update. + :type body: ~azure.mgmt.machinelearningservices.models.ComponentVersionData + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ComponentVersionData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ComponentVersionData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ComponentVersionData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'ComponentVersionData') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + version=version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ComponentVersionData', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ComponentVersionData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_compute_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_compute_operations.py new file mode 100644 index 00000000..2e0620b5 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_compute_operations.py @@ -0,0 +1,1002 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._compute_operations import build_create_or_update_request_initial, build_delete_request_initial, build_get_request, build_list_keys_request, build_list_nodes_request, build_list_request, build_restart_request_initial, build_start_request_initial, build_stop_request_initial, build_update_request_initial +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ComputeOperations: + """ComputeOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workspace_name: str, + skip: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.PaginatedComputeResourcesList"]: + """Gets computes in specified workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param skip: Continuation token for pagination. + :type skip: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PaginatedComputeResourcesList or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.PaginatedComputeResourcesList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PaginatedComputeResourcesList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + skip=skip, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + skip=skip, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("PaginatedComputeResourcesList", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes'} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + workspace_name: str, + compute_name: str, + **kwargs: Any + ) -> "_models.ComputeResource": + """Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are + not returned - use 'keys' nested resource to get them. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param compute_name: Name of the Azure Machine Learning compute. + :type compute_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ComputeResource, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ComputeResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ComputeResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ComputeResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + workspace_name: str, + compute_name: str, + parameters: "_models.ComputeResource", + **kwargs: Any + ) -> "_models.ComputeResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ComputeResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ComputeResource') + + request = build_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize('ComputeResource', pipeline_response) + + if response.status_code == 201: + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + + deserialized = self._deserialize('ComputeResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + workspace_name: str, + compute_name: str, + parameters: "_models.ComputeResource", + **kwargs: Any + ) -> AsyncLROPoller["_models.ComputeResource"]: + """Creates or updates compute. This call will overwrite a compute if it exists. This is a + nonrecoverable operation. If your intent is to create a new compute, do a GET first to verify + that it does not exist yet. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param compute_name: Name of the Azure Machine Learning compute. + :type compute_name: str + :param parameters: Payload with Machine Learning compute definition. + :type parameters: ~azure.mgmt.machinelearningservices.models.ComputeResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ComputeResource or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.machinelearningservices.models.ComputeResource] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ComputeResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + parameters=parameters, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ComputeResource', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore + + async def _update_initial( + self, + resource_group_name: str, + workspace_name: str, + compute_name: str, + parameters: "_models.ClusterUpdateParameters", + **kwargs: Any + ) -> "_models.ComputeResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ComputeResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ClusterUpdateParameters') + + request = build_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + content_type=content_type, + json=_json, + template_url=self._update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ComputeResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore + + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + workspace_name: str, + compute_name: str, + parameters: "_models.ClusterUpdateParameters", + **kwargs: Any + ) -> AsyncLROPoller["_models.ComputeResource"]: + """Updates properties of a compute. This call will overwrite a compute if it exists. This is a + nonrecoverable operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param compute_name: Name of the Azure Machine Learning compute. + :type compute_name: str + :param parameters: Additional parameters for cluster update. + :type parameters: ~azure.mgmt.machinelearningservices.models.ClusterUpdateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ComputeResource or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.machinelearningservices.models.ComputeResource] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ComputeResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + parameters=parameters, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ComputeResource', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + workspace_name: str, + compute_name: str, + underlying_resource_action: Union[str, "_models.UnderlyingResourceAction"], + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + underlying_resource_action=underlying_resource_action, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore + + + @distributed_trace_async + async def begin_delete( + self, + resource_group_name: str, + workspace_name: str, + compute_name: str, + underlying_resource_action: Union[str, "_models.UnderlyingResourceAction"], + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes specified Machine Learning compute. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param compute_name: Name of the Azure Machine Learning compute. + :type compute_name: str + :param underlying_resource_action: Delete the underlying compute if 'Delete', or detach the + underlying compute from workspace if 'Detach'. + :type underlying_resource_action: str or + ~azure.mgmt.machinelearningservices.models.UnderlyingResourceAction + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + underlying_resource_action=underlying_resource_action, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore + + @distributed_trace + def list_nodes( + self, + resource_group_name: str, + workspace_name: str, + compute_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.AmlComputeNodesInformation"]: + """Get the details (e.g IP address, port etc) of all the compute nodes in the compute. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param compute_name: Name of the Azure Machine Learning compute. + :type compute_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AmlComputeNodesInformation or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.AmlComputeNodesInformation] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AmlComputeNodesInformation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_nodes_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + template_url=self.list_nodes.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_nodes_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("AmlComputeNodesInformation", pipeline_response) + list_of_elem = deserialized.nodes + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_nodes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listNodes'} # type: ignore + + @distributed_trace_async + async def list_keys( + self, + resource_group_name: str, + workspace_name: str, + compute_name: str, + **kwargs: Any + ) -> "_models.ComputeSecrets": + """Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param compute_name: Name of the Azure Machine Learning compute. + :type compute_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ComputeSecrets, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ComputeSecrets + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ComputeSecrets"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_list_keys_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + template_url=self.list_keys.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ComputeSecrets', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listKeys'} # type: ignore + + + async def _start_initial( + self, + resource_group_name: str, + workspace_name: str, + compute_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_start_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + template_url=self._start_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _start_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/start'} # type: ignore + + + @distributed_trace_async + async def begin_start( + self, + resource_group_name: str, + workspace_name: str, + compute_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Posts a start action to a compute instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param compute_name: Name of the Azure Machine Learning compute. + :type compute_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._start_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/start'} # type: ignore + + async def _stop_initial( + self, + resource_group_name: str, + workspace_name: str, + compute_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_stop_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + template_url=self._stop_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _stop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/stop'} # type: ignore + + + @distributed_trace_async + async def begin_stop( + self, + resource_group_name: str, + workspace_name: str, + compute_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Posts a stop action to a compute instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param compute_name: Name of the Azure Machine Learning compute. + :type compute_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._stop_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/stop'} # type: ignore + + async def _restart_initial( + self, + resource_group_name: str, + workspace_name: str, + compute_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_restart_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + template_url=self._restart_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _restart_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/restart'} # type: ignore + + + @distributed_trace_async + async def begin_restart( + self, + resource_group_name: str, + workspace_name: str, + compute_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Posts a restart action to a compute instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param compute_name: Name of the Azure Machine Learning compute. + :type compute_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._restart_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/restart'} # type: ignore diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_data_containers_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_data_containers_operations.py new file mode 100644 index 00000000..749296ff --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_data_containers_operations.py @@ -0,0 +1,317 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._data_containers_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DataContainersOperations: + """DataContainersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workspace_name: str, + skip: Optional[str] = None, + list_view_type: Optional[Union[str, "_models.ListViewType"]] = None, + **kwargs: Any + ) -> AsyncIterable["_models.DataContainerResourceArmPaginatedResult"]: + """List data containers. + + List data containers. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param skip: Continuation token for pagination. + :type skip: str + :param list_view_type: View type for including/excluding (for example) archived entities. + :type list_view_type: str or ~azure.mgmt.machinelearningservices.models.ListViewType + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DataContainerResourceArmPaginatedResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.DataContainerResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataContainerResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + skip=skip, + list_view_type=list_view_type, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + skip=skip, + list_view_type=list_view_type, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("DataContainerResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data'} # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + workspace_name: str, + name: str, + **kwargs: Any + ) -> None: + """Delete container. + + Delete container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}'} # type: ignore + + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + workspace_name: str, + name: str, + **kwargs: Any + ) -> "_models.DataContainerData": + """Get container. + + Get container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataContainerData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.DataContainerData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataContainerData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DataContainerData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}'} # type: ignore + + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + workspace_name: str, + name: str, + body: "_models.DataContainerData", + **kwargs: Any + ) -> "_models.DataContainerData": + """Create or update container. + + Create or update container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. + :type name: str + :param body: Container entity to create or update. + :type body: ~azure.mgmt.machinelearningservices.models.DataContainerData + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataContainerData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.DataContainerData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataContainerData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'DataContainerData') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DataContainerData', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DataContainerData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_data_versions_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_data_versions_operations.py new file mode 100644 index 00000000..cde23f60 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_data_versions_operations.py @@ -0,0 +1,353 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._data_versions_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DataVersionsOperations: + """DataVersionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workspace_name: str, + name: str, + order_by: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[str] = None, + tags: Optional[str] = None, + list_view_type: Optional[Union[str, "_models.ListViewType"]] = None, + **kwargs: Any + ) -> AsyncIterable["_models.DataVersionBaseResourceArmPaginatedResult"]: + """List data versions in the data container. + + List data versions in the data container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Data container's name. + :type name: str + :param order_by: Please choose OrderBy value from ['createdtime', 'modifiedtime']. + :type order_by: str + :param top: Top count of results, top count cannot be greater than the page size. + If topCount > page size, results with be default page size count + will be returned. + :type top: int + :param skip: Continuation token for pagination. + :type skip: str + :param tags: Comma-separated list of tag names (and optionally values). Example: + tag1,tag2=value2. + :type tags: str + :param list_view_type: [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, + ListViewType.All]View type for including/excluding (for example) archived entities. + :type list_view_type: str or ~azure.mgmt.machinelearningservices.models.ListViewType + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DataVersionBaseResourceArmPaginatedResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.DataVersionBaseResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataVersionBaseResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + order_by=order_by, + top=top, + skip=skip, + tags=tags, + list_view_type=list_view_type, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + order_by=order_by, + top=top, + skip=skip, + tags=tags, + list_view_type=list_view_type, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("DataVersionBaseResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions'} # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + workspace_name: str, + name: str, + version: str, + **kwargs: Any + ) -> None: + """Delete version. + + Delete version. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. + :type name: str + :param version: Version identifier. + :type version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + version=version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}'} # type: ignore + + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + workspace_name: str, + name: str, + version: str, + **kwargs: Any + ) -> "_models.DataVersionBaseData": + """Get version. + + Get version. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. + :type name: str + :param version: Version identifier. + :type version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataVersionBaseData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.DataVersionBaseData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataVersionBaseData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + version=version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DataVersionBaseData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}'} # type: ignore + + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + workspace_name: str, + name: str, + version: str, + body: "_models.DataVersionBaseData", + **kwargs: Any + ) -> "_models.DataVersionBaseData": + """Create or update version. + + Create or update version. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. + :type name: str + :param version: Version identifier. + :type version: str + :param body: Version entity to create or update. + :type body: ~azure.mgmt.machinelearningservices.models.DataVersionBaseData + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataVersionBaseData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.DataVersionBaseData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataVersionBaseData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'DataVersionBaseData') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + version=version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DataVersionBaseData', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DataVersionBaseData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_datastores_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_datastores_operations.py new file mode 100644 index 00000000..75233892 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_datastores_operations.py @@ -0,0 +1,404 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._datastores_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_request, build_list_secrets_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DatastoresOperations: + """DatastoresOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workspace_name: str, + skip: Optional[str] = None, + count: Optional[int] = 30, + is_default: Optional[bool] = None, + names: Optional[List[str]] = None, + search_text: Optional[str] = None, + order_by: Optional[str] = None, + order_by_asc: Optional[bool] = False, + **kwargs: Any + ) -> AsyncIterable["_models.DatastoreResourceArmPaginatedResult"]: + """List datastores. + + List datastores. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param skip: Continuation token for pagination. + :type skip: str + :param count: Maximum number of results to return. + :type count: int + :param is_default: Filter down to the workspace default datastore. + :type is_default: bool + :param names: Names of datastores to return. + :type names: list[str] + :param search_text: Text to search for in the datastore names. + :type search_text: str + :param order_by: Order by property (createdtime | modifiedtime | name). + :type order_by: str + :param order_by_asc: Order by property in ascending order. + :type order_by_asc: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DatastoreResourceArmPaginatedResult or the result + of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.DatastoreResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DatastoreResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + skip=skip, + count=count, + is_default=is_default, + names=names, + search_text=search_text, + order_by=order_by, + order_by_asc=order_by_asc, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + skip=skip, + count=count, + is_default=is_default, + names=names, + search_text=search_text, + order_by=order_by, + order_by_asc=order_by_asc, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("DatastoreResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores'} # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + workspace_name: str, + name: str, + **kwargs: Any + ) -> None: + """Delete datastore. + + Delete datastore. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Datastore name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}'} # type: ignore + + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + workspace_name: str, + name: str, + **kwargs: Any + ) -> "_models.DatastoreData": + """Get datastore. + + Get datastore. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Datastore name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DatastoreData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.DatastoreData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DatastoreData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DatastoreData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}'} # type: ignore + + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + workspace_name: str, + name: str, + body: "_models.DatastoreData", + skip_validation: Optional[bool] = False, + **kwargs: Any + ) -> "_models.DatastoreData": + """Create or update datastore. + + Create or update datastore. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Datastore name. + :type name: str + :param body: Datastore entity to create or update. + :type body: ~azure.mgmt.machinelearningservices.models.DatastoreData + :param skip_validation: Flag to skip validation. + :type skip_validation: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DatastoreData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.DatastoreData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DatastoreData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'DatastoreData') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + content_type=content_type, + json=_json, + skip_validation=skip_validation, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DatastoreData', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DatastoreData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}'} # type: ignore + + + @distributed_trace_async + async def list_secrets( + self, + resource_group_name: str, + workspace_name: str, + name: str, + **kwargs: Any + ) -> "_models.DatastoreSecrets": + """Get datastore secrets. + + Get datastore secrets. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Datastore name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DatastoreSecrets, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.DatastoreSecrets + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DatastoreSecrets"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_list_secrets_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + template_url=self.list_secrets.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DatastoreSecrets', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}/listSecrets'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_environment_containers_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_environment_containers_operations.py new file mode 100644 index 00000000..82858725 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_environment_containers_operations.py @@ -0,0 +1,317 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._environment_containers_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class EnvironmentContainersOperations: + """EnvironmentContainersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workspace_name: str, + skip: Optional[str] = None, + list_view_type: Optional[Union[str, "_models.ListViewType"]] = None, + **kwargs: Any + ) -> AsyncIterable["_models.EnvironmentContainerResourceArmPaginatedResult"]: + """List environment containers. + + List environment containers. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param skip: Continuation token for pagination. + :type skip: str + :param list_view_type: View type for including/excluding (for example) archived entities. + :type list_view_type: str or ~azure.mgmt.machinelearningservices.models.ListViewType + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either EnvironmentContainerResourceArmPaginatedResult or + the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.EnvironmentContainerResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EnvironmentContainerResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + skip=skip, + list_view_type=list_view_type, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + skip=skip, + list_view_type=list_view_type, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("EnvironmentContainerResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments'} # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + workspace_name: str, + name: str, + **kwargs: Any + ) -> None: + """Delete container. + + Delete container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}'} # type: ignore + + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + workspace_name: str, + name: str, + **kwargs: Any + ) -> "_models.EnvironmentContainerData": + """Get container. + + Get container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EnvironmentContainerData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.EnvironmentContainerData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EnvironmentContainerData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('EnvironmentContainerData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}'} # type: ignore + + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + workspace_name: str, + name: str, + body: "_models.EnvironmentContainerData", + **kwargs: Any + ) -> "_models.EnvironmentContainerData": + """Create or update container. + + Create or update container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :param body: Container entity to create or update. + :type body: ~azure.mgmt.machinelearningservices.models.EnvironmentContainerData + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EnvironmentContainerData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.EnvironmentContainerData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EnvironmentContainerData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'EnvironmentContainerData') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('EnvironmentContainerData', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('EnvironmentContainerData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_environment_versions_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_environment_versions_operations.py new file mode 100644 index 00000000..232982ef --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_environment_versions_operations.py @@ -0,0 +1,344 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._environment_versions_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class EnvironmentVersionsOperations: + """EnvironmentVersionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workspace_name: str, + name: str, + order_by: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[str] = None, + list_view_type: Optional[Union[str, "_models.ListViewType"]] = None, + **kwargs: Any + ) -> AsyncIterable["_models.EnvironmentVersionResourceArmPaginatedResult"]: + """List versions. + + List versions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :param order_by: Ordering of list. + :type order_by: str + :param top: Maximum number of records to return. + :type top: int + :param skip: Continuation token for pagination. + :type skip: str + :param list_view_type: View type for including/excluding (for example) archived entities. + :type list_view_type: str or ~azure.mgmt.machinelearningservices.models.ListViewType + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either EnvironmentVersionResourceArmPaginatedResult or + the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.EnvironmentVersionResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EnvironmentVersionResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + order_by=order_by, + top=top, + skip=skip, + list_view_type=list_view_type, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + order_by=order_by, + top=top, + skip=skip, + list_view_type=list_view_type, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("EnvironmentVersionResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions'} # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + workspace_name: str, + name: str, + version: str, + **kwargs: Any + ) -> None: + """Delete version. + + Delete version. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :param version: Version identifier. This is case-sensitive. + :type version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + version=version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}'} # type: ignore + + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + workspace_name: str, + name: str, + version: str, + **kwargs: Any + ) -> "_models.EnvironmentVersionData": + """Get version. + + Get version. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :param version: Version identifier. This is case-sensitive. + :type version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EnvironmentVersionData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.EnvironmentVersionData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EnvironmentVersionData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + version=version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('EnvironmentVersionData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}'} # type: ignore + + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + workspace_name: str, + name: str, + version: str, + body: "_models.EnvironmentVersionData", + **kwargs: Any + ) -> "_models.EnvironmentVersionData": + """Creates or updates an EnvironmentVersion. + + Creates or updates an EnvironmentVersion. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Name of EnvironmentVersion. This is case-sensitive. + :type name: str + :param version: Version of EnvironmentVersion. + :type version: str + :param body: Definition of EnvironmentVersion. + :type body: ~azure.mgmt.machinelearningservices.models.EnvironmentVersionData + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EnvironmentVersionData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.EnvironmentVersionData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EnvironmentVersionData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'EnvironmentVersionData') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + version=version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('EnvironmentVersionData', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('EnvironmentVersionData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_jobs_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_jobs_operations.py new file mode 100644 index 00000000..3b7550be --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_jobs_operations.py @@ -0,0 +1,496 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._jobs_operations import build_cancel_request_initial, build_create_or_update_request, build_delete_request_initial, build_get_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class JobsOperations: + """JobsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workspace_name: str, + skip: Optional[str] = None, + job_type: Optional[str] = None, + tag: Optional[str] = None, + list_view_type: Optional[Union[str, "_models.ListViewType"]] = None, + **kwargs: Any + ) -> AsyncIterable["_models.JobBaseResourceArmPaginatedResult"]: + """Lists Jobs in the workspace. + + Lists Jobs in the workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param skip: Continuation token for pagination. + :type skip: str + :param job_type: Type of job to be returned. + :type job_type: str + :param tag: Jobs returned will have this tag key. + :type tag: str + :param list_view_type: View type for including/excluding (for example) archived entities. + :type list_view_type: str or ~azure.mgmt.machinelearningservices.models.ListViewType + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either JobBaseResourceArmPaginatedResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.JobBaseResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobBaseResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + skip=skip, + job_type=job_type, + tag=tag, + list_view_type=list_view_type, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + skip=skip, + job_type=job_type, + tag=tag, + list_view_type=list_view_type, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("JobBaseResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + workspace_name: str, + id: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + id=id, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers['x-ms-async-operation-timeout']=self._deserialize('duration', response.headers.get('x-ms-async-operation-timeout')) + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}'} # type: ignore + + + @distributed_trace_async + async def begin_delete( + self, + resource_group_name: str, + workspace_name: str, + id: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a Job (asynchronous). + + Deletes a Job (asynchronous). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param id: The name and identifier for the Job. This is case-sensitive. + :type id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + id=id, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}'} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + workspace_name: str, + id: str, + **kwargs: Any + ) -> "_models.JobBaseData": + """Gets a Job by name/id. + + Gets a Job by name/id. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param id: The name and identifier for the Job. This is case-sensitive. + :type id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: JobBaseData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.JobBaseData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobBaseData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + id=id, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('JobBaseData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}'} # type: ignore + + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + workspace_name: str, + id: str, + body: "_models.JobBaseData", + **kwargs: Any + ) -> "_models.JobBaseData": + """Creates and executes a Job. + + Creates and executes a Job. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param id: The name and identifier for the Job. This is case-sensitive. + :type id: str + :param body: Job definition object. + :type body: ~azure.mgmt.machinelearningservices.models.JobBaseData + :keyword callable cls: A custom type or function that will be passed the direct response + :return: JobBaseData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.JobBaseData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobBaseData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'JobBaseData') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + id=id, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('JobBaseData', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('JobBaseData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}'} # type: ignore + + + async def _cancel_initial( + self, + resource_group_name: str, + workspace_name: str, + id: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_cancel_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + id=id, + template_url=self._cancel_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + + if cls: + return cls(pipeline_response, None, response_headers) + + _cancel_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}/cancel'} # type: ignore + + + @distributed_trace_async + async def begin_cancel( + self, + resource_group_name: str, + workspace_name: str, + id: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Cancels a Job (asynchronous). + + Cancels a Job (asynchronous). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param id: The name and identifier for the Job. This is case-sensitive. + :type id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._cancel_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + id=id, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}/cancel'} # type: ignore diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_model_containers_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_model_containers_operations.py new file mode 100644 index 00000000..cc6f0064 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_model_containers_operations.py @@ -0,0 +1,322 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._model_containers_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ModelContainersOperations: + """ModelContainersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workspace_name: str, + skip: Optional[str] = None, + count: Optional[int] = None, + list_view_type: Optional[Union[str, "_models.ListViewType"]] = None, + **kwargs: Any + ) -> AsyncIterable["_models.ModelContainerResourceArmPaginatedResult"]: + """List model containers. + + List model containers. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param skip: Continuation token for pagination. + :type skip: str + :param count: Maximum number of results to return. + :type count: int + :param list_view_type: View type for including/excluding (for example) archived entities. + :type list_view_type: str or ~azure.mgmt.machinelearningservices.models.ListViewType + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ModelContainerResourceArmPaginatedResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.ModelContainerResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ModelContainerResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + skip=skip, + count=count, + list_view_type=list_view_type, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + skip=skip, + count=count, + list_view_type=list_view_type, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ModelContainerResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models'} # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + workspace_name: str, + name: str, + **kwargs: Any + ) -> None: + """Delete container. + + Delete container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}'} # type: ignore + + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + workspace_name: str, + name: str, + **kwargs: Any + ) -> "_models.ModelContainerData": + """Get container. + + Get container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ModelContainerData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ModelContainerData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ModelContainerData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ModelContainerData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}'} # type: ignore + + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + workspace_name: str, + name: str, + body: "_models.ModelContainerData", + **kwargs: Any + ) -> "_models.ModelContainerData": + """Create or update container. + + Create or update container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :param body: Container entity to create or update. + :type body: ~azure.mgmt.machinelearningservices.models.ModelContainerData + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ModelContainerData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ModelContainerData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ModelContainerData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'ModelContainerData') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ModelContainerData', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ModelContainerData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_model_versions_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_model_versions_operations.py new file mode 100644 index 00000000..8af2fa2c --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_model_versions_operations.py @@ -0,0 +1,376 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._model_versions_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ModelVersionsOperations: + """ModelVersionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workspace_name: str, + name: str, + skip: Optional[str] = None, + order_by: Optional[str] = None, + top: Optional[int] = None, + version: Optional[str] = None, + description: Optional[str] = None, + offset: Optional[int] = None, + tags: Optional[str] = None, + properties: Optional[str] = None, + feed: Optional[str] = None, + list_view_type: Optional[Union[str, "_models.ListViewType"]] = None, + **kwargs: Any + ) -> AsyncIterable["_models.ModelVersionResourceArmPaginatedResult"]: + """List model versions. + + List model versions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Model name. This is case-sensitive. + :type name: str + :param skip: Continuation token for pagination. + :type skip: str + :param order_by: Ordering of list. + :type order_by: str + :param top: Maximum number of records to return. + :type top: int + :param version: Model version. + :type version: str + :param description: Model description. + :type description: str + :param offset: Number of initial results to skip. + :type offset: int + :param tags: Comma-separated list of tag names (and optionally values). Example: + tag1,tag2=value2. + :type tags: str + :param properties: Comma-separated list of property names (and optionally values). Example: + prop1,prop2=value2. + :type properties: str + :param feed: Name of the feed. + :type feed: str + :param list_view_type: View type for including/excluding (for example) archived entities. + :type list_view_type: str or ~azure.mgmt.machinelearningservices.models.ListViewType + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ModelVersionResourceArmPaginatedResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.ModelVersionResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ModelVersionResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + skip=skip, + order_by=order_by, + top=top, + version=version, + description=description, + offset=offset, + tags=tags, + properties=properties, + feed=feed, + list_view_type=list_view_type, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + skip=skip, + order_by=order_by, + top=top, + version=version, + description=description, + offset=offset, + tags=tags, + properties=properties, + feed=feed, + list_view_type=list_view_type, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ModelVersionResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions'} # type: ignore + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + workspace_name: str, + name: str, + version: str, + **kwargs: Any + ) -> None: + """Delete version. + + Delete version. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :param version: Version identifier. This is case-sensitive. + :type version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + version=version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}'} # type: ignore + + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + workspace_name: str, + name: str, + version: str, + **kwargs: Any + ) -> "_models.ModelVersionData": + """Get version. + + Get version. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :param version: Version identifier. This is case-sensitive. + :type version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ModelVersionData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ModelVersionData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ModelVersionData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + version=version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ModelVersionData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}'} # type: ignore + + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + workspace_name: str, + name: str, + version: str, + body: "_models.ModelVersionData", + **kwargs: Any + ) -> "_models.ModelVersionData": + """Create or update version. + + Create or update version. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :param version: Version identifier. This is case-sensitive. + :type version: str + :param body: Version entity to create or update. + :type body: ~azure.mgmt.machinelearningservices.models.ModelVersionData + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ModelVersionData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ModelVersionData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ModelVersionData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'ModelVersionData') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + version=version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ModelVersionData', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ModelVersionData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_online_deployments_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_online_deployments_operations.py new file mode 100644 index 00000000..58b81856 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_online_deployments_operations.py @@ -0,0 +1,774 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._online_deployments_operations import build_create_or_update_request_initial, build_delete_request_initial, build_get_logs_request, build_get_request, build_list_request, build_list_skus_request, build_update_request_initial +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class OnlineDeploymentsOperations: + """OnlineDeploymentsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + order_by: Optional[str] = None, + top: Optional[int] = None, + skip: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.OnlineDeploymentTrackedResourceArmPaginatedResult"]: + """List Inference Endpoint Deployments. + + List Inference Endpoint Deployments. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Inference endpoint name. + :type endpoint_name: str + :param order_by: Ordering of list. + :type order_by: str + :param top: Top of list. + :type top: int + :param skip: Continuation token for pagination. + :type skip: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OnlineDeploymentTrackedResourceArmPaginatedResult + or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.OnlineDeploymentTrackedResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OnlineDeploymentTrackedResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + order_by=order_by, + top=top, + skip=skip, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + order_by=order_by, + top=top, + skip=skip, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("OnlineDeploymentTrackedResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + deployment_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + deployment_name=deployment_name, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers['x-ms-async-operation-timeout']=self._deserialize('duration', response.headers.get('x-ms-async-operation-timeout')) + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}'} # type: ignore + + + @distributed_trace_async + async def begin_delete( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + deployment_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Delete Inference Endpoint Deployment (asynchronous). + + Delete Inference Endpoint Deployment (asynchronous). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Inference endpoint name. + :type endpoint_name: str + :param deployment_name: Inference Endpoint Deployment name. + :type deployment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + deployment_name=deployment_name, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}'} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + deployment_name: str, + **kwargs: Any + ) -> "_models.OnlineDeploymentData": + """Get Inference Deployment Deployment. + + Get Inference Deployment Deployment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Inference endpoint name. + :type endpoint_name: str + :param deployment_name: Inference Endpoint Deployment name. + :type deployment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OnlineDeploymentData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.OnlineDeploymentData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OnlineDeploymentData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + deployment_name=deployment_name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('OnlineDeploymentData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}'} # type: ignore + + + async def _update_initial( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + deployment_name: str, + body: "_models.PartialOnlineDeploymentPartialTrackedResource", + **kwargs: Any + ) -> Optional["_models.OnlineDeploymentData"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.OnlineDeploymentData"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'PartialOnlineDeploymentPartialTrackedResource') + + request = build_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + deployment_name=deployment_name, + content_type=content_type, + json=_json, + template_url=self._update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize('OnlineDeploymentData', pipeline_response) + + if response.status_code == 202: + response_headers['x-ms-async-operation-timeout']=self._deserialize('duration', response.headers.get('x-ms-async-operation-timeout')) + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}'} # type: ignore + + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + deployment_name: str, + body: "_models.PartialOnlineDeploymentPartialTrackedResource", + **kwargs: Any + ) -> AsyncLROPoller["_models.OnlineDeploymentData"]: + """Update Online Deployment (asynchronous). + + Update Online Deployment (asynchronous). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Online Endpoint name. + :type endpoint_name: str + :param deployment_name: Inference Endpoint Deployment name. + :type deployment_name: str + :param body: Online Endpoint entity to apply during operation. + :type body: + ~azure.mgmt.machinelearningservices.models.PartialOnlineDeploymentPartialTrackedResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either OnlineDeploymentData or the result + of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.machinelearningservices.models.OnlineDeploymentData] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OnlineDeploymentData"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + deployment_name=deployment_name, + body=body, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('OnlineDeploymentData', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + deployment_name: str, + body: "_models.OnlineDeploymentData", + **kwargs: Any + ) -> "_models.OnlineDeploymentData": + cls = kwargs.pop('cls', None) # type: ClsType["_models.OnlineDeploymentData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'OnlineDeploymentData') + + request = build_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + deployment_name=deployment_name, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize('OnlineDeploymentData', pipeline_response) + + if response.status_code == 201: + response_headers['x-ms-async-operation-timeout']=self._deserialize('duration', response.headers.get('x-ms-async-operation-timeout')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + + deserialized = self._deserialize('OnlineDeploymentData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}'} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + deployment_name: str, + body: "_models.OnlineDeploymentData", + **kwargs: Any + ) -> AsyncLROPoller["_models.OnlineDeploymentData"]: + """Create or update Inference Endpoint Deployment (asynchronous). + + Create or update Inference Endpoint Deployment (asynchronous). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Inference endpoint name. + :type endpoint_name: str + :param deployment_name: Inference Endpoint Deployment name. + :type deployment_name: str + :param body: Inference Endpoint entity to apply during operation. + :type body: ~azure.mgmt.machinelearningservices.models.OnlineDeploymentData + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either OnlineDeploymentData or the result + of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.machinelearningservices.models.OnlineDeploymentData] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OnlineDeploymentData"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + deployment_name=deployment_name, + body=body, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('OnlineDeploymentData', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}'} # type: ignore + + @distributed_trace_async + async def get_logs( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + deployment_name: str, + body: "_models.DeploymentLogsRequest", + **kwargs: Any + ) -> "_models.DeploymentLogs": + """Polls an Endpoint operation. + + Polls an Endpoint operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Inference endpoint name. + :type endpoint_name: str + :param deployment_name: The name and identifier for the endpoint. + :type deployment_name: str + :param body: The request containing parameters for retrieving logs. + :type body: ~azure.mgmt.machinelearningservices.models.DeploymentLogsRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeploymentLogs, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.DeploymentLogs + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentLogs"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'DeploymentLogsRequest') + + request = build_get_logs_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + deployment_name=deployment_name, + content_type=content_type, + json=_json, + template_url=self.get_logs.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DeploymentLogs', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}/getLogs'} # type: ignore + + + @distributed_trace + def list_skus( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + deployment_name: str, + count: Optional[int] = None, + skip: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.SkuResourceArmPaginatedResult"]: + """List Inference Endpoint Deployment Skus. + + List Inference Endpoint Deployment Skus. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Inference endpoint name. + :type endpoint_name: str + :param deployment_name: Inference Endpoint Deployment name. + :type deployment_name: str + :param count: Number of Skus to be retrieved in a page of results. + :type count: int + :param skip: Continuation token for pagination. + :type skip: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SkuResourceArmPaginatedResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.SkuResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_skus_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + deployment_name=deployment_name, + count=count, + skip=skip, + template_url=self.list_skus.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_skus_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + deployment_name=deployment_name, + count=count, + skip=skip, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("SkuResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}/skus'} # type: ignore diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_online_endpoints_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_online_endpoints_operations.py new file mode 100644 index 00000000..b660396e --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_online_endpoints_operations.py @@ -0,0 +1,840 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._online_endpoints_operations import build_create_or_update_request_initial, build_delete_request_initial, build_get_request, build_get_token_request, build_list_keys_request, build_list_request, build_regenerate_keys_request_initial, build_update_request_initial +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class OnlineEndpointsOperations: + """OnlineEndpointsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workspace_name: str, + name: Optional[str] = None, + count: Optional[int] = None, + compute_type: Optional[Union[str, "_models.EndpointComputeType"]] = None, + skip: Optional[str] = None, + tags: Optional[str] = None, + properties: Optional[str] = None, + order_by: Optional[Union[str, "_models.OrderString"]] = None, + **kwargs: Any + ) -> AsyncIterable["_models.OnlineEndpointTrackedResourceArmPaginatedResult"]: + """List Online Endpoints. + + List Online Endpoints. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Name of the endpoint. + :type name: str + :param count: Number of endpoints to be retrieved in a page of results. + :type count: int + :param compute_type: EndpointComputeType to be filtered by. + :type compute_type: str or ~azure.mgmt.machinelearningservices.models.EndpointComputeType + :param skip: Continuation token for pagination. + :type skip: str + :param tags: A set of tags with which to filter the returned models. It is a comma separated + string of tags key or tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + :type tags: str + :param properties: A set of properties with which to filter the returned models. It is a comma + separated string of properties key and/or properties key=value Example: + propKey1,propKey2,propKey3=value3 . + :type properties: str + :param order_by: The option to order the response. + :type order_by: str or ~azure.mgmt.machinelearningservices.models.OrderString + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OnlineEndpointTrackedResourceArmPaginatedResult or + the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.OnlineEndpointTrackedResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OnlineEndpointTrackedResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + count=count, + compute_type=compute_type, + skip=skip, + tags=tags, + properties=properties, + order_by=order_by, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + count=count, + compute_type=compute_type, + skip=skip, + tags=tags, + properties=properties, + order_by=order_by, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("OnlineEndpointTrackedResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers['x-ms-async-operation-timeout']=self._deserialize('duration', response.headers.get('x-ms-async-operation-timeout')) + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}'} # type: ignore + + + @distributed_trace_async + async def begin_delete( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Delete Online Endpoint (asynchronous). + + Delete Online Endpoint (asynchronous). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Online Endpoint name. + :type endpoint_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}'} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + **kwargs: Any + ) -> "_models.OnlineEndpointData": + """Get Online Endpoint. + + Get Online Endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Online Endpoint name. + :type endpoint_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OnlineEndpointData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.OnlineEndpointData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OnlineEndpointData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('OnlineEndpointData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}'} # type: ignore + + + async def _update_initial( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + body: "_models.PartialOnlineEndpointPartialTrackedResource", + **kwargs: Any + ) -> Optional["_models.OnlineEndpointData"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.OnlineEndpointData"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'PartialOnlineEndpointPartialTrackedResource') + + request = build_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + content_type=content_type, + json=_json, + template_url=self._update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize('OnlineEndpointData', pipeline_response) + + if response.status_code == 202: + response_headers['x-ms-async-operation-timeout']=self._deserialize('duration', response.headers.get('x-ms-async-operation-timeout')) + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}'} # type: ignore + + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + body: "_models.PartialOnlineEndpointPartialTrackedResource", + **kwargs: Any + ) -> AsyncLROPoller["_models.OnlineEndpointData"]: + """Update Online Endpoint (asynchronous). + + Update Online Endpoint (asynchronous). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Online Endpoint name. + :type endpoint_name: str + :param body: Online Endpoint entity to apply during operation. + :type body: + ~azure.mgmt.machinelearningservices.models.PartialOnlineEndpointPartialTrackedResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either OnlineEndpointData or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.machinelearningservices.models.OnlineEndpointData] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OnlineEndpointData"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + body=body, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('OnlineEndpointData', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + body: "_models.OnlineEndpointData", + **kwargs: Any + ) -> "_models.OnlineEndpointData": + cls = kwargs.pop('cls', None) # type: ClsType["_models.OnlineEndpointData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'OnlineEndpointData') + + request = build_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize('OnlineEndpointData', pipeline_response) + + if response.status_code == 201: + response_headers['x-ms-async-operation-timeout']=self._deserialize('duration', response.headers.get('x-ms-async-operation-timeout')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + + deserialized = self._deserialize('OnlineEndpointData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}'} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + body: "_models.OnlineEndpointData", + **kwargs: Any + ) -> AsyncLROPoller["_models.OnlineEndpointData"]: + """Create or update Online Endpoint (asynchronous). + + Create or update Online Endpoint (asynchronous). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Online Endpoint name. + :type endpoint_name: str + :param body: Online Endpoint entity to apply during operation. + :type body: ~azure.mgmt.machinelearningservices.models.OnlineEndpointData + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either OnlineEndpointData or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.machinelearningservices.models.OnlineEndpointData] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OnlineEndpointData"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + body=body, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('OnlineEndpointData', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}'} # type: ignore + + @distributed_trace_async + async def list_keys( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + **kwargs: Any + ) -> "_models.EndpointAuthKeys": + """List EndpointAuthKeys for an Endpoint using Key-based authentication. + + List EndpointAuthKeys for an Endpoint using Key-based authentication. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Online Endpoint name. + :type endpoint_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EndpointAuthKeys, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.EndpointAuthKeys + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EndpointAuthKeys"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_list_keys_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + template_url=self.list_keys.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('EndpointAuthKeys', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/listKeys'} # type: ignore + + + async def _regenerate_keys_initial( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + body: "_models.RegenerateEndpointKeysRequest", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'RegenerateEndpointKeysRequest') + + request = build_regenerate_keys_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + content_type=content_type, + json=_json, + template_url=self._regenerate_keys_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + + if cls: + return cls(pipeline_response, None, response_headers) + + _regenerate_keys_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/regenerateKeys'} # type: ignore + + + @distributed_trace_async + async def begin_regenerate_keys( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + body: "_models.RegenerateEndpointKeysRequest", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + + Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Online Endpoint name. + :type endpoint_name: str + :param body: RegenerateKeys request . + :type body: ~azure.mgmt.machinelearningservices.models.RegenerateEndpointKeysRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._regenerate_keys_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + body=body, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_regenerate_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/regenerateKeys'} # type: ignore + + @distributed_trace_async + async def get_token( + self, + resource_group_name: str, + workspace_name: str, + endpoint_name: str, + **kwargs: Any + ) -> "_models.EndpointAuthToken": + """Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. + + Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Online Endpoint name. + :type endpoint_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EndpointAuthToken, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.EndpointAuthToken + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EndpointAuthToken"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_token_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + template_url=self.get_token.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('EndpointAuthToken', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/token'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_operations.py new file mode 100644 index 00000000..75ac95c7 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_operations.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._operations import build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class Operations: + """Operations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.AmlOperationListResult"]: + """Lists all of the available Azure Machine Learning Workspaces REST API operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AmlOperationListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.AmlOperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AmlOperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("AmlOperationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.MachineLearningServices/operations'} # type: ignore diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_private_endpoint_connections_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_private_endpoint_connections_operations.py new file mode 100644 index 00000000..d1228f86 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,298 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._private_endpoint_connections_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PrivateEndpointConnectionsOperations: + """PrivateEndpointConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workspace_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PrivateEndpointConnectionListResult"]: + """List all the private endpoint connections associated with the workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result + of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.PrivateEndpointConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + subscription_id=self._config.subscription_id, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + subscription_id=self._config.subscription_id, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("PrivateEndpointConnectionListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections'} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + workspace_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> "_models.PrivateEndpointConnection": + """Gets the specified private endpoint connection associated with the workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection associated + with the workspace. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + private_endpoint_connection_name=private_endpoint_connection_name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + workspace_name: str, + private_endpoint_connection_name: str, + properties: "_models.PrivateEndpointConnection", + **kwargs: Any + ) -> "_models.PrivateEndpointConnection": + """Update the state of specified private endpoint connection associated with the workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection associated + with the workspace. + :type private_endpoint_connection_name: str + :param properties: The private endpoint connection properties. + :type properties: ~azure.mgmt.machinelearningservices.models.PrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(properties, 'PrivateEndpointConnection') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + private_endpoint_connection_name=private_endpoint_connection_name, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + workspace_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> None: + """Deletes the specified private endpoint connection associated with the workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection associated + with the workspace. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + private_endpoint_connection_name=private_endpoint_connection_name, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_private_link_resources_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_private_link_resources_operations.py new file mode 100644 index 00000000..e0d008b1 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_private_link_resources_operations.py @@ -0,0 +1,97 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._private_link_resources_operations import build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PrivateLinkResourcesOperations: + """PrivateLinkResourcesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def list( + self, + resource_group_name: str, + workspace_name: str, + **kwargs: Any + ) -> "_models.PrivateLinkResourceListResult": + """Gets the private link resources that need to be created for a workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResourceListResult, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.PrivateLinkResourceListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResourceListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateLinkResources'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_quotas_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_quotas_operations.py new file mode 100644 index 00000000..ce339e75 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_quotas_operations.py @@ -0,0 +1,173 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._quotas_operations import build_list_request, build_update_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class QuotasOperations: + """QuotasOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def update( + self, + location: str, + parameters: "_models.QuotaUpdateParameters", + **kwargs: Any + ) -> "_models.UpdateWorkspaceQuotasResult": + """Update quota for each VM family in workspace. + + :param location: The location for update quota is queried. + :type location: str + :param parameters: Quota update parameters. + :type parameters: ~azure.mgmt.machinelearningservices.models.QuotaUpdateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: UpdateWorkspaceQuotasResult, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.UpdateWorkspaceQuotasResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UpdateWorkspaceQuotasResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'QuotaUpdateParameters') + + request = build_update_request( + location=location, + subscription_id=self._config.subscription_id, + content_type=content_type, + json=_json, + template_url=self.update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('UpdateWorkspaceQuotasResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/updateQuotas'} # type: ignore + + + @distributed_trace + def list( + self, + location: str, + **kwargs: Any + ) -> AsyncIterable["_models.ListWorkspaceQuotas"]: + """Gets the currently assigned Workspace Quotas based on VMFamily. + + :param location: The location for which resource usage is queried. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListWorkspaceQuotas or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.ListWorkspaceQuotas] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListWorkspaceQuotas"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + location=location, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + location=location, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ListWorkspaceQuotas", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/quotas'} # type: ignore diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_usages_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_usages_operations.py new file mode 100644 index 00000000..f42c0277 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_usages_operations.py @@ -0,0 +1,118 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._usages_operations import build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class UsagesOperations: + """UsagesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + location: str, + **kwargs: Any + ) -> AsyncIterable["_models.ListUsagesResult"]: + """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. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListUsagesResult or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.ListUsagesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListUsagesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + location=location, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + location=location, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ListUsagesResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/usages'} # type: ignore diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_virtual_machine_sizes_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_virtual_machine_sizes_operations.py new file mode 100644 index 00000000..4bd0ecb9 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_virtual_machine_sizes_operations.py @@ -0,0 +1,93 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._virtual_machine_sizes_operations import build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class VirtualMachineSizesOperations: + """VirtualMachineSizesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def list( + self, + location: str, + **kwargs: Any + ) -> "_models.VirtualMachineSizeListResult": + """Returns supported VM Sizes in a location. + + :param location: The location upon which virtual-machine-sizes is queried. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualMachineSizeListResult, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.VirtualMachineSizeListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineSizeListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_list_request( + location=location, + subscription_id=self._config.subscription_id, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualMachineSizeListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/vmSizes'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_workspace_connections_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_workspace_connections_operations.py new file mode 100644 index 00000000..eec0ff70 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_workspace_connections_operations.py @@ -0,0 +1,306 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._workspace_connections_operations import build_create_request, build_delete_request, build_get_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class WorkspaceConnectionsOperations: + """WorkspaceConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def create( + self, + resource_group_name: str, + workspace_name: str, + connection_name: str, + parameters: "_models.WorkspaceConnectionPropertiesV2BasicResource", + **kwargs: Any + ) -> "_models.WorkspaceConnectionPropertiesV2BasicResource": + """create. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param connection_name: Friendly name of the workspace connection. + :type connection_name: str + :param parameters: The object for creating or updating a new workspace connection. + :type parameters: + ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionPropertiesV2BasicResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkspaceConnectionPropertiesV2BasicResource, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionPropertiesV2BasicResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkspaceConnectionPropertiesV2BasicResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'WorkspaceConnectionPropertiesV2BasicResource') + + request = build_create_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + connection_name=connection_name, + content_type=content_type, + json=_json, + template_url=self.create.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkspaceConnectionPropertiesV2BasicResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}'} # type: ignore + + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + workspace_name: str, + connection_name: str, + **kwargs: Any + ) -> "_models.WorkspaceConnectionPropertiesV2BasicResource": + """get. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param connection_name: Friendly name of the workspace connection. + :type connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkspaceConnectionPropertiesV2BasicResource, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionPropertiesV2BasicResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkspaceConnectionPropertiesV2BasicResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + connection_name=connection_name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkspaceConnectionPropertiesV2BasicResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}'} # type: ignore + + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + workspace_name: str, + connection_name: str, + **kwargs: Any + ) -> None: + """delete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param connection_name: Friendly name of the workspace connection. + :type connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + connection_name=connection_name, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}'} # type: ignore + + + @distributed_trace + def list( + self, + resource_group_name: str, + workspace_name: str, + target: Optional[str] = None, + category: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult"]: + """list. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param target: Target of the workspace connection. + :type target: str + :param category: Category of the workspace connection. + :type category: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either + WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + target=target, + category=category, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + target=target, + category=category, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections'} # type: ignore diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_workspace_features_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_workspace_features_operations.py new file mode 100644 index 00000000..2e4752bd --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_workspace_features_operations.py @@ -0,0 +1,123 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._workspace_features_operations import build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class WorkspaceFeaturesOperations: + """WorkspaceFeaturesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workspace_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ListAmlUserFeatureResult"]: + """Lists all enabled features for a workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListAmlUserFeatureResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.ListAmlUserFeatureResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListAmlUserFeatureResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ListAmlUserFeatureResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/features'} # type: ignore diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_workspaces_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_workspaces_operations.py new file mode 100644 index 00000000..f7ef8bea --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/aio/operations/_workspaces_operations.py @@ -0,0 +1,1179 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._workspaces_operations import build_create_or_update_request_initial, build_delete_request_initial, build_diagnose_request_initial, build_get_request, build_list_by_resource_group_request, build_list_by_subscription_request, build_list_keys_request, build_list_notebook_access_token_request, build_list_notebook_keys_request, build_list_outbound_network_dependencies_endpoints_request, build_list_storage_account_keys_request, build_prepare_notebook_request_initial, build_resync_keys_request_initial, build_update_request_initial +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class WorkspacesOperations: + """WorkspacesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + workspace_name: str, + **kwargs: Any + ) -> "_models.Workspace": + """Gets the properties of the specified machine learning workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Workspace, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.Workspace + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Workspace"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Workspace', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + workspace_name: str, + parameters: "_models.Workspace", + **kwargs: Any + ) -> Optional["_models.Workspace"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Workspace"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'Workspace') + + request = build_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Workspace', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + workspace_name: str, + parameters: "_models.Workspace", + **kwargs: Any + ) -> AsyncLROPoller["_models.Workspace"]: + """Creates or updates a workspace with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param parameters: The parameters for creating or updating a machine learning workspace. + :type parameters: ~azure.mgmt.machinelearningservices.models.Workspace + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either Workspace or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.machinelearningservices.models.Workspace] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Workspace"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + parameters=parameters, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('Workspace', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + workspace_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} # type: ignore + + + @distributed_trace_async + async def begin_delete( + self, + resource_group_name: str, + workspace_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a machine learning workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} # type: ignore + + async def _update_initial( + self, + resource_group_name: str, + workspace_name: str, + parameters: "_models.WorkspaceUpdateParameters", + **kwargs: Any + ) -> Optional["_models.Workspace"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Workspace"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'WorkspaceUpdateParameters') + + request = build_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + content_type=content_type, + json=_json, + template_url=self._update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Workspace', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} # type: ignore + + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + workspace_name: str, + parameters: "_models.WorkspaceUpdateParameters", + **kwargs: Any + ) -> AsyncLROPoller["_models.Workspace"]: + """Updates a machine learning workspace with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param parameters: The parameters for updating a machine learning workspace. + :type parameters: ~azure.mgmt.machinelearningservices.models.WorkspaceUpdateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either Workspace or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.machinelearningservices.models.Workspace] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Workspace"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + parameters=parameters, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('Workspace', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + skip: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.WorkspaceListResult"]: + """Lists all the available machine learning workspaces under the specified resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param skip: Continuation token for pagination. + :type skip: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkspaceListResult or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.WorkspaceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkspaceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + skip=skip, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + skip=skip, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("WorkspaceListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces'} # type: ignore + + async def _diagnose_initial( + self, + resource_group_name: str, + workspace_name: str, + parameters: Optional["_models.DiagnoseWorkspaceParameters"] = None, + **kwargs: Any + ) -> Optional["_models.DiagnoseResponseResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.DiagnoseResponseResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if parameters is not None: + _json = self._serialize.body(parameters, 'DiagnoseWorkspaceParameters') + else: + _json = None + + request = build_diagnose_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + content_type=content_type, + json=_json, + template_url=self._diagnose_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize('DiagnoseResponseResult', pipeline_response) + + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _diagnose_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/diagnose'} # type: ignore + + + @distributed_trace_async + async def begin_diagnose( + self, + resource_group_name: str, + workspace_name: str, + parameters: Optional["_models.DiagnoseWorkspaceParameters"] = None, + **kwargs: Any + ) -> AsyncLROPoller["_models.DiagnoseResponseResult"]: + """Diagnose workspace setup issue. + + Diagnose workspace setup issue. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param parameters: The parameter of diagnosing workspace health. + :type parameters: ~azure.mgmt.machinelearningservices.models.DiagnoseWorkspaceParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DiagnoseResponseResult or the result + of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.machinelearningservices.models.DiagnoseResponseResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnoseResponseResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._diagnose_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + parameters=parameters, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('DiagnoseResponseResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_diagnose.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/diagnose'} # type: ignore + + @distributed_trace_async + async def list_keys( + self, + resource_group_name: str, + workspace_name: str, + **kwargs: Any + ) -> "_models.ListWorkspaceKeysResult": + """Lists all the keys associated with this workspace. This includes keys for the storage account, + app insights and password for container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ListWorkspaceKeysResult, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ListWorkspaceKeysResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListWorkspaceKeysResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_list_keys_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + template_url=self.list_keys.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ListWorkspaceKeysResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listKeys'} # type: ignore + + + async def _resync_keys_initial( + self, + resource_group_name: str, + workspace_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_resync_keys_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + template_url=self._resync_keys_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _resync_keys_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys'} # type: ignore + + + @distributed_trace_async + async def begin_resync_keys( + self, + resource_group_name: str, + workspace_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Resync all the keys associated with this workspace. This includes keys for the storage account, + app insights and password for container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._resync_keys_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_resync_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys'} # type: ignore + + @distributed_trace + def list_by_subscription( + self, + skip: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.WorkspaceListResult"]: + """Lists all the available machine learning workspaces under the specified subscription. + + :param skip: Continuation token for pagination. + :type skip: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkspaceListResult or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.WorkspaceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkspaceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_subscription_request( + subscription_id=self._config.subscription_id, + skip=skip, + template_url=self.list_by_subscription.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_by_subscription_request( + subscription_id=self._config.subscription_id, + skip=skip, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("WorkspaceListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces'} # type: ignore + + @distributed_trace_async + async def list_notebook_access_token( + self, + resource_group_name: str, + workspace_name: str, + **kwargs: Any + ) -> "_models.NotebookAccessTokenResult": + """return notebook access token and refresh token. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NotebookAccessTokenResult, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.NotebookAccessTokenResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NotebookAccessTokenResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_list_notebook_access_token_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + template_url=self.list_notebook_access_token.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NotebookAccessTokenResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_notebook_access_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookAccessToken'} # type: ignore + + + async def _prepare_notebook_initial( + self, + resource_group_name: str, + workspace_name: str, + **kwargs: Any + ) -> Optional["_models.NotebookResourceInfo"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.NotebookResourceInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_prepare_notebook_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + template_url=self._prepare_notebook_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('NotebookResourceInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _prepare_notebook_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook'} # type: ignore + + + @distributed_trace_async + async def begin_prepare_notebook( + self, + resource_group_name: str, + workspace_name: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.NotebookResourceInfo"]: + """Prepare a notebook. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either NotebookResourceInfo or the result + of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.machinelearningservices.models.NotebookResourceInfo] + :raises: ~azure.core.exceptions.HttpResponseError + """ + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NotebookResourceInfo"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._prepare_notebook_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('NotebookResourceInfo', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_prepare_notebook.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook'} # type: ignore + + @distributed_trace_async + async def list_storage_account_keys( + self, + resource_group_name: str, + workspace_name: str, + **kwargs: Any + ) -> "_models.ListStorageAccountKeysResult": + """List storage account keys of a workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ListStorageAccountKeysResult, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ListStorageAccountKeysResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListStorageAccountKeysResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_list_storage_account_keys_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + template_url=self.list_storage_account_keys.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ListStorageAccountKeysResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_storage_account_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listStorageAccountKeys'} # type: ignore + + + @distributed_trace_async + async def list_notebook_keys( + self, + resource_group_name: str, + workspace_name: str, + **kwargs: Any + ) -> "_models.ListNotebookKeysResult": + """List keys of a notebook. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ListNotebookKeysResult, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ListNotebookKeysResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListNotebookKeysResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_list_notebook_keys_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + template_url=self.list_notebook_keys.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ListNotebookKeysResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_notebook_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookKeys'} # type: ignore + + + @distributed_trace_async + async def list_outbound_network_dependencies_endpoints( + self, + resource_group_name: str, + workspace_name: str, + **kwargs: Any + ) -> "_models.ExternalFQDNResponse": + """Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) + programmatically. + + Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) + programmatically. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExternalFQDNResponse, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ExternalFQDNResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExternalFQDNResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_list_outbound_network_dependencies_endpoints_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + template_url=self.list_outbound_network_dependencies_endpoints.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExternalFQDNResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/models/__init__.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/models/__init__.py new file mode 100644 index 00000000..01405058 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/models/__init__.py @@ -0,0 +1,1107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import AKS + from ._models_py3 import AKSSchema + from ._models_py3 import AKSSchemaProperties + from ._models_py3 import AccountKeyDatastoreCredentials + from ._models_py3 import AccountKeyDatastoreSecrets + from ._models_py3 import AksComputeSecrets + from ._models_py3 import AksComputeSecretsProperties + from ._models_py3 import AksNetworkingConfiguration + from ._models_py3 import AmlCompute + from ._models_py3 import AmlComputeNodeInformation + from ._models_py3 import AmlComputeNodesInformation + from ._models_py3 import AmlComputeProperties + from ._models_py3 import AmlComputeSchema + from ._models_py3 import AmlOperation + from ._models_py3 import AmlOperationDisplay + from ._models_py3 import AmlOperationListResult + from ._models_py3 import AmlToken + from ._models_py3 import AmlUserFeature + from ._models_py3 import AssetBase + from ._models_py3 import AssetContainer + from ._models_py3 import AssetJobInput + from ._models_py3 import AssetJobOutput + from ._models_py3 import AssetReferenceBase + from ._models_py3 import AssignedUser + from ._models_py3 import AutoPauseProperties + from ._models_py3 import AutoScaleProperties + from ._models_py3 import AzureBlobDatastore + from ._models_py3 import AzureDataLakeGen1Datastore + from ._models_py3 import AzureDataLakeGen2Datastore + from ._models_py3 import AzureFileDatastore + from ._models_py3 import BanditPolicy + from ._models_py3 import BatchDeploymentData + from ._models_py3 import BatchDeploymentDetails + from ._models_py3 import BatchDeploymentTrackedResourceArmPaginatedResult + from ._models_py3 import BatchEndpointData + from ._models_py3 import BatchEndpointDefaults + from ._models_py3 import BatchEndpointDetails + from ._models_py3 import BatchEndpointTrackedResourceArmPaginatedResult + from ._models_py3 import BatchRetrySettings + from ._models_py3 import BayesianSamplingAlgorithm + from ._models_py3 import BuildContext + from ._models_py3 import CertificateDatastoreCredentials + from ._models_py3 import CertificateDatastoreSecrets + from ._models_py3 import ClusterUpdateParameters + from ._models_py3 import CodeConfiguration + from ._models_py3 import CodeContainerData + from ._models_py3 import CodeContainerDetails + from ._models_py3 import CodeContainerResourceArmPaginatedResult + from ._models_py3 import CodeVersionData + from ._models_py3 import CodeVersionDetails + from ._models_py3 import CodeVersionResourceArmPaginatedResult + from ._models_py3 import CommandJob + from ._models_py3 import CommandJobLimits + from ._models_py3 import ComponentContainerData + from ._models_py3 import ComponentContainerDetails + from ._models_py3 import ComponentContainerResourceArmPaginatedResult + from ._models_py3 import ComponentVersionData + from ._models_py3 import ComponentVersionDetails + from ._models_py3 import ComponentVersionResourceArmPaginatedResult + from ._models_py3 import Compute + from ._models_py3 import ComputeInstance + from ._models_py3 import ComputeInstanceApplication + from ._models_py3 import ComputeInstanceConnectivityEndpoints + from ._models_py3 import ComputeInstanceContainer + from ._models_py3 import ComputeInstanceCreatedBy + from ._models_py3 import ComputeInstanceDataDisk + from ._models_py3 import ComputeInstanceDataMount + from ._models_py3 import ComputeInstanceEnvironmentInfo + from ._models_py3 import ComputeInstanceLastOperation + from ._models_py3 import ComputeInstanceProperties + from ._models_py3 import ComputeInstanceSchema + from ._models_py3 import ComputeInstanceSshSettings + from ._models_py3 import ComputeInstanceVersion + from ._models_py3 import ComputeResource + from ._models_py3 import ComputeResourceSchema + from ._models_py3 import ComputeSchedules + from ._models_py3 import ComputeSecrets + from ._models_py3 import ComputeStartStopSchedule + from ._models_py3 import ContainerResourceRequirements + from ._models_py3 import ContainerResourceSettings + from ._models_py3 import CosmosDbSettings + from ._models_py3 import CronSchedule + from ._models_py3 import CustomModelJobInput + from ._models_py3 import CustomModelJobOutput + from ._models_py3 import DataContainerData + from ._models_py3 import DataContainerDetails + from ._models_py3 import DataContainerResourceArmPaginatedResult + from ._models_py3 import DataFactory + from ._models_py3 import DataLakeAnalytics + from ._models_py3 import DataLakeAnalyticsSchema + from ._models_py3 import DataLakeAnalyticsSchemaProperties + from ._models_py3 import DataPathAssetReference + from ._models_py3 import DataVersionBaseData + from ._models_py3 import DataVersionBaseDetails + from ._models_py3 import DataVersionBaseResourceArmPaginatedResult + from ._models_py3 import Databricks + from ._models_py3 import DatabricksComputeSecrets + from ._models_py3 import DatabricksComputeSecretsProperties + from ._models_py3 import DatabricksProperties + from ._models_py3 import DatabricksSchema + from ._models_py3 import DatastoreCredentials + from ._models_py3 import DatastoreData + from ._models_py3 import DatastoreDetails + from ._models_py3 import DatastoreResourceArmPaginatedResult + from ._models_py3 import DatastoreSecrets + from ._models_py3 import DefaultScaleSettings + from ._models_py3 import DeploymentLogs + from ._models_py3 import DeploymentLogsRequest + from ._models_py3 import DiagnoseRequestProperties + from ._models_py3 import DiagnoseResponseResult + from ._models_py3 import DiagnoseResponseResultValue + from ._models_py3 import DiagnoseResult + from ._models_py3 import DiagnoseWorkspaceParameters + from ._models_py3 import DistributionConfiguration + from ._models_py3 import EarlyTerminationPolicy + from ._models_py3 import EncryptionKeyVaultProperties + from ._models_py3 import EncryptionProperty + from ._models_py3 import EndpointAuthKeys + from ._models_py3 import EndpointAuthToken + from ._models_py3 import EndpointDeploymentPropertiesBase + from ._models_py3 import EndpointPropertiesBase + from ._models_py3 import EnvironmentContainerData + from ._models_py3 import EnvironmentContainerDetails + from ._models_py3 import EnvironmentContainerResourceArmPaginatedResult + from ._models_py3 import EnvironmentVersionData + from ._models_py3 import EnvironmentVersionDetails + from ._models_py3 import EnvironmentVersionResourceArmPaginatedResult + from ._models_py3 import ErrorAdditionalInfo + from ._models_py3 import ErrorDetail + from ._models_py3 import ErrorResponse + from ._models_py3 import EstimatedVMPrice + from ._models_py3 import EstimatedVMPrices + from ._models_py3 import ExternalFQDNResponse + from ._models_py3 import FQDNEndpoint + from ._models_py3 import FQDNEndpointDetail + from ._models_py3 import FQDNEndpoints + from ._models_py3 import FQDNEndpointsProperties + from ._models_py3 import FlavorData + from ._models_py3 import GridSamplingAlgorithm + from ._models_py3 import HDInsight + from ._models_py3 import HDInsightProperties + from ._models_py3 import HDInsightSchema + from ._models_py3 import IdAssetReference + from ._models_py3 import IdentityConfiguration + from ._models_py3 import IdentityForCmk + from ._models_py3 import InferenceContainerProperties + from ._models_py3 import InstanceTypeSchema + from ._models_py3 import InstanceTypeSchemaResources + from ._models_py3 import JobBaseData + from ._models_py3 import JobBaseDetails + from ._models_py3 import JobBaseResourceArmPaginatedResult + from ._models_py3 import JobInput + from ._models_py3 import JobLimits + from ._models_py3 import JobOutput + from ._models_py3 import JobService + from ._models_py3 import Kubernetes + from ._models_py3 import KubernetesOnlineDeployment + from ._models_py3 import KubernetesProperties + from ._models_py3 import KubernetesSchema + from ._models_py3 import ListAmlUserFeatureResult + from ._models_py3 import ListNotebookKeysResult + from ._models_py3 import ListStorageAccountKeysResult + from ._models_py3 import ListUsagesResult + from ._models_py3 import ListWorkspaceKeysResult + from ._models_py3 import ListWorkspaceQuotas + from ._models_py3 import LiteralJobInput + from ._models_py3 import MLFlowModelJobInput + from ._models_py3 import MLFlowModelJobOutput + from ._models_py3 import MLTableData + from ._models_py3 import MLTableJobInput + from ._models_py3 import MLTableJobOutput + from ._models_py3 import ManagedIdentity + from ._models_py3 import ManagedIdentityAuthTypeWorkspaceConnectionProperties + from ._models_py3 import ManagedOnlineDeployment + from ._models_py3 import ManagedServiceIdentity + from ._models_py3 import MedianStoppingPolicy + from ._models_py3 import ModelContainerData + from ._models_py3 import ModelContainerDetails + from ._models_py3 import ModelContainerResourceArmPaginatedResult + from ._models_py3 import ModelVersionData + from ._models_py3 import ModelVersionDetails + from ._models_py3 import ModelVersionResourceArmPaginatedResult + from ._models_py3 import Mpi + from ._models_py3 import NodeStateCounts + from ._models_py3 import NoneAuthTypeWorkspaceConnectionProperties + from ._models_py3 import NoneDatastoreCredentials + from ._models_py3 import NotebookAccessTokenResult + from ._models_py3 import NotebookPreparationError + from ._models_py3 import NotebookResourceInfo + from ._models_py3 import Objective + from ._models_py3 import OnlineDeploymentData + from ._models_py3 import OnlineDeploymentDetails + from ._models_py3 import OnlineDeploymentTrackedResourceArmPaginatedResult + from ._models_py3 import OnlineEndpointData + from ._models_py3 import OnlineEndpointDetails + from ._models_py3 import OnlineEndpointTrackedResourceArmPaginatedResult + from ._models_py3 import OnlineRequestSettings + from ._models_py3 import OnlineScaleSettings + from ._models_py3 import OutputPathAssetReference + from ._models_py3 import PATAuthTypeWorkspaceConnectionProperties + from ._models_py3 import PaginatedComputeResourcesList + from ._models_py3 import PartialAssetReferenceBase + from ._models_py3 import PartialBatchDeployment + from ._models_py3 import PartialBatchDeploymentPartialTrackedResource + from ._models_py3 import PartialBatchEndpoint + from ._models_py3 import PartialBatchEndpointPartialTrackedResource + from ._models_py3 import PartialBatchRetrySettings + from ._models_py3 import PartialCodeConfiguration + from ._models_py3 import PartialDataPathAssetReference + from ._models_py3 import PartialIdAssetReference + from ._models_py3 import PartialKubernetesOnlineDeployment + from ._models_py3 import PartialManagedOnlineDeployment + from ._models_py3 import PartialManagedServiceIdentity + from ._models_py3 import PartialOnlineDeployment + from ._models_py3 import PartialOnlineDeploymentPartialTrackedResource + from ._models_py3 import PartialOnlineEndpointPartialTrackedResource + from ._models_py3 import PartialOutputPathAssetReference + from ._models_py3 import PartialSku + from ._models_py3 import Password + from ._models_py3 import PersonalComputeInstanceSettings + from ._models_py3 import PipelineJob + from ._models_py3 import PrivateEndpoint + from ._models_py3 import PrivateEndpointConnection + from ._models_py3 import PrivateEndpointConnectionListResult + from ._models_py3 import PrivateLinkResource + from ._models_py3 import PrivateLinkResourceListResult + from ._models_py3 import PrivateLinkServiceConnectionState + from ._models_py3 import ProbeSettings + from ._models_py3 import PyTorch + from ._models_py3 import QuotaBaseProperties + from ._models_py3 import QuotaUpdateParameters + from ._models_py3 import RandomSamplingAlgorithm + from ._models_py3 import RecurrencePattern + from ._models_py3 import RecurrenceSchedule + from ._models_py3 import RegenerateEndpointKeysRequest + from ._models_py3 import RegistryListCredentialsResult + from ._models_py3 import Resource + from ._models_py3 import ResourceBase + from ._models_py3 import ResourceConfiguration + from ._models_py3 import ResourceId + from ._models_py3 import ResourceName + from ._models_py3 import ResourceQuota + from ._models_py3 import Route + from ._models_py3 import SASAuthTypeWorkspaceConnectionProperties + from ._models_py3 import SamplingAlgorithm + from ._models_py3 import SasDatastoreCredentials + from ._models_py3 import SasDatastoreSecrets + from ._models_py3 import ScaleSettings + from ._models_py3 import ScaleSettingsInformation + from ._models_py3 import ScheduleBase + from ._models_py3 import ScriptReference + from ._models_py3 import ScriptsToExecute + from ._models_py3 import ServiceManagedResourcesSettings + from ._models_py3 import ServicePrincipalDatastoreCredentials + from ._models_py3 import ServicePrincipalDatastoreSecrets + from ._models_py3 import SetupScripts + from ._models_py3 import SharedPrivateLinkResource + from ._models_py3 import Sku + from ._models_py3 import SkuCapacity + from ._models_py3 import SkuResource + from ._models_py3 import SkuResourceArmPaginatedResult + from ._models_py3 import SkuSetting + from ._models_py3 import SslConfiguration + from ._models_py3 import SweepJob + from ._models_py3 import SweepJobLimits + from ._models_py3 import SynapseSpark + from ._models_py3 import SynapseSparkProperties + from ._models_py3 import SystemData + from ._models_py3 import SystemService + from ._models_py3 import TargetUtilizationScaleSettings + from ._models_py3 import TensorFlow + from ._models_py3 import TrackedResource + from ._models_py3 import TrialComponent + from ._models_py3 import TritonModelJobInput + from ._models_py3 import TritonModelJobOutput + from ._models_py3 import TruncationSelectionPolicy + from ._models_py3 import UpdateWorkspaceQuotas + from ._models_py3 import UpdateWorkspaceQuotasResult + from ._models_py3 import UriFileDataVersion + from ._models_py3 import UriFileJobInput + from ._models_py3 import UriFileJobOutput + from ._models_py3 import UriFolderDataVersion + from ._models_py3 import UriFolderJobInput + from ._models_py3 import UriFolderJobOutput + from ._models_py3 import Usage + from ._models_py3 import UsageName + from ._models_py3 import UserAccountCredentials + from ._models_py3 import UserAssignedIdentity + from ._models_py3 import UserIdentity + from ._models_py3 import UsernamePasswordAuthTypeWorkspaceConnectionProperties + from ._models_py3 import VirtualMachine + from ._models_py3 import VirtualMachineImage + from ._models_py3 import VirtualMachineSchema + from ._models_py3 import VirtualMachineSchemaProperties + from ._models_py3 import VirtualMachineSecrets + from ._models_py3 import VirtualMachineSecretsSchema + from ._models_py3 import VirtualMachineSize + from ._models_py3 import VirtualMachineSizeListResult + from ._models_py3 import VirtualMachineSshCredentials + from ._models_py3 import Workspace + from ._models_py3 import WorkspaceConnectionManagedIdentity + from ._models_py3 import WorkspaceConnectionPersonalAccessToken + from ._models_py3 import WorkspaceConnectionPropertiesV2 + from ._models_py3 import WorkspaceConnectionPropertiesV2BasicResource + from ._models_py3 import WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult + from ._models_py3 import WorkspaceConnectionSharedAccessSignature + from ._models_py3 import WorkspaceConnectionUsernamePassword + from ._models_py3 import WorkspaceListResult + from ._models_py3 import WorkspaceUpdateParameters +except (SyntaxError, ImportError): + from ._models import AKS # type: ignore + from ._models import AKSSchema # type: ignore + from ._models import AKSSchemaProperties # type: ignore + from ._models import AccountKeyDatastoreCredentials # type: ignore + from ._models import AccountKeyDatastoreSecrets # type: ignore + from ._models import AksComputeSecrets # type: ignore + from ._models import AksComputeSecretsProperties # type: ignore + from ._models import AksNetworkingConfiguration # type: ignore + from ._models import AmlCompute # type: ignore + from ._models import AmlComputeNodeInformation # type: ignore + from ._models import AmlComputeNodesInformation # type: ignore + from ._models import AmlComputeProperties # type: ignore + from ._models import AmlComputeSchema # type: ignore + from ._models import AmlOperation # type: ignore + from ._models import AmlOperationDisplay # type: ignore + from ._models import AmlOperationListResult # type: ignore + from ._models import AmlToken # type: ignore + from ._models import AmlUserFeature # type: ignore + from ._models import AssetBase # type: ignore + from ._models import AssetContainer # type: ignore + from ._models import AssetJobInput # type: ignore + from ._models import AssetJobOutput # type: ignore + from ._models import AssetReferenceBase # type: ignore + from ._models import AssignedUser # type: ignore + from ._models import AutoPauseProperties # type: ignore + from ._models import AutoScaleProperties # type: ignore + from ._models import AzureBlobDatastore # type: ignore + from ._models import AzureDataLakeGen1Datastore # type: ignore + from ._models import AzureDataLakeGen2Datastore # type: ignore + from ._models import AzureFileDatastore # type: ignore + from ._models import BanditPolicy # type: ignore + from ._models import BatchDeploymentData # type: ignore + from ._models import BatchDeploymentDetails # type: ignore + from ._models import BatchDeploymentTrackedResourceArmPaginatedResult # type: ignore + from ._models import BatchEndpointData # type: ignore + from ._models import BatchEndpointDefaults # type: ignore + from ._models import BatchEndpointDetails # type: ignore + from ._models import BatchEndpointTrackedResourceArmPaginatedResult # type: ignore + from ._models import BatchRetrySettings # type: ignore + from ._models import BayesianSamplingAlgorithm # type: ignore + from ._models import BuildContext # type: ignore + from ._models import CertificateDatastoreCredentials # type: ignore + from ._models import CertificateDatastoreSecrets # type: ignore + from ._models import ClusterUpdateParameters # type: ignore + from ._models import CodeConfiguration # type: ignore + from ._models import CodeContainerData # type: ignore + from ._models import CodeContainerDetails # type: ignore + from ._models import CodeContainerResourceArmPaginatedResult # type: ignore + from ._models import CodeVersionData # type: ignore + from ._models import CodeVersionDetails # type: ignore + from ._models import CodeVersionResourceArmPaginatedResult # type: ignore + from ._models import CommandJob # type: ignore + from ._models import CommandJobLimits # type: ignore + from ._models import ComponentContainerData # type: ignore + from ._models import ComponentContainerDetails # type: ignore + from ._models import ComponentContainerResourceArmPaginatedResult # type: ignore + from ._models import ComponentVersionData # type: ignore + from ._models import ComponentVersionDetails # type: ignore + from ._models import ComponentVersionResourceArmPaginatedResult # type: ignore + from ._models import Compute # type: ignore + from ._models import ComputeInstance # type: ignore + from ._models import ComputeInstanceApplication # type: ignore + from ._models import ComputeInstanceConnectivityEndpoints # type: ignore + from ._models import ComputeInstanceContainer # type: ignore + from ._models import ComputeInstanceCreatedBy # type: ignore + from ._models import ComputeInstanceDataDisk # type: ignore + from ._models import ComputeInstanceDataMount # type: ignore + from ._models import ComputeInstanceEnvironmentInfo # type: ignore + from ._models import ComputeInstanceLastOperation # type: ignore + from ._models import ComputeInstanceProperties # type: ignore + from ._models import ComputeInstanceSchema # type: ignore + from ._models import ComputeInstanceSshSettings # type: ignore + from ._models import ComputeInstanceVersion # type: ignore + from ._models import ComputeResource # type: ignore + from ._models import ComputeResourceSchema # type: ignore + from ._models import ComputeSchedules # type: ignore + from ._models import ComputeSecrets # type: ignore + from ._models import ComputeStartStopSchedule # type: ignore + from ._models import ContainerResourceRequirements # type: ignore + from ._models import ContainerResourceSettings # type: ignore + from ._models import CosmosDbSettings # type: ignore + from ._models import CronSchedule # type: ignore + from ._models import CustomModelJobInput # type: ignore + from ._models import CustomModelJobOutput # type: ignore + from ._models import DataContainerData # type: ignore + from ._models import DataContainerDetails # type: ignore + from ._models import DataContainerResourceArmPaginatedResult # type: ignore + from ._models import DataFactory # type: ignore + from ._models import DataLakeAnalytics # type: ignore + from ._models import DataLakeAnalyticsSchema # type: ignore + from ._models import DataLakeAnalyticsSchemaProperties # type: ignore + from ._models import DataPathAssetReference # type: ignore + from ._models import DataVersionBaseData # type: ignore + from ._models import DataVersionBaseDetails # type: ignore + from ._models import DataVersionBaseResourceArmPaginatedResult # type: ignore + from ._models import Databricks # type: ignore + from ._models import DatabricksComputeSecrets # type: ignore + from ._models import DatabricksComputeSecretsProperties # type: ignore + from ._models import DatabricksProperties # type: ignore + from ._models import DatabricksSchema # type: ignore + from ._models import DatastoreCredentials # type: ignore + from ._models import DatastoreData # type: ignore + from ._models import DatastoreDetails # type: ignore + from ._models import DatastoreResourceArmPaginatedResult # type: ignore + from ._models import DatastoreSecrets # type: ignore + from ._models import DefaultScaleSettings # type: ignore + from ._models import DeploymentLogs # type: ignore + from ._models import DeploymentLogsRequest # type: ignore + from ._models import DiagnoseRequestProperties # type: ignore + from ._models import DiagnoseResponseResult # type: ignore + from ._models import DiagnoseResponseResultValue # type: ignore + from ._models import DiagnoseResult # type: ignore + from ._models import DiagnoseWorkspaceParameters # type: ignore + from ._models import DistributionConfiguration # type: ignore + from ._models import EarlyTerminationPolicy # type: ignore + from ._models import EncryptionKeyVaultProperties # type: ignore + from ._models import EncryptionProperty # type: ignore + from ._models import EndpointAuthKeys # type: ignore + from ._models import EndpointAuthToken # type: ignore + from ._models import EndpointDeploymentPropertiesBase # type: ignore + from ._models import EndpointPropertiesBase # type: ignore + from ._models import EnvironmentContainerData # type: ignore + from ._models import EnvironmentContainerDetails # type: ignore + from ._models import EnvironmentContainerResourceArmPaginatedResult # type: ignore + from ._models import EnvironmentVersionData # type: ignore + from ._models import EnvironmentVersionDetails # type: ignore + from ._models import EnvironmentVersionResourceArmPaginatedResult # type: ignore + from ._models import ErrorAdditionalInfo # type: ignore + from ._models import ErrorDetail # type: ignore + from ._models import ErrorResponse # type: ignore + from ._models import EstimatedVMPrice # type: ignore + from ._models import EstimatedVMPrices # type: ignore + from ._models import ExternalFQDNResponse # type: ignore + from ._models import FQDNEndpoint # type: ignore + from ._models import FQDNEndpointDetail # type: ignore + from ._models import FQDNEndpoints # type: ignore + from ._models import FQDNEndpointsProperties # type: ignore + from ._models import FlavorData # type: ignore + from ._models import GridSamplingAlgorithm # type: ignore + from ._models import HDInsight # type: ignore + from ._models import HDInsightProperties # type: ignore + from ._models import HDInsightSchema # type: ignore + from ._models import IdAssetReference # type: ignore + from ._models import IdentityConfiguration # type: ignore + from ._models import IdentityForCmk # type: ignore + from ._models import InferenceContainerProperties # type: ignore + from ._models import InstanceTypeSchema # type: ignore + from ._models import InstanceTypeSchemaResources # type: ignore + from ._models import JobBaseData # type: ignore + from ._models import JobBaseDetails # type: ignore + from ._models import JobBaseResourceArmPaginatedResult # type: ignore + from ._models import JobInput # type: ignore + from ._models import JobLimits # type: ignore + from ._models import JobOutput # type: ignore + from ._models import JobService # type: ignore + from ._models import Kubernetes # type: ignore + from ._models import KubernetesOnlineDeployment # type: ignore + from ._models import KubernetesProperties # type: ignore + from ._models import KubernetesSchema # type: ignore + from ._models import ListAmlUserFeatureResult # type: ignore + from ._models import ListNotebookKeysResult # type: ignore + from ._models import ListStorageAccountKeysResult # type: ignore + from ._models import ListUsagesResult # type: ignore + from ._models import ListWorkspaceKeysResult # type: ignore + from ._models import ListWorkspaceQuotas # type: ignore + from ._models import LiteralJobInput # type: ignore + from ._models import MLFlowModelJobInput # type: ignore + from ._models import MLFlowModelJobOutput # type: ignore + from ._models import MLTableData # type: ignore + from ._models import MLTableJobInput # type: ignore + from ._models import MLTableJobOutput # type: ignore + from ._models import ManagedIdentity # type: ignore + from ._models import ManagedIdentityAuthTypeWorkspaceConnectionProperties # type: ignore + from ._models import ManagedOnlineDeployment # type: ignore + from ._models import ManagedServiceIdentity # type: ignore + from ._models import MedianStoppingPolicy # type: ignore + from ._models import ModelContainerData # type: ignore + from ._models import ModelContainerDetails # type: ignore + from ._models import ModelContainerResourceArmPaginatedResult # type: ignore + from ._models import ModelVersionData # type: ignore + from ._models import ModelVersionDetails # type: ignore + from ._models import ModelVersionResourceArmPaginatedResult # type: ignore + from ._models import Mpi # type: ignore + from ._models import NodeStateCounts # type: ignore + from ._models import NoneAuthTypeWorkspaceConnectionProperties # type: ignore + from ._models import NoneDatastoreCredentials # type: ignore + from ._models import NotebookAccessTokenResult # type: ignore + from ._models import NotebookPreparationError # type: ignore + from ._models import NotebookResourceInfo # type: ignore + from ._models import Objective # type: ignore + from ._models import OnlineDeploymentData # type: ignore + from ._models import OnlineDeploymentDetails # type: ignore + from ._models import OnlineDeploymentTrackedResourceArmPaginatedResult # type: ignore + from ._models import OnlineEndpointData # type: ignore + from ._models import OnlineEndpointDetails # type: ignore + from ._models import OnlineEndpointTrackedResourceArmPaginatedResult # type: ignore + from ._models import OnlineRequestSettings # type: ignore + from ._models import OnlineScaleSettings # type: ignore + from ._models import OutputPathAssetReference # type: ignore + from ._models import PATAuthTypeWorkspaceConnectionProperties # type: ignore + from ._models import PaginatedComputeResourcesList # type: ignore + from ._models import PartialAssetReferenceBase # type: ignore + from ._models import PartialBatchDeployment # type: ignore + from ._models import PartialBatchDeploymentPartialTrackedResource # type: ignore + from ._models import PartialBatchEndpoint # type: ignore + from ._models import PartialBatchEndpointPartialTrackedResource # type: ignore + from ._models import PartialBatchRetrySettings # type: ignore + from ._models import PartialCodeConfiguration # type: ignore + from ._models import PartialDataPathAssetReference # type: ignore + from ._models import PartialIdAssetReference # type: ignore + from ._models import PartialKubernetesOnlineDeployment # type: ignore + from ._models import PartialManagedOnlineDeployment # type: ignore + from ._models import PartialManagedServiceIdentity # type: ignore + from ._models import PartialOnlineDeployment # type: ignore + from ._models import PartialOnlineDeploymentPartialTrackedResource # type: ignore + from ._models import PartialOnlineEndpointPartialTrackedResource # type: ignore + from ._models import PartialOutputPathAssetReference # type: ignore + from ._models import PartialSku # type: ignore + from ._models import Password # type: ignore + from ._models import PersonalComputeInstanceSettings # type: ignore + from ._models import PipelineJob # type: ignore + from ._models import PrivateEndpoint # type: ignore + from ._models import PrivateEndpointConnection # type: ignore + from ._models import PrivateEndpointConnectionListResult # type: ignore + from ._models import PrivateLinkResource # type: ignore + from ._models import PrivateLinkResourceListResult # type: ignore + from ._models import PrivateLinkServiceConnectionState # type: ignore + from ._models import ProbeSettings # type: ignore + from ._models import PyTorch # type: ignore + from ._models import QuotaBaseProperties # type: ignore + from ._models import QuotaUpdateParameters # type: ignore + from ._models import RandomSamplingAlgorithm # type: ignore + from ._models import RecurrencePattern # type: ignore + from ._models import RecurrenceSchedule # type: ignore + from ._models import RegenerateEndpointKeysRequest # type: ignore + from ._models import RegistryListCredentialsResult # type: ignore + from ._models import Resource # type: ignore + from ._models import ResourceBase # type: ignore + from ._models import ResourceConfiguration # type: ignore + from ._models import ResourceId # type: ignore + from ._models import ResourceName # type: ignore + from ._models import ResourceQuota # type: ignore + from ._models import Route # type: ignore + from ._models import SASAuthTypeWorkspaceConnectionProperties # type: ignore + from ._models import SamplingAlgorithm # type: ignore + from ._models import SasDatastoreCredentials # type: ignore + from ._models import SasDatastoreSecrets # type: ignore + from ._models import ScaleSettings # type: ignore + from ._models import ScaleSettingsInformation # type: ignore + from ._models import ScheduleBase # type: ignore + from ._models import ScriptReference # type: ignore + from ._models import ScriptsToExecute # type: ignore + from ._models import ServiceManagedResourcesSettings # type: ignore + from ._models import ServicePrincipalDatastoreCredentials # type: ignore + from ._models import ServicePrincipalDatastoreSecrets # type: ignore + from ._models import SetupScripts # type: ignore + from ._models import SharedPrivateLinkResource # type: ignore + from ._models import Sku # type: ignore + from ._models import SkuCapacity # type: ignore + from ._models import SkuResource # type: ignore + from ._models import SkuResourceArmPaginatedResult # type: ignore + from ._models import SkuSetting # type: ignore + from ._models import SslConfiguration # type: ignore + from ._models import SweepJob # type: ignore + from ._models import SweepJobLimits # type: ignore + from ._models import SynapseSpark # type: ignore + from ._models import SynapseSparkProperties # type: ignore + from ._models import SystemData # type: ignore + from ._models import SystemService # type: ignore + from ._models import TargetUtilizationScaleSettings # type: ignore + from ._models import TensorFlow # type: ignore + from ._models import TrackedResource # type: ignore + from ._models import TrialComponent # type: ignore + from ._models import TritonModelJobInput # type: ignore + from ._models import TritonModelJobOutput # type: ignore + from ._models import TruncationSelectionPolicy # type: ignore + from ._models import UpdateWorkspaceQuotas # type: ignore + from ._models import UpdateWorkspaceQuotasResult # type: ignore + from ._models import UriFileDataVersion # type: ignore + from ._models import UriFileJobInput # type: ignore + from ._models import UriFileJobOutput # type: ignore + from ._models import UriFolderDataVersion # type: ignore + from ._models import UriFolderJobInput # type: ignore + from ._models import UriFolderJobOutput # type: ignore + from ._models import Usage # type: ignore + from ._models import UsageName # type: ignore + from ._models import UserAccountCredentials # type: ignore + from ._models import UserAssignedIdentity # type: ignore + from ._models import UserIdentity # type: ignore + from ._models import UsernamePasswordAuthTypeWorkspaceConnectionProperties # type: ignore + from ._models import VirtualMachine # type: ignore + from ._models import VirtualMachineImage # type: ignore + from ._models import VirtualMachineSchema # type: ignore + from ._models import VirtualMachineSchemaProperties # type: ignore + from ._models import VirtualMachineSecrets # type: ignore + from ._models import VirtualMachineSecretsSchema # type: ignore + from ._models import VirtualMachineSize # type: ignore + from ._models import VirtualMachineSizeListResult # type: ignore + from ._models import VirtualMachineSshCredentials # type: ignore + from ._models import Workspace # type: ignore + from ._models import WorkspaceConnectionManagedIdentity # type: ignore + from ._models import WorkspaceConnectionPersonalAccessToken # type: ignore + from ._models import WorkspaceConnectionPropertiesV2 # type: ignore + from ._models import WorkspaceConnectionPropertiesV2BasicResource # type: ignore + from ._models import WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult # type: ignore + from ._models import WorkspaceConnectionSharedAccessSignature # type: ignore + from ._models import WorkspaceConnectionUsernamePassword # type: ignore + from ._models import WorkspaceListResult # type: ignore + from ._models import WorkspaceUpdateParameters # type: ignore + +from ._azure_machine_learning_workspaces_enums import ( + AllocationState, + ApplicationSharingPolicy, + Autosave, + BatchLoggingLevel, + BatchOutputAction, + BillingCurrency, + Caching, + ClusterPurpose, + ComputeInstanceAuthorizationType, + ComputeInstanceState, + ComputePowerAction, + ComputeType, + ConnectionAuthType, + ConnectionCategory, + ContainerType, + CreatedByType, + CredentialsType, + DataType, + DatastoreType, + DeploymentProvisioningState, + DiagnoseResultLevel, + DistributionType, + EarlyTerminationPolicyType, + EncryptionStatus, + EndpointAuthMode, + EndpointComputeType, + EndpointProvisioningState, + EnvironmentType, + Goal, + IdentityConfigurationType, + InputDeliveryMode, + JobInputType, + JobLimitsType, + JobOutputType, + JobStatus, + JobType, + KeyType, + ListViewType, + LoadBalancerType, + ManagedServiceIdentityType, + MountAction, + MountState, + Network, + NodeState, + OperatingSystemType, + OperationName, + OperationStatus, + OperationTrigger, + OrderString, + OsType, + OutputDeliveryMode, + PrivateEndpointConnectionProvisioningState, + PrivateEndpointServiceConnectionStatus, + ProvisioningState, + ProvisioningStatus, + PublicNetworkAccess, + QuotaUnit, + RandomSamplingAlgorithmRule, + RecurrenceFrequency, + ReferenceType, + RemoteLoginPortPublicAccess, + SamplingAlgorithmType, + ScaleType, + ScheduleStatus, + ScheduleType, + SecretsType, + ServiceDataAccessAuthIdentity, + SkuScaleType, + SkuTier, + SourceType, + SshPublicAccess, + SslConfigurationStatus, + Status, + StorageAccountType, + UnderlyingResourceAction, + UnitOfMeasure, + UsageUnit, + VMPriceOSType, + VMTier, + ValueFormat, + VmPriority, + Weekday, +) + +__all__ = [ + 'AKS', + 'AKSSchema', + 'AKSSchemaProperties', + 'AccountKeyDatastoreCredentials', + 'AccountKeyDatastoreSecrets', + 'AksComputeSecrets', + 'AksComputeSecretsProperties', + 'AksNetworkingConfiguration', + 'AmlCompute', + 'AmlComputeNodeInformation', + 'AmlComputeNodesInformation', + 'AmlComputeProperties', + 'AmlComputeSchema', + 'AmlOperation', + 'AmlOperationDisplay', + 'AmlOperationListResult', + 'AmlToken', + 'AmlUserFeature', + 'AssetBase', + 'AssetContainer', + 'AssetJobInput', + 'AssetJobOutput', + 'AssetReferenceBase', + 'AssignedUser', + 'AutoPauseProperties', + 'AutoScaleProperties', + 'AzureBlobDatastore', + 'AzureDataLakeGen1Datastore', + 'AzureDataLakeGen2Datastore', + 'AzureFileDatastore', + 'BanditPolicy', + 'BatchDeploymentData', + 'BatchDeploymentDetails', + 'BatchDeploymentTrackedResourceArmPaginatedResult', + 'BatchEndpointData', + 'BatchEndpointDefaults', + 'BatchEndpointDetails', + 'BatchEndpointTrackedResourceArmPaginatedResult', + 'BatchRetrySettings', + 'BayesianSamplingAlgorithm', + 'BuildContext', + 'CertificateDatastoreCredentials', + 'CertificateDatastoreSecrets', + 'ClusterUpdateParameters', + 'CodeConfiguration', + 'CodeContainerData', + 'CodeContainerDetails', + 'CodeContainerResourceArmPaginatedResult', + 'CodeVersionData', + 'CodeVersionDetails', + 'CodeVersionResourceArmPaginatedResult', + 'CommandJob', + 'CommandJobLimits', + 'ComponentContainerData', + 'ComponentContainerDetails', + 'ComponentContainerResourceArmPaginatedResult', + 'ComponentVersionData', + 'ComponentVersionDetails', + 'ComponentVersionResourceArmPaginatedResult', + 'Compute', + 'ComputeInstance', + 'ComputeInstanceApplication', + 'ComputeInstanceConnectivityEndpoints', + 'ComputeInstanceContainer', + 'ComputeInstanceCreatedBy', + 'ComputeInstanceDataDisk', + 'ComputeInstanceDataMount', + 'ComputeInstanceEnvironmentInfo', + 'ComputeInstanceLastOperation', + 'ComputeInstanceProperties', + 'ComputeInstanceSchema', + 'ComputeInstanceSshSettings', + 'ComputeInstanceVersion', + 'ComputeResource', + 'ComputeResourceSchema', + 'ComputeSchedules', + 'ComputeSecrets', + 'ComputeStartStopSchedule', + 'ContainerResourceRequirements', + 'ContainerResourceSettings', + 'CosmosDbSettings', + 'CronSchedule', + 'CustomModelJobInput', + 'CustomModelJobOutput', + 'DataContainerData', + 'DataContainerDetails', + 'DataContainerResourceArmPaginatedResult', + 'DataFactory', + 'DataLakeAnalytics', + 'DataLakeAnalyticsSchema', + 'DataLakeAnalyticsSchemaProperties', + 'DataPathAssetReference', + 'DataVersionBaseData', + 'DataVersionBaseDetails', + 'DataVersionBaseResourceArmPaginatedResult', + 'Databricks', + 'DatabricksComputeSecrets', + 'DatabricksComputeSecretsProperties', + 'DatabricksProperties', + 'DatabricksSchema', + 'DatastoreCredentials', + 'DatastoreData', + 'DatastoreDetails', + 'DatastoreResourceArmPaginatedResult', + 'DatastoreSecrets', + 'DefaultScaleSettings', + 'DeploymentLogs', + 'DeploymentLogsRequest', + 'DiagnoseRequestProperties', + 'DiagnoseResponseResult', + 'DiagnoseResponseResultValue', + 'DiagnoseResult', + 'DiagnoseWorkspaceParameters', + 'DistributionConfiguration', + 'EarlyTerminationPolicy', + 'EncryptionKeyVaultProperties', + 'EncryptionProperty', + 'EndpointAuthKeys', + 'EndpointAuthToken', + 'EndpointDeploymentPropertiesBase', + 'EndpointPropertiesBase', + 'EnvironmentContainerData', + 'EnvironmentContainerDetails', + 'EnvironmentContainerResourceArmPaginatedResult', + 'EnvironmentVersionData', + 'EnvironmentVersionDetails', + 'EnvironmentVersionResourceArmPaginatedResult', + 'ErrorAdditionalInfo', + 'ErrorDetail', + 'ErrorResponse', + 'EstimatedVMPrice', + 'EstimatedVMPrices', + 'ExternalFQDNResponse', + 'FQDNEndpoint', + 'FQDNEndpointDetail', + 'FQDNEndpoints', + 'FQDNEndpointsProperties', + 'FlavorData', + 'GridSamplingAlgorithm', + 'HDInsight', + 'HDInsightProperties', + 'HDInsightSchema', + 'IdAssetReference', + 'IdentityConfiguration', + 'IdentityForCmk', + 'InferenceContainerProperties', + 'InstanceTypeSchema', + 'InstanceTypeSchemaResources', + 'JobBaseData', + 'JobBaseDetails', + 'JobBaseResourceArmPaginatedResult', + 'JobInput', + 'JobLimits', + 'JobOutput', + 'JobService', + 'Kubernetes', + 'KubernetesOnlineDeployment', + 'KubernetesProperties', + 'KubernetesSchema', + 'ListAmlUserFeatureResult', + 'ListNotebookKeysResult', + 'ListStorageAccountKeysResult', + 'ListUsagesResult', + 'ListWorkspaceKeysResult', + 'ListWorkspaceQuotas', + 'LiteralJobInput', + 'MLFlowModelJobInput', + 'MLFlowModelJobOutput', + 'MLTableData', + 'MLTableJobInput', + 'MLTableJobOutput', + 'ManagedIdentity', + 'ManagedIdentityAuthTypeWorkspaceConnectionProperties', + 'ManagedOnlineDeployment', + 'ManagedServiceIdentity', + 'MedianStoppingPolicy', + 'ModelContainerData', + 'ModelContainerDetails', + 'ModelContainerResourceArmPaginatedResult', + 'ModelVersionData', + 'ModelVersionDetails', + 'ModelVersionResourceArmPaginatedResult', + 'Mpi', + 'NodeStateCounts', + 'NoneAuthTypeWorkspaceConnectionProperties', + 'NoneDatastoreCredentials', + 'NotebookAccessTokenResult', + 'NotebookPreparationError', + 'NotebookResourceInfo', + 'Objective', + 'OnlineDeploymentData', + 'OnlineDeploymentDetails', + 'OnlineDeploymentTrackedResourceArmPaginatedResult', + 'OnlineEndpointData', + 'OnlineEndpointDetails', + 'OnlineEndpointTrackedResourceArmPaginatedResult', + 'OnlineRequestSettings', + 'OnlineScaleSettings', + 'OutputPathAssetReference', + 'PATAuthTypeWorkspaceConnectionProperties', + 'PaginatedComputeResourcesList', + 'PartialAssetReferenceBase', + 'PartialBatchDeployment', + 'PartialBatchDeploymentPartialTrackedResource', + 'PartialBatchEndpoint', + 'PartialBatchEndpointPartialTrackedResource', + 'PartialBatchRetrySettings', + 'PartialCodeConfiguration', + 'PartialDataPathAssetReference', + 'PartialIdAssetReference', + 'PartialKubernetesOnlineDeployment', + 'PartialManagedOnlineDeployment', + 'PartialManagedServiceIdentity', + 'PartialOnlineDeployment', + 'PartialOnlineDeploymentPartialTrackedResource', + 'PartialOnlineEndpointPartialTrackedResource', + 'PartialOutputPathAssetReference', + 'PartialSku', + 'Password', + 'PersonalComputeInstanceSettings', + 'PipelineJob', + 'PrivateEndpoint', + 'PrivateEndpointConnection', + 'PrivateEndpointConnectionListResult', + 'PrivateLinkResource', + 'PrivateLinkResourceListResult', + 'PrivateLinkServiceConnectionState', + 'ProbeSettings', + 'PyTorch', + 'QuotaBaseProperties', + 'QuotaUpdateParameters', + 'RandomSamplingAlgorithm', + 'RecurrencePattern', + 'RecurrenceSchedule', + 'RegenerateEndpointKeysRequest', + 'RegistryListCredentialsResult', + 'Resource', + 'ResourceBase', + 'ResourceConfiguration', + 'ResourceId', + 'ResourceName', + 'ResourceQuota', + 'Route', + 'SASAuthTypeWorkspaceConnectionProperties', + 'SamplingAlgorithm', + 'SasDatastoreCredentials', + 'SasDatastoreSecrets', + 'ScaleSettings', + 'ScaleSettingsInformation', + 'ScheduleBase', + 'ScriptReference', + 'ScriptsToExecute', + 'ServiceManagedResourcesSettings', + 'ServicePrincipalDatastoreCredentials', + 'ServicePrincipalDatastoreSecrets', + 'SetupScripts', + 'SharedPrivateLinkResource', + 'Sku', + 'SkuCapacity', + 'SkuResource', + 'SkuResourceArmPaginatedResult', + 'SkuSetting', + 'SslConfiguration', + 'SweepJob', + 'SweepJobLimits', + 'SynapseSpark', + 'SynapseSparkProperties', + 'SystemData', + 'SystemService', + 'TargetUtilizationScaleSettings', + 'TensorFlow', + 'TrackedResource', + 'TrialComponent', + 'TritonModelJobInput', + 'TritonModelJobOutput', + 'TruncationSelectionPolicy', + 'UpdateWorkspaceQuotas', + 'UpdateWorkspaceQuotasResult', + 'UriFileDataVersion', + 'UriFileJobInput', + 'UriFileJobOutput', + 'UriFolderDataVersion', + 'UriFolderJobInput', + 'UriFolderJobOutput', + 'Usage', + 'UsageName', + 'UserAccountCredentials', + 'UserAssignedIdentity', + 'UserIdentity', + 'UsernamePasswordAuthTypeWorkspaceConnectionProperties', + 'VirtualMachine', + 'VirtualMachineImage', + 'VirtualMachineSchema', + 'VirtualMachineSchemaProperties', + 'VirtualMachineSecrets', + 'VirtualMachineSecretsSchema', + 'VirtualMachineSize', + 'VirtualMachineSizeListResult', + 'VirtualMachineSshCredentials', + 'Workspace', + 'WorkspaceConnectionManagedIdentity', + 'WorkspaceConnectionPersonalAccessToken', + 'WorkspaceConnectionPropertiesV2', + 'WorkspaceConnectionPropertiesV2BasicResource', + 'WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult', + 'WorkspaceConnectionSharedAccessSignature', + 'WorkspaceConnectionUsernamePassword', + 'WorkspaceListResult', + 'WorkspaceUpdateParameters', + 'AllocationState', + 'ApplicationSharingPolicy', + 'Autosave', + 'BatchLoggingLevel', + 'BatchOutputAction', + 'BillingCurrency', + 'Caching', + 'ClusterPurpose', + 'ComputeInstanceAuthorizationType', + 'ComputeInstanceState', + 'ComputePowerAction', + 'ComputeType', + 'ConnectionAuthType', + 'ConnectionCategory', + 'ContainerType', + 'CreatedByType', + 'CredentialsType', + 'DataType', + 'DatastoreType', + 'DeploymentProvisioningState', + 'DiagnoseResultLevel', + 'DistributionType', + 'EarlyTerminationPolicyType', + 'EncryptionStatus', + 'EndpointAuthMode', + 'EndpointComputeType', + 'EndpointProvisioningState', + 'EnvironmentType', + 'Goal', + 'IdentityConfigurationType', + 'InputDeliveryMode', + 'JobInputType', + 'JobLimitsType', + 'JobOutputType', + 'JobStatus', + 'JobType', + 'KeyType', + 'ListViewType', + 'LoadBalancerType', + 'ManagedServiceIdentityType', + 'MountAction', + 'MountState', + 'Network', + 'NodeState', + 'OperatingSystemType', + 'OperationName', + 'OperationStatus', + 'OperationTrigger', + 'OrderString', + 'OsType', + 'OutputDeliveryMode', + 'PrivateEndpointConnectionProvisioningState', + 'PrivateEndpointServiceConnectionStatus', + 'ProvisioningState', + 'ProvisioningStatus', + 'PublicNetworkAccess', + 'QuotaUnit', + 'RandomSamplingAlgorithmRule', + 'RecurrenceFrequency', + 'ReferenceType', + 'RemoteLoginPortPublicAccess', + 'SamplingAlgorithmType', + 'ScaleType', + 'ScheduleStatus', + 'ScheduleType', + 'SecretsType', + 'ServiceDataAccessAuthIdentity', + 'SkuScaleType', + 'SkuTier', + 'SourceType', + 'SshPublicAccess', + 'SslConfigurationStatus', + 'Status', + 'StorageAccountType', + 'UnderlyingResourceAction', + 'UnitOfMeasure', + 'UsageUnit', + 'VMPriceOSType', + 'VMTier', + 'ValueFormat', + 'VmPriority', + 'Weekday', +] diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/models/_azure_machine_learning_workspaces_enums.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/models/_azure_machine_learning_workspaces_enums.py new file mode 100644 index 00000000..3e85b7aa --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/models/_azure_machine_learning_workspaces_enums.py @@ -0,0 +1,755 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum +from azure.core import CaseInsensitiveEnumMeta + + +class AllocationState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Allocation state of the compute. Possible values are: steady - Indicates that the compute is + not resizing. There are no changes to the number of compute nodes in the compute in progress. A + compute enters this state when it is created and when no operations are being performed on the + compute to change the number of compute nodes. resizing - Indicates that the compute is + resizing; that is, compute nodes are being added to or removed from the compute. + """ + + STEADY = "Steady" + RESIZING = "Resizing" + +class ApplicationSharingPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Policy for sharing applications on this compute instance among users of parent workspace. If + Personal, only the creator can access applications on this compute instance. When Shared, any + workspace user can access applications on this instance depending on his/her assigned role. + """ + + PERSONAL = "Personal" + SHARED = "Shared" + +class Autosave(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Auto save settings. + """ + + NONE = "None" + LOCAL = "Local" + REMOTE = "Remote" + +class BatchLoggingLevel(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Log verbosity for batch inferencing. + Increasing verbosity order for logging is : Warning, Info and Debug. + The default value is Info. + """ + + INFO = "Info" + WARNING = "Warning" + DEBUG = "Debug" + +class BatchOutputAction(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Enum to determine how batch inferencing will handle output + """ + + SUMMARY_ONLY = "SummaryOnly" + APPEND_ROW = "AppendRow" + +class BillingCurrency(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Three lettered code specifying the currency of the VM price. Example: USD + """ + + USD = "USD" + +class Caching(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Caching type of Data Disk. + """ + + NONE = "None" + READ_ONLY = "ReadOnly" + READ_WRITE = "ReadWrite" + +class ClusterPurpose(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Intended usage of the cluster + """ + + FAST_PROD = "FastProd" + DENSE_PROD = "DenseProd" + DEV_TEST = "DevTest" + +class ComputeInstanceAuthorizationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The Compute Instance Authorization type. Available values are personal (default). + """ + + PERSONAL = "personal" + +class ComputeInstanceState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Current state of an ComputeInstance. + """ + + CREATING = "Creating" + CREATE_FAILED = "CreateFailed" + DELETING = "Deleting" + RUNNING = "Running" + RESTARTING = "Restarting" + JOB_RUNNING = "JobRunning" + SETTING_UP = "SettingUp" + SETUP_FAILED = "SetupFailed" + STARTING = "Starting" + STOPPED = "Stopped" + STOPPING = "Stopping" + USER_SETTING_UP = "UserSettingUp" + USER_SETUP_FAILED = "UserSetupFailed" + UNKNOWN = "Unknown" + UNUSABLE = "Unusable" + +class ComputePowerAction(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The compute power action. + """ + + START = "Start" + STOP = "Stop" + +class ComputeType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of compute + """ + + AKS = "AKS" + KUBERNETES = "Kubernetes" + AML_COMPUTE = "AmlCompute" + COMPUTE_INSTANCE = "ComputeInstance" + DATA_FACTORY = "DataFactory" + VIRTUAL_MACHINE = "VirtualMachine" + HD_INSIGHT = "HDInsight" + DATABRICKS = "Databricks" + DATA_LAKE_ANALYTICS = "DataLakeAnalytics" + SYNAPSE_SPARK = "SynapseSpark" + +class ConnectionAuthType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Authentication type of the connection target + """ + + PAT = "PAT" + MANAGED_IDENTITY = "ManagedIdentity" + USERNAME_PASSWORD = "UsernamePassword" + NONE = "None" + SAS = "SAS" + +class ConnectionCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Category of the connection + """ + + PYTHON_FEED = "PythonFeed" + CONTAINER_REGISTRY = "ContainerRegistry" + GIT = "Git" + +class ContainerType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + + STORAGE_INITIALIZER = "StorageInitializer" + INFERENCE_SERVER = "InferenceServer" + +class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of identity that created the resource. + """ + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + +class CredentialsType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Enum to determine the datastore credentials type. + """ + + ACCOUNT_KEY = "AccountKey" + CERTIFICATE = "Certificate" + NONE = "None" + SAS = "Sas" + SERVICE_PRINCIPAL = "ServicePrincipal" + +class DatastoreType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Enum to determine the datastore contents type. + """ + + AZURE_BLOB = "AzureBlob" + AZURE_DATA_LAKE_GEN1 = "AzureDataLakeGen1" + AZURE_DATA_LAKE_GEN2 = "AzureDataLakeGen2" + AZURE_FILE = "AzureFile" + +class DataType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Enum to determine the type of data. + """ + + URI_FILE = "uri_file" + URI_FOLDER = "uri_folder" + MLTABLE = "mltable" + +class DeploymentProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Possible values for DeploymentProvisioningState. + """ + + CREATING = "Creating" + DELETING = "Deleting" + SCALING = "Scaling" + UPDATING = "Updating" + SUCCEEDED = "Succeeded" + FAILED = "Failed" + CANCELED = "Canceled" + +class DiagnoseResultLevel(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Level of workspace setup error + """ + + WARNING = "Warning" + ERROR = "Error" + INFORMATION = "Information" + +class DistributionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Enum to determine the job distribution type. + """ + + PY_TORCH = "PyTorch" + TENSOR_FLOW = "TensorFlow" + MPI = "Mpi" + +class EarlyTerminationPolicyType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + + BANDIT = "Bandit" + MEDIAN_STOPPING = "MedianStopping" + TRUNCATION_SELECTION = "TruncationSelection" + +class EncryptionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Indicates whether or not the encryption is enabled for the workspace. + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" + +class EndpointAuthMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Enum to determine endpoint authentication mode. + """ + + AML_TOKEN = "AMLToken" + KEY = "Key" + AAD_TOKEN = "AADToken" + +class EndpointComputeType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Enum to determine endpoint compute type. + """ + + MANAGED = "Managed" + KUBERNETES = "Kubernetes" + AZURE_ML_COMPUTE = "AzureMLCompute" + +class EndpointProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """State of endpoint provisioning. + """ + + CREATING = "Creating" + DELETING = "Deleting" + SUCCEEDED = "Succeeded" + FAILED = "Failed" + UPDATING = "Updating" + CANCELED = "Canceled" + +class EnvironmentType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Environment type is either user created or curated by Azure ML service + """ + + CURATED = "Curated" + USER_CREATED = "UserCreated" + +class Goal(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Defines supported metric goals for hyperparameter tuning + """ + + MINIMIZE = "Minimize" + MAXIMIZE = "Maximize" + +class IdentityConfigurationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Enum to determine identity framework. + """ + + MANAGED = "Managed" + AML_TOKEN = "AMLToken" + USER_IDENTITY = "UserIdentity" + +class InputDeliveryMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Enum to determine the input data delivery mode. + """ + + READ_ONLY_MOUNT = "ReadOnlyMount" + READ_WRITE_MOUNT = "ReadWriteMount" + DOWNLOAD = "Download" + DIRECT = "Direct" + EVAL_MOUNT = "EvalMount" + EVAL_DOWNLOAD = "EvalDownload" + +class JobInputType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Enum to determine the Job Input Type. + """ + + LITERAL = "literal" + URI_FILE = "uri_file" + URI_FOLDER = "uri_folder" + MLTABLE = "mltable" + CUSTOM_MODEL = "custom_model" + MLFLOW_MODEL = "mlflow_model" + TRITON_MODEL = "triton_model" + +class JobLimitsType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + + COMMAND = "Command" + SWEEP = "Sweep" + +class JobOutputType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Enum to determine the Job Output Type. + """ + + URI_FILE = "uri_file" + URI_FOLDER = "uri_folder" + MLTABLE = "mltable" + CUSTOM_MODEL = "custom_model" + MLFLOW_MODEL = "mlflow_model" + TRITON_MODEL = "triton_model" + +class JobStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The status of a job. + """ + + #: Run hasn't started yet. + NOT_STARTED = "NotStarted" + #: Run has started. The user has a run ID. + STARTING = "Starting" + #: (Not used currently) It will be used if ES is creating the compute target. + PROVISIONING = "Provisioning" + #: The run environment is being prepared. + PREPARING = "Preparing" + #: The job is queued in the compute target. For example, in BatchAI the job is in queued state, + #: while waiting for all required nodes to be ready. + QUEUED = "Queued" + #: The job started to run in the compute target. + RUNNING = "Running" + #: Job is completed in the target. It is in output collection state now. + FINALIZING = "Finalizing" + #: Cancellation has been requested for the job. + CANCEL_REQUESTED = "CancelRequested" + #: Job completed successfully. This reflects that both the job itself and output collection states + #: completed successfully. + COMPLETED = "Completed" + #: Job failed. + FAILED = "Failed" + #: Following cancellation request, the job is now successfully canceled. + CANCELED = "Canceled" + #: When heartbeat is enabled, if the run isn't updating any information to RunHistory then the run + #: goes to NotResponding state. + #: NotResponding is the only state that is exempt from strict transition orders. A run can go from + #: NotResponding to any of the previous states. + NOT_RESPONDING = "NotResponding" + #: The job is paused by users. Some adjustment to labeling jobs can be made only in paused state. + PAUSED = "Paused" + #: Default job status if not mapped to all other statuses. + UNKNOWN = "Unknown" + +class JobType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Enum to determine the type of job. + """ + + COMMAND = "Command" + SWEEP = "Sweep" + PIPELINE = "Pipeline" + +class KeyType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + + PRIMARY = "Primary" + SECONDARY = "Secondary" + +class ListViewType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + + ACTIVE_ONLY = "ActiveOnly" + ARCHIVED_ONLY = "ArchivedOnly" + ALL = "All" + +class LoadBalancerType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Load Balancer Type + """ + + PUBLIC_IP = "PublicIp" + INTERNAL_LOAD_BALANCER = "InternalLoadBalancer" + +class ManagedServiceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Type of managed service identity (where both SystemAssigned and UserAssigned types are + allowed). + """ + + NONE = "None" + SYSTEM_ASSIGNED = "SystemAssigned" + USER_ASSIGNED = "UserAssigned" + SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned,UserAssigned" + +class MountAction(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Mount Action. + """ + + MOUNT = "Mount" + UNMOUNT = "Unmount" + +class MountState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Mount state. + """ + + MOUNT_REQUESTED = "MountRequested" + MOUNTED = "Mounted" + MOUNT_FAILED = "MountFailed" + UNMOUNT_REQUESTED = "UnmountRequested" + UNMOUNT_FAILED = "UnmountFailed" + UNMOUNTED = "Unmounted" + +class Network(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """network of this container. + """ + + BRIDGE = "Bridge" + HOST = "Host" + +class NodeState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """State of the compute node. Values are idle, running, preparing, unusable, leaving and + preempted. + """ + + IDLE = "idle" + RUNNING = "running" + PREPARING = "preparing" + UNUSABLE = "unusable" + LEAVING = "leaving" + PREEMPTED = "preempted" + +class OperatingSystemType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of operating system. + """ + + LINUX = "Linux" + WINDOWS = "Windows" + +class OperationName(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Name of the last operation. + """ + + CREATE = "Create" + START = "Start" + STOP = "Stop" + RESTART = "Restart" + REIMAGE = "Reimage" + DELETE = "Delete" + +class OperationStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Operation status. + """ + + IN_PROGRESS = "InProgress" + SUCCEEDED = "Succeeded" + CREATE_FAILED = "CreateFailed" + START_FAILED = "StartFailed" + STOP_FAILED = "StopFailed" + RESTART_FAILED = "RestartFailed" + REIMAGE_FAILED = "ReimageFailed" + DELETE_FAILED = "DeleteFailed" + +class OperationTrigger(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Trigger of operation. + """ + + USER = "User" + SCHEDULE = "Schedule" + IDLE_SHUTDOWN = "IdleShutdown" + +class OrderString(str, Enum, metaclass=CaseInsensitiveEnumMeta): + + CREATED_AT_DESC = "CreatedAtDesc" + CREATED_AT_ASC = "CreatedAtAsc" + UPDATED_AT_DESC = "UpdatedAtDesc" + UPDATED_AT_ASC = "UpdatedAtAsc" + +class OsType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Compute OS Type + """ + + LINUX = "Linux" + WINDOWS = "Windows" + +class OutputDeliveryMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Output data delivery mode enums. + """ + + READ_WRITE_MOUNT = "ReadWriteMount" + UPLOAD = "Upload" + +class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The current provisioning state. + """ + + SUCCEEDED = "Succeeded" + CREATING = "Creating" + DELETING = "Deleting" + FAILED = "Failed" + +class PrivateEndpointServiceConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The private endpoint connection status. + """ + + PENDING = "Pending" + APPROVED = "Approved" + REJECTED = "Rejected" + DISCONNECTED = "Disconnected" + TIMEOUT = "Timeout" + +class ProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The current deployment state of workspace resource. The provisioningState is to indicate states + for resource provisioning. + """ + + UNKNOWN = "Unknown" + UPDATING = "Updating" + CREATING = "Creating" + DELETING = "Deleting" + SUCCEEDED = "Succeeded" + FAILED = "Failed" + CANCELED = "Canceled" + +class ProvisioningStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The current deployment state of schedule. + """ + + COMPLETED = "Completed" + PROVISIONING = "Provisioning" + FAILED = "Failed" + +class PublicNetworkAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Whether requests from Public Network are allowed. + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" + +class QuotaUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """An enum describing the unit of quota measurement. + """ + + COUNT = "Count" + +class RandomSamplingAlgorithmRule(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The specific type of random algorithm + """ + + RANDOM = "Random" + SOBOL = "Sobol" + +class RecurrenceFrequency(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Enum to describe the frequency of a recurrence schedule + """ + + #: Minute frequency. + MINUTE = "Minute" + #: Hour frequency. + HOUR = "Hour" + #: Day frequency. + DAY = "Day" + #: Week frequency. + WEEK = "Week" + #: Month frequency. + MONTH = "Month" + +class ReferenceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Enum to determine which reference method to use for an asset. + """ + + ID = "Id" + DATA_PATH = "DataPath" + OUTPUT_PATH = "OutputPath" + +class RemoteLoginPortPublicAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh + port is closed on all nodes of the cluster. Enabled - Indicates that the public ssh port is + open on all nodes of the cluster. NotSpecified - Indicates that the public ssh port is closed + on all nodes of the cluster if VNet is defined, else is open all public nodes. It can be + default only during cluster creation time, after creation it will be either enabled or + disabled. + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" + NOT_SPECIFIED = "NotSpecified" + +class SamplingAlgorithmType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + + GRID = "Grid" + RANDOM = "Random" + BAYESIAN = "Bayesian" + +class ScaleType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + + DEFAULT = "Default" + TARGET_UTILIZATION = "TargetUtilization" + +class ScheduleStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Enum to describe status of schedule + """ + + #: Schedule is enabled. + ENABLED = "Enabled" + #: Schedule is disabled. + DISABLED = "Disabled" + +class ScheduleType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Enum to describe type of schedule + """ + + #: Cron schedule type. + CRON = "Cron" + #: Recurrence schedule type. + RECURRENCE = "Recurrence" + +class SecretsType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Enum to determine the datastore secrets type. + """ + + ACCOUNT_KEY = "AccountKey" + CERTIFICATE = "Certificate" + SAS = "Sas" + SERVICE_PRINCIPAL = "ServicePrincipal" + +class ServiceDataAccessAuthIdentity(str, Enum, metaclass=CaseInsensitiveEnumMeta): + + #: Do not use any identity for service data access. + NONE = "None" + #: Use the system assigned managed identity of the Workspace to authenticate service data access. + WORKSPACE_SYSTEM_ASSIGNED_IDENTITY = "WorkspaceSystemAssignedIdentity" + #: Use the user assigned managed identity of the Workspace to authenticate service data access. + WORKSPACE_USER_ASSIGNED_IDENTITY = "WorkspaceUserAssignedIdentity" + +class SkuScaleType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """TODO - SKU scale type + """ + + AUTOMATIC = "Automatic" + MANUAL = "Manual" + NONE = "None" + +class SkuTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """This field is required to be implemented by the Resource Provider if the service has more than + one tier, but is not required on a PUT. + """ + + FREE = "Free" + BASIC = "Basic" + STANDARD = "Standard" + PREMIUM = "Premium" + +class SourceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Data source type. + """ + + DATASET = "Dataset" + DATASTORE = "Datastore" + URI = "URI" + +class SshPublicAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh + port is closed on this instance. Enabled - Indicates that the public ssh port is open and + accessible according to the VNet/subnet policy if applicable. + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" + +class SslConfigurationStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Enable or disable ssl for scoring + """ + + DISABLED = "Disabled" + ENABLED = "Enabled" + AUTO = "Auto" + +class Status(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Status of update workspace quota. + """ + + UNDEFINED = "Undefined" + SUCCESS = "Success" + FAILURE = "Failure" + INVALID_QUOTA_BELOW_CLUSTER_MINIMUM = "InvalidQuotaBelowClusterMinimum" + INVALID_QUOTA_EXCEEDS_SUBSCRIPTION_LIMIT = "InvalidQuotaExceedsSubscriptionLimit" + INVALID_VM_FAMILY_NAME = "InvalidVMFamilyName" + OPERATION_NOT_SUPPORTED_FOR_SKU = "OperationNotSupportedForSku" + OPERATION_NOT_ENABLED_FOR_REGION = "OperationNotEnabledForRegion" + +class StorageAccountType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """type of this storage account. + """ + + STANDARD_LRS = "Standard_LRS" + PREMIUM_LRS = "Premium_LRS" + +class UnderlyingResourceAction(str, Enum, metaclass=CaseInsensitiveEnumMeta): + + DELETE = "Delete" + DETACH = "Detach" + +class UnitOfMeasure(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The unit of time measurement for the specified VM price. Example: OneHour + """ + + ONE_HOUR = "OneHour" + +class UsageUnit(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """An enum describing the unit of usage measurement. + """ + + COUNT = "Count" + +class ValueFormat(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """format for the workspace connection value + """ + + JSON = "JSON" + +class VMPriceOSType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Operating system type used by the VM. + """ + + LINUX = "Linux" + WINDOWS = "Windows" + +class VmPriority(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Virtual Machine priority + """ + + DEDICATED = "Dedicated" + LOW_PRIORITY = "LowPriority" + +class VMTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of the VM. + """ + + STANDARD = "Standard" + LOW_PRIORITY = "LowPriority" + SPOT = "Spot" + +class Weekday(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Enum of weekdays + """ + + #: Monday weekday. + MONDAY = "Monday" + #: Tuesday weekday. + TUESDAY = "Tuesday" + #: Wednesday weekday. + WEDNESDAY = "Wednesday" + #: Thursday weekday. + THURSDAY = "Thursday" + #: Friday weekday. + FRIDAY = "Friday" + #: Saturday weekday. + SATURDAY = "Saturday" + #: Sunday weekday. + SUNDAY = "Sunday" diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/models/_models.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/models/_models.py new file mode 100644 index 00000000..f195106e --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/models/_models.py @@ -0,0 +1,15070 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + + +class DatastoreCredentials(msrest.serialization.Model): + """Base definition for datastore credentials. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AccountKeyDatastoreCredentials, CertificateDatastoreCredentials, NoneDatastoreCredentials, SasDatastoreCredentials, ServicePrincipalDatastoreCredentials. + + All required parameters must be populated in order to send to Azure. + + :ivar credentials_type: Required. [Required] Credential type used to authentication with + storage.Constant filled by server. Possible values include: "AccountKey", "Certificate", + "None", "Sas", "ServicePrincipal". + :vartype credentials_type: str or ~azure.mgmt.machinelearningservices.models.CredentialsType + """ + + _validation = { + 'credentials_type': {'required': True}, + } + + _attribute_map = { + 'credentials_type': {'key': 'credentialsType', 'type': 'str'}, + } + + _subtype_map = { + 'credentials_type': {'AccountKey': 'AccountKeyDatastoreCredentials', 'Certificate': 'CertificateDatastoreCredentials', 'None': 'NoneDatastoreCredentials', 'Sas': 'SasDatastoreCredentials', 'ServicePrincipal': 'ServicePrincipalDatastoreCredentials'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(DatastoreCredentials, self).__init__(**kwargs) + self.credentials_type = None # type: Optional[str] + + +class AccountKeyDatastoreCredentials(DatastoreCredentials): + """Account key datastore credentials configuration. + + All required parameters must be populated in order to send to Azure. + + :ivar credentials_type: Required. [Required] Credential type used to authentication with + storage.Constant filled by server. Possible values include: "AccountKey", "Certificate", + "None", "Sas", "ServicePrincipal". + :vartype credentials_type: str or ~azure.mgmt.machinelearningservices.models.CredentialsType + :ivar secrets: Required. [Required] Storage account secrets. + :vartype secrets: ~azure.mgmt.machinelearningservices.models.AccountKeyDatastoreSecrets + """ + + _validation = { + 'credentials_type': {'required': True}, + 'secrets': {'required': True}, + } + + _attribute_map = { + 'credentials_type': {'key': 'credentialsType', 'type': 'str'}, + 'secrets': {'key': 'secrets', 'type': 'AccountKeyDatastoreSecrets'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword secrets: Required. [Required] Storage account secrets. + :paramtype secrets: ~azure.mgmt.machinelearningservices.models.AccountKeyDatastoreSecrets + """ + super(AccountKeyDatastoreCredentials, self).__init__(**kwargs) + self.credentials_type = 'AccountKey' # type: str + self.secrets = kwargs['secrets'] + + +class DatastoreSecrets(msrest.serialization.Model): + """Base definition for datastore secrets. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AccountKeyDatastoreSecrets, CertificateDatastoreSecrets, SasDatastoreSecrets, ServicePrincipalDatastoreSecrets. + + All required parameters must be populated in order to send to Azure. + + :ivar secrets_type: Required. [Required] Credential type used to authentication with + storage.Constant filled by server. Possible values include: "AccountKey", "Certificate", "Sas", + "ServicePrincipal". + :vartype secrets_type: str or ~azure.mgmt.machinelearningservices.models.SecretsType + """ + + _validation = { + 'secrets_type': {'required': True}, + } + + _attribute_map = { + 'secrets_type': {'key': 'secretsType', 'type': 'str'}, + } + + _subtype_map = { + 'secrets_type': {'AccountKey': 'AccountKeyDatastoreSecrets', 'Certificate': 'CertificateDatastoreSecrets', 'Sas': 'SasDatastoreSecrets', 'ServicePrincipal': 'ServicePrincipalDatastoreSecrets'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(DatastoreSecrets, self).__init__(**kwargs) + self.secrets_type = None # type: Optional[str] + + +class AccountKeyDatastoreSecrets(DatastoreSecrets): + """Datastore account key secrets. + + All required parameters must be populated in order to send to Azure. + + :ivar secrets_type: Required. [Required] Credential type used to authentication with + storage.Constant filled by server. Possible values include: "AccountKey", "Certificate", "Sas", + "ServicePrincipal". + :vartype secrets_type: str or ~azure.mgmt.machinelearningservices.models.SecretsType + :ivar key: Storage account key. + :vartype key: str + """ + + _validation = { + 'secrets_type': {'required': True}, + } + + _attribute_map = { + 'secrets_type': {'key': 'secretsType', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword key: Storage account key. + :paramtype key: str + """ + super(AccountKeyDatastoreSecrets, self).__init__(**kwargs) + self.secrets_type = 'AccountKey' # type: str + self.key = kwargs.get('key', None) + + +class AKSSchema(msrest.serialization.Model): + """AKSSchema. + + :ivar properties: AKS properties. + :vartype properties: ~azure.mgmt.machinelearningservices.models.AKSSchemaProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'AKSSchemaProperties'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: AKS properties. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.AKSSchemaProperties + """ + super(AKSSchema, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class Compute(msrest.serialization.Model): + """Machine Learning compute object. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AKS, AmlCompute, ComputeInstance, DataFactory, DataLakeAnalytics, Databricks, HDInsight, Kubernetes, SynapseSpark, VirtualMachine. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values + include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", + "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark". + :vartype compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType + :ivar compute_location: Location for the underlying compute. + :vartype compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values are Unknown, + Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating", + "Creating", "Deleting", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :ivar description: The description of the Machine Learning compute. + :vartype description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: ~datetime.datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: ~datetime.datetime + :ivar resource_id: ARM resource id of the underlying compute. + :vartype resource_id: str + :ivar provisioning_errors: Errors during provisioning. + :vartype provisioning_errors: list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought + from outside if true, or machine learning service provisioned it if false. + :vartype is_attached_compute: bool + :ivar disable_local_auth: Opt-out of local authentication and ensure customers can use only MSI + and AAD exclusively for authentication. + :vartype disable_local_auth: bool + """ + + _validation = { + 'compute_type': {'required': True}, + 'compute_location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'readonly': True}, + } + + _attribute_map = { + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + } + + _subtype_map = { + 'compute_type': {'AKS': 'AKS', 'AmlCompute': 'AmlCompute', 'ComputeInstance': 'ComputeInstance', 'DataFactory': 'DataFactory', 'DataLakeAnalytics': 'DataLakeAnalytics', 'Databricks': 'Databricks', 'HDInsight': 'HDInsight', 'Kubernetes': 'Kubernetes', 'SynapseSpark': 'SynapseSpark', 'VirtualMachine': 'VirtualMachine'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: The description of the Machine Learning compute. + :paramtype description: str + :keyword resource_id: ARM resource id of the underlying compute. + :paramtype resource_id: str + :keyword disable_local_auth: Opt-out of local authentication and ensure customers can use only + MSI and AAD exclusively for authentication. + :paramtype disable_local_auth: bool + """ + super(Compute, self).__init__(**kwargs) + self.compute_type = None # type: Optional[str] + self.compute_location = None + self.provisioning_state = None + self.description = kwargs.get('description', None) + self.created_on = None + self.modified_on = None + self.resource_id = kwargs.get('resource_id', None) + self.provisioning_errors = None + self.is_attached_compute = None + self.disable_local_auth = kwargs.get('disable_local_auth', None) + + +class AKS(Compute, AKSSchema): + """A Machine Learning compute based on AKS. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar properties: AKS properties. + :vartype properties: ~azure.mgmt.machinelearningservices.models.AKSSchemaProperties + :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values + include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", + "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark". + :vartype compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType + :ivar compute_location: Location for the underlying compute. + :vartype compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values are Unknown, + Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating", + "Creating", "Deleting", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :ivar description: The description of the Machine Learning compute. + :vartype description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: ~datetime.datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: ~datetime.datetime + :ivar resource_id: ARM resource id of the underlying compute. + :vartype resource_id: str + :ivar provisioning_errors: Errors during provisioning. + :vartype provisioning_errors: list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought + from outside if true, or machine learning service provisioned it if false. + :vartype is_attached_compute: bool + :ivar disable_local_auth: Opt-out of local authentication and ensure customers can use only MSI + and AAD exclusively for authentication. + :vartype disable_local_auth: bool + """ + + _validation = { + 'compute_type': {'required': True}, + 'compute_location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'AKSSchemaProperties'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: AKS properties. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.AKSSchemaProperties + :keyword description: The description of the Machine Learning compute. + :paramtype description: str + :keyword resource_id: ARM resource id of the underlying compute. + :paramtype resource_id: str + :keyword disable_local_auth: Opt-out of local authentication and ensure customers can use only + MSI and AAD exclusively for authentication. + :paramtype disable_local_auth: bool + """ + super(AKS, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.compute_type = 'AKS' # type: str + self.compute_type = 'AKS' # type: str + self.compute_location = None + self.provisioning_state = None + self.description = kwargs.get('description', None) + self.created_on = None + self.modified_on = None + self.resource_id = kwargs.get('resource_id', None) + self.provisioning_errors = None + self.is_attached_compute = None + self.disable_local_auth = kwargs.get('disable_local_auth', None) + + +class AksComputeSecretsProperties(msrest.serialization.Model): + """Properties of AksComputeSecrets. + + :ivar user_kube_config: Content of kubeconfig file that can be used to connect to the + Kubernetes cluster. + :vartype user_kube_config: str + :ivar admin_kube_config: Content of kubeconfig file that can be used to connect to the + Kubernetes cluster. + :vartype admin_kube_config: str + :ivar image_pull_secret_name: Image registry pull secret. + :vartype image_pull_secret_name: str + """ + + _attribute_map = { + 'user_kube_config': {'key': 'userKubeConfig', 'type': 'str'}, + 'admin_kube_config': {'key': 'adminKubeConfig', 'type': 'str'}, + 'image_pull_secret_name': {'key': 'imagePullSecretName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword user_kube_config: Content of kubeconfig file that can be used to connect to the + Kubernetes cluster. + :paramtype user_kube_config: str + :keyword admin_kube_config: Content of kubeconfig file that can be used to connect to the + Kubernetes cluster. + :paramtype admin_kube_config: str + :keyword image_pull_secret_name: Image registry pull secret. + :paramtype image_pull_secret_name: str + """ + super(AksComputeSecretsProperties, self).__init__(**kwargs) + self.user_kube_config = kwargs.get('user_kube_config', None) + self.admin_kube_config = kwargs.get('admin_kube_config', None) + self.image_pull_secret_name = kwargs.get('image_pull_secret_name', None) + + +class ComputeSecrets(msrest.serialization.Model): + """Secrets related to a Machine Learning compute. Might differ for every type of compute. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AksComputeSecrets, DatabricksComputeSecrets, VirtualMachineSecrets. + + All required parameters must be populated in order to send to Azure. + + :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values + include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", + "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark". + :vartype compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType + """ + + _validation = { + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'compute_type': {'key': 'computeType', 'type': 'str'}, + } + + _subtype_map = { + 'compute_type': {'AKS': 'AksComputeSecrets', 'Databricks': 'DatabricksComputeSecrets', 'VirtualMachine': 'VirtualMachineSecrets'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ComputeSecrets, self).__init__(**kwargs) + self.compute_type = None # type: Optional[str] + + +class AksComputeSecrets(ComputeSecrets, AksComputeSecretsProperties): + """Secrets related to a Machine Learning compute based on AKS. + + All required parameters must be populated in order to send to Azure. + + :ivar user_kube_config: Content of kubeconfig file that can be used to connect to the + Kubernetes cluster. + :vartype user_kube_config: str + :ivar admin_kube_config: Content of kubeconfig file that can be used to connect to the + Kubernetes cluster. + :vartype admin_kube_config: str + :ivar image_pull_secret_name: Image registry pull secret. + :vartype image_pull_secret_name: str + :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values + include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", + "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark". + :vartype compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType + """ + + _validation = { + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'user_kube_config': {'key': 'userKubeConfig', 'type': 'str'}, + 'admin_kube_config': {'key': 'adminKubeConfig', 'type': 'str'}, + 'image_pull_secret_name': {'key': 'imagePullSecretName', 'type': 'str'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword user_kube_config: Content of kubeconfig file that can be used to connect to the + Kubernetes cluster. + :paramtype user_kube_config: str + :keyword admin_kube_config: Content of kubeconfig file that can be used to connect to the + Kubernetes cluster. + :paramtype admin_kube_config: str + :keyword image_pull_secret_name: Image registry pull secret. + :paramtype image_pull_secret_name: str + """ + super(AksComputeSecrets, self).__init__(**kwargs) + self.user_kube_config = kwargs.get('user_kube_config', None) + self.admin_kube_config = kwargs.get('admin_kube_config', None) + self.image_pull_secret_name = kwargs.get('image_pull_secret_name', None) + self.compute_type = 'AKS' # type: str + self.compute_type = 'AKS' # type: str + + +class AksNetworkingConfiguration(msrest.serialization.Model): + """Advance configuration for AKS networking. + + :ivar subnet_id: Virtual network subnet resource ID the compute nodes belong to. + :vartype subnet_id: str + :ivar service_cidr: A CIDR notation IP range from which to assign service cluster IPs. It must + not overlap with any Subnet IP ranges. + :vartype service_cidr: str + :ivar dns_service_ip: An IP address assigned to the Kubernetes DNS service. It must be within + the Kubernetes service address range specified in serviceCidr. + :vartype dns_service_ip: str + :ivar docker_bridge_cidr: A CIDR notation IP range assigned to the Docker bridge network. It + must not overlap with any Subnet IP ranges or the Kubernetes service address range. + :vartype docker_bridge_cidr: str + """ + + _validation = { + 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, + 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + } + + _attribute_map = { + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, + 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, + 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword subnet_id: Virtual network subnet resource ID the compute nodes belong to. + :paramtype subnet_id: str + :keyword service_cidr: A CIDR notation IP range from which to assign service cluster IPs. It + must not overlap with any Subnet IP ranges. + :paramtype service_cidr: str + :keyword dns_service_ip: An IP address assigned to the Kubernetes DNS service. It must be + within the Kubernetes service address range specified in serviceCidr. + :paramtype dns_service_ip: str + :keyword docker_bridge_cidr: A CIDR notation IP range assigned to the Docker bridge network. It + must not overlap with any Subnet IP ranges or the Kubernetes service address range. + :paramtype docker_bridge_cidr: str + """ + super(AksNetworkingConfiguration, self).__init__(**kwargs) + self.subnet_id = kwargs.get('subnet_id', None) + self.service_cidr = kwargs.get('service_cidr', None) + self.dns_service_ip = kwargs.get('dns_service_ip', None) + self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', None) + + +class AKSSchemaProperties(msrest.serialization.Model): + """AKS properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar cluster_fqdn: Cluster full qualified domain name. + :vartype cluster_fqdn: str + :ivar system_services: System services. + :vartype system_services: list[~azure.mgmt.machinelearningservices.models.SystemService] + :ivar agent_count: Number of agents. + :vartype agent_count: int + :ivar agent_vm_size: Agent virtual machine size. + :vartype agent_vm_size: str + :ivar cluster_purpose: Intended usage of the cluster. Possible values include: "FastProd", + "DenseProd", "DevTest". Default value: "FastProd". + :vartype cluster_purpose: str or ~azure.mgmt.machinelearningservices.models.ClusterPurpose + :ivar ssl_configuration: SSL configuration. + :vartype ssl_configuration: ~azure.mgmt.machinelearningservices.models.SslConfiguration + :ivar aks_networking_configuration: AKS networking configuration for vnet. + :vartype aks_networking_configuration: + ~azure.mgmt.machinelearningservices.models.AksNetworkingConfiguration + :ivar load_balancer_type: Load Balancer Type. Possible values include: "PublicIp", + "InternalLoadBalancer". Default value: "PublicIp". + :vartype load_balancer_type: str or ~azure.mgmt.machinelearningservices.models.LoadBalancerType + :ivar load_balancer_subnet: Load Balancer Subnet. + :vartype load_balancer_subnet: str + """ + + _validation = { + 'system_services': {'readonly': True}, + 'agent_count': {'minimum': 0}, + } + + _attribute_map = { + 'cluster_fqdn': {'key': 'clusterFqdn', 'type': 'str'}, + 'system_services': {'key': 'systemServices', 'type': '[SystemService]'}, + 'agent_count': {'key': 'agentCount', 'type': 'int'}, + 'agent_vm_size': {'key': 'agentVmSize', 'type': 'str'}, + 'cluster_purpose': {'key': 'clusterPurpose', 'type': 'str'}, + 'ssl_configuration': {'key': 'sslConfiguration', 'type': 'SslConfiguration'}, + 'aks_networking_configuration': {'key': 'aksNetworkingConfiguration', 'type': 'AksNetworkingConfiguration'}, + 'load_balancer_type': {'key': 'loadBalancerType', 'type': 'str'}, + 'load_balancer_subnet': {'key': 'loadBalancerSubnet', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword cluster_fqdn: Cluster full qualified domain name. + :paramtype cluster_fqdn: str + :keyword agent_count: Number of agents. + :paramtype agent_count: int + :keyword agent_vm_size: Agent virtual machine size. + :paramtype agent_vm_size: str + :keyword cluster_purpose: Intended usage of the cluster. Possible values include: "FastProd", + "DenseProd", "DevTest". Default value: "FastProd". + :paramtype cluster_purpose: str or ~azure.mgmt.machinelearningservices.models.ClusterPurpose + :keyword ssl_configuration: SSL configuration. + :paramtype ssl_configuration: ~azure.mgmt.machinelearningservices.models.SslConfiguration + :keyword aks_networking_configuration: AKS networking configuration for vnet. + :paramtype aks_networking_configuration: + ~azure.mgmt.machinelearningservices.models.AksNetworkingConfiguration + :keyword load_balancer_type: Load Balancer Type. Possible values include: "PublicIp", + "InternalLoadBalancer". Default value: "PublicIp". + :paramtype load_balancer_type: str or + ~azure.mgmt.machinelearningservices.models.LoadBalancerType + :keyword load_balancer_subnet: Load Balancer Subnet. + :paramtype load_balancer_subnet: str + """ + super(AKSSchemaProperties, self).__init__(**kwargs) + self.cluster_fqdn = kwargs.get('cluster_fqdn', None) + self.system_services = None + self.agent_count = kwargs.get('agent_count', None) + self.agent_vm_size = kwargs.get('agent_vm_size', None) + self.cluster_purpose = kwargs.get('cluster_purpose', "FastProd") + self.ssl_configuration = kwargs.get('ssl_configuration', None) + self.aks_networking_configuration = kwargs.get('aks_networking_configuration', None) + self.load_balancer_type = kwargs.get('load_balancer_type', "PublicIp") + self.load_balancer_subnet = kwargs.get('load_balancer_subnet', None) + + +class AmlComputeSchema(msrest.serialization.Model): + """Properties(top level) of AmlCompute. + + :ivar properties: Properties of AmlCompute. + :vartype properties: ~azure.mgmt.machinelearningservices.models.AmlComputeProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'AmlComputeProperties'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: Properties of AmlCompute. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.AmlComputeProperties + """ + super(AmlComputeSchema, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AmlCompute(Compute, AmlComputeSchema): + """An Azure Machine Learning compute. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar properties: Properties of AmlCompute. + :vartype properties: ~azure.mgmt.machinelearningservices.models.AmlComputeProperties + :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values + include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", + "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark". + :vartype compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType + :ivar compute_location: Location for the underlying compute. + :vartype compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values are Unknown, + Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating", + "Creating", "Deleting", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :ivar description: The description of the Machine Learning compute. + :vartype description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: ~datetime.datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: ~datetime.datetime + :ivar resource_id: ARM resource id of the underlying compute. + :vartype resource_id: str + :ivar provisioning_errors: Errors during provisioning. + :vartype provisioning_errors: list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought + from outside if true, or machine learning service provisioned it if false. + :vartype is_attached_compute: bool + :ivar disable_local_auth: Opt-out of local authentication and ensure customers can use only MSI + and AAD exclusively for authentication. + :vartype disable_local_auth: bool + """ + + _validation = { + 'compute_type': {'required': True}, + 'compute_location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'AmlComputeProperties'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: Properties of AmlCompute. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.AmlComputeProperties + :keyword description: The description of the Machine Learning compute. + :paramtype description: str + :keyword resource_id: ARM resource id of the underlying compute. + :paramtype resource_id: str + :keyword disable_local_auth: Opt-out of local authentication and ensure customers can use only + MSI and AAD exclusively for authentication. + :paramtype disable_local_auth: bool + """ + super(AmlCompute, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.compute_type = 'AmlCompute' # type: str + self.compute_type = 'AmlCompute' # type: str + self.compute_location = None + self.provisioning_state = None + self.description = kwargs.get('description', None) + self.created_on = None + self.modified_on = None + self.resource_id = kwargs.get('resource_id', None) + self.provisioning_errors = None + self.is_attached_compute = None + self.disable_local_auth = kwargs.get('disable_local_auth', None) + + +class AmlComputeNodeInformation(msrest.serialization.Model): + """Compute node information related to a AmlCompute. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar node_id: ID of the compute node. + :vartype node_id: str + :ivar private_ip_address: Private IP address of the compute node. + :vartype private_ip_address: str + :ivar public_ip_address: Public IP address of the compute node. + :vartype public_ip_address: str + :ivar port: SSH port number of the node. + :vartype port: int + :ivar node_state: State of the compute node. Values are idle, running, preparing, unusable, + leaving and preempted. Possible values include: "idle", "running", "preparing", "unusable", + "leaving", "preempted". + :vartype node_state: str or ~azure.mgmt.machinelearningservices.models.NodeState + :ivar run_id: ID of the Experiment running on the node, if any else null. + :vartype run_id: str + """ + + _validation = { + 'node_id': {'readonly': True}, + 'private_ip_address': {'readonly': True}, + 'public_ip_address': {'readonly': True}, + 'port': {'readonly': True}, + 'node_state': {'readonly': True}, + 'run_id': {'readonly': True}, + } + + _attribute_map = { + 'node_id': {'key': 'nodeId', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'node_state': {'key': 'nodeState', 'type': 'str'}, + 'run_id': {'key': 'runId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(AmlComputeNodeInformation, self).__init__(**kwargs) + self.node_id = None + self.private_ip_address = None + self.public_ip_address = None + self.port = None + self.node_state = None + self.run_id = None + + +class AmlComputeNodesInformation(msrest.serialization.Model): + """Result of AmlCompute Nodes. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar nodes: The collection of returned AmlCompute nodes details. + :vartype nodes: list[~azure.mgmt.machinelearningservices.models.AmlComputeNodeInformation] + :ivar next_link: The continuation token. + :vartype next_link: str + """ + + _validation = { + 'nodes': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'nodes': {'key': 'nodes', 'type': '[AmlComputeNodeInformation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(AmlComputeNodesInformation, self).__init__(**kwargs) + self.nodes = None + self.next_link = None + + +class AmlComputeProperties(msrest.serialization.Model): + """AML Compute properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar os_type: Compute OS Type. Possible values include: "Linux", "Windows". Default value: + "Linux". + :vartype os_type: str or ~azure.mgmt.machinelearningservices.models.OsType + :ivar vm_size: Virtual Machine Size. + :vartype vm_size: str + :ivar vm_priority: Virtual Machine priority. Possible values include: "Dedicated", + "LowPriority". + :vartype vm_priority: str or ~azure.mgmt.machinelearningservices.models.VmPriority + :ivar virtual_machine_image: Virtual Machine image for AML Compute - windows only. + :vartype virtual_machine_image: ~azure.mgmt.machinelearningservices.models.VirtualMachineImage + :ivar isolated_network: Network is isolated or not. + :vartype isolated_network: bool + :ivar scale_settings: Scale settings for AML Compute. + :vartype scale_settings: ~azure.mgmt.machinelearningservices.models.ScaleSettings + :ivar user_account_credentials: Credentials for an administrator user account that will be + created on each compute node. + :vartype user_account_credentials: + ~azure.mgmt.machinelearningservices.models.UserAccountCredentials + :ivar subnet: Virtual network subnet resource ID the compute nodes belong to. + :vartype subnet: ~azure.mgmt.machinelearningservices.models.ResourceId + :ivar remote_login_port_public_access: State of the public SSH port. Possible values are: + Disabled - Indicates that the public ssh port is closed on all nodes of the cluster. Enabled - + Indicates that the public ssh port is open on all nodes of the cluster. NotSpecified - + Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, + else is open all public nodes. It can be default only during cluster creation time, after + creation it will be either enabled or disabled. Possible values include: "Enabled", "Disabled", + "NotSpecified". Default value: "NotSpecified". + :vartype remote_login_port_public_access: str or + ~azure.mgmt.machinelearningservices.models.RemoteLoginPortPublicAccess + :ivar allocation_state: Allocation state of the compute. Possible values are: steady - + Indicates that the compute is not resizing. There are no changes to the number of compute nodes + in the compute in progress. A compute enters this state when it is created and when no + operations are being performed on the compute to change the number of compute nodes. resizing - + Indicates that the compute is resizing; that is, compute nodes are being added to or removed + from the compute. Possible values include: "Steady", "Resizing". + :vartype allocation_state: str or ~azure.mgmt.machinelearningservices.models.AllocationState + :ivar allocation_state_transition_time: The time at which the compute entered its current + allocation state. + :vartype allocation_state_transition_time: ~datetime.datetime + :ivar errors: Collection of errors encountered by various compute nodes during node setup. + :vartype errors: list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar current_node_count: The number of compute nodes currently assigned to the compute. + :vartype current_node_count: int + :ivar target_node_count: The target number of compute nodes for the compute. If the + allocationState is resizing, this property denotes the target node count for the ongoing resize + operation. If the allocationState is steady, this property denotes the target node count for + the previous resize operation. + :vartype target_node_count: int + :ivar node_state_counts: Counts of various node states on the compute. + :vartype node_state_counts: ~azure.mgmt.machinelearningservices.models.NodeStateCounts + :ivar enable_node_public_ip: Enable or disable node public IP address provisioning. Possible + values are: Possible values are: true - Indicates that the compute nodes will have public IPs + provisioned. false - Indicates that the compute nodes will have a private endpoint and no + public IPs. + :vartype enable_node_public_ip: bool + :ivar property_bag: A property bag containing additional properties. + :vartype property_bag: any + """ + + _validation = { + 'allocation_state': {'readonly': True}, + 'allocation_state_transition_time': {'readonly': True}, + 'errors': {'readonly': True}, + 'current_node_count': {'readonly': True}, + 'target_node_count': {'readonly': True}, + 'node_state_counts': {'readonly': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'vm_priority': {'key': 'vmPriority', 'type': 'str'}, + 'virtual_machine_image': {'key': 'virtualMachineImage', 'type': 'VirtualMachineImage'}, + 'isolated_network': {'key': 'isolatedNetwork', 'type': 'bool'}, + 'scale_settings': {'key': 'scaleSettings', 'type': 'ScaleSettings'}, + 'user_account_credentials': {'key': 'userAccountCredentials', 'type': 'UserAccountCredentials'}, + 'subnet': {'key': 'subnet', 'type': 'ResourceId'}, + 'remote_login_port_public_access': {'key': 'remoteLoginPortPublicAccess', 'type': 'str'}, + 'allocation_state': {'key': 'allocationState', 'type': 'str'}, + 'allocation_state_transition_time': {'key': 'allocationStateTransitionTime', 'type': 'iso-8601'}, + 'errors': {'key': 'errors', 'type': '[ErrorResponse]'}, + 'current_node_count': {'key': 'currentNodeCount', 'type': 'int'}, + 'target_node_count': {'key': 'targetNodeCount', 'type': 'int'}, + 'node_state_counts': {'key': 'nodeStateCounts', 'type': 'NodeStateCounts'}, + 'enable_node_public_ip': {'key': 'enableNodePublicIp', 'type': 'bool'}, + 'property_bag': {'key': 'propertyBag', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword os_type: Compute OS Type. Possible values include: "Linux", "Windows". Default value: + "Linux". + :paramtype os_type: str or ~azure.mgmt.machinelearningservices.models.OsType + :keyword vm_size: Virtual Machine Size. + :paramtype vm_size: str + :keyword vm_priority: Virtual Machine priority. Possible values include: "Dedicated", + "LowPriority". + :paramtype vm_priority: str or ~azure.mgmt.machinelearningservices.models.VmPriority + :keyword virtual_machine_image: Virtual Machine image for AML Compute - windows only. + :paramtype virtual_machine_image: + ~azure.mgmt.machinelearningservices.models.VirtualMachineImage + :keyword isolated_network: Network is isolated or not. + :paramtype isolated_network: bool + :keyword scale_settings: Scale settings for AML Compute. + :paramtype scale_settings: ~azure.mgmt.machinelearningservices.models.ScaleSettings + :keyword user_account_credentials: Credentials for an administrator user account that will be + created on each compute node. + :paramtype user_account_credentials: + ~azure.mgmt.machinelearningservices.models.UserAccountCredentials + :keyword subnet: Virtual network subnet resource ID the compute nodes belong to. + :paramtype subnet: ~azure.mgmt.machinelearningservices.models.ResourceId + :keyword remote_login_port_public_access: State of the public SSH port. Possible values are: + Disabled - Indicates that the public ssh port is closed on all nodes of the cluster. Enabled - + Indicates that the public ssh port is open on all nodes of the cluster. NotSpecified - + Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, + else is open all public nodes. It can be default only during cluster creation time, after + creation it will be either enabled or disabled. Possible values include: "Enabled", "Disabled", + "NotSpecified". Default value: "NotSpecified". + :paramtype remote_login_port_public_access: str or + ~azure.mgmt.machinelearningservices.models.RemoteLoginPortPublicAccess + :keyword enable_node_public_ip: Enable or disable node public IP address provisioning. Possible + values are: Possible values are: true - Indicates that the compute nodes will have public IPs + provisioned. false - Indicates that the compute nodes will have a private endpoint and no + public IPs. + :paramtype enable_node_public_ip: bool + :keyword property_bag: A property bag containing additional properties. + :paramtype property_bag: any + """ + super(AmlComputeProperties, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', "Linux") + self.vm_size = kwargs.get('vm_size', None) + self.vm_priority = kwargs.get('vm_priority', None) + self.virtual_machine_image = kwargs.get('virtual_machine_image', None) + self.isolated_network = kwargs.get('isolated_network', None) + self.scale_settings = kwargs.get('scale_settings', None) + self.user_account_credentials = kwargs.get('user_account_credentials', None) + self.subnet = kwargs.get('subnet', None) + self.remote_login_port_public_access = kwargs.get('remote_login_port_public_access', "NotSpecified") + self.allocation_state = None + self.allocation_state_transition_time = None + self.errors = None + self.current_node_count = None + self.target_node_count = None + self.node_state_counts = None + self.enable_node_public_ip = kwargs.get('enable_node_public_ip', True) + self.property_bag = kwargs.get('property_bag', None) + + +class AmlOperation(msrest.serialization.Model): + """Azure Machine Learning workspace REST API operation. + + :ivar name: Operation name: {provider}/{resource}/{operation}. + :vartype name: str + :ivar display: Display name of operation. + :vartype display: ~azure.mgmt.machinelearningservices.models.AmlOperationDisplay + :ivar is_data_action: Indicates whether the operation applies to data-plane. + :vartype is_data_action: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'AmlOperationDisplay'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Operation name: {provider}/{resource}/{operation}. + :paramtype name: str + :keyword display: Display name of operation. + :paramtype display: ~azure.mgmt.machinelearningservices.models.AmlOperationDisplay + :keyword is_data_action: Indicates whether the operation applies to data-plane. + :paramtype is_data_action: bool + """ + super(AmlOperation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.is_data_action = kwargs.get('is_data_action', None) + + +class AmlOperationDisplay(msrest.serialization.Model): + """Display name of operation. + + :ivar provider: The resource provider name: Microsoft.MachineLearningExperimentation. + :vartype provider: str + :ivar resource: The resource on which the operation is performed. + :vartype resource: str + :ivar operation: The operation that users can perform. + :vartype operation: str + :ivar description: The description for the operation. + :vartype description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword provider: The resource provider name: Microsoft.MachineLearningExperimentation. + :paramtype provider: str + :keyword resource: The resource on which the operation is performed. + :paramtype resource: str + :keyword operation: The operation that users can perform. + :paramtype operation: str + :keyword description: The description for the operation. + :paramtype description: str + """ + super(AmlOperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class AmlOperationListResult(msrest.serialization.Model): + """An array of operations supported by the resource provider. + + :ivar value: List of AML workspace operations supported by the AML workspace resource provider. + :vartype value: list[~azure.mgmt.machinelearningservices.models.AmlOperation] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AmlOperation]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword value: List of AML workspace operations supported by the AML workspace resource + provider. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.AmlOperation] + """ + super(AmlOperationListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class IdentityConfiguration(msrest.serialization.Model): + """Base definition for identity configuration. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AmlToken, ManagedIdentity, UserIdentity. + + All required parameters must be populated in order to send to Azure. + + :ivar identity_type: Required. [Required] Specifies the type of identity framework.Constant + filled by server. Possible values include: "Managed", "AMLToken", "UserIdentity". + :vartype identity_type: str or + ~azure.mgmt.machinelearningservices.models.IdentityConfigurationType + """ + + _validation = { + 'identity_type': {'required': True}, + } + + _attribute_map = { + 'identity_type': {'key': 'identityType', 'type': 'str'}, + } + + _subtype_map = { + 'identity_type': {'AMLToken': 'AmlToken', 'Managed': 'ManagedIdentity', 'UserIdentity': 'UserIdentity'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(IdentityConfiguration, self).__init__(**kwargs) + self.identity_type = None # type: Optional[str] + + +class AmlToken(IdentityConfiguration): + """AML Token identity configuration. + + All required parameters must be populated in order to send to Azure. + + :ivar identity_type: Required. [Required] Specifies the type of identity framework.Constant + filled by server. Possible values include: "Managed", "AMLToken", "UserIdentity". + :vartype identity_type: str or + ~azure.mgmt.machinelearningservices.models.IdentityConfigurationType + """ + + _validation = { + 'identity_type': {'required': True}, + } + + _attribute_map = { + 'identity_type': {'key': 'identityType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(AmlToken, self).__init__(**kwargs) + self.identity_type = 'AMLToken' # type: str + + +class AmlUserFeature(msrest.serialization.Model): + """Features enabled for a workspace. + + :ivar id: Specifies the feature ID. + :vartype id: str + :ivar display_name: Specifies the feature name. + :vartype display_name: str + :ivar description: Describes the feature for user experience. + :vartype description: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: Specifies the feature ID. + :paramtype id: str + :keyword display_name: Specifies the feature name. + :paramtype display_name: str + :keyword description: Describes the feature for user experience. + :paramtype description: str + """ + super(AmlUserFeature, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + + +class ResourceBase(msrest.serialization.Model): + """ResourceBase. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + """ + super(ResourceBase, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.properties = kwargs.get('properties', None) + self.tags = kwargs.get('tags', None) + + +class AssetBase(ResourceBase): + """AssetBase. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar is_anonymous: If the name version are system generated (anonymous registration). + :vartype is_anonymous: bool + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword is_anonymous: If the name version are system generated (anonymous registration). + :paramtype is_anonymous: bool + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + """ + super(AssetBase, self).__init__(**kwargs) + self.is_anonymous = kwargs.get('is_anonymous', False) + self.is_archived = kwargs.get('is_archived', False) + + +class AssetContainer(ResourceBase): + """AssetContainer. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar latest_version: The latest version inside this container. + :vartype latest_version: str + :ivar next_version: The next auto incremental version. + :vartype next_version: str + """ + + _validation = { + 'latest_version': {'readonly': True}, + 'next_version': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'latest_version': {'key': 'latestVersion', 'type': 'str'}, + 'next_version': {'key': 'nextVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + """ + super(AssetContainer, self).__init__(**kwargs) + self.is_archived = kwargs.get('is_archived', False) + self.latest_version = None + self.next_version = None + + +class AssetJobInput(msrest.serialization.Model): + """Asset input type. + + All required parameters must be populated in order to send to Azure. + + :ivar mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", + "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". + :vartype mode: str or ~azure.mgmt.machinelearningservices.models.InputDeliveryMode + :ivar uri: Required. [Required] Input Asset URI. + :vartype uri: str + """ + + _validation = { + 'uri': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + } + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", + "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". + :paramtype mode: str or ~azure.mgmt.machinelearningservices.models.InputDeliveryMode + :keyword uri: Required. [Required] Input Asset URI. + :paramtype uri: str + """ + super(AssetJobInput, self).__init__(**kwargs) + self.mode = kwargs.get('mode', None) + self.uri = kwargs['uri'] + + +class AssetJobOutput(msrest.serialization.Model): + """Asset output type. + + :ivar mode: Output Asset Delivery Mode. Possible values include: "ReadWriteMount", "Upload". + :vartype mode: str or ~azure.mgmt.machinelearningservices.models.OutputDeliveryMode + :ivar uri: Output Asset URI. + :vartype uri: str + """ + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword mode: Output Asset Delivery Mode. Possible values include: "ReadWriteMount", "Upload". + :paramtype mode: str or ~azure.mgmt.machinelearningservices.models.OutputDeliveryMode + :keyword uri: Output Asset URI. + :paramtype uri: str + """ + super(AssetJobOutput, self).__init__(**kwargs) + self.mode = kwargs.get('mode', None) + self.uri = kwargs.get('uri', None) + + +class AssetReferenceBase(msrest.serialization.Model): + """Base definition for asset references. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataPathAssetReference, IdAssetReference, OutputPathAssetReference. + + All required parameters must be populated in order to send to Azure. + + :ivar reference_type: Required. [Required] Specifies the type of asset reference.Constant + filled by server. Possible values include: "Id", "DataPath", "OutputPath". + :vartype reference_type: str or ~azure.mgmt.machinelearningservices.models.ReferenceType + """ + + _validation = { + 'reference_type': {'required': True}, + } + + _attribute_map = { + 'reference_type': {'key': 'referenceType', 'type': 'str'}, + } + + _subtype_map = { + 'reference_type': {'DataPath': 'DataPathAssetReference', 'Id': 'IdAssetReference', 'OutputPath': 'OutputPathAssetReference'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(AssetReferenceBase, self).__init__(**kwargs) + self.reference_type = None # type: Optional[str] + + +class AssignedUser(msrest.serialization.Model): + """A user that can be assigned to a compute instance. + + All required parameters must be populated in order to send to Azure. + + :ivar object_id: Required. User�s AAD Object Id. + :vartype object_id: str + :ivar tenant_id: Required. User�s AAD Tenant Id. + :vartype tenant_id: str + """ + + _validation = { + 'object_id': {'required': True}, + 'tenant_id': {'required': True}, + } + + _attribute_map = { + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword object_id: Required. User�s AAD Object Id. + :paramtype object_id: str + :keyword tenant_id: Required. User�s AAD Tenant Id. + :paramtype tenant_id: str + """ + super(AssignedUser, self).__init__(**kwargs) + self.object_id = kwargs['object_id'] + self.tenant_id = kwargs['tenant_id'] + + +class AutoPauseProperties(msrest.serialization.Model): + """Auto pause properties. + + :ivar delay_in_minutes: + :vartype delay_in_minutes: int + :ivar enabled: + :vartype enabled: bool + """ + + _attribute_map = { + 'delay_in_minutes': {'key': 'delayInMinutes', 'type': 'int'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword delay_in_minutes: + :paramtype delay_in_minutes: int + :keyword enabled: + :paramtype enabled: bool + """ + super(AutoPauseProperties, self).__init__(**kwargs) + self.delay_in_minutes = kwargs.get('delay_in_minutes', None) + self.enabled = kwargs.get('enabled', None) + + +class AutoScaleProperties(msrest.serialization.Model): + """Auto scale properties. + + :ivar min_node_count: + :vartype min_node_count: int + :ivar enabled: + :vartype enabled: bool + :ivar max_node_count: + :vartype max_node_count: int + """ + + _attribute_map = { + 'min_node_count': {'key': 'minNodeCount', 'type': 'int'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'max_node_count': {'key': 'maxNodeCount', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword min_node_count: + :paramtype min_node_count: int + :keyword enabled: + :paramtype enabled: bool + :keyword max_node_count: + :paramtype max_node_count: int + """ + super(AutoScaleProperties, self).__init__(**kwargs) + self.min_node_count = kwargs.get('min_node_count', None) + self.enabled = kwargs.get('enabled', None) + self.max_node_count = kwargs.get('max_node_count', None) + + +class DatastoreDetails(ResourceBase): + """Base definition for datastore contents configuration. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBlobDatastore, AzureDataLakeGen1Datastore, AzureDataLakeGen2Datastore, AzureFileDatastore. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar credentials: Required. [Required] Account credentials. + :vartype credentials: ~azure.mgmt.machinelearningservices.models.DatastoreCredentials + :ivar datastore_type: Required. [Required] Storage type backing the datastore.Constant filled + by server. Possible values include: "AzureBlob", "AzureDataLakeGen1", "AzureDataLakeGen2", + "AzureFile". + :vartype datastore_type: str or ~azure.mgmt.machinelearningservices.models.DatastoreType + :ivar is_default: Readonly property to indicate if datastore is the workspace default + datastore. + :vartype is_default: bool + """ + + _validation = { + 'credentials': {'required': True}, + 'datastore_type': {'required': True}, + 'is_default': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'credentials': {'key': 'credentials', 'type': 'DatastoreCredentials'}, + 'datastore_type': {'key': 'datastoreType', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + } + + _subtype_map = { + 'datastore_type': {'AzureBlob': 'AzureBlobDatastore', 'AzureDataLakeGen1': 'AzureDataLakeGen1Datastore', 'AzureDataLakeGen2': 'AzureDataLakeGen2Datastore', 'AzureFile': 'AzureFileDatastore'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword credentials: Required. [Required] Account credentials. + :paramtype credentials: ~azure.mgmt.machinelearningservices.models.DatastoreCredentials + """ + super(DatastoreDetails, self).__init__(**kwargs) + self.credentials = kwargs['credentials'] + self.datastore_type = 'DatastoreDetails' # type: str + self.is_default = None + + +class AzureBlobDatastore(DatastoreDetails): + """Azure Blob datastore configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar credentials: Required. [Required] Account credentials. + :vartype credentials: ~azure.mgmt.machinelearningservices.models.DatastoreCredentials + :ivar datastore_type: Required. [Required] Storage type backing the datastore.Constant filled + by server. Possible values include: "AzureBlob", "AzureDataLakeGen1", "AzureDataLakeGen2", + "AzureFile". + :vartype datastore_type: str or ~azure.mgmt.machinelearningservices.models.DatastoreType + :ivar is_default: Readonly property to indicate if datastore is the workspace default + datastore. + :vartype is_default: bool + :ivar account_name: Storage account name. + :vartype account_name: str + :ivar container_name: Storage account container name. + :vartype container_name: str + :ivar endpoint: Azure cloud endpoint for the storage account. + :vartype endpoint: str + :ivar protocol: Protocol used to communicate with the storage account. + :vartype protocol: str + :ivar service_data_access_auth_identity: Indicates which identity to use to authenticate + service data access to customer's storage. Possible values include: "None", + "WorkspaceSystemAssignedIdentity", "WorkspaceUserAssignedIdentity". + :vartype service_data_access_auth_identity: str or + ~azure.mgmt.machinelearningservices.models.ServiceDataAccessAuthIdentity + """ + + _validation = { + 'credentials': {'required': True}, + 'datastore_type': {'required': True}, + 'is_default': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'credentials': {'key': 'credentials', 'type': 'DatastoreCredentials'}, + 'datastore_type': {'key': 'datastoreType', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'service_data_access_auth_identity': {'key': 'serviceDataAccessAuthIdentity', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword credentials: Required. [Required] Account credentials. + :paramtype credentials: ~azure.mgmt.machinelearningservices.models.DatastoreCredentials + :keyword account_name: Storage account name. + :paramtype account_name: str + :keyword container_name: Storage account container name. + :paramtype container_name: str + :keyword endpoint: Azure cloud endpoint for the storage account. + :paramtype endpoint: str + :keyword protocol: Protocol used to communicate with the storage account. + :paramtype protocol: str + :keyword service_data_access_auth_identity: Indicates which identity to use to authenticate + service data access to customer's storage. Possible values include: "None", + "WorkspaceSystemAssignedIdentity", "WorkspaceUserAssignedIdentity". + :paramtype service_data_access_auth_identity: str or + ~azure.mgmt.machinelearningservices.models.ServiceDataAccessAuthIdentity + """ + super(AzureBlobDatastore, self).__init__(**kwargs) + self.datastore_type = 'AzureBlob' # type: str + self.account_name = kwargs.get('account_name', None) + self.container_name = kwargs.get('container_name', None) + self.endpoint = kwargs.get('endpoint', None) + self.protocol = kwargs.get('protocol', None) + self.service_data_access_auth_identity = kwargs.get('service_data_access_auth_identity', None) + + +class AzureDataLakeGen1Datastore(DatastoreDetails): + """Azure Data Lake Gen1 datastore configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar credentials: Required. [Required] Account credentials. + :vartype credentials: ~azure.mgmt.machinelearningservices.models.DatastoreCredentials + :ivar datastore_type: Required. [Required] Storage type backing the datastore.Constant filled + by server. Possible values include: "AzureBlob", "AzureDataLakeGen1", "AzureDataLakeGen2", + "AzureFile". + :vartype datastore_type: str or ~azure.mgmt.machinelearningservices.models.DatastoreType + :ivar is_default: Readonly property to indicate if datastore is the workspace default + datastore. + :vartype is_default: bool + :ivar service_data_access_auth_identity: Indicates which identity to use to authenticate + service data access to customer's storage. Possible values include: "None", + "WorkspaceSystemAssignedIdentity", "WorkspaceUserAssignedIdentity". + :vartype service_data_access_auth_identity: str or + ~azure.mgmt.machinelearningservices.models.ServiceDataAccessAuthIdentity + :ivar store_name: Required. [Required] Azure Data Lake store name. + :vartype store_name: str + """ + + _validation = { + 'credentials': {'required': True}, + 'datastore_type': {'required': True}, + 'is_default': {'readonly': True}, + 'store_name': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'credentials': {'key': 'credentials', 'type': 'DatastoreCredentials'}, + 'datastore_type': {'key': 'datastoreType', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'service_data_access_auth_identity': {'key': 'serviceDataAccessAuthIdentity', 'type': 'str'}, + 'store_name': {'key': 'storeName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword credentials: Required. [Required] Account credentials. + :paramtype credentials: ~azure.mgmt.machinelearningservices.models.DatastoreCredentials + :keyword service_data_access_auth_identity: Indicates which identity to use to authenticate + service data access to customer's storage. Possible values include: "None", + "WorkspaceSystemAssignedIdentity", "WorkspaceUserAssignedIdentity". + :paramtype service_data_access_auth_identity: str or + ~azure.mgmt.machinelearningservices.models.ServiceDataAccessAuthIdentity + :keyword store_name: Required. [Required] Azure Data Lake store name. + :paramtype store_name: str + """ + super(AzureDataLakeGen1Datastore, self).__init__(**kwargs) + self.datastore_type = 'AzureDataLakeGen1' # type: str + self.service_data_access_auth_identity = kwargs.get('service_data_access_auth_identity', None) + self.store_name = kwargs['store_name'] + + +class AzureDataLakeGen2Datastore(DatastoreDetails): + """Azure Data Lake Gen2 datastore configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar credentials: Required. [Required] Account credentials. + :vartype credentials: ~azure.mgmt.machinelearningservices.models.DatastoreCredentials + :ivar datastore_type: Required. [Required] Storage type backing the datastore.Constant filled + by server. Possible values include: "AzureBlob", "AzureDataLakeGen1", "AzureDataLakeGen2", + "AzureFile". + :vartype datastore_type: str or ~azure.mgmt.machinelearningservices.models.DatastoreType + :ivar is_default: Readonly property to indicate if datastore is the workspace default + datastore. + :vartype is_default: bool + :ivar account_name: Required. [Required] Storage account name. + :vartype account_name: str + :ivar endpoint: Azure cloud endpoint for the storage account. + :vartype endpoint: str + :ivar filesystem: Required. [Required] The name of the Data Lake Gen2 filesystem. + :vartype filesystem: str + :ivar protocol: Protocol used to communicate with the storage account. + :vartype protocol: str + :ivar service_data_access_auth_identity: Indicates which identity to use to authenticate + service data access to customer's storage. Possible values include: "None", + "WorkspaceSystemAssignedIdentity", "WorkspaceUserAssignedIdentity". + :vartype service_data_access_auth_identity: str or + ~azure.mgmt.machinelearningservices.models.ServiceDataAccessAuthIdentity + """ + + _validation = { + 'credentials': {'required': True}, + 'datastore_type': {'required': True}, + 'is_default': {'readonly': True}, + 'account_name': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + 'filesystem': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'credentials': {'key': 'credentials', 'type': 'DatastoreCredentials'}, + 'datastore_type': {'key': 'datastoreType', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + 'filesystem': {'key': 'filesystem', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'service_data_access_auth_identity': {'key': 'serviceDataAccessAuthIdentity', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword credentials: Required. [Required] Account credentials. + :paramtype credentials: ~azure.mgmt.machinelearningservices.models.DatastoreCredentials + :keyword account_name: Required. [Required] Storage account name. + :paramtype account_name: str + :keyword endpoint: Azure cloud endpoint for the storage account. + :paramtype endpoint: str + :keyword filesystem: Required. [Required] The name of the Data Lake Gen2 filesystem. + :paramtype filesystem: str + :keyword protocol: Protocol used to communicate with the storage account. + :paramtype protocol: str + :keyword service_data_access_auth_identity: Indicates which identity to use to authenticate + service data access to customer's storage. Possible values include: "None", + "WorkspaceSystemAssignedIdentity", "WorkspaceUserAssignedIdentity". + :paramtype service_data_access_auth_identity: str or + ~azure.mgmt.machinelearningservices.models.ServiceDataAccessAuthIdentity + """ + super(AzureDataLakeGen2Datastore, self).__init__(**kwargs) + self.datastore_type = 'AzureDataLakeGen2' # type: str + self.account_name = kwargs['account_name'] + self.endpoint = kwargs.get('endpoint', None) + self.filesystem = kwargs['filesystem'] + self.protocol = kwargs.get('protocol', None) + self.service_data_access_auth_identity = kwargs.get('service_data_access_auth_identity', None) + + +class AzureFileDatastore(DatastoreDetails): + """Azure File datastore configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar credentials: Required. [Required] Account credentials. + :vartype credentials: ~azure.mgmt.machinelearningservices.models.DatastoreCredentials + :ivar datastore_type: Required. [Required] Storage type backing the datastore.Constant filled + by server. Possible values include: "AzureBlob", "AzureDataLakeGen1", "AzureDataLakeGen2", + "AzureFile". + :vartype datastore_type: str or ~azure.mgmt.machinelearningservices.models.DatastoreType + :ivar is_default: Readonly property to indicate if datastore is the workspace default + datastore. + :vartype is_default: bool + :ivar account_name: Required. [Required] Storage account name. + :vartype account_name: str + :ivar endpoint: Azure cloud endpoint for the storage account. + :vartype endpoint: str + :ivar file_share_name: Required. [Required] TODO - File share name. + :vartype file_share_name: str + :ivar protocol: Protocol used to communicate with the storage account. + :vartype protocol: str + :ivar service_data_access_auth_identity: Indicates which identity to use to authenticate + service data access to customer's storage. Possible values include: "None", + "WorkspaceSystemAssignedIdentity", "WorkspaceUserAssignedIdentity". + :vartype service_data_access_auth_identity: str or + ~azure.mgmt.machinelearningservices.models.ServiceDataAccessAuthIdentity + """ + + _validation = { + 'credentials': {'required': True}, + 'datastore_type': {'required': True}, + 'is_default': {'readonly': True}, + 'account_name': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + 'file_share_name': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'credentials': {'key': 'credentials', 'type': 'DatastoreCredentials'}, + 'datastore_type': {'key': 'datastoreType', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + 'file_share_name': {'key': 'fileShareName', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'service_data_access_auth_identity': {'key': 'serviceDataAccessAuthIdentity', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword credentials: Required. [Required] Account credentials. + :paramtype credentials: ~azure.mgmt.machinelearningservices.models.DatastoreCredentials + :keyword account_name: Required. [Required] Storage account name. + :paramtype account_name: str + :keyword endpoint: Azure cloud endpoint for the storage account. + :paramtype endpoint: str + :keyword file_share_name: Required. [Required] TODO - File share name. + :paramtype file_share_name: str + :keyword protocol: Protocol used to communicate with the storage account. + :paramtype protocol: str + :keyword service_data_access_auth_identity: Indicates which identity to use to authenticate + service data access to customer's storage. Possible values include: "None", + "WorkspaceSystemAssignedIdentity", "WorkspaceUserAssignedIdentity". + :paramtype service_data_access_auth_identity: str or + ~azure.mgmt.machinelearningservices.models.ServiceDataAccessAuthIdentity + """ + super(AzureFileDatastore, self).__init__(**kwargs) + self.datastore_type = 'AzureFile' # type: str + self.account_name = kwargs['account_name'] + self.endpoint = kwargs.get('endpoint', None) + self.file_share_name = kwargs['file_share_name'] + self.protocol = kwargs.get('protocol', None) + self.service_data_access_auth_identity = kwargs.get('service_data_access_auth_identity', None) + + +class EarlyTerminationPolicy(msrest.serialization.Model): + """Early termination policies enable canceling poor-performing runs before they complete. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: BanditPolicy, MedianStoppingPolicy, TruncationSelectionPolicy. + + All required parameters must be populated in order to send to Azure. + + :ivar delay_evaluation: Number of intervals by which to delay the first evaluation. + :vartype delay_evaluation: int + :ivar evaluation_interval: Interval (number of runs) between policy evaluations. + :vartype evaluation_interval: int + :ivar policy_type: Required. [Required] Name of policy configuration.Constant filled by server. + Possible values include: "Bandit", "MedianStopping", "TruncationSelection". + :vartype policy_type: str or + ~azure.mgmt.machinelearningservices.models.EarlyTerminationPolicyType + """ + + _validation = { + 'policy_type': {'required': True}, + } + + _attribute_map = { + 'delay_evaluation': {'key': 'delayEvaluation', 'type': 'int'}, + 'evaluation_interval': {'key': 'evaluationInterval', 'type': 'int'}, + 'policy_type': {'key': 'policyType', 'type': 'str'}, + } + + _subtype_map = { + 'policy_type': {'Bandit': 'BanditPolicy', 'MedianStopping': 'MedianStoppingPolicy', 'TruncationSelection': 'TruncationSelectionPolicy'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword delay_evaluation: Number of intervals by which to delay the first evaluation. + :paramtype delay_evaluation: int + :keyword evaluation_interval: Interval (number of runs) between policy evaluations. + :paramtype evaluation_interval: int + """ + super(EarlyTerminationPolicy, self).__init__(**kwargs) + self.delay_evaluation = kwargs.get('delay_evaluation', 0) + self.evaluation_interval = kwargs.get('evaluation_interval', 0) + self.policy_type = None # type: Optional[str] + + +class BanditPolicy(EarlyTerminationPolicy): + """Defines an early termination policy based on slack criteria, and a frequency and delay interval for evaluation. + + All required parameters must be populated in order to send to Azure. + + :ivar delay_evaluation: Number of intervals by which to delay the first evaluation. + :vartype delay_evaluation: int + :ivar evaluation_interval: Interval (number of runs) between policy evaluations. + :vartype evaluation_interval: int + :ivar policy_type: Required. [Required] Name of policy configuration.Constant filled by server. + Possible values include: "Bandit", "MedianStopping", "TruncationSelection". + :vartype policy_type: str or + ~azure.mgmt.machinelearningservices.models.EarlyTerminationPolicyType + :ivar slack_amount: Absolute distance allowed from the best performing run. + :vartype slack_amount: float + :ivar slack_factor: Ratio of the allowed distance from the best performing run. + :vartype slack_factor: float + """ + + _validation = { + 'policy_type': {'required': True}, + } + + _attribute_map = { + 'delay_evaluation': {'key': 'delayEvaluation', 'type': 'int'}, + 'evaluation_interval': {'key': 'evaluationInterval', 'type': 'int'}, + 'policy_type': {'key': 'policyType', 'type': 'str'}, + 'slack_amount': {'key': 'slackAmount', 'type': 'float'}, + 'slack_factor': {'key': 'slackFactor', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword delay_evaluation: Number of intervals by which to delay the first evaluation. + :paramtype delay_evaluation: int + :keyword evaluation_interval: Interval (number of runs) between policy evaluations. + :paramtype evaluation_interval: int + :keyword slack_amount: Absolute distance allowed from the best performing run. + :paramtype slack_amount: float + :keyword slack_factor: Ratio of the allowed distance from the best performing run. + :paramtype slack_factor: float + """ + super(BanditPolicy, self).__init__(**kwargs) + self.policy_type = 'Bandit' # type: str + self.slack_amount = kwargs.get('slack_amount', 0) + self.slack_factor = kwargs.get('slack_factor', 0) + + +class Resource(msrest.serialization.Model): + """Common fields that are returned in the response for all Azure Resource Manager resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.system_data = None + + +class TrackedResource(Resource): + """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar location: Required. The geo-location where the resource lives. + :vartype location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword location: Required. The geo-location where the resource lives. + :paramtype location: str + """ + super(TrackedResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.location = kwargs['location'] + + +class BatchDeploymentData(TrackedResource): + """BatchDeploymentData. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar location: Required. The geo-location where the resource lives. + :vartype location: str + :ivar identity: Managed service identity (system assigned and/or user assigned identities). + :vartype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :ivar kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type. + :vartype kind: str + :ivar properties: Required. [Required] Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.BatchDeploymentDetails + :ivar sku: Sku details required for ARM contract for Autoscaling. + :vartype sku: ~azure.mgmt.machinelearningservices.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'location': {'required': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'BatchDeploymentDetails'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword location: Required. The geo-location where the resource lives. + :paramtype location: str + :keyword identity: Managed service identity (system assigned and/or user assigned identities). + :paramtype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :keyword kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type. + :paramtype kind: str + :keyword properties: Required. [Required] Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.BatchDeploymentDetails + :keyword sku: Sku details required for ARM contract for Autoscaling. + :paramtype sku: ~azure.mgmt.machinelearningservices.models.Sku + """ + super(BatchDeploymentData, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.kind = kwargs.get('kind', None) + self.properties = kwargs['properties'] + self.sku = kwargs.get('sku', None) + + +class EndpointDeploymentPropertiesBase(msrest.serialization.Model): + """Base definition for endpoint deployment. + + :ivar code_configuration: Code configuration for the endpoint deployment. + :vartype code_configuration: ~azure.mgmt.machinelearningservices.models.CodeConfiguration + :ivar description: Description of the endpoint deployment. + :vartype description: str + :ivar environment_id: ARM resource ID of the environment specification for the endpoint + deployment. + :vartype environment_id: str + :ivar environment_variables: Environment variables configuration for the deployment. + :vartype environment_variables: dict[str, str] + :ivar properties: Property dictionary. Properties can be added, but not removed or altered. + :vartype properties: dict[str, str] + """ + + _attribute_map = { + 'code_configuration': {'key': 'codeConfiguration', 'type': 'CodeConfiguration'}, + 'description': {'key': 'description', 'type': 'str'}, + 'environment_id': {'key': 'environmentId', 'type': 'str'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword code_configuration: Code configuration for the endpoint deployment. + :paramtype code_configuration: ~azure.mgmt.machinelearningservices.models.CodeConfiguration + :keyword description: Description of the endpoint deployment. + :paramtype description: str + :keyword environment_id: ARM resource ID of the environment specification for the endpoint + deployment. + :paramtype environment_id: str + :keyword environment_variables: Environment variables configuration for the deployment. + :paramtype environment_variables: dict[str, str] + :keyword properties: Property dictionary. Properties can be added, but not removed or altered. + :paramtype properties: dict[str, str] + """ + super(EndpointDeploymentPropertiesBase, self).__init__(**kwargs) + self.code_configuration = kwargs.get('code_configuration', None) + self.description = kwargs.get('description', None) + self.environment_id = kwargs.get('environment_id', None) + self.environment_variables = kwargs.get('environment_variables', None) + self.properties = kwargs.get('properties', None) + + +class BatchDeploymentDetails(EndpointDeploymentPropertiesBase): + """Batch inference settings per deployment. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code_configuration: Code configuration for the endpoint deployment. + :vartype code_configuration: ~azure.mgmt.machinelearningservices.models.CodeConfiguration + :ivar description: Description of the endpoint deployment. + :vartype description: str + :ivar environment_id: ARM resource ID of the environment specification for the endpoint + deployment. + :vartype environment_id: str + :ivar environment_variables: Environment variables configuration for the deployment. + :vartype environment_variables: dict[str, str] + :ivar properties: Property dictionary. Properties can be added, but not removed or altered. + :vartype properties: dict[str, str] + :ivar compute: Compute target for batch inference operation. + :vartype compute: str + :ivar error_threshold: Error threshold, if the error count for the entire input goes above this + value, + the batch inference will be aborted. Range is [-1, int.MaxValue]. + For FileDataset, this value is the count of file failures. + For TabularDataset, this value is the count of record failures. + If set to -1 (the lower bound), all failures during batch inference will be ignored. + :vartype error_threshold: int + :ivar logging_level: Logging level for batch inference operation. Possible values include: + "Info", "Warning", "Debug". + :vartype logging_level: str or ~azure.mgmt.machinelearningservices.models.BatchLoggingLevel + :ivar max_concurrency_per_instance: Indicates maximum number of parallelism per instance. + :vartype max_concurrency_per_instance: int + :ivar mini_batch_size: Size of the mini-batch passed to each batch invocation. + For FileDataset, this is the number of files per mini-batch. + For TabularDataset, this is the size of the records in bytes, per mini-batch. + :vartype mini_batch_size: long + :ivar model: Reference to the model asset for the endpoint deployment. + :vartype model: ~azure.mgmt.machinelearningservices.models.AssetReferenceBase + :ivar output_action: Indicates how the output will be organized. Possible values include: + "SummaryOnly", "AppendRow". + :vartype output_action: str or ~azure.mgmt.machinelearningservices.models.BatchOutputAction + :ivar output_file_name: Customized output file name for append_row output action. + :vartype output_file_name: str + :ivar provisioning_state: Provisioning state for the endpoint deployment. Possible values + include: "Creating", "Deleting", "Scaling", "Updating", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.DeploymentProvisioningState + :ivar resources: Indicates compute configuration for the job. + If not provided, will default to the defaults defined in ResourceConfiguration. + :vartype resources: ~azure.mgmt.machinelearningservices.models.ResourceConfiguration + :ivar retry_settings: Retry Settings for the batch inference operation. + If not provided, will default to the defaults defined in BatchRetrySettings. + :vartype retry_settings: ~azure.mgmt.machinelearningservices.models.BatchRetrySettings + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'code_configuration': {'key': 'codeConfiguration', 'type': 'CodeConfiguration'}, + 'description': {'key': 'description', 'type': 'str'}, + 'environment_id': {'key': 'environmentId', 'type': 'str'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'compute': {'key': 'compute', 'type': 'str'}, + 'error_threshold': {'key': 'errorThreshold', 'type': 'int'}, + 'logging_level': {'key': 'loggingLevel', 'type': 'str'}, + 'max_concurrency_per_instance': {'key': 'maxConcurrencyPerInstance', 'type': 'int'}, + 'mini_batch_size': {'key': 'miniBatchSize', 'type': 'long'}, + 'model': {'key': 'model', 'type': 'AssetReferenceBase'}, + 'output_action': {'key': 'outputAction', 'type': 'str'}, + 'output_file_name': {'key': 'outputFileName', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': 'ResourceConfiguration'}, + 'retry_settings': {'key': 'retrySettings', 'type': 'BatchRetrySettings'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword code_configuration: Code configuration for the endpoint deployment. + :paramtype code_configuration: ~azure.mgmt.machinelearningservices.models.CodeConfiguration + :keyword description: Description of the endpoint deployment. + :paramtype description: str + :keyword environment_id: ARM resource ID of the environment specification for the endpoint + deployment. + :paramtype environment_id: str + :keyword environment_variables: Environment variables configuration for the deployment. + :paramtype environment_variables: dict[str, str] + :keyword properties: Property dictionary. Properties can be added, but not removed or altered. + :paramtype properties: dict[str, str] + :keyword compute: Compute target for batch inference operation. + :paramtype compute: str + :keyword error_threshold: Error threshold, if the error count for the entire input goes above + this value, + the batch inference will be aborted. Range is [-1, int.MaxValue]. + For FileDataset, this value is the count of file failures. + For TabularDataset, this value is the count of record failures. + If set to -1 (the lower bound), all failures during batch inference will be ignored. + :paramtype error_threshold: int + :keyword logging_level: Logging level for batch inference operation. Possible values include: + "Info", "Warning", "Debug". + :paramtype logging_level: str or ~azure.mgmt.machinelearningservices.models.BatchLoggingLevel + :keyword max_concurrency_per_instance: Indicates maximum number of parallelism per instance. + :paramtype max_concurrency_per_instance: int + :keyword mini_batch_size: Size of the mini-batch passed to each batch invocation. + For FileDataset, this is the number of files per mini-batch. + For TabularDataset, this is the size of the records in bytes, per mini-batch. + :paramtype mini_batch_size: long + :keyword model: Reference to the model asset for the endpoint deployment. + :paramtype model: ~azure.mgmt.machinelearningservices.models.AssetReferenceBase + :keyword output_action: Indicates how the output will be organized. Possible values include: + "SummaryOnly", "AppendRow". + :paramtype output_action: str or ~azure.mgmt.machinelearningservices.models.BatchOutputAction + :keyword output_file_name: Customized output file name for append_row output action. + :paramtype output_file_name: str + :keyword resources: Indicates compute configuration for the job. + If not provided, will default to the defaults defined in ResourceConfiguration. + :paramtype resources: ~azure.mgmt.machinelearningservices.models.ResourceConfiguration + :keyword retry_settings: Retry Settings for the batch inference operation. + If not provided, will default to the defaults defined in BatchRetrySettings. + :paramtype retry_settings: ~azure.mgmt.machinelearningservices.models.BatchRetrySettings + """ + super(BatchDeploymentDetails, self).__init__(**kwargs) + self.compute = kwargs.get('compute', None) + self.error_threshold = kwargs.get('error_threshold', -1) + self.logging_level = kwargs.get('logging_level', None) + self.max_concurrency_per_instance = kwargs.get('max_concurrency_per_instance', 1) + self.mini_batch_size = kwargs.get('mini_batch_size', 10) + self.model = kwargs.get('model', None) + self.output_action = kwargs.get('output_action', None) + self.output_file_name = kwargs.get('output_file_name', "predictions.csv") + self.provisioning_state = None + self.resources = kwargs.get('resources', None) + self.retry_settings = kwargs.get('retry_settings', None) + + +class BatchDeploymentTrackedResourceArmPaginatedResult(msrest.serialization.Model): + """A paginated list of BatchDeployment entities. + + :ivar next_link: The link to the next page of BatchDeployment objects. If null, there are no + additional pages. + :vartype next_link: str + :ivar value: An array of objects of type BatchDeployment. + :vartype value: list[~azure.mgmt.machinelearningservices.models.BatchDeploymentData] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[BatchDeploymentData]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword next_link: The link to the next page of BatchDeployment objects. If null, there are no + additional pages. + :paramtype next_link: str + :keyword value: An array of objects of type BatchDeployment. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.BatchDeploymentData] + """ + super(BatchDeploymentTrackedResourceArmPaginatedResult, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class BatchEndpointData(TrackedResource): + """BatchEndpointData. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar location: Required. The geo-location where the resource lives. + :vartype location: str + :ivar identity: Managed service identity (system assigned and/or user assigned identities). + :vartype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :ivar kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type. + :vartype kind: str + :ivar properties: Required. [Required] Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.BatchEndpointDetails + :ivar sku: Sku details required for ARM contract for Autoscaling. + :vartype sku: ~azure.mgmt.machinelearningservices.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'location': {'required': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'BatchEndpointDetails'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword location: Required. The geo-location where the resource lives. + :paramtype location: str + :keyword identity: Managed service identity (system assigned and/or user assigned identities). + :paramtype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :keyword kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type. + :paramtype kind: str + :keyword properties: Required. [Required] Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.BatchEndpointDetails + :keyword sku: Sku details required for ARM contract for Autoscaling. + :paramtype sku: ~azure.mgmt.machinelearningservices.models.Sku + """ + super(BatchEndpointData, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.kind = kwargs.get('kind', None) + self.properties = kwargs['properties'] + self.sku = kwargs.get('sku', None) + + +class BatchEndpointDefaults(msrest.serialization.Model): + """Batch endpoint default values. + + :ivar deployment_name: Name of the deployment that will be default for the endpoint. + This deployment will end up getting 100% traffic when the endpoint scoring URL is invoked. + :vartype deployment_name: str + """ + + _attribute_map = { + 'deployment_name': {'key': 'deploymentName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword deployment_name: Name of the deployment that will be default for the endpoint. + This deployment will end up getting 100% traffic when the endpoint scoring URL is invoked. + :paramtype deployment_name: str + """ + super(BatchEndpointDefaults, self).__init__(**kwargs) + self.deployment_name = kwargs.get('deployment_name', None) + + +class EndpointPropertiesBase(msrest.serialization.Model): + """Inference Endpoint base definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar auth_mode: Required. [Required] Use 'Key' for key based authentication and 'AMLToken' for + Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. + Possible values include: "AMLToken", "Key", "AADToken". + :vartype auth_mode: str or ~azure.mgmt.machinelearningservices.models.EndpointAuthMode + :ivar description: Description of the inference endpoint. + :vartype description: str + :ivar keys: EndpointAuthKeys to set initially on an Endpoint. + This property will always be returned as null. AuthKey values must be retrieved using the + ListKeys API. + :vartype keys: ~azure.mgmt.machinelearningservices.models.EndpointAuthKeys + :ivar properties: Property dictionary. Properties can be added, but not removed or altered. + :vartype properties: dict[str, str] + :ivar scoring_uri: Endpoint URI. + :vartype scoring_uri: str + :ivar swagger_uri: Endpoint Swagger URI. + :vartype swagger_uri: str + """ + + _validation = { + 'auth_mode': {'required': True}, + 'scoring_uri': {'readonly': True}, + 'swagger_uri': {'readonly': True}, + } + + _attribute_map = { + 'auth_mode': {'key': 'authMode', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'keys': {'key': 'keys', 'type': 'EndpointAuthKeys'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'scoring_uri': {'key': 'scoringUri', 'type': 'str'}, + 'swagger_uri': {'key': 'swaggerUri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword auth_mode: Required. [Required] Use 'Key' for key based authentication and 'AMLToken' + for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' + does. Possible values include: "AMLToken", "Key", "AADToken". + :paramtype auth_mode: str or ~azure.mgmt.machinelearningservices.models.EndpointAuthMode + :keyword description: Description of the inference endpoint. + :paramtype description: str + :keyword keys: EndpointAuthKeys to set initially on an Endpoint. + This property will always be returned as null. AuthKey values must be retrieved using the + ListKeys API. + :paramtype keys: ~azure.mgmt.machinelearningservices.models.EndpointAuthKeys + :keyword properties: Property dictionary. Properties can be added, but not removed or altered. + :paramtype properties: dict[str, str] + """ + super(EndpointPropertiesBase, self).__init__(**kwargs) + self.auth_mode = kwargs['auth_mode'] + self.description = kwargs.get('description', None) + self.keys = kwargs.get('keys', None) + self.properties = kwargs.get('properties', None) + self.scoring_uri = None + self.swagger_uri = None + + +class BatchEndpointDetails(EndpointPropertiesBase): + """Batch endpoint configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar auth_mode: Required. [Required] Use 'Key' for key based authentication and 'AMLToken' for + Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. + Possible values include: "AMLToken", "Key", "AADToken". + :vartype auth_mode: str or ~azure.mgmt.machinelearningservices.models.EndpointAuthMode + :ivar description: Description of the inference endpoint. + :vartype description: str + :ivar keys: EndpointAuthKeys to set initially on an Endpoint. + This property will always be returned as null. AuthKey values must be retrieved using the + ListKeys API. + :vartype keys: ~azure.mgmt.machinelearningservices.models.EndpointAuthKeys + :ivar properties: Property dictionary. Properties can be added, but not removed or altered. + :vartype properties: dict[str, str] + :ivar scoring_uri: Endpoint URI. + :vartype scoring_uri: str + :ivar swagger_uri: Endpoint Swagger URI. + :vartype swagger_uri: str + :ivar defaults: Default values for Batch Endpoint. + :vartype defaults: ~azure.mgmt.machinelearningservices.models.BatchEndpointDefaults + :ivar provisioning_state: Provisioning state for the endpoint. Possible values include: + "Creating", "Deleting", "Succeeded", "Failed", "Updating", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.EndpointProvisioningState + """ + + _validation = { + 'auth_mode': {'required': True}, + 'scoring_uri': {'readonly': True}, + 'swagger_uri': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'auth_mode': {'key': 'authMode', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'keys': {'key': 'keys', 'type': 'EndpointAuthKeys'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'scoring_uri': {'key': 'scoringUri', 'type': 'str'}, + 'swagger_uri': {'key': 'swaggerUri', 'type': 'str'}, + 'defaults': {'key': 'defaults', 'type': 'BatchEndpointDefaults'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword auth_mode: Required. [Required] Use 'Key' for key based authentication and 'AMLToken' + for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' + does. Possible values include: "AMLToken", "Key", "AADToken". + :paramtype auth_mode: str or ~azure.mgmt.machinelearningservices.models.EndpointAuthMode + :keyword description: Description of the inference endpoint. + :paramtype description: str + :keyword keys: EndpointAuthKeys to set initially on an Endpoint. + This property will always be returned as null. AuthKey values must be retrieved using the + ListKeys API. + :paramtype keys: ~azure.mgmt.machinelearningservices.models.EndpointAuthKeys + :keyword properties: Property dictionary. Properties can be added, but not removed or altered. + :paramtype properties: dict[str, str] + :keyword defaults: Default values for Batch Endpoint. + :paramtype defaults: ~azure.mgmt.machinelearningservices.models.BatchEndpointDefaults + """ + super(BatchEndpointDetails, self).__init__(**kwargs) + self.defaults = kwargs.get('defaults', None) + self.provisioning_state = None + + +class BatchEndpointTrackedResourceArmPaginatedResult(msrest.serialization.Model): + """A paginated list of BatchEndpoint entities. + + :ivar next_link: The link to the next page of BatchEndpoint objects. If null, there are no + additional pages. + :vartype next_link: str + :ivar value: An array of objects of type BatchEndpoint. + :vartype value: list[~azure.mgmt.machinelearningservices.models.BatchEndpointData] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[BatchEndpointData]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword next_link: The link to the next page of BatchEndpoint objects. If null, there are no + additional pages. + :paramtype next_link: str + :keyword value: An array of objects of type BatchEndpoint. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.BatchEndpointData] + """ + super(BatchEndpointTrackedResourceArmPaginatedResult, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class BatchRetrySettings(msrest.serialization.Model): + """Retry settings for a batch inference operation. + + :ivar max_retries: Maximum retry count for a mini-batch. + :vartype max_retries: int + :ivar timeout: Invocation timeout for a mini-batch, in ISO 8601 format. + :vartype timeout: ~datetime.timedelta + """ + + _attribute_map = { + 'max_retries': {'key': 'maxRetries', 'type': 'int'}, + 'timeout': {'key': 'timeout', 'type': 'duration'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword max_retries: Maximum retry count for a mini-batch. + :paramtype max_retries: int + :keyword timeout: Invocation timeout for a mini-batch, in ISO 8601 format. + :paramtype timeout: ~datetime.timedelta + """ + super(BatchRetrySettings, self).__init__(**kwargs) + self.max_retries = kwargs.get('max_retries', 3) + self.timeout = kwargs.get('timeout', "PT30S") + + +class SamplingAlgorithm(msrest.serialization.Model): + """The Sampling Algorithm used to generate hyperparameter values, along with properties to +configure the algorithm. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: BayesianSamplingAlgorithm, GridSamplingAlgorithm, RandomSamplingAlgorithm. + + All required parameters must be populated in order to send to Azure. + + :ivar sampling_algorithm_type: Required. [Required] The algorithm used for generating + hyperparameter values, along with configuration properties.Constant filled by server. Possible + values include: "Grid", "Random", "Bayesian". + :vartype sampling_algorithm_type: str or + ~azure.mgmt.machinelearningservices.models.SamplingAlgorithmType + """ + + _validation = { + 'sampling_algorithm_type': {'required': True}, + } + + _attribute_map = { + 'sampling_algorithm_type': {'key': 'samplingAlgorithmType', 'type': 'str'}, + } + + _subtype_map = { + 'sampling_algorithm_type': {'Bayesian': 'BayesianSamplingAlgorithm', 'Grid': 'GridSamplingAlgorithm', 'Random': 'RandomSamplingAlgorithm'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(SamplingAlgorithm, self).__init__(**kwargs) + self.sampling_algorithm_type = None # type: Optional[str] + + +class BayesianSamplingAlgorithm(SamplingAlgorithm): + """Defines a Sampling Algorithm that generates values based on previous values. + + All required parameters must be populated in order to send to Azure. + + :ivar sampling_algorithm_type: Required. [Required] The algorithm used for generating + hyperparameter values, along with configuration properties.Constant filled by server. Possible + values include: "Grid", "Random", "Bayesian". + :vartype sampling_algorithm_type: str or + ~azure.mgmt.machinelearningservices.models.SamplingAlgorithmType + """ + + _validation = { + 'sampling_algorithm_type': {'required': True}, + } + + _attribute_map = { + 'sampling_algorithm_type': {'key': 'samplingAlgorithmType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(BayesianSamplingAlgorithm, self).__init__(**kwargs) + self.sampling_algorithm_type = 'Bayesian' # type: str + + +class BuildContext(msrest.serialization.Model): + """Configuration settings for Docker build context. + + All required parameters must be populated in order to send to Azure. + + :ivar context_uri: Required. [Required] URI of the Docker build context used to build the + image. Supports blob URIs on environment creation and may return blob or Git URIs. + + + .. raw:: html + + <seealso + href="https://docs.docker.com/engine/reference/commandline/build/#extended-description" />. + :vartype context_uri: str + :ivar dockerfile_path: Path to the Dockerfile in the build context. + + + .. raw:: html + + <seealso href="https://docs.docker.com/engine/reference/builder/" />. + :vartype dockerfile_path: str + """ + + _validation = { + 'context_uri': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + } + + _attribute_map = { + 'context_uri': {'key': 'contextUri', 'type': 'str'}, + 'dockerfile_path': {'key': 'dockerfilePath', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword context_uri: Required. [Required] URI of the Docker build context used to build the + image. Supports blob URIs on environment creation and may return blob or Git URIs. + + + .. raw:: html + + <seealso + href="https://docs.docker.com/engine/reference/commandline/build/#extended-description" />. + :paramtype context_uri: str + :keyword dockerfile_path: Path to the Dockerfile in the build context. + + + .. raw:: html + + <seealso href="https://docs.docker.com/engine/reference/builder/" />. + :paramtype dockerfile_path: str + """ + super(BuildContext, self).__init__(**kwargs) + self.context_uri = kwargs['context_uri'] + self.dockerfile_path = kwargs.get('dockerfile_path', "Dockerfile") + + +class CertificateDatastoreCredentials(DatastoreCredentials): + """Certificate datastore credentials configuration. + + All required parameters must be populated in order to send to Azure. + + :ivar credentials_type: Required. [Required] Credential type used to authentication with + storage.Constant filled by server. Possible values include: "AccountKey", "Certificate", + "None", "Sas", "ServicePrincipal". + :vartype credentials_type: str or ~azure.mgmt.machinelearningservices.models.CredentialsType + :ivar authority_url: Authority URL used for authentication. + :vartype authority_url: str + :ivar client_id: Required. [Required] Service principal client ID. + :vartype client_id: str + :ivar resource_url: Resource the service principal has access to. + :vartype resource_url: str + :ivar secrets: Required. [Required] Service principal secrets. + :vartype secrets: ~azure.mgmt.machinelearningservices.models.CertificateDatastoreSecrets + :ivar tenant_id: Required. [Required] ID of the tenant to which the service principal belongs. + :vartype tenant_id: str + :ivar thumbprint: Required. [Required] Thumbprint of the certificate used for authentication. + :vartype thumbprint: str + """ + + _validation = { + 'credentials_type': {'required': True}, + 'client_id': {'required': True}, + 'secrets': {'required': True}, + 'tenant_id': {'required': True}, + 'thumbprint': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + } + + _attribute_map = { + 'credentials_type': {'key': 'credentialsType', 'type': 'str'}, + 'authority_url': {'key': 'authorityUrl', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'resource_url': {'key': 'resourceUrl', 'type': 'str'}, + 'secrets': {'key': 'secrets', 'type': 'CertificateDatastoreSecrets'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword authority_url: Authority URL used for authentication. + :paramtype authority_url: str + :keyword client_id: Required. [Required] Service principal client ID. + :paramtype client_id: str + :keyword resource_url: Resource the service principal has access to. + :paramtype resource_url: str + :keyword secrets: Required. [Required] Service principal secrets. + :paramtype secrets: ~azure.mgmt.machinelearningservices.models.CertificateDatastoreSecrets + :keyword tenant_id: Required. [Required] ID of the tenant to which the service principal + belongs. + :paramtype tenant_id: str + :keyword thumbprint: Required. [Required] Thumbprint of the certificate used for + authentication. + :paramtype thumbprint: str + """ + super(CertificateDatastoreCredentials, self).__init__(**kwargs) + self.credentials_type = 'Certificate' # type: str + self.authority_url = kwargs.get('authority_url', None) + self.client_id = kwargs['client_id'] + self.resource_url = kwargs.get('resource_url', None) + self.secrets = kwargs['secrets'] + self.tenant_id = kwargs['tenant_id'] + self.thumbprint = kwargs['thumbprint'] + + +class CertificateDatastoreSecrets(DatastoreSecrets): + """Datastore certificate secrets. + + All required parameters must be populated in order to send to Azure. + + :ivar secrets_type: Required. [Required] Credential type used to authentication with + storage.Constant filled by server. Possible values include: "AccountKey", "Certificate", "Sas", + "ServicePrincipal". + :vartype secrets_type: str or ~azure.mgmt.machinelearningservices.models.SecretsType + :ivar certificate: Service principal certificate. + :vartype certificate: str + """ + + _validation = { + 'secrets_type': {'required': True}, + } + + _attribute_map = { + 'secrets_type': {'key': 'secretsType', 'type': 'str'}, + 'certificate': {'key': 'certificate', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword certificate: Service principal certificate. + :paramtype certificate: str + """ + super(CertificateDatastoreSecrets, self).__init__(**kwargs) + self.secrets_type = 'Certificate' # type: str + self.certificate = kwargs.get('certificate', None) + + +class ClusterUpdateParameters(msrest.serialization.Model): + """AmlCompute update parameters. + + :ivar properties: Properties of ClusterUpdate. + :vartype properties: ~azure.mgmt.machinelearningservices.models.ScaleSettingsInformation + """ + + _attribute_map = { + 'properties': {'key': 'properties.properties', 'type': 'ScaleSettingsInformation'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: Properties of ClusterUpdate. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.ScaleSettingsInformation + """ + super(ClusterUpdateParameters, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class CodeConfiguration(msrest.serialization.Model): + """Configuration for a scoring code asset. + + All required parameters must be populated in order to send to Azure. + + :ivar code_id: ARM resource ID of the code asset. + :vartype code_id: str + :ivar scoring_script: Required. [Required] The script to execute on startup. eg. "score.py". + :vartype scoring_script: str + """ + + _validation = { + 'scoring_script': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + } + + _attribute_map = { + 'code_id': {'key': 'codeId', 'type': 'str'}, + 'scoring_script': {'key': 'scoringScript', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword code_id: ARM resource ID of the code asset. + :paramtype code_id: str + :keyword scoring_script: Required. [Required] The script to execute on startup. eg. "score.py". + :paramtype scoring_script: str + """ + super(CodeConfiguration, self).__init__(**kwargs) + self.code_id = kwargs.get('code_id', None) + self.scoring_script = kwargs['scoring_script'] + + +class CodeContainerData(Resource): + """Azure Resource Manager resource envelope. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar properties: Required. [Required] Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.CodeContainerDetails + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'CodeContainerDetails'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: Required. [Required] Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.CodeContainerDetails + """ + super(CodeContainerData, self).__init__(**kwargs) + self.properties = kwargs['properties'] + + +class CodeContainerDetails(AssetContainer): + """Container for code asset versions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar latest_version: The latest version inside this container. + :vartype latest_version: str + :ivar next_version: The next auto incremental version. + :vartype next_version: str + """ + + _validation = { + 'latest_version': {'readonly': True}, + 'next_version': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'latest_version': {'key': 'latestVersion', 'type': 'str'}, + 'next_version': {'key': 'nextVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + """ + super(CodeContainerDetails, self).__init__(**kwargs) + + +class CodeContainerResourceArmPaginatedResult(msrest.serialization.Model): + """A paginated list of CodeContainer entities. + + :ivar next_link: The link to the next page of CodeContainer objects. If null, there are no + additional pages. + :vartype next_link: str + :ivar value: An array of objects of type CodeContainer. + :vartype value: list[~azure.mgmt.machinelearningservices.models.CodeContainerData] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[CodeContainerData]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword next_link: The link to the next page of CodeContainer objects. If null, there are no + additional pages. + :paramtype next_link: str + :keyword value: An array of objects of type CodeContainer. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.CodeContainerData] + """ + super(CodeContainerResourceArmPaginatedResult, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class CodeVersionData(Resource): + """Azure Resource Manager resource envelope. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar properties: Required. [Required] Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.CodeVersionDetails + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'CodeVersionDetails'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: Required. [Required] Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.CodeVersionDetails + """ + super(CodeVersionData, self).__init__(**kwargs) + self.properties = kwargs['properties'] + + +class CodeVersionDetails(AssetBase): + """Code asset version details. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar is_anonymous: If the name version are system generated (anonymous registration). + :vartype is_anonymous: bool + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar code_uri: Uri where code is located. + :vartype code_uri: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'code_uri': {'key': 'codeUri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword is_anonymous: If the name version are system generated (anonymous registration). + :paramtype is_anonymous: bool + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + :keyword code_uri: Uri where code is located. + :paramtype code_uri: str + """ + super(CodeVersionDetails, self).__init__(**kwargs) + self.code_uri = kwargs.get('code_uri', None) + + +class CodeVersionResourceArmPaginatedResult(msrest.serialization.Model): + """A paginated list of CodeVersion entities. + + :ivar next_link: The link to the next page of CodeVersion objects. If null, there are no + additional pages. + :vartype next_link: str + :ivar value: An array of objects of type CodeVersion. + :vartype value: list[~azure.mgmt.machinelearningservices.models.CodeVersionData] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[CodeVersionData]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword next_link: The link to the next page of CodeVersion objects. If null, there are no + additional pages. + :paramtype next_link: str + :keyword value: An array of objects of type CodeVersion. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.CodeVersionData] + """ + super(CodeVersionResourceArmPaginatedResult, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class JobBaseDetails(ResourceBase): + """Base definition for a job. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CommandJob, PipelineJob, SweepJob. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar compute_id: ARM resource ID of the compute resource. + :vartype compute_id: str + :ivar display_name: Display name of job. + :vartype display_name: str + :ivar experiment_name: The name of the experiment the job belongs to. If not set, the job is + placed in the "Default" experiment. + :vartype experiment_name: str + :ivar identity: Identity configuration. If set, this should be one of AmlToken, + ManagedIdentity, UserIdentity or null. + Defaults to AmlToken if null. + :vartype identity: ~azure.mgmt.machinelearningservices.models.IdentityConfiguration + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar job_type: Required. [Required] Specifies the type of job.Constant filled by server. + Possible values include: "Command", "Sweep", "Pipeline". + :vartype job_type: str or ~azure.mgmt.machinelearningservices.models.JobType + :ivar services: List of JobEndpoints. + For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + :vartype services: dict[str, ~azure.mgmt.machinelearningservices.models.JobService] + :ivar status: Status of the job. Possible values include: "NotStarted", "Starting", + "Provisioning", "Preparing", "Queued", "Running", "Finalizing", "CancelRequested", "Completed", + "Failed", "Canceled", "NotResponding", "Paused", "Unknown". + :vartype status: str or ~azure.mgmt.machinelearningservices.models.JobStatus + """ + + _validation = { + 'job_type': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'compute_id': {'key': 'computeId', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'experiment_name': {'key': 'experimentName', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'IdentityConfiguration'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'services': {'key': 'services', 'type': '{JobService}'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + _subtype_map = { + 'job_type': {'Command': 'CommandJob', 'Pipeline': 'PipelineJob', 'Sweep': 'SweepJob'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword compute_id: ARM resource ID of the compute resource. + :paramtype compute_id: str + :keyword display_name: Display name of job. + :paramtype display_name: str + :keyword experiment_name: The name of the experiment the job belongs to. If not set, the job is + placed in the "Default" experiment. + :paramtype experiment_name: str + :keyword identity: Identity configuration. If set, this should be one of AmlToken, + ManagedIdentity, UserIdentity or null. + Defaults to AmlToken if null. + :paramtype identity: ~azure.mgmt.machinelearningservices.models.IdentityConfiguration + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + :keyword services: List of JobEndpoints. + For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + :paramtype services: dict[str, ~azure.mgmt.machinelearningservices.models.JobService] + """ + super(JobBaseDetails, self).__init__(**kwargs) + self.compute_id = kwargs.get('compute_id', None) + self.display_name = kwargs.get('display_name', None) + self.experiment_name = kwargs.get('experiment_name', "Default") + self.identity = kwargs.get('identity', None) + self.is_archived = kwargs.get('is_archived', False) + self.job_type = 'JobBaseDetails' # type: str + self.services = kwargs.get('services', None) + self.status = None + + +class CommandJob(JobBaseDetails): + """Command job definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar compute_id: ARM resource ID of the compute resource. + :vartype compute_id: str + :ivar display_name: Display name of job. + :vartype display_name: str + :ivar experiment_name: The name of the experiment the job belongs to. If not set, the job is + placed in the "Default" experiment. + :vartype experiment_name: str + :ivar identity: Identity configuration. If set, this should be one of AmlToken, + ManagedIdentity, UserIdentity or null. + Defaults to AmlToken if null. + :vartype identity: ~azure.mgmt.machinelearningservices.models.IdentityConfiguration + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar job_type: Required. [Required] Specifies the type of job.Constant filled by server. + Possible values include: "Command", "Sweep", "Pipeline". + :vartype job_type: str or ~azure.mgmt.machinelearningservices.models.JobType + :ivar services: List of JobEndpoints. + For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + :vartype services: dict[str, ~azure.mgmt.machinelearningservices.models.JobService] + :ivar status: Status of the job. Possible values include: "NotStarted", "Starting", + "Provisioning", "Preparing", "Queued", "Running", "Finalizing", "CancelRequested", "Completed", + "Failed", "Canceled", "NotResponding", "Paused", "Unknown". + :vartype status: str or ~azure.mgmt.machinelearningservices.models.JobStatus + :ivar code_id: ARM resource ID of the code asset. + :vartype code_id: str + :ivar command: Required. [Required] The command to execute on startup of the job. eg. "python + train.py". + :vartype command: str + :ivar distribution: Distribution configuration of the job. If set, this should be one of Mpi, + Tensorflow, PyTorch, or null. + :vartype distribution: ~azure.mgmt.machinelearningservices.models.DistributionConfiguration + :ivar environment_id: Required. [Required] The ARM resource ID of the Environment specification + for the job. + :vartype environment_id: str + :ivar environment_variables: Environment variables included in the job. + :vartype environment_variables: dict[str, str] + :ivar inputs: Mapping of input data bindings used in the job. + :vartype inputs: dict[str, ~azure.mgmt.machinelearningservices.models.JobInput] + :ivar limits: Command Job limit. + :vartype limits: ~azure.mgmt.machinelearningservices.models.CommandJobLimits + :ivar outputs: Mapping of output data bindings used in the job. + :vartype outputs: dict[str, ~azure.mgmt.machinelearningservices.models.JobOutput] + :ivar parameters: Input parameters. + :vartype parameters: any + :ivar resources: Compute Resource configuration for the job. + :vartype resources: ~azure.mgmt.machinelearningservices.models.ResourceConfiguration + """ + + _validation = { + 'job_type': {'required': True}, + 'status': {'readonly': True}, + 'command': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + 'environment_id': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + 'parameters': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'compute_id': {'key': 'computeId', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'experiment_name': {'key': 'experimentName', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'IdentityConfiguration'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'services': {'key': 'services', 'type': '{JobService}'}, + 'status': {'key': 'status', 'type': 'str'}, + 'code_id': {'key': 'codeId', 'type': 'str'}, + 'command': {'key': 'command', 'type': 'str'}, + 'distribution': {'key': 'distribution', 'type': 'DistributionConfiguration'}, + 'environment_id': {'key': 'environmentId', 'type': 'str'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, + 'inputs': {'key': 'inputs', 'type': '{JobInput}'}, + 'limits': {'key': 'limits', 'type': 'CommandJobLimits'}, + 'outputs': {'key': 'outputs', 'type': '{JobOutput}'}, + 'parameters': {'key': 'parameters', 'type': 'object'}, + 'resources': {'key': 'resources', 'type': 'ResourceConfiguration'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword compute_id: ARM resource ID of the compute resource. + :paramtype compute_id: str + :keyword display_name: Display name of job. + :paramtype display_name: str + :keyword experiment_name: The name of the experiment the job belongs to. If not set, the job is + placed in the "Default" experiment. + :paramtype experiment_name: str + :keyword identity: Identity configuration. If set, this should be one of AmlToken, + ManagedIdentity, UserIdentity or null. + Defaults to AmlToken if null. + :paramtype identity: ~azure.mgmt.machinelearningservices.models.IdentityConfiguration + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + :keyword services: List of JobEndpoints. + For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + :paramtype services: dict[str, ~azure.mgmt.machinelearningservices.models.JobService] + :keyword code_id: ARM resource ID of the code asset. + :paramtype code_id: str + :keyword command: Required. [Required] The command to execute on startup of the job. eg. + "python train.py". + :paramtype command: str + :keyword distribution: Distribution configuration of the job. If set, this should be one of + Mpi, Tensorflow, PyTorch, or null. + :paramtype distribution: ~azure.mgmt.machinelearningservices.models.DistributionConfiguration + :keyword environment_id: Required. [Required] The ARM resource ID of the Environment + specification for the job. + :paramtype environment_id: str + :keyword environment_variables: Environment variables included in the job. + :paramtype environment_variables: dict[str, str] + :keyword inputs: Mapping of input data bindings used in the job. + :paramtype inputs: dict[str, ~azure.mgmt.machinelearningservices.models.JobInput] + :keyword limits: Command Job limit. + :paramtype limits: ~azure.mgmt.machinelearningservices.models.CommandJobLimits + :keyword outputs: Mapping of output data bindings used in the job. + :paramtype outputs: dict[str, ~azure.mgmt.machinelearningservices.models.JobOutput] + :keyword resources: Compute Resource configuration for the job. + :paramtype resources: ~azure.mgmt.machinelearningservices.models.ResourceConfiguration + """ + super(CommandJob, self).__init__(**kwargs) + self.job_type = 'Command' # type: str + self.code_id = kwargs.get('code_id', None) + self.command = kwargs['command'] + self.distribution = kwargs.get('distribution', None) + self.environment_id = kwargs['environment_id'] + self.environment_variables = kwargs.get('environment_variables', None) + self.inputs = kwargs.get('inputs', None) + self.limits = kwargs.get('limits', None) + self.outputs = kwargs.get('outputs', None) + self.parameters = None + self.resources = kwargs.get('resources', None) + + +class JobLimits(msrest.serialization.Model): + """JobLimits. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CommandJobLimits, SweepJobLimits. + + All required parameters must be populated in order to send to Azure. + + :ivar job_limits_type: Required. [Required] JobLimit type.Constant filled by server. Possible + values include: "Command", "Sweep". + :vartype job_limits_type: str or ~azure.mgmt.machinelearningservices.models.JobLimitsType + :ivar timeout: The max run duration in ISO 8601 format, after which the job will be cancelled. + Only supports duration with precision as low as Seconds. + :vartype timeout: ~datetime.timedelta + """ + + _validation = { + 'job_limits_type': {'required': True}, + } + + _attribute_map = { + 'job_limits_type': {'key': 'jobLimitsType', 'type': 'str'}, + 'timeout': {'key': 'timeout', 'type': 'duration'}, + } + + _subtype_map = { + 'job_limits_type': {'Command': 'CommandJobLimits', 'Sweep': 'SweepJobLimits'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword timeout: The max run duration in ISO 8601 format, after which the job will be + cancelled. Only supports duration with precision as low as Seconds. + :paramtype timeout: ~datetime.timedelta + """ + super(JobLimits, self).__init__(**kwargs) + self.job_limits_type = None # type: Optional[str] + self.timeout = kwargs.get('timeout', None) + + +class CommandJobLimits(JobLimits): + """Command Job limit class. + + All required parameters must be populated in order to send to Azure. + + :ivar job_limits_type: Required. [Required] JobLimit type.Constant filled by server. Possible + values include: "Command", "Sweep". + :vartype job_limits_type: str or ~azure.mgmt.machinelearningservices.models.JobLimitsType + :ivar timeout: The max run duration in ISO 8601 format, after which the job will be cancelled. + Only supports duration with precision as low as Seconds. + :vartype timeout: ~datetime.timedelta + """ + + _validation = { + 'job_limits_type': {'required': True}, + } + + _attribute_map = { + 'job_limits_type': {'key': 'jobLimitsType', 'type': 'str'}, + 'timeout': {'key': 'timeout', 'type': 'duration'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword timeout: The max run duration in ISO 8601 format, after which the job will be + cancelled. Only supports duration with precision as low as Seconds. + :paramtype timeout: ~datetime.timedelta + """ + super(CommandJobLimits, self).__init__(**kwargs) + self.job_limits_type = 'Command' # type: str + + +class ComponentContainerData(Resource): + """Azure Resource Manager resource envelope. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar properties: Required. [Required] Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.ComponentContainerDetails + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'ComponentContainerDetails'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: Required. [Required] Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.ComponentContainerDetails + """ + super(ComponentContainerData, self).__init__(**kwargs) + self.properties = kwargs['properties'] + + +class ComponentContainerDetails(AssetContainer): + """Component container definition. + + +.. raw:: html + + <see href="https://learn.microsoft.com/azure/machine-learning/reference-yaml-component-command" />. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar latest_version: The latest version inside this container. + :vartype latest_version: str + :ivar next_version: The next auto incremental version. + :vartype next_version: str + """ + + _validation = { + 'latest_version': {'readonly': True}, + 'next_version': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'latest_version': {'key': 'latestVersion', 'type': 'str'}, + 'next_version': {'key': 'nextVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + """ + super(ComponentContainerDetails, self).__init__(**kwargs) + + +class ComponentContainerResourceArmPaginatedResult(msrest.serialization.Model): + """A paginated list of ComponentContainer entities. + + :ivar next_link: The link to the next page of ComponentContainer objects. If null, there are no + additional pages. + :vartype next_link: str + :ivar value: An array of objects of type ComponentContainer. + :vartype value: list[~azure.mgmt.machinelearningservices.models.ComponentContainerData] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ComponentContainerData]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword next_link: The link to the next page of ComponentContainer objects. If null, there are + no additional pages. + :paramtype next_link: str + :keyword value: An array of objects of type ComponentContainer. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.ComponentContainerData] + """ + super(ComponentContainerResourceArmPaginatedResult, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class ComponentVersionData(Resource): + """Azure Resource Manager resource envelope. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar properties: Required. [Required] Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.ComponentVersionDetails + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'ComponentVersionDetails'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: Required. [Required] Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.ComponentVersionDetails + """ + super(ComponentVersionData, self).__init__(**kwargs) + self.properties = kwargs['properties'] + + +class ComponentVersionDetails(AssetBase): + """Definition of a component version: defines resources that span component types. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar is_anonymous: If the name version are system generated (anonymous registration). + :vartype is_anonymous: bool + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar component_spec: Defines Component definition details. + + + .. raw:: html + + <see + href="https://learn.microsoft.com/azure/machine-learning/reference-yaml-component-command" + />. + :vartype component_spec: any + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'component_spec': {'key': 'componentSpec', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword is_anonymous: If the name version are system generated (anonymous registration). + :paramtype is_anonymous: bool + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + :keyword component_spec: Defines Component definition details. + + + .. raw:: html + + <see + href="https://learn.microsoft.com/azure/machine-learning/reference-yaml-component-command" + />. + :paramtype component_spec: any + """ + super(ComponentVersionDetails, self).__init__(**kwargs) + self.component_spec = kwargs.get('component_spec', None) + + +class ComponentVersionResourceArmPaginatedResult(msrest.serialization.Model): + """A paginated list of ComponentVersion entities. + + :ivar next_link: The link to the next page of ComponentVersion objects. If null, there are no + additional pages. + :vartype next_link: str + :ivar value: An array of objects of type ComponentVersion. + :vartype value: list[~azure.mgmt.machinelearningservices.models.ComponentVersionData] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ComponentVersionData]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword next_link: The link to the next page of ComponentVersion objects. If null, there are + no additional pages. + :paramtype next_link: str + :keyword value: An array of objects of type ComponentVersion. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.ComponentVersionData] + """ + super(ComponentVersionResourceArmPaginatedResult, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class ComputeInstanceSchema(msrest.serialization.Model): + """Properties(top level) of ComputeInstance. + + :ivar properties: Properties of ComputeInstance. + :vartype properties: ~azure.mgmt.machinelearningservices.models.ComputeInstanceProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'ComputeInstanceProperties'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: Properties of ComputeInstance. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.ComputeInstanceProperties + """ + super(ComputeInstanceSchema, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class ComputeInstance(Compute, ComputeInstanceSchema): + """An Azure Machine Learning compute instance. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar properties: Properties of ComputeInstance. + :vartype properties: ~azure.mgmt.machinelearningservices.models.ComputeInstanceProperties + :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values + include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", + "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark". + :vartype compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType + :ivar compute_location: Location for the underlying compute. + :vartype compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values are Unknown, + Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating", + "Creating", "Deleting", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :ivar description: The description of the Machine Learning compute. + :vartype description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: ~datetime.datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: ~datetime.datetime + :ivar resource_id: ARM resource id of the underlying compute. + :vartype resource_id: str + :ivar provisioning_errors: Errors during provisioning. + :vartype provisioning_errors: list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought + from outside if true, or machine learning service provisioned it if false. + :vartype is_attached_compute: bool + :ivar disable_local_auth: Opt-out of local authentication and ensure customers can use only MSI + and AAD exclusively for authentication. + :vartype disable_local_auth: bool + """ + + _validation = { + 'compute_type': {'required': True}, + 'compute_location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'ComputeInstanceProperties'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: Properties of ComputeInstance. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.ComputeInstanceProperties + :keyword description: The description of the Machine Learning compute. + :paramtype description: str + :keyword resource_id: ARM resource id of the underlying compute. + :paramtype resource_id: str + :keyword disable_local_auth: Opt-out of local authentication and ensure customers can use only + MSI and AAD exclusively for authentication. + :paramtype disable_local_auth: bool + """ + super(ComputeInstance, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.compute_type = 'ComputeInstance' # type: str + self.compute_type = 'ComputeInstance' # type: str + self.compute_location = None + self.provisioning_state = None + self.description = kwargs.get('description', None) + self.created_on = None + self.modified_on = None + self.resource_id = kwargs.get('resource_id', None) + self.provisioning_errors = None + self.is_attached_compute = None + self.disable_local_auth = kwargs.get('disable_local_auth', None) + + +class ComputeInstanceApplication(msrest.serialization.Model): + """Defines an Aml Instance application and its connectivity endpoint URI. + + :ivar display_name: Name of the ComputeInstance application. + :vartype display_name: str + :ivar endpoint_uri: Application' endpoint URI. + :vartype endpoint_uri: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'endpoint_uri': {'key': 'endpointUri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword display_name: Name of the ComputeInstance application. + :paramtype display_name: str + :keyword endpoint_uri: Application' endpoint URI. + :paramtype endpoint_uri: str + """ + super(ComputeInstanceApplication, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.endpoint_uri = kwargs.get('endpoint_uri', None) + + +class ComputeInstanceConnectivityEndpoints(msrest.serialization.Model): + """Defines all connectivity endpoints and properties for an ComputeInstance. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar public_ip_address: Public IP Address of this ComputeInstance. + :vartype public_ip_address: str + :ivar private_ip_address: Private IP Address of this ComputeInstance (local to the VNET in + which the compute instance is deployed). + :vartype private_ip_address: str + """ + + _validation = { + 'public_ip_address': {'readonly': True}, + 'private_ip_address': {'readonly': True}, + } + + _attribute_map = { + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ComputeInstanceConnectivityEndpoints, self).__init__(**kwargs) + self.public_ip_address = None + self.private_ip_address = None + + +class ComputeInstanceContainer(msrest.serialization.Model): + """Defines an Aml Instance container. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the ComputeInstance container. + :vartype name: str + :ivar autosave: Auto save settings. Possible values include: "None", "Local", "Remote". + :vartype autosave: str or ~azure.mgmt.machinelearningservices.models.Autosave + :ivar gpu: Information of GPU. + :vartype gpu: str + :ivar network: network of this container. Possible values include: "Bridge", "Host". + :vartype network: str or ~azure.mgmt.machinelearningservices.models.Network + :ivar environment: Environment information of this container. + :vartype environment: ~azure.mgmt.machinelearningservices.models.ComputeInstanceEnvironmentInfo + :ivar services: services of this containers. + :vartype services: list[any] + """ + + _validation = { + 'services': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'autosave': {'key': 'autosave', 'type': 'str'}, + 'gpu': {'key': 'gpu', 'type': 'str'}, + 'network': {'key': 'network', 'type': 'str'}, + 'environment': {'key': 'environment', 'type': 'ComputeInstanceEnvironmentInfo'}, + 'services': {'key': 'services', 'type': '[object]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Name of the ComputeInstance container. + :paramtype name: str + :keyword autosave: Auto save settings. Possible values include: "None", "Local", "Remote". + :paramtype autosave: str or ~azure.mgmt.machinelearningservices.models.Autosave + :keyword gpu: Information of GPU. + :paramtype gpu: str + :keyword network: network of this container. Possible values include: "Bridge", "Host". + :paramtype network: str or ~azure.mgmt.machinelearningservices.models.Network + :keyword environment: Environment information of this container. + :paramtype environment: + ~azure.mgmt.machinelearningservices.models.ComputeInstanceEnvironmentInfo + """ + super(ComputeInstanceContainer, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.autosave = kwargs.get('autosave', None) + self.gpu = kwargs.get('gpu', None) + self.network = kwargs.get('network', None) + self.environment = kwargs.get('environment', None) + self.services = None + + +class ComputeInstanceCreatedBy(msrest.serialization.Model): + """Describes information on user who created this ComputeInstance. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar user_name: Name of the user. + :vartype user_name: str + :ivar user_org_id: Uniquely identifies user' Azure Active Directory organization. + :vartype user_org_id: str + :ivar user_id: Uniquely identifies the user within his/her organization. + :vartype user_id: str + """ + + _validation = { + 'user_name': {'readonly': True}, + 'user_org_id': {'readonly': True}, + 'user_id': {'readonly': True}, + } + + _attribute_map = { + 'user_name': {'key': 'userName', 'type': 'str'}, + 'user_org_id': {'key': 'userOrgId', 'type': 'str'}, + 'user_id': {'key': 'userId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ComputeInstanceCreatedBy, self).__init__(**kwargs) + self.user_name = None + self.user_org_id = None + self.user_id = None + + +class ComputeInstanceDataDisk(msrest.serialization.Model): + """Defines an Aml Instance DataDisk. + + :ivar caching: Caching type of Data Disk. Possible values include: "None", "ReadOnly", + "ReadWrite". + :vartype caching: str or ~azure.mgmt.machinelearningservices.models.Caching + :ivar disk_size_gb: The initial disk size in gigabytes. + :vartype disk_size_gb: int + :ivar lun: The lun is used to uniquely identify each data disk. If attaching multiple disks, + each should have a distinct lun. + :vartype lun: int + :ivar storage_account_type: type of this storage account. Possible values include: + "Standard_LRS", "Premium_LRS". Default value: "Standard_LRS". + :vartype storage_account_type: str or + ~azure.mgmt.machinelearningservices.models.StorageAccountType + """ + + _attribute_map = { + 'caching': {'key': 'caching', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'lun': {'key': 'lun', 'type': 'int'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword caching: Caching type of Data Disk. Possible values include: "None", "ReadOnly", + "ReadWrite". + :paramtype caching: str or ~azure.mgmt.machinelearningservices.models.Caching + :keyword disk_size_gb: The initial disk size in gigabytes. + :paramtype disk_size_gb: int + :keyword lun: The lun is used to uniquely identify each data disk. If attaching multiple disks, + each should have a distinct lun. + :paramtype lun: int + :keyword storage_account_type: type of this storage account. Possible values include: + "Standard_LRS", "Premium_LRS". Default value: "Standard_LRS". + :paramtype storage_account_type: str or + ~azure.mgmt.machinelearningservices.models.StorageAccountType + """ + super(ComputeInstanceDataDisk, self).__init__(**kwargs) + self.caching = kwargs.get('caching', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.lun = kwargs.get('lun', None) + self.storage_account_type = kwargs.get('storage_account_type', "Standard_LRS") + + +class ComputeInstanceDataMount(msrest.serialization.Model): + """Defines an Aml Instance DataMount. + + :ivar source: Source of the ComputeInstance data mount. + :vartype source: str + :ivar source_type: Data source type. Possible values include: "Dataset", "Datastore", "URI". + :vartype source_type: str or ~azure.mgmt.machinelearningservices.models.SourceType + :ivar mount_name: name of the ComputeInstance data mount. + :vartype mount_name: str + :ivar mount_action: Mount Action. Possible values include: "Mount", "Unmount". + :vartype mount_action: str or ~azure.mgmt.machinelearningservices.models.MountAction + :ivar created_by: who this data mount created by. + :vartype created_by: str + :ivar mount_path: Path of this data mount. + :vartype mount_path: str + :ivar mount_state: Mount state. Possible values include: "MountRequested", "Mounted", + "MountFailed", "UnmountRequested", "UnmountFailed", "Unmounted". + :vartype mount_state: str or ~azure.mgmt.machinelearningservices.models.MountState + :ivar mounted_on: The time when the disk mounted. + :vartype mounted_on: ~datetime.datetime + :ivar error: Error of this data mount. + :vartype error: str + """ + + _attribute_map = { + 'source': {'key': 'source', 'type': 'str'}, + 'source_type': {'key': 'sourceType', 'type': 'str'}, + 'mount_name': {'key': 'mountName', 'type': 'str'}, + 'mount_action': {'key': 'mountAction', 'type': 'str'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'mount_path': {'key': 'mountPath', 'type': 'str'}, + 'mount_state': {'key': 'mountState', 'type': 'str'}, + 'mounted_on': {'key': 'mountedOn', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword source: Source of the ComputeInstance data mount. + :paramtype source: str + :keyword source_type: Data source type. Possible values include: "Dataset", "Datastore", "URI". + :paramtype source_type: str or ~azure.mgmt.machinelearningservices.models.SourceType + :keyword mount_name: name of the ComputeInstance data mount. + :paramtype mount_name: str + :keyword mount_action: Mount Action. Possible values include: "Mount", "Unmount". + :paramtype mount_action: str or ~azure.mgmt.machinelearningservices.models.MountAction + :keyword created_by: who this data mount created by. + :paramtype created_by: str + :keyword mount_path: Path of this data mount. + :paramtype mount_path: str + :keyword mount_state: Mount state. Possible values include: "MountRequested", "Mounted", + "MountFailed", "UnmountRequested", "UnmountFailed", "Unmounted". + :paramtype mount_state: str or ~azure.mgmt.machinelearningservices.models.MountState + :keyword mounted_on: The time when the disk mounted. + :paramtype mounted_on: ~datetime.datetime + :keyword error: Error of this data mount. + :paramtype error: str + """ + super(ComputeInstanceDataMount, self).__init__(**kwargs) + self.source = kwargs.get('source', None) + self.source_type = kwargs.get('source_type', None) + self.mount_name = kwargs.get('mount_name', None) + self.mount_action = kwargs.get('mount_action', None) + self.created_by = kwargs.get('created_by', None) + self.mount_path = kwargs.get('mount_path', None) + self.mount_state = kwargs.get('mount_state', None) + self.mounted_on = kwargs.get('mounted_on', None) + self.error = kwargs.get('error', None) + + +class ComputeInstanceEnvironmentInfo(msrest.serialization.Model): + """Environment information. + + :ivar name: name of environment. + :vartype name: str + :ivar version: version of environment. + :vartype version: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: name of environment. + :paramtype name: str + :keyword version: version of environment. + :paramtype version: str + """ + super(ComputeInstanceEnvironmentInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.version = kwargs.get('version', None) + + +class ComputeInstanceLastOperation(msrest.serialization.Model): + """The last operation on ComputeInstance. + + :ivar operation_name: Name of the last operation. Possible values include: "Create", "Start", + "Stop", "Restart", "Reimage", "Delete". + :vartype operation_name: str or ~azure.mgmt.machinelearningservices.models.OperationName + :ivar operation_time: Time of the last operation. + :vartype operation_time: ~datetime.datetime + :ivar operation_status: Operation status. Possible values include: "InProgress", "Succeeded", + "CreateFailed", "StartFailed", "StopFailed", "RestartFailed", "ReimageFailed", "DeleteFailed". + :vartype operation_status: str or ~azure.mgmt.machinelearningservices.models.OperationStatus + :ivar operation_trigger: Trigger of operation. Possible values include: "User", "Schedule", + "IdleShutdown". + :vartype operation_trigger: str or ~azure.mgmt.machinelearningservices.models.OperationTrigger + """ + + _attribute_map = { + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'operation_time': {'key': 'operationTime', 'type': 'iso-8601'}, + 'operation_status': {'key': 'operationStatus', 'type': 'str'}, + 'operation_trigger': {'key': 'operationTrigger', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword operation_name: Name of the last operation. Possible values include: "Create", + "Start", "Stop", "Restart", "Reimage", "Delete". + :paramtype operation_name: str or ~azure.mgmt.machinelearningservices.models.OperationName + :keyword operation_time: Time of the last operation. + :paramtype operation_time: ~datetime.datetime + :keyword operation_status: Operation status. Possible values include: "InProgress", + "Succeeded", "CreateFailed", "StartFailed", "StopFailed", "RestartFailed", "ReimageFailed", + "DeleteFailed". + :paramtype operation_status: str or ~azure.mgmt.machinelearningservices.models.OperationStatus + :keyword operation_trigger: Trigger of operation. Possible values include: "User", "Schedule", + "IdleShutdown". + :paramtype operation_trigger: str or + ~azure.mgmt.machinelearningservices.models.OperationTrigger + """ + super(ComputeInstanceLastOperation, self).__init__(**kwargs) + self.operation_name = kwargs.get('operation_name', None) + self.operation_time = kwargs.get('operation_time', None) + self.operation_status = kwargs.get('operation_status', None) + self.operation_trigger = kwargs.get('operation_trigger', None) + + +class ComputeInstanceProperties(msrest.serialization.Model): + """Compute Instance properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar vm_size: Virtual Machine Size. + :vartype vm_size: str + :ivar subnet: Virtual network subnet resource ID the compute nodes belong to. + :vartype subnet: ~azure.mgmt.machinelearningservices.models.ResourceId + :ivar application_sharing_policy: Policy for sharing applications on this compute instance + among users of parent workspace. If Personal, only the creator can access applications on this + compute instance. When Shared, any workspace user can access applications on this instance + depending on his/her assigned role. Possible values include: "Personal", "Shared". Default + value: "Shared". + :vartype application_sharing_policy: str or + ~azure.mgmt.machinelearningservices.models.ApplicationSharingPolicy + :ivar ssh_settings: Specifies policy and settings for SSH access. + :vartype ssh_settings: ~azure.mgmt.machinelearningservices.models.ComputeInstanceSshSettings + :ivar connectivity_endpoints: Describes all connectivity endpoints available for this + ComputeInstance. + :vartype connectivity_endpoints: + ~azure.mgmt.machinelearningservices.models.ComputeInstanceConnectivityEndpoints + :ivar applications: Describes available applications and their endpoints on this + ComputeInstance. + :vartype applications: + list[~azure.mgmt.machinelearningservices.models.ComputeInstanceApplication] + :ivar created_by: Describes information on user who created this ComputeInstance. + :vartype created_by: ~azure.mgmt.machinelearningservices.models.ComputeInstanceCreatedBy + :ivar errors: Collection of errors encountered on this ComputeInstance. + :vartype errors: list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar state: The current state of this ComputeInstance. Possible values include: "Creating", + "CreateFailed", "Deleting", "Running", "Restarting", "JobRunning", "SettingUp", "SetupFailed", + "Starting", "Stopped", "Stopping", "UserSettingUp", "UserSetupFailed", "Unknown", "Unusable". + :vartype state: str or ~azure.mgmt.machinelearningservices.models.ComputeInstanceState + :ivar compute_instance_authorization_type: The Compute Instance Authorization type. Available + values are personal (default). Possible values include: "personal". Default value: "personal". + :vartype compute_instance_authorization_type: str or + ~azure.mgmt.machinelearningservices.models.ComputeInstanceAuthorizationType + :ivar personal_compute_instance_settings: Settings for a personal compute instance. + :vartype personal_compute_instance_settings: + ~azure.mgmt.machinelearningservices.models.PersonalComputeInstanceSettings + :ivar setup_scripts: Details of customized scripts to execute for setting up the cluster. + :vartype setup_scripts: ~azure.mgmt.machinelearningservices.models.SetupScripts + :ivar last_operation: The last operation on ComputeInstance. + :vartype last_operation: + ~azure.mgmt.machinelearningservices.models.ComputeInstanceLastOperation + :ivar schedules: The list of schedules to be applied on the computes. + :vartype schedules: ~azure.mgmt.machinelearningservices.models.ComputeSchedules + :ivar enable_node_public_ip: Enable or disable node public IP address provisioning. Possible + values are: Possible values are: true - Indicates that the compute nodes will have public IPs + provisioned. false - Indicates that the compute nodes will have a private endpoint and no + public IPs. + :vartype enable_node_public_ip: bool + :ivar containers: Describes informations of containers on this ComputeInstance. + :vartype containers: list[~azure.mgmt.machinelearningservices.models.ComputeInstanceContainer] + :ivar data_disks: Describes informations of dataDisks on this ComputeInstance. + :vartype data_disks: list[~azure.mgmt.machinelearningservices.models.ComputeInstanceDataDisk] + :ivar data_mounts: Describes informations of dataMounts on this ComputeInstance. + :vartype data_mounts: list[~azure.mgmt.machinelearningservices.models.ComputeInstanceDataMount] + :ivar versions: ComputeInstance version. + :vartype versions: ~azure.mgmt.machinelearningservices.models.ComputeInstanceVersion + """ + + _validation = { + 'connectivity_endpoints': {'readonly': True}, + 'applications': {'readonly': True}, + 'created_by': {'readonly': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'last_operation': {'readonly': True}, + 'schedules': {'readonly': True}, + 'containers': {'readonly': True}, + 'data_disks': {'readonly': True}, + 'data_mounts': {'readonly': True}, + 'versions': {'readonly': True}, + } + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'subnet': {'key': 'subnet', 'type': 'ResourceId'}, + 'application_sharing_policy': {'key': 'applicationSharingPolicy', 'type': 'str'}, + 'ssh_settings': {'key': 'sshSettings', 'type': 'ComputeInstanceSshSettings'}, + 'connectivity_endpoints': {'key': 'connectivityEndpoints', 'type': 'ComputeInstanceConnectivityEndpoints'}, + 'applications': {'key': 'applications', 'type': '[ComputeInstanceApplication]'}, + 'created_by': {'key': 'createdBy', 'type': 'ComputeInstanceCreatedBy'}, + 'errors': {'key': 'errors', 'type': '[ErrorResponse]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'compute_instance_authorization_type': {'key': 'computeInstanceAuthorizationType', 'type': 'str'}, + 'personal_compute_instance_settings': {'key': 'personalComputeInstanceSettings', 'type': 'PersonalComputeInstanceSettings'}, + 'setup_scripts': {'key': 'setupScripts', 'type': 'SetupScripts'}, + 'last_operation': {'key': 'lastOperation', 'type': 'ComputeInstanceLastOperation'}, + 'schedules': {'key': 'schedules', 'type': 'ComputeSchedules'}, + 'enable_node_public_ip': {'key': 'enableNodePublicIp', 'type': 'bool'}, + 'containers': {'key': 'containers', 'type': '[ComputeInstanceContainer]'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ComputeInstanceDataDisk]'}, + 'data_mounts': {'key': 'dataMounts', 'type': '[ComputeInstanceDataMount]'}, + 'versions': {'key': 'versions', 'type': 'ComputeInstanceVersion'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword vm_size: Virtual Machine Size. + :paramtype vm_size: str + :keyword subnet: Virtual network subnet resource ID the compute nodes belong to. + :paramtype subnet: ~azure.mgmt.machinelearningservices.models.ResourceId + :keyword application_sharing_policy: Policy for sharing applications on this compute instance + among users of parent workspace. If Personal, only the creator can access applications on this + compute instance. When Shared, any workspace user can access applications on this instance + depending on his/her assigned role. Possible values include: "Personal", "Shared". Default + value: "Shared". + :paramtype application_sharing_policy: str or + ~azure.mgmt.machinelearningservices.models.ApplicationSharingPolicy + :keyword ssh_settings: Specifies policy and settings for SSH access. + :paramtype ssh_settings: ~azure.mgmt.machinelearningservices.models.ComputeInstanceSshSettings + :keyword compute_instance_authorization_type: The Compute Instance Authorization type. + Available values are personal (default). Possible values include: "personal". Default value: + "personal". + :paramtype compute_instance_authorization_type: str or + ~azure.mgmt.machinelearningservices.models.ComputeInstanceAuthorizationType + :keyword personal_compute_instance_settings: Settings for a personal compute instance. + :paramtype personal_compute_instance_settings: + ~azure.mgmt.machinelearningservices.models.PersonalComputeInstanceSettings + :keyword setup_scripts: Details of customized scripts to execute for setting up the cluster. + :paramtype setup_scripts: ~azure.mgmt.machinelearningservices.models.SetupScripts + :keyword enable_node_public_ip: Enable or disable node public IP address provisioning. Possible + values are: Possible values are: true - Indicates that the compute nodes will have public IPs + provisioned. false - Indicates that the compute nodes will have a private endpoint and no + public IPs. + :paramtype enable_node_public_ip: bool + """ + super(ComputeInstanceProperties, self).__init__(**kwargs) + self.vm_size = kwargs.get('vm_size', None) + self.subnet = kwargs.get('subnet', None) + self.application_sharing_policy = kwargs.get('application_sharing_policy', "Shared") + self.ssh_settings = kwargs.get('ssh_settings', None) + self.connectivity_endpoints = None + self.applications = None + self.created_by = None + self.errors = None + self.state = None + self.compute_instance_authorization_type = kwargs.get('compute_instance_authorization_type', "personal") + self.personal_compute_instance_settings = kwargs.get('personal_compute_instance_settings', None) + self.setup_scripts = kwargs.get('setup_scripts', None) + self.last_operation = None + self.schedules = None + self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) + self.containers = None + self.data_disks = None + self.data_mounts = None + self.versions = None + + +class ComputeInstanceSshSettings(msrest.serialization.Model): + """Specifies policy and settings for SSH access. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar ssh_public_access: State of the public SSH port. Possible values are: Disabled - + Indicates that the public ssh port is closed on this instance. Enabled - Indicates that the + public ssh port is open and accessible according to the VNet/subnet policy if applicable. + Possible values include: "Enabled", "Disabled". Default value: "Disabled". + :vartype ssh_public_access: str or ~azure.mgmt.machinelearningservices.models.SshPublicAccess + :ivar admin_user_name: Describes the admin user name. + :vartype admin_user_name: str + :ivar ssh_port: Describes the port for connecting through SSH. + :vartype ssh_port: int + :ivar admin_public_key: Specifies the SSH rsa public key file as a string. Use "ssh-keygen -t + rsa -b 2048" to generate your SSH key pairs. + :vartype admin_public_key: str + """ + + _validation = { + 'admin_user_name': {'readonly': True}, + 'ssh_port': {'readonly': True}, + } + + _attribute_map = { + 'ssh_public_access': {'key': 'sshPublicAccess', 'type': 'str'}, + 'admin_user_name': {'key': 'adminUserName', 'type': 'str'}, + 'ssh_port': {'key': 'sshPort', 'type': 'int'}, + 'admin_public_key': {'key': 'adminPublicKey', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword ssh_public_access: State of the public SSH port. Possible values are: Disabled - + Indicates that the public ssh port is closed on this instance. Enabled - Indicates that the + public ssh port is open and accessible according to the VNet/subnet policy if applicable. + Possible values include: "Enabled", "Disabled". Default value: "Disabled". + :paramtype ssh_public_access: str or ~azure.mgmt.machinelearningservices.models.SshPublicAccess + :keyword admin_public_key: Specifies the SSH rsa public key file as a string. Use "ssh-keygen + -t rsa -b 2048" to generate your SSH key pairs. + :paramtype admin_public_key: str + """ + super(ComputeInstanceSshSettings, self).__init__(**kwargs) + self.ssh_public_access = kwargs.get('ssh_public_access', "Disabled") + self.admin_user_name = None + self.ssh_port = None + self.admin_public_key = kwargs.get('admin_public_key', None) + + +class ComputeInstanceVersion(msrest.serialization.Model): + """Version of computeInstance. + + :ivar runtime: Runtime of compute instance. + :vartype runtime: str + """ + + _attribute_map = { + 'runtime': {'key': 'runtime', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword runtime: Runtime of compute instance. + :paramtype runtime: str + """ + super(ComputeInstanceVersion, self).__init__(**kwargs) + self.runtime = kwargs.get('runtime', None) + + +class ComputeResourceSchema(msrest.serialization.Model): + """ComputeResourceSchema. + + :ivar properties: Compute properties. + :vartype properties: ~azure.mgmt.machinelearningservices.models.Compute + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'Compute'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: Compute properties. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.Compute + """ + super(ComputeResourceSchema, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class ComputeResource(Resource, ComputeResourceSchema): + """Machine Learning compute object wrapped into ARM resource envelope. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar properties: Compute properties. + :vartype properties: ~azure.mgmt.machinelearningservices.models.Compute + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar identity: The identity of the resource. + :vartype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :ivar location: Specifies the location of the resource. + :vartype location: str + :ivar tags: A set of tags. Contains resource tags defined as key/value pairs. + :vartype tags: dict[str, str] + :ivar sku: The sku of the workspace. + :vartype sku: ~azure.mgmt.machinelearningservices.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'Compute'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: Compute properties. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.Compute + :keyword identity: The identity of the resource. + :paramtype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :keyword location: Specifies the location of the resource. + :paramtype location: str + :keyword tags: A set of tags. Contains resource tags defined as key/value pairs. + :paramtype tags: dict[str, str] + :keyword sku: The sku of the workspace. + :paramtype sku: ~azure.mgmt.machinelearningservices.models.Sku + """ + super(ComputeResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.identity = kwargs.get('identity', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + self.id = None + self.name = None + self.type = None + self.system_data = None + self.identity = kwargs.get('identity', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + + +class ComputeSchedules(msrest.serialization.Model): + """The list of schedules to be applied on the computes. + + :ivar compute_start_stop: The list of compute start stop schedules to be applied. + :vartype compute_start_stop: + list[~azure.mgmt.machinelearningservices.models.ComputeStartStopSchedule] + """ + + _attribute_map = { + 'compute_start_stop': {'key': 'computeStartStop', 'type': '[ComputeStartStopSchedule]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword compute_start_stop: The list of compute start stop schedules to be applied. + :paramtype compute_start_stop: + list[~azure.mgmt.machinelearningservices.models.ComputeStartStopSchedule] + """ + super(ComputeSchedules, self).__init__(**kwargs) + self.compute_start_stop = kwargs.get('compute_start_stop', None) + + +class ComputeStartStopSchedule(msrest.serialization.Model): + """Compute start stop schedule properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Schedule id. + :vartype id: str + :ivar provisioning_status: The current deployment state of schedule. Possible values include: + "Completed", "Provisioning", "Failed". + :vartype provisioning_status: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningStatus + :ivar action: The compute power action. Possible values include: "Start", "Stop". + :vartype action: str or ~azure.mgmt.machinelearningservices.models.ComputePowerAction + :ivar schedule: Base definition of a schedule. + :vartype schedule: ~azure.mgmt.machinelearningservices.models.ScheduleBase + """ + + _validation = { + 'id': {'readonly': True}, + 'provisioning_status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'provisioning_status': {'key': 'provisioningStatus', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'str'}, + 'schedule': {'key': 'schedule', 'type': 'ScheduleBase'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword action: The compute power action. Possible values include: "Start", "Stop". + :paramtype action: str or ~azure.mgmt.machinelearningservices.models.ComputePowerAction + :keyword schedule: Base definition of a schedule. + :paramtype schedule: ~azure.mgmt.machinelearningservices.models.ScheduleBase + """ + super(ComputeStartStopSchedule, self).__init__(**kwargs) + self.id = None + self.provisioning_status = None + self.action = kwargs.get('action', None) + self.schedule = kwargs.get('schedule', None) + + +class ContainerResourceRequirements(msrest.serialization.Model): + """Resource requirements for each container instance within an online deployment. + + :ivar container_resource_limits: Container resource limit info:. + :vartype container_resource_limits: + ~azure.mgmt.machinelearningservices.models.ContainerResourceSettings + :ivar container_resource_requests: Container resource request info:. + :vartype container_resource_requests: + ~azure.mgmt.machinelearningservices.models.ContainerResourceSettings + """ + + _attribute_map = { + 'container_resource_limits': {'key': 'containerResourceLimits', 'type': 'ContainerResourceSettings'}, + 'container_resource_requests': {'key': 'containerResourceRequests', 'type': 'ContainerResourceSettings'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword container_resource_limits: Container resource limit info:. + :paramtype container_resource_limits: + ~azure.mgmt.machinelearningservices.models.ContainerResourceSettings + :keyword container_resource_requests: Container resource request info:. + :paramtype container_resource_requests: + ~azure.mgmt.machinelearningservices.models.ContainerResourceSettings + """ + super(ContainerResourceRequirements, self).__init__(**kwargs) + self.container_resource_limits = kwargs.get('container_resource_limits', None) + self.container_resource_requests = kwargs.get('container_resource_requests', None) + + +class ContainerResourceSettings(msrest.serialization.Model): + """ContainerResourceSettings. + + :ivar cpu: Number of vCPUs request/limit for container. More info: + https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. + :vartype cpu: str + :ivar gpu: Number of Nvidia GPU cards request/limit for container. More info: + https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. + :vartype gpu: str + :ivar memory: Memory size request/limit for container. More info: + https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. + :vartype memory: str + """ + + _attribute_map = { + 'cpu': {'key': 'cpu', 'type': 'str'}, + 'gpu': {'key': 'gpu', 'type': 'str'}, + 'memory': {'key': 'memory', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword cpu: Number of vCPUs request/limit for container. More info: + https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. + :paramtype cpu: str + :keyword gpu: Number of Nvidia GPU cards request/limit for container. More info: + https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. + :paramtype gpu: str + :keyword memory: Memory size request/limit for container. More info: + https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. + :paramtype memory: str + """ + super(ContainerResourceSettings, self).__init__(**kwargs) + self.cpu = kwargs.get('cpu', None) + self.gpu = kwargs.get('gpu', None) + self.memory = kwargs.get('memory', None) + + +class CosmosDbSettings(msrest.serialization.Model): + """CosmosDbSettings. + + :ivar collections_throughput: The throughput of the collections in cosmosdb database. + :vartype collections_throughput: int + """ + + _attribute_map = { + 'collections_throughput': {'key': 'collectionsThroughput', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword collections_throughput: The throughput of the collections in cosmosdb database. + :paramtype collections_throughput: int + """ + super(CosmosDbSettings, self).__init__(**kwargs) + self.collections_throughput = kwargs.get('collections_throughput', None) + + +class ScheduleBase(msrest.serialization.Model): + """Base definition of a schedule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CronSchedule, RecurrenceSchedule. + + All required parameters must be populated in order to send to Azure. + + :ivar end_time: Specifies end time of schedule in ISO 8601 format. + If not present, the schedule will run indefinitely. + :vartype end_time: ~datetime.datetime + :ivar schedule_status: Specifies the schedule's status. Possible values include: "Enabled", + "Disabled". + :vartype schedule_status: str or ~azure.mgmt.machinelearningservices.models.ScheduleStatus + :ivar schedule_type: Required. [Required] Specifies the schedule type.Constant filled by + server. Possible values include: "Cron", "Recurrence". + :vartype schedule_type: str or ~azure.mgmt.machinelearningservices.models.ScheduleType + :ivar start_time: Specifies start time of schedule in ISO 8601 format. + :vartype start_time: ~datetime.datetime + :ivar time_zone: Specifies time zone in which the schedule runs. + TimeZone should follow Windows time zone format. + :vartype time_zone: str + """ + + _validation = { + 'schedule_type': {'required': True}, + } + + _attribute_map = { + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'schedule_status': {'key': 'scheduleStatus', 'type': 'str'}, + 'schedule_type': {'key': 'scheduleType', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + } + + _subtype_map = { + 'schedule_type': {'Cron': 'CronSchedule', 'Recurrence': 'RecurrenceSchedule'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword end_time: Specifies end time of schedule in ISO 8601 format. + If not present, the schedule will run indefinitely. + :paramtype end_time: ~datetime.datetime + :keyword schedule_status: Specifies the schedule's status. Possible values include: "Enabled", + "Disabled". + :paramtype schedule_status: str or ~azure.mgmt.machinelearningservices.models.ScheduleStatus + :keyword start_time: Specifies start time of schedule in ISO 8601 format. + :paramtype start_time: ~datetime.datetime + :keyword time_zone: Specifies time zone in which the schedule runs. + TimeZone should follow Windows time zone format. + :paramtype time_zone: str + """ + super(ScheduleBase, self).__init__(**kwargs) + self.end_time = kwargs.get('end_time', None) + self.schedule_status = kwargs.get('schedule_status', None) + self.schedule_type = None # type: Optional[str] + self.start_time = kwargs.get('start_time', None) + self.time_zone = kwargs.get('time_zone', "UTC") + + +class CronSchedule(ScheduleBase): + """Cron schedule definition. + + All required parameters must be populated in order to send to Azure. + + :ivar end_time: Specifies end time of schedule in ISO 8601 format. + If not present, the schedule will run indefinitely. + :vartype end_time: ~datetime.datetime + :ivar schedule_status: Specifies the schedule's status. Possible values include: "Enabled", + "Disabled". + :vartype schedule_status: str or ~azure.mgmt.machinelearningservices.models.ScheduleStatus + :ivar schedule_type: Required. [Required] Specifies the schedule type.Constant filled by + server. Possible values include: "Cron", "Recurrence". + :vartype schedule_type: str or ~azure.mgmt.machinelearningservices.models.ScheduleType + :ivar start_time: Specifies start time of schedule in ISO 8601 format. + :vartype start_time: ~datetime.datetime + :ivar time_zone: Specifies time zone in which the schedule runs. + TimeZone should follow Windows time zone format. + :vartype time_zone: str + :ivar expression: Required. [Required] Specifies cron expression of schedule. + The expression should follow NCronTab format. + :vartype expression: str + """ + + _validation = { + 'schedule_type': {'required': True}, + 'expression': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + } + + _attribute_map = { + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'schedule_status': {'key': 'scheduleStatus', 'type': 'str'}, + 'schedule_type': {'key': 'scheduleType', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'expression': {'key': 'expression', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword end_time: Specifies end time of schedule in ISO 8601 format. + If not present, the schedule will run indefinitely. + :paramtype end_time: ~datetime.datetime + :keyword schedule_status: Specifies the schedule's status. Possible values include: "Enabled", + "Disabled". + :paramtype schedule_status: str or ~azure.mgmt.machinelearningservices.models.ScheduleStatus + :keyword start_time: Specifies start time of schedule in ISO 8601 format. + :paramtype start_time: ~datetime.datetime + :keyword time_zone: Specifies time zone in which the schedule runs. + TimeZone should follow Windows time zone format. + :paramtype time_zone: str + :keyword expression: Required. [Required] Specifies cron expression of schedule. + The expression should follow NCronTab format. + :paramtype expression: str + """ + super(CronSchedule, self).__init__(**kwargs) + self.schedule_type = 'Cron' # type: str + self.expression = kwargs['expression'] + + +class JobInput(msrest.serialization.Model): + """Command job definition. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CustomModelJobInput, LiteralJobInput, MLFlowModelJobInput, MLTableJobInput, TritonModelJobInput, UriFileJobInput, UriFolderJobInput. + + All required parameters must be populated in order to send to Azure. + + :ivar description: Description for the input. + :vartype description: str + :ivar job_input_type: Required. [Required] Specifies the type of job.Constant filled by server. + Possible values include: "literal", "uri_file", "uri_folder", "mltable", "custom_model", + "mlflow_model", "triton_model". + :vartype job_input_type: str or ~azure.mgmt.machinelearningservices.models.JobInputType + """ + + _validation = { + 'job_input_type': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'job_input_type': {'key': 'jobInputType', 'type': 'str'}, + } + + _subtype_map = { + 'job_input_type': {'custom_model': 'CustomModelJobInput', 'literal': 'LiteralJobInput', 'mlflow_model': 'MLFlowModelJobInput', 'mltable': 'MLTableJobInput', 'triton_model': 'TritonModelJobInput', 'uri_file': 'UriFileJobInput', 'uri_folder': 'UriFolderJobInput'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: Description for the input. + :paramtype description: str + """ + super(JobInput, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.job_input_type = None # type: Optional[str] + + +class CustomModelJobInput(JobInput, AssetJobInput): + """CustomModelJobInput. + + All required parameters must be populated in order to send to Azure. + + :ivar mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", + "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". + :vartype mode: str or ~azure.mgmt.machinelearningservices.models.InputDeliveryMode + :ivar uri: Required. [Required] Input Asset URI. + :vartype uri: str + :ivar description: Description for the input. + :vartype description: str + :ivar job_input_type: Required. [Required] Specifies the type of job.Constant filled by server. + Possible values include: "literal", "uri_file", "uri_folder", "mltable", "custom_model", + "mlflow_model", "triton_model". + :vartype job_input_type: str or ~azure.mgmt.machinelearningservices.models.JobInputType + """ + + _validation = { + 'uri': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + 'job_input_type': {'required': True}, + } + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'job_input_type': {'key': 'jobInputType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", + "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". + :paramtype mode: str or ~azure.mgmt.machinelearningservices.models.InputDeliveryMode + :keyword uri: Required. [Required] Input Asset URI. + :paramtype uri: str + :keyword description: Description for the input. + :paramtype description: str + """ + super(CustomModelJobInput, self).__init__(**kwargs) + self.mode = kwargs.get('mode', None) + self.uri = kwargs['uri'] + self.job_input_type = 'custom_model' # type: str + self.description = kwargs.get('description', None) + self.job_input_type = 'custom_model' # type: str + + +class JobOutput(msrest.serialization.Model): + """Job output definition container information on where to find job output/logs. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CustomModelJobOutput, MLFlowModelJobOutput, MLTableJobOutput, TritonModelJobOutput, UriFileJobOutput, UriFolderJobOutput. + + All required parameters must be populated in order to send to Azure. + + :ivar description: Description for the output. + :vartype description: str + :ivar job_output_type: Required. [Required] Specifies the type of job.Constant filled by + server. Possible values include: "uri_file", "uri_folder", "mltable", "custom_model", + "mlflow_model", "triton_model". + :vartype job_output_type: str or ~azure.mgmt.machinelearningservices.models.JobOutputType + """ + + _validation = { + 'job_output_type': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'job_output_type': {'key': 'jobOutputType', 'type': 'str'}, + } + + _subtype_map = { + 'job_output_type': {'custom_model': 'CustomModelJobOutput', 'mlflow_model': 'MLFlowModelJobOutput', 'mltable': 'MLTableJobOutput', 'triton_model': 'TritonModelJobOutput', 'uri_file': 'UriFileJobOutput', 'uri_folder': 'UriFolderJobOutput'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: Description for the output. + :paramtype description: str + """ + super(JobOutput, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.job_output_type = None # type: Optional[str] + + +class CustomModelJobOutput(JobOutput, AssetJobOutput): + """CustomModelJobOutput. + + All required parameters must be populated in order to send to Azure. + + :ivar mode: Output Asset Delivery Mode. Possible values include: "ReadWriteMount", "Upload". + :vartype mode: str or ~azure.mgmt.machinelearningservices.models.OutputDeliveryMode + :ivar uri: Output Asset URI. + :vartype uri: str + :ivar description: Description for the output. + :vartype description: str + :ivar job_output_type: Required. [Required] Specifies the type of job.Constant filled by + server. Possible values include: "uri_file", "uri_folder", "mltable", "custom_model", + "mlflow_model", "triton_model". + :vartype job_output_type: str or ~azure.mgmt.machinelearningservices.models.JobOutputType + """ + + _validation = { + 'job_output_type': {'required': True}, + } + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'job_output_type': {'key': 'jobOutputType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword mode: Output Asset Delivery Mode. Possible values include: "ReadWriteMount", "Upload". + :paramtype mode: str or ~azure.mgmt.machinelearningservices.models.OutputDeliveryMode + :keyword uri: Output Asset URI. + :paramtype uri: str + :keyword description: Description for the output. + :paramtype description: str + """ + super(CustomModelJobOutput, self).__init__(**kwargs) + self.mode = kwargs.get('mode', None) + self.uri = kwargs.get('uri', None) + self.job_output_type = 'custom_model' # type: str + self.description = kwargs.get('description', None) + self.job_output_type = 'custom_model' # type: str + + +class DatabricksSchema(msrest.serialization.Model): + """DatabricksSchema. + + :ivar properties: Properties of Databricks. + :vartype properties: ~azure.mgmt.machinelearningservices.models.DatabricksProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'DatabricksProperties'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: Properties of Databricks. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.DatabricksProperties + """ + super(DatabricksSchema, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class Databricks(Compute, DatabricksSchema): + """A DataFactory compute. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar properties: Properties of Databricks. + :vartype properties: ~azure.mgmt.machinelearningservices.models.DatabricksProperties + :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values + include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", + "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark". + :vartype compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType + :ivar compute_location: Location for the underlying compute. + :vartype compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values are Unknown, + Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating", + "Creating", "Deleting", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :ivar description: The description of the Machine Learning compute. + :vartype description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: ~datetime.datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: ~datetime.datetime + :ivar resource_id: ARM resource id of the underlying compute. + :vartype resource_id: str + :ivar provisioning_errors: Errors during provisioning. + :vartype provisioning_errors: list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought + from outside if true, or machine learning service provisioned it if false. + :vartype is_attached_compute: bool + :ivar disable_local_auth: Opt-out of local authentication and ensure customers can use only MSI + and AAD exclusively for authentication. + :vartype disable_local_auth: bool + """ + + _validation = { + 'compute_type': {'required': True}, + 'compute_location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'DatabricksProperties'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: Properties of Databricks. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.DatabricksProperties + :keyword description: The description of the Machine Learning compute. + :paramtype description: str + :keyword resource_id: ARM resource id of the underlying compute. + :paramtype resource_id: str + :keyword disable_local_auth: Opt-out of local authentication and ensure customers can use only + MSI and AAD exclusively for authentication. + :paramtype disable_local_auth: bool + """ + super(Databricks, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.compute_type = 'Databricks' # type: str + self.compute_type = 'Databricks' # type: str + self.compute_location = None + self.provisioning_state = None + self.description = kwargs.get('description', None) + self.created_on = None + self.modified_on = None + self.resource_id = kwargs.get('resource_id', None) + self.provisioning_errors = None + self.is_attached_compute = None + self.disable_local_auth = kwargs.get('disable_local_auth', None) + + +class DatabricksComputeSecretsProperties(msrest.serialization.Model): + """Properties of Databricks Compute Secrets. + + :ivar databricks_access_token: access token for databricks account. + :vartype databricks_access_token: str + """ + + _attribute_map = { + 'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword databricks_access_token: access token for databricks account. + :paramtype databricks_access_token: str + """ + super(DatabricksComputeSecretsProperties, self).__init__(**kwargs) + self.databricks_access_token = kwargs.get('databricks_access_token', None) + + +class DatabricksComputeSecrets(ComputeSecrets, DatabricksComputeSecretsProperties): + """Secrets related to a Machine Learning compute based on Databricks. + + All required parameters must be populated in order to send to Azure. + + :ivar databricks_access_token: access token for databricks account. + :vartype databricks_access_token: str + :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values + include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", + "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark". + :vartype compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType + """ + + _validation = { + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword databricks_access_token: access token for databricks account. + :paramtype databricks_access_token: str + """ + super(DatabricksComputeSecrets, self).__init__(**kwargs) + self.databricks_access_token = kwargs.get('databricks_access_token', None) + self.compute_type = 'Databricks' # type: str + self.compute_type = 'Databricks' # type: str + + +class DatabricksProperties(msrest.serialization.Model): + """Properties of Databricks. + + :ivar databricks_access_token: Databricks access token. + :vartype databricks_access_token: str + :ivar workspace_url: Workspace Url. + :vartype workspace_url: str + """ + + _attribute_map = { + 'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'}, + 'workspace_url': {'key': 'workspaceUrl', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword databricks_access_token: Databricks access token. + :paramtype databricks_access_token: str + :keyword workspace_url: Workspace Url. + :paramtype workspace_url: str + """ + super(DatabricksProperties, self).__init__(**kwargs) + self.databricks_access_token = kwargs.get('databricks_access_token', None) + self.workspace_url = kwargs.get('workspace_url', None) + + +class DataContainerData(Resource): + """Azure Resource Manager resource envelope. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar properties: Required. [Required] Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.DataContainerDetails + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'DataContainerDetails'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: Required. [Required] Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.DataContainerDetails + """ + super(DataContainerData, self).__init__(**kwargs) + self.properties = kwargs['properties'] + + +class DataContainerDetails(AssetContainer): + """Container for data asset versions. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar latest_version: The latest version inside this container. + :vartype latest_version: str + :ivar next_version: The next auto incremental version. + :vartype next_version: str + :ivar data_type: Required. [Required] Specifies the type of data. Possible values include: + "uri_file", "uri_folder", "mltable". + :vartype data_type: str or ~azure.mgmt.machinelearningservices.models.DataType + """ + + _validation = { + 'latest_version': {'readonly': True}, + 'next_version': {'readonly': True}, + 'data_type': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'latest_version': {'key': 'latestVersion', 'type': 'str'}, + 'next_version': {'key': 'nextVersion', 'type': 'str'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + :keyword data_type: Required. [Required] Specifies the type of data. Possible values include: + "uri_file", "uri_folder", "mltable". + :paramtype data_type: str or ~azure.mgmt.machinelearningservices.models.DataType + """ + super(DataContainerDetails, self).__init__(**kwargs) + self.data_type = kwargs['data_type'] + + +class DataContainerResourceArmPaginatedResult(msrest.serialization.Model): + """A paginated list of DataContainer entities. + + :ivar next_link: The link to the next page of DataContainer objects. If null, there are no + additional pages. + :vartype next_link: str + :ivar value: An array of objects of type DataContainer. + :vartype value: list[~azure.mgmt.machinelearningservices.models.DataContainerData] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[DataContainerData]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword next_link: The link to the next page of DataContainer objects. If null, there are no + additional pages. + :paramtype next_link: str + :keyword value: An array of objects of type DataContainer. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.DataContainerData] + """ + super(DataContainerResourceArmPaginatedResult, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class DataFactory(Compute): + """A DataFactory compute. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values + include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", + "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark". + :vartype compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType + :ivar compute_location: Location for the underlying compute. + :vartype compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values are Unknown, + Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating", + "Creating", "Deleting", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :ivar description: The description of the Machine Learning compute. + :vartype description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: ~datetime.datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: ~datetime.datetime + :ivar resource_id: ARM resource id of the underlying compute. + :vartype resource_id: str + :ivar provisioning_errors: Errors during provisioning. + :vartype provisioning_errors: list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought + from outside if true, or machine learning service provisioned it if false. + :vartype is_attached_compute: bool + :ivar disable_local_auth: Opt-out of local authentication and ensure customers can use only MSI + and AAD exclusively for authentication. + :vartype disable_local_auth: bool + """ + + _validation = { + 'compute_type': {'required': True}, + 'compute_location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'readonly': True}, + } + + _attribute_map = { + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: The description of the Machine Learning compute. + :paramtype description: str + :keyword resource_id: ARM resource id of the underlying compute. + :paramtype resource_id: str + :keyword disable_local_auth: Opt-out of local authentication and ensure customers can use only + MSI and AAD exclusively for authentication. + :paramtype disable_local_auth: bool + """ + super(DataFactory, self).__init__(**kwargs) + self.compute_type = 'DataFactory' # type: str + + +class DataLakeAnalyticsSchema(msrest.serialization.Model): + """DataLakeAnalyticsSchema. + + :ivar properties: + :vartype properties: + ~azure.mgmt.machinelearningservices.models.DataLakeAnalyticsSchemaProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'DataLakeAnalyticsSchemaProperties'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: + :paramtype properties: + ~azure.mgmt.machinelearningservices.models.DataLakeAnalyticsSchemaProperties + """ + super(DataLakeAnalyticsSchema, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class DataLakeAnalytics(Compute, DataLakeAnalyticsSchema): + """A DataLakeAnalytics compute. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar properties: + :vartype properties: + ~azure.mgmt.machinelearningservices.models.DataLakeAnalyticsSchemaProperties + :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values + include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", + "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark". + :vartype compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType + :ivar compute_location: Location for the underlying compute. + :vartype compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values are Unknown, + Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating", + "Creating", "Deleting", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :ivar description: The description of the Machine Learning compute. + :vartype description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: ~datetime.datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: ~datetime.datetime + :ivar resource_id: ARM resource id of the underlying compute. + :vartype resource_id: str + :ivar provisioning_errors: Errors during provisioning. + :vartype provisioning_errors: list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought + from outside if true, or machine learning service provisioned it if false. + :vartype is_attached_compute: bool + :ivar disable_local_auth: Opt-out of local authentication and ensure customers can use only MSI + and AAD exclusively for authentication. + :vartype disable_local_auth: bool + """ + + _validation = { + 'compute_type': {'required': True}, + 'compute_location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'DataLakeAnalyticsSchemaProperties'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: + :paramtype properties: + ~azure.mgmt.machinelearningservices.models.DataLakeAnalyticsSchemaProperties + :keyword description: The description of the Machine Learning compute. + :paramtype description: str + :keyword resource_id: ARM resource id of the underlying compute. + :paramtype resource_id: str + :keyword disable_local_auth: Opt-out of local authentication and ensure customers can use only + MSI and AAD exclusively for authentication. + :paramtype disable_local_auth: bool + """ + super(DataLakeAnalytics, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.compute_type = 'DataLakeAnalytics' # type: str + self.compute_type = 'DataLakeAnalytics' # type: str + self.compute_location = None + self.provisioning_state = None + self.description = kwargs.get('description', None) + self.created_on = None + self.modified_on = None + self.resource_id = kwargs.get('resource_id', None) + self.provisioning_errors = None + self.is_attached_compute = None + self.disable_local_auth = kwargs.get('disable_local_auth', None) + + +class DataLakeAnalyticsSchemaProperties(msrest.serialization.Model): + """DataLakeAnalyticsSchemaProperties. + + :ivar data_lake_store_account_name: DataLake Store Account Name. + :vartype data_lake_store_account_name: str + """ + + _attribute_map = { + 'data_lake_store_account_name': {'key': 'dataLakeStoreAccountName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword data_lake_store_account_name: DataLake Store Account Name. + :paramtype data_lake_store_account_name: str + """ + super(DataLakeAnalyticsSchemaProperties, self).__init__(**kwargs) + self.data_lake_store_account_name = kwargs.get('data_lake_store_account_name', None) + + +class DataPathAssetReference(AssetReferenceBase): + """Reference to an asset via its path in a datastore. + + All required parameters must be populated in order to send to Azure. + + :ivar reference_type: Required. [Required] Specifies the type of asset reference.Constant + filled by server. Possible values include: "Id", "DataPath", "OutputPath". + :vartype reference_type: str or ~azure.mgmt.machinelearningservices.models.ReferenceType + :ivar datastore_id: ARM resource ID of the datastore where the asset is located. + :vartype datastore_id: str + :ivar path: The path of the file/directory in the datastore. + :vartype path: str + """ + + _validation = { + 'reference_type': {'required': True}, + } + + _attribute_map = { + 'reference_type': {'key': 'referenceType', 'type': 'str'}, + 'datastore_id': {'key': 'datastoreId', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword datastore_id: ARM resource ID of the datastore where the asset is located. + :paramtype datastore_id: str + :keyword path: The path of the file/directory in the datastore. + :paramtype path: str + """ + super(DataPathAssetReference, self).__init__(**kwargs) + self.reference_type = 'DataPath' # type: str + self.datastore_id = kwargs.get('datastore_id', None) + self.path = kwargs.get('path', None) + + +class DatastoreData(Resource): + """Azure Resource Manager resource envelope. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar properties: Required. [Required] Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.DatastoreDetails + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'DatastoreDetails'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: Required. [Required] Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.DatastoreDetails + """ + super(DatastoreData, self).__init__(**kwargs) + self.properties = kwargs['properties'] + + +class DatastoreResourceArmPaginatedResult(msrest.serialization.Model): + """A paginated list of Datastore entities. + + :ivar next_link: The link to the next page of Datastore objects. If null, there are no + additional pages. + :vartype next_link: str + :ivar value: An array of objects of type Datastore. + :vartype value: list[~azure.mgmt.machinelearningservices.models.DatastoreData] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[DatastoreData]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword next_link: The link to the next page of Datastore objects. If null, there are no + additional pages. + :paramtype next_link: str + :keyword value: An array of objects of type Datastore. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.DatastoreData] + """ + super(DatastoreResourceArmPaginatedResult, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class DataVersionBaseData(Resource): + """Azure Resource Manager resource envelope. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar properties: Required. [Required] Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.DataVersionBaseDetails + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'DataVersionBaseDetails'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: Required. [Required] Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.DataVersionBaseDetails + """ + super(DataVersionBaseData, self).__init__(**kwargs) + self.properties = kwargs['properties'] + + +class DataVersionBaseDetails(AssetBase): + """Data version base definition. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MLTableData, UriFileDataVersion, UriFolderDataVersion. + + All required parameters must be populated in order to send to Azure. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar is_anonymous: If the name version are system generated (anonymous registration). + :vartype is_anonymous: bool + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar data_type: Required. [Required] Specifies the type of data.Constant filled by server. + Possible values include: "uri_file", "uri_folder", "mltable". + :vartype data_type: str or ~azure.mgmt.machinelearningservices.models.DataType + :ivar data_uri: Required. [Required] Uri of the data. Usage/meaning depends on + Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220501.Assets.DataVersionBase.DataType. + :vartype data_uri: str + """ + + _validation = { + 'data_type': {'required': True}, + 'data_uri': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + 'data_uri': {'key': 'dataUri', 'type': 'str'}, + } + + _subtype_map = { + 'data_type': {'mltable': 'MLTableData', 'uri_file': 'UriFileDataVersion', 'uri_folder': 'UriFolderDataVersion'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword is_anonymous: If the name version are system generated (anonymous registration). + :paramtype is_anonymous: bool + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + :keyword data_uri: Required. [Required] Uri of the data. Usage/meaning depends on + Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220501.Assets.DataVersionBase.DataType. + :paramtype data_uri: str + """ + super(DataVersionBaseDetails, self).__init__(**kwargs) + self.data_type = 'DataVersionBaseDetails' # type: str + self.data_uri = kwargs['data_uri'] + + +class DataVersionBaseResourceArmPaginatedResult(msrest.serialization.Model): + """A paginated list of DataVersionBase entities. + + :ivar next_link: The link to the next page of DataVersionBase objects. If null, there are no + additional pages. + :vartype next_link: str + :ivar value: An array of objects of type DataVersionBase. + :vartype value: list[~azure.mgmt.machinelearningservices.models.DataVersionBaseData] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[DataVersionBaseData]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword next_link: The link to the next page of DataVersionBase objects. If null, there are no + additional pages. + :paramtype next_link: str + :keyword value: An array of objects of type DataVersionBase. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.DataVersionBaseData] + """ + super(DataVersionBaseResourceArmPaginatedResult, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class OnlineScaleSettings(msrest.serialization.Model): + """Online deployment scaling configuration. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DefaultScaleSettings, TargetUtilizationScaleSettings. + + All required parameters must be populated in order to send to Azure. + + :ivar scale_type: Required. [Required] Type of deployment scaling algorithm.Constant filled by + server. Possible values include: "Default", "TargetUtilization". + :vartype scale_type: str or ~azure.mgmt.machinelearningservices.models.ScaleType + """ + + _validation = { + 'scale_type': {'required': True}, + } + + _attribute_map = { + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + } + + _subtype_map = { + 'scale_type': {'Default': 'DefaultScaleSettings', 'TargetUtilization': 'TargetUtilizationScaleSettings'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(OnlineScaleSettings, self).__init__(**kwargs) + self.scale_type = None # type: Optional[str] + + +class DefaultScaleSettings(OnlineScaleSettings): + """DefaultScaleSettings. + + All required parameters must be populated in order to send to Azure. + + :ivar scale_type: Required. [Required] Type of deployment scaling algorithm.Constant filled by + server. Possible values include: "Default", "TargetUtilization". + :vartype scale_type: str or ~azure.mgmt.machinelearningservices.models.ScaleType + """ + + _validation = { + 'scale_type': {'required': True}, + } + + _attribute_map = { + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(DefaultScaleSettings, self).__init__(**kwargs) + self.scale_type = 'Default' # type: str + + +class DeploymentLogs(msrest.serialization.Model): + """DeploymentLogs. + + :ivar content: The retrieved online deployment logs. + :vartype content: str + """ + + _attribute_map = { + 'content': {'key': 'content', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword content: The retrieved online deployment logs. + :paramtype content: str + """ + super(DeploymentLogs, self).__init__(**kwargs) + self.content = kwargs.get('content', None) + + +class DeploymentLogsRequest(msrest.serialization.Model): + """DeploymentLogsRequest. + + :ivar container_type: The type of container to retrieve logs from. Possible values include: + "StorageInitializer", "InferenceServer". + :vartype container_type: str or ~azure.mgmt.machinelearningservices.models.ContainerType + :ivar tail: The maximum number of lines to tail. + :vartype tail: int + """ + + _attribute_map = { + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'tail': {'key': 'tail', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword container_type: The type of container to retrieve logs from. Possible values include: + "StorageInitializer", "InferenceServer". + :paramtype container_type: str or ~azure.mgmt.machinelearningservices.models.ContainerType + :keyword tail: The maximum number of lines to tail. + :paramtype tail: int + """ + super(DeploymentLogsRequest, self).__init__(**kwargs) + self.container_type = kwargs.get('container_type', None) + self.tail = kwargs.get('tail', None) + + +class DiagnoseRequestProperties(msrest.serialization.Model): + """DiagnoseRequestProperties. + + :ivar udr: Setting for diagnosing user defined routing. + :vartype udr: dict[str, any] + :ivar nsg: Setting for diagnosing network security group. + :vartype nsg: dict[str, any] + :ivar resource_lock: Setting for diagnosing resource lock. + :vartype resource_lock: dict[str, any] + :ivar dns_resolution: Setting for diagnosing dns resolution. + :vartype dns_resolution: dict[str, any] + :ivar storage_account: Setting for diagnosing dependent storage account. + :vartype storage_account: dict[str, any] + :ivar key_vault: Setting for diagnosing dependent key vault. + :vartype key_vault: dict[str, any] + :ivar container_registry: Setting for diagnosing dependent container registry. + :vartype container_registry: dict[str, any] + :ivar application_insights: Setting for diagnosing dependent application insights. + :vartype application_insights: dict[str, any] + :ivar others: Setting for diagnosing unclassified category of problems. + :vartype others: dict[str, any] + """ + + _attribute_map = { + 'udr': {'key': 'udr', 'type': '{object}'}, + 'nsg': {'key': 'nsg', 'type': '{object}'}, + 'resource_lock': {'key': 'resourceLock', 'type': '{object}'}, + 'dns_resolution': {'key': 'dnsResolution', 'type': '{object}'}, + 'storage_account': {'key': 'storageAccount', 'type': '{object}'}, + 'key_vault': {'key': 'keyVault', 'type': '{object}'}, + 'container_registry': {'key': 'containerRegistry', 'type': '{object}'}, + 'application_insights': {'key': 'applicationInsights', 'type': '{object}'}, + 'others': {'key': 'others', 'type': '{object}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword udr: Setting for diagnosing user defined routing. + :paramtype udr: dict[str, any] + :keyword nsg: Setting for diagnosing network security group. + :paramtype nsg: dict[str, any] + :keyword resource_lock: Setting for diagnosing resource lock. + :paramtype resource_lock: dict[str, any] + :keyword dns_resolution: Setting for diagnosing dns resolution. + :paramtype dns_resolution: dict[str, any] + :keyword storage_account: Setting for diagnosing dependent storage account. + :paramtype storage_account: dict[str, any] + :keyword key_vault: Setting for diagnosing dependent key vault. + :paramtype key_vault: dict[str, any] + :keyword container_registry: Setting for diagnosing dependent container registry. + :paramtype container_registry: dict[str, any] + :keyword application_insights: Setting for diagnosing dependent application insights. + :paramtype application_insights: dict[str, any] + :keyword others: Setting for diagnosing unclassified category of problems. + :paramtype others: dict[str, any] + """ + super(DiagnoseRequestProperties, self).__init__(**kwargs) + self.udr = kwargs.get('udr', None) + self.nsg = kwargs.get('nsg', None) + self.resource_lock = kwargs.get('resource_lock', None) + self.dns_resolution = kwargs.get('dns_resolution', None) + self.storage_account = kwargs.get('storage_account', None) + self.key_vault = kwargs.get('key_vault', None) + self.container_registry = kwargs.get('container_registry', None) + self.application_insights = kwargs.get('application_insights', None) + self.others = kwargs.get('others', None) + + +class DiagnoseResponseResult(msrest.serialization.Model): + """DiagnoseResponseResult. + + :ivar value: + :vartype value: ~azure.mgmt.machinelearningservices.models.DiagnoseResponseResultValue + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'DiagnoseResponseResultValue'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword value: + :paramtype value: ~azure.mgmt.machinelearningservices.models.DiagnoseResponseResultValue + """ + super(DiagnoseResponseResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class DiagnoseResponseResultValue(msrest.serialization.Model): + """DiagnoseResponseResultValue. + + :ivar user_defined_route_results: + :vartype user_defined_route_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :ivar network_security_rule_results: + :vartype network_security_rule_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :ivar resource_lock_results: + :vartype resource_lock_results: list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :ivar dns_resolution_results: + :vartype dns_resolution_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :ivar storage_account_results: + :vartype storage_account_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :ivar key_vault_results: + :vartype key_vault_results: list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :ivar container_registry_results: + :vartype container_registry_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :ivar application_insights_results: + :vartype application_insights_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :ivar other_results: + :vartype other_results: list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + """ + + _attribute_map = { + 'user_defined_route_results': {'key': 'userDefinedRouteResults', 'type': '[DiagnoseResult]'}, + 'network_security_rule_results': {'key': 'networkSecurityRuleResults', 'type': '[DiagnoseResult]'}, + 'resource_lock_results': {'key': 'resourceLockResults', 'type': '[DiagnoseResult]'}, + 'dns_resolution_results': {'key': 'dnsResolutionResults', 'type': '[DiagnoseResult]'}, + 'storage_account_results': {'key': 'storageAccountResults', 'type': '[DiagnoseResult]'}, + 'key_vault_results': {'key': 'keyVaultResults', 'type': '[DiagnoseResult]'}, + 'container_registry_results': {'key': 'containerRegistryResults', 'type': '[DiagnoseResult]'}, + 'application_insights_results': {'key': 'applicationInsightsResults', 'type': '[DiagnoseResult]'}, + 'other_results': {'key': 'otherResults', 'type': '[DiagnoseResult]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword user_defined_route_results: + :paramtype user_defined_route_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :keyword network_security_rule_results: + :paramtype network_security_rule_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :keyword resource_lock_results: + :paramtype resource_lock_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :keyword dns_resolution_results: + :paramtype dns_resolution_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :keyword storage_account_results: + :paramtype storage_account_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :keyword key_vault_results: + :paramtype key_vault_results: list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :keyword container_registry_results: + :paramtype container_registry_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :keyword application_insights_results: + :paramtype application_insights_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :keyword other_results: + :paramtype other_results: list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + """ + super(DiagnoseResponseResultValue, self).__init__(**kwargs) + self.user_defined_route_results = kwargs.get('user_defined_route_results', None) + self.network_security_rule_results = kwargs.get('network_security_rule_results', None) + self.resource_lock_results = kwargs.get('resource_lock_results', None) + self.dns_resolution_results = kwargs.get('dns_resolution_results', None) + self.storage_account_results = kwargs.get('storage_account_results', None) + self.key_vault_results = kwargs.get('key_vault_results', None) + self.container_registry_results = kwargs.get('container_registry_results', None) + self.application_insights_results = kwargs.get('application_insights_results', None) + self.other_results = kwargs.get('other_results', None) + + +class DiagnoseResult(msrest.serialization.Model): + """Result of Diagnose. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: Code for workspace setup error. + :vartype code: str + :ivar level: Level of workspace setup error. Possible values include: "Warning", "Error", + "Information". + :vartype level: str or ~azure.mgmt.machinelearningservices.models.DiagnoseResultLevel + :ivar message: Message of workspace setup error. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'level': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(DiagnoseResult, self).__init__(**kwargs) + self.code = None + self.level = None + self.message = None + + +class DiagnoseWorkspaceParameters(msrest.serialization.Model): + """Parameters to diagnose a workspace. + + :ivar value: Value of Parameters. + :vartype value: ~azure.mgmt.machinelearningservices.models.DiagnoseRequestProperties + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'DiagnoseRequestProperties'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword value: Value of Parameters. + :paramtype value: ~azure.mgmt.machinelearningservices.models.DiagnoseRequestProperties + """ + super(DiagnoseWorkspaceParameters, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class DistributionConfiguration(msrest.serialization.Model): + """Base definition for job distribution configuration. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Mpi, PyTorch, TensorFlow. + + All required parameters must be populated in order to send to Azure. + + :ivar distribution_type: Required. [Required] Specifies the type of distribution + framework.Constant filled by server. Possible values include: "PyTorch", "TensorFlow", "Mpi". + :vartype distribution_type: str or ~azure.mgmt.machinelearningservices.models.DistributionType + """ + + _validation = { + 'distribution_type': {'required': True}, + } + + _attribute_map = { + 'distribution_type': {'key': 'distributionType', 'type': 'str'}, + } + + _subtype_map = { + 'distribution_type': {'Mpi': 'Mpi', 'PyTorch': 'PyTorch', 'TensorFlow': 'TensorFlow'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(DistributionConfiguration, self).__init__(**kwargs) + self.distribution_type = None # type: Optional[str] + + +class EncryptionKeyVaultProperties(msrest.serialization.Model): + """EncryptionKeyVaultProperties. + + All required parameters must be populated in order to send to Azure. + + :ivar key_vault_arm_id: Required. The ArmId of the keyVault where the customer owned encryption + key is present. + :vartype key_vault_arm_id: str + :ivar key_identifier: Required. Key vault uri to access the encryption key. + :vartype key_identifier: str + :ivar identity_client_id: For future use - The client id of the identity which will be used to + access key vault. + :vartype identity_client_id: str + """ + + _validation = { + 'key_vault_arm_id': {'required': True}, + 'key_identifier': {'required': True}, + } + + _attribute_map = { + 'key_vault_arm_id': {'key': 'keyVaultArmId', 'type': 'str'}, + 'key_identifier': {'key': 'keyIdentifier', 'type': 'str'}, + 'identity_client_id': {'key': 'identityClientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword key_vault_arm_id: Required. The ArmId of the keyVault where the customer owned + encryption key is present. + :paramtype key_vault_arm_id: str + :keyword key_identifier: Required. Key vault uri to access the encryption key. + :paramtype key_identifier: str + :keyword identity_client_id: For future use - The client id of the identity which will be used + to access key vault. + :paramtype identity_client_id: str + """ + super(EncryptionKeyVaultProperties, self).__init__(**kwargs) + self.key_vault_arm_id = kwargs['key_vault_arm_id'] + self.key_identifier = kwargs['key_identifier'] + self.identity_client_id = kwargs.get('identity_client_id', None) + + +class EncryptionProperty(msrest.serialization.Model): + """EncryptionProperty. + + All required parameters must be populated in order to send to Azure. + + :ivar status: Required. Indicates whether or not the encryption is enabled for the workspace. + Possible values include: "Enabled", "Disabled". + :vartype status: str or ~azure.mgmt.machinelearningservices.models.EncryptionStatus + :ivar identity: The identity that will be used to access the key vault for encryption at rest. + :vartype identity: ~azure.mgmt.machinelearningservices.models.IdentityForCmk + :ivar key_vault_properties: Required. Customer Key vault properties. + :vartype key_vault_properties: + ~azure.mgmt.machinelearningservices.models.EncryptionKeyVaultProperties + """ + + _validation = { + 'status': {'required': True}, + 'key_vault_properties': {'required': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'IdentityForCmk'}, + 'key_vault_properties': {'key': 'keyVaultProperties', 'type': 'EncryptionKeyVaultProperties'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword status: Required. Indicates whether or not the encryption is enabled for the + workspace. Possible values include: "Enabled", "Disabled". + :paramtype status: str or ~azure.mgmt.machinelearningservices.models.EncryptionStatus + :keyword identity: The identity that will be used to access the key vault for encryption at + rest. + :paramtype identity: ~azure.mgmt.machinelearningservices.models.IdentityForCmk + :keyword key_vault_properties: Required. Customer Key vault properties. + :paramtype key_vault_properties: + ~azure.mgmt.machinelearningservices.models.EncryptionKeyVaultProperties + """ + super(EncryptionProperty, self).__init__(**kwargs) + self.status = kwargs['status'] + self.identity = kwargs.get('identity', None) + self.key_vault_properties = kwargs['key_vault_properties'] + + +class EndpointAuthKeys(msrest.serialization.Model): + """Keys for endpoint authentication. + + :ivar primary_key: The primary key. + :vartype primary_key: str + :ivar secondary_key: The secondary key. + :vartype secondary_key: str + """ + + _attribute_map = { + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword primary_key: The primary key. + :paramtype primary_key: str + :keyword secondary_key: The secondary key. + :paramtype secondary_key: str + """ + super(EndpointAuthKeys, self).__init__(**kwargs) + self.primary_key = kwargs.get('primary_key', None) + self.secondary_key = kwargs.get('secondary_key', None) + + +class EndpointAuthToken(msrest.serialization.Model): + """Service Token. + + :ivar access_token: Access token for endpoint authentication. + :vartype access_token: str + :ivar expiry_time_utc: Access token expiry time (UTC). + :vartype expiry_time_utc: long + :ivar refresh_after_time_utc: Refresh access token after time (UTC). + :vartype refresh_after_time_utc: long + :ivar token_type: Access token type. + :vartype token_type: str + """ + + _attribute_map = { + 'access_token': {'key': 'accessToken', 'type': 'str'}, + 'expiry_time_utc': {'key': 'expiryTimeUtc', 'type': 'long'}, + 'refresh_after_time_utc': {'key': 'refreshAfterTimeUtc', 'type': 'long'}, + 'token_type': {'key': 'tokenType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword access_token: Access token for endpoint authentication. + :paramtype access_token: str + :keyword expiry_time_utc: Access token expiry time (UTC). + :paramtype expiry_time_utc: long + :keyword refresh_after_time_utc: Refresh access token after time (UTC). + :paramtype refresh_after_time_utc: long + :keyword token_type: Access token type. + :paramtype token_type: str + """ + super(EndpointAuthToken, self).__init__(**kwargs) + self.access_token = kwargs.get('access_token', None) + self.expiry_time_utc = kwargs.get('expiry_time_utc', 0) + self.refresh_after_time_utc = kwargs.get('refresh_after_time_utc', 0) + self.token_type = kwargs.get('token_type', None) + + +class EnvironmentContainerData(Resource): + """Azure Resource Manager resource envelope. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar properties: Required. [Required] Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.EnvironmentContainerDetails + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'EnvironmentContainerDetails'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: Required. [Required] Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.EnvironmentContainerDetails + """ + super(EnvironmentContainerData, self).__init__(**kwargs) + self.properties = kwargs['properties'] + + +class EnvironmentContainerDetails(AssetContainer): + """Container for environment specification versions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar latest_version: The latest version inside this container. + :vartype latest_version: str + :ivar next_version: The next auto incremental version. + :vartype next_version: str + """ + + _validation = { + 'latest_version': {'readonly': True}, + 'next_version': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'latest_version': {'key': 'latestVersion', 'type': 'str'}, + 'next_version': {'key': 'nextVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + """ + super(EnvironmentContainerDetails, self).__init__(**kwargs) + + +class EnvironmentContainerResourceArmPaginatedResult(msrest.serialization.Model): + """A paginated list of EnvironmentContainer entities. + + :ivar next_link: The link to the next page of EnvironmentContainer objects. If null, there are + no additional pages. + :vartype next_link: str + :ivar value: An array of objects of type EnvironmentContainer. + :vartype value: list[~azure.mgmt.machinelearningservices.models.EnvironmentContainerData] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[EnvironmentContainerData]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword next_link: The link to the next page of EnvironmentContainer objects. If null, there + are no additional pages. + :paramtype next_link: str + :keyword value: An array of objects of type EnvironmentContainer. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.EnvironmentContainerData] + """ + super(EnvironmentContainerResourceArmPaginatedResult, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class EnvironmentVersionData(Resource): + """Azure Resource Manager resource envelope. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar properties: Required. [Required] Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.EnvironmentVersionDetails + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'EnvironmentVersionDetails'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: Required. [Required] Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.EnvironmentVersionDetails + """ + super(EnvironmentVersionData, self).__init__(**kwargs) + self.properties = kwargs['properties'] + + +class EnvironmentVersionDetails(AssetBase): + """Environment version details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar is_anonymous: If the name version are system generated (anonymous registration). + :vartype is_anonymous: bool + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar build: Configuration settings for Docker build context. + :vartype build: ~azure.mgmt.machinelearningservices.models.BuildContext + :ivar conda_file: Standard configuration file used by Conda that lets you install any kind of + package, including Python, R, and C/C++ packages. + + + .. raw:: html + + <see + href="https://repo2docker.readthedocs.io/en/latest/config_files.html#environment-yml-install-a-conda-environment" + />. + :vartype conda_file: str + :ivar environment_type: Environment type is either user managed or curated by the Azure ML + service + + + .. raw:: html + + <see + href="https://learn.microsoft.com/azure/machine-learning/resource-curated-environments" + />. Possible values include: "Curated", "UserCreated". + :vartype environment_type: str or ~azure.mgmt.machinelearningservices.models.EnvironmentType + :ivar image: Name of the image that will be used for the environment. + + + .. raw:: html + + <seealso + href="https://learn.microsoft.com/azure/machine-learning/how-to-deploy-custom-docker-image#use-a-custom-base-image" + />. + :vartype image: str + :ivar inference_config: Defines configuration specific to inference. + :vartype inference_config: + ~azure.mgmt.machinelearningservices.models.InferenceContainerProperties + :ivar os_type: The OS type of the environment. Possible values include: "Linux", "Windows". + :vartype os_type: str or ~azure.mgmt.machinelearningservices.models.OperatingSystemType + """ + + _validation = { + 'environment_type': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'build': {'key': 'build', 'type': 'BuildContext'}, + 'conda_file': {'key': 'condaFile', 'type': 'str'}, + 'environment_type': {'key': 'environmentType', 'type': 'str'}, + 'image': {'key': 'image', 'type': 'str'}, + 'inference_config': {'key': 'inferenceConfig', 'type': 'InferenceContainerProperties'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword is_anonymous: If the name version are system generated (anonymous registration). + :paramtype is_anonymous: bool + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + :keyword build: Configuration settings for Docker build context. + :paramtype build: ~azure.mgmt.machinelearningservices.models.BuildContext + :keyword conda_file: Standard configuration file used by Conda that lets you install any kind + of package, including Python, R, and C/C++ packages. + + + .. raw:: html + + <see + href="https://repo2docker.readthedocs.io/en/latest/config_files.html#environment-yml-install-a-conda-environment" + />. + :paramtype conda_file: str + :keyword image: Name of the image that will be used for the environment. + + + .. raw:: html + + <seealso + href="https://learn.microsoft.com/azure/machine-learning/how-to-deploy-custom-docker-image#use-a-custom-base-image" + />. + :paramtype image: str + :keyword inference_config: Defines configuration specific to inference. + :paramtype inference_config: + ~azure.mgmt.machinelearningservices.models.InferenceContainerProperties + :keyword os_type: The OS type of the environment. Possible values include: "Linux", "Windows". + :paramtype os_type: str or ~azure.mgmt.machinelearningservices.models.OperatingSystemType + """ + super(EnvironmentVersionDetails, self).__init__(**kwargs) + self.build = kwargs.get('build', None) + self.conda_file = kwargs.get('conda_file', None) + self.environment_type = None + self.image = kwargs.get('image', None) + self.inference_config = kwargs.get('inference_config', None) + self.os_type = kwargs.get('os_type', None) + + +class EnvironmentVersionResourceArmPaginatedResult(msrest.serialization.Model): + """A paginated list of EnvironmentVersion entities. + + :ivar next_link: The link to the next page of EnvironmentVersion objects. If null, there are no + additional pages. + :vartype next_link: str + :ivar value: An array of objects of type EnvironmentVersion. + :vartype value: list[~azure.mgmt.machinelearningservices.models.EnvironmentVersionData] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[EnvironmentVersionData]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword next_link: The link to the next page of EnvironmentVersion objects. If null, there are + no additional pages. + :paramtype next_link: str + :keyword value: An array of objects of type EnvironmentVersion. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.EnvironmentVersionData] + """ + super(EnvironmentVersionResourceArmPaginatedResult, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class ErrorAdditionalInfo(msrest.serialization.Model): + """The resource management error additional info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: any + """ + + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None + + +class ErrorDetail(msrest.serialization.Model): + """The error detail. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~azure.mgmt.machinelearningservices.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: list[~azure.mgmt.machinelearningservices.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ErrorDetail, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class ErrorResponse(msrest.serialization.Model): + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). + + :ivar error: The error object. + :vartype error: ~azure.mgmt.machinelearningservices.models.ErrorDetail + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword error: The error object. + :paramtype error: ~azure.mgmt.machinelearningservices.models.ErrorDetail + """ + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class EstimatedVMPrice(msrest.serialization.Model): + """The estimated price info for using a VM of a particular OS type, tier, etc. + + All required parameters must be populated in order to send to Azure. + + :ivar retail_price: Required. The price charged for using the VM. + :vartype retail_price: float + :ivar os_type: Required. Operating system type used by the VM. Possible values include: + "Linux", "Windows". + :vartype os_type: str or ~azure.mgmt.machinelearningservices.models.VMPriceOSType + :ivar vm_tier: Required. The type of the VM. Possible values include: "Standard", + "LowPriority", "Spot". + :vartype vm_tier: str or ~azure.mgmt.machinelearningservices.models.VMTier + """ + + _validation = { + 'retail_price': {'required': True}, + 'os_type': {'required': True}, + 'vm_tier': {'required': True}, + } + + _attribute_map = { + 'retail_price': {'key': 'retailPrice', 'type': 'float'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'vm_tier': {'key': 'vmTier', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword retail_price: Required. The price charged for using the VM. + :paramtype retail_price: float + :keyword os_type: Required. Operating system type used by the VM. Possible values include: + "Linux", "Windows". + :paramtype os_type: str or ~azure.mgmt.machinelearningservices.models.VMPriceOSType + :keyword vm_tier: Required. The type of the VM. Possible values include: "Standard", + "LowPriority", "Spot". + :paramtype vm_tier: str or ~azure.mgmt.machinelearningservices.models.VMTier + """ + super(EstimatedVMPrice, self).__init__(**kwargs) + self.retail_price = kwargs['retail_price'] + self.os_type = kwargs['os_type'] + self.vm_tier = kwargs['vm_tier'] + + +class EstimatedVMPrices(msrest.serialization.Model): + """The estimated price info for using a VM. + + All required parameters must be populated in order to send to Azure. + + :ivar billing_currency: Required. Three lettered code specifying the currency of the VM price. + Example: USD. Possible values include: "USD". + :vartype billing_currency: str or ~azure.mgmt.machinelearningservices.models.BillingCurrency + :ivar unit_of_measure: Required. The unit of time measurement for the specified VM price. + Example: OneHour. Possible values include: "OneHour". + :vartype unit_of_measure: str or ~azure.mgmt.machinelearningservices.models.UnitOfMeasure + :ivar values: Required. The list of estimated prices for using a VM of a particular OS type, + tier, etc. + :vartype values: list[~azure.mgmt.machinelearningservices.models.EstimatedVMPrice] + """ + + _validation = { + 'billing_currency': {'required': True}, + 'unit_of_measure': {'required': True}, + 'values': {'required': True}, + } + + _attribute_map = { + 'billing_currency': {'key': 'billingCurrency', 'type': 'str'}, + 'unit_of_measure': {'key': 'unitOfMeasure', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[EstimatedVMPrice]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword billing_currency: Required. Three lettered code specifying the currency of the VM + price. Example: USD. Possible values include: "USD". + :paramtype billing_currency: str or ~azure.mgmt.machinelearningservices.models.BillingCurrency + :keyword unit_of_measure: Required. The unit of time measurement for the specified VM price. + Example: OneHour. Possible values include: "OneHour". + :paramtype unit_of_measure: str or ~azure.mgmt.machinelearningservices.models.UnitOfMeasure + :keyword values: Required. The list of estimated prices for using a VM of a particular OS type, + tier, etc. + :paramtype values: list[~azure.mgmt.machinelearningservices.models.EstimatedVMPrice] + """ + super(EstimatedVMPrices, self).__init__(**kwargs) + self.billing_currency = kwargs['billing_currency'] + self.unit_of_measure = kwargs['unit_of_measure'] + self.values = kwargs['values'] + + +class ExternalFQDNResponse(msrest.serialization.Model): + """ExternalFQDNResponse. + + :ivar value: + :vartype value: list[~azure.mgmt.machinelearningservices.models.FQDNEndpoints] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[FQDNEndpoints]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword value: + :paramtype value: list[~azure.mgmt.machinelearningservices.models.FQDNEndpoints] + """ + super(ExternalFQDNResponse, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class FlavorData(msrest.serialization.Model): + """FlavorData. + + :ivar data: Model flavor-specific data. + :vartype data: dict[str, str] + """ + + _attribute_map = { + 'data': {'key': 'data', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword data: Model flavor-specific data. + :paramtype data: dict[str, str] + """ + super(FlavorData, self).__init__(**kwargs) + self.data = kwargs.get('data', None) + + +class FQDNEndpoint(msrest.serialization.Model): + """FQDNEndpoint. + + :ivar domain_name: + :vartype domain_name: str + :ivar endpoint_details: + :vartype endpoint_details: list[~azure.mgmt.machinelearningservices.models.FQDNEndpointDetail] + """ + + _attribute_map = { + 'domain_name': {'key': 'domainName', 'type': 'str'}, + 'endpoint_details': {'key': 'endpointDetails', 'type': '[FQDNEndpointDetail]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword domain_name: + :paramtype domain_name: str + :keyword endpoint_details: + :paramtype endpoint_details: + list[~azure.mgmt.machinelearningservices.models.FQDNEndpointDetail] + """ + super(FQDNEndpoint, self).__init__(**kwargs) + self.domain_name = kwargs.get('domain_name', None) + self.endpoint_details = kwargs.get('endpoint_details', None) + + +class FQDNEndpointDetail(msrest.serialization.Model): + """FQDNEndpointDetail. + + :ivar port: + :vartype port: int + """ + + _attribute_map = { + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword port: + :paramtype port: int + """ + super(FQDNEndpointDetail, self).__init__(**kwargs) + self.port = kwargs.get('port', None) + + +class FQDNEndpoints(msrest.serialization.Model): + """FQDNEndpoints. + + :ivar properties: + :vartype properties: ~azure.mgmt.machinelearningservices.models.FQDNEndpointsProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'FQDNEndpointsProperties'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: + :paramtype properties: ~azure.mgmt.machinelearningservices.models.FQDNEndpointsProperties + """ + super(FQDNEndpoints, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class FQDNEndpointsProperties(msrest.serialization.Model): + """FQDNEndpointsProperties. + + :ivar category: + :vartype category: str + :ivar endpoints: + :vartype endpoints: list[~azure.mgmt.machinelearningservices.models.FQDNEndpoint] + """ + + _attribute_map = { + 'category': {'key': 'category', 'type': 'str'}, + 'endpoints': {'key': 'endpoints', 'type': '[FQDNEndpoint]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword category: + :paramtype category: str + :keyword endpoints: + :paramtype endpoints: list[~azure.mgmt.machinelearningservices.models.FQDNEndpoint] + """ + super(FQDNEndpointsProperties, self).__init__(**kwargs) + self.category = kwargs.get('category', None) + self.endpoints = kwargs.get('endpoints', None) + + +class GridSamplingAlgorithm(SamplingAlgorithm): + """Defines a Sampling Algorithm that exhaustively generates every value combination in the space. + + All required parameters must be populated in order to send to Azure. + + :ivar sampling_algorithm_type: Required. [Required] The algorithm used for generating + hyperparameter values, along with configuration properties.Constant filled by server. Possible + values include: "Grid", "Random", "Bayesian". + :vartype sampling_algorithm_type: str or + ~azure.mgmt.machinelearningservices.models.SamplingAlgorithmType + """ + + _validation = { + 'sampling_algorithm_type': {'required': True}, + } + + _attribute_map = { + 'sampling_algorithm_type': {'key': 'samplingAlgorithmType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(GridSamplingAlgorithm, self).__init__(**kwargs) + self.sampling_algorithm_type = 'Grid' # type: str + + +class HDInsightSchema(msrest.serialization.Model): + """HDInsightSchema. + + :ivar properties: HDInsight compute properties. + :vartype properties: ~azure.mgmt.machinelearningservices.models.HDInsightProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'HDInsightProperties'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: HDInsight compute properties. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.HDInsightProperties + """ + super(HDInsightSchema, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class HDInsight(Compute, HDInsightSchema): + """A HDInsight compute. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar properties: HDInsight compute properties. + :vartype properties: ~azure.mgmt.machinelearningservices.models.HDInsightProperties + :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values + include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", + "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark". + :vartype compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType + :ivar compute_location: Location for the underlying compute. + :vartype compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values are Unknown, + Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating", + "Creating", "Deleting", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :ivar description: The description of the Machine Learning compute. + :vartype description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: ~datetime.datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: ~datetime.datetime + :ivar resource_id: ARM resource id of the underlying compute. + :vartype resource_id: str + :ivar provisioning_errors: Errors during provisioning. + :vartype provisioning_errors: list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought + from outside if true, or machine learning service provisioned it if false. + :vartype is_attached_compute: bool + :ivar disable_local_auth: Opt-out of local authentication and ensure customers can use only MSI + and AAD exclusively for authentication. + :vartype disable_local_auth: bool + """ + + _validation = { + 'compute_type': {'required': True}, + 'compute_location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'HDInsightProperties'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: HDInsight compute properties. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.HDInsightProperties + :keyword description: The description of the Machine Learning compute. + :paramtype description: str + :keyword resource_id: ARM resource id of the underlying compute. + :paramtype resource_id: str + :keyword disable_local_auth: Opt-out of local authentication and ensure customers can use only + MSI and AAD exclusively for authentication. + :paramtype disable_local_auth: bool + """ + super(HDInsight, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.compute_type = 'HDInsight' # type: str + self.compute_type = 'HDInsight' # type: str + self.compute_location = None + self.provisioning_state = None + self.description = kwargs.get('description', None) + self.created_on = None + self.modified_on = None + self.resource_id = kwargs.get('resource_id', None) + self.provisioning_errors = None + self.is_attached_compute = None + self.disable_local_auth = kwargs.get('disable_local_auth', None) + + +class HDInsightProperties(msrest.serialization.Model): + """HDInsight compute properties. + + :ivar ssh_port: Port open for ssh connections on the master node of the cluster. + :vartype ssh_port: int + :ivar address: Public IP address of the master node of the cluster. + :vartype address: str + :ivar administrator_account: Admin credentials for master node of the cluster. + :vartype administrator_account: + ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials + """ + + _attribute_map = { + 'ssh_port': {'key': 'sshPort', 'type': 'int'}, + 'address': {'key': 'address', 'type': 'str'}, + 'administrator_account': {'key': 'administratorAccount', 'type': 'VirtualMachineSshCredentials'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword ssh_port: Port open for ssh connections on the master node of the cluster. + :paramtype ssh_port: int + :keyword address: Public IP address of the master node of the cluster. + :paramtype address: str + :keyword administrator_account: Admin credentials for master node of the cluster. + :paramtype administrator_account: + ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials + """ + super(HDInsightProperties, self).__init__(**kwargs) + self.ssh_port = kwargs.get('ssh_port', None) + self.address = kwargs.get('address', None) + self.administrator_account = kwargs.get('administrator_account', None) + + +class IdAssetReference(AssetReferenceBase): + """Reference to an asset via its ARM resource ID. + + All required parameters must be populated in order to send to Azure. + + :ivar reference_type: Required. [Required] Specifies the type of asset reference.Constant + filled by server. Possible values include: "Id", "DataPath", "OutputPath". + :vartype reference_type: str or ~azure.mgmt.machinelearningservices.models.ReferenceType + :ivar asset_id: Required. [Required] ARM resource ID of the asset. + :vartype asset_id: str + """ + + _validation = { + 'reference_type': {'required': True}, + 'asset_id': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + } + + _attribute_map = { + 'reference_type': {'key': 'referenceType', 'type': 'str'}, + 'asset_id': {'key': 'assetId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword asset_id: Required. [Required] ARM resource ID of the asset. + :paramtype asset_id: str + """ + super(IdAssetReference, self).__init__(**kwargs) + self.reference_type = 'Id' # type: str + self.asset_id = kwargs['asset_id'] + + +class IdentityForCmk(msrest.serialization.Model): + """Identity that will be used to access key vault for encryption at rest. + + :ivar user_assigned_identity: The ArmId of the user assigned identity that will be used to + access the customer managed key vault. + :vartype user_assigned_identity: str + """ + + _attribute_map = { + 'user_assigned_identity': {'key': 'userAssignedIdentity', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword user_assigned_identity: The ArmId of the user assigned identity that will be used to + access the customer managed key vault. + :paramtype user_assigned_identity: str + """ + super(IdentityForCmk, self).__init__(**kwargs) + self.user_assigned_identity = kwargs.get('user_assigned_identity', None) + + +class InferenceContainerProperties(msrest.serialization.Model): + """InferenceContainerProperties. + + :ivar liveness_route: The route to check the liveness of the inference server container. + :vartype liveness_route: ~azure.mgmt.machinelearningservices.models.Route + :ivar readiness_route: The route to check the readiness of the inference server container. + :vartype readiness_route: ~azure.mgmt.machinelearningservices.models.Route + :ivar scoring_route: The port to send the scoring requests to, within the inference server + container. + :vartype scoring_route: ~azure.mgmt.machinelearningservices.models.Route + """ + + _attribute_map = { + 'liveness_route': {'key': 'livenessRoute', 'type': 'Route'}, + 'readiness_route': {'key': 'readinessRoute', 'type': 'Route'}, + 'scoring_route': {'key': 'scoringRoute', 'type': 'Route'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword liveness_route: The route to check the liveness of the inference server container. + :paramtype liveness_route: ~azure.mgmt.machinelearningservices.models.Route + :keyword readiness_route: The route to check the readiness of the inference server container. + :paramtype readiness_route: ~azure.mgmt.machinelearningservices.models.Route + :keyword scoring_route: The port to send the scoring requests to, within the inference server + container. + :paramtype scoring_route: ~azure.mgmt.machinelearningservices.models.Route + """ + super(InferenceContainerProperties, self).__init__(**kwargs) + self.liveness_route = kwargs.get('liveness_route', None) + self.readiness_route = kwargs.get('readiness_route', None) + self.scoring_route = kwargs.get('scoring_route', None) + + +class InstanceTypeSchema(msrest.serialization.Model): + """Instance type schema. + + :ivar node_selector: Node Selector. + :vartype node_selector: dict[str, str] + :ivar resources: Resource requests/limits for this instance type. + :vartype resources: ~azure.mgmt.machinelearningservices.models.InstanceTypeSchemaResources + """ + + _attribute_map = { + 'node_selector': {'key': 'nodeSelector', 'type': '{str}'}, + 'resources': {'key': 'resources', 'type': 'InstanceTypeSchemaResources'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword node_selector: Node Selector. + :paramtype node_selector: dict[str, str] + :keyword resources: Resource requests/limits for this instance type. + :paramtype resources: ~azure.mgmt.machinelearningservices.models.InstanceTypeSchemaResources + """ + super(InstanceTypeSchema, self).__init__(**kwargs) + self.node_selector = kwargs.get('node_selector', None) + self.resources = kwargs.get('resources', None) + + +class InstanceTypeSchemaResources(msrest.serialization.Model): + """Resource requests/limits for this instance type. + + :ivar requests: Resource requests for this instance type. + :vartype requests: dict[str, str] + :ivar limits: Resource limits for this instance type. + :vartype limits: dict[str, str] + """ + + _attribute_map = { + 'requests': {'key': 'requests', 'type': '{str}'}, + 'limits': {'key': 'limits', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword requests: Resource requests for this instance type. + :paramtype requests: dict[str, str] + :keyword limits: Resource limits for this instance type. + :paramtype limits: dict[str, str] + """ + super(InstanceTypeSchemaResources, self).__init__(**kwargs) + self.requests = kwargs.get('requests', None) + self.limits = kwargs.get('limits', None) + + +class JobBaseData(Resource): + """Azure Resource Manager resource envelope. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar properties: Required. [Required] Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.JobBaseDetails + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'JobBaseDetails'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: Required. [Required] Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.JobBaseDetails + """ + super(JobBaseData, self).__init__(**kwargs) + self.properties = kwargs['properties'] + + +class JobBaseResourceArmPaginatedResult(msrest.serialization.Model): + """A paginated list of JobBase entities. + + :ivar next_link: The link to the next page of JobBase objects. If null, there are no additional + pages. + :vartype next_link: str + :ivar value: An array of objects of type JobBase. + :vartype value: list[~azure.mgmt.machinelearningservices.models.JobBaseData] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[JobBaseData]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword next_link: The link to the next page of JobBase objects. If null, there are no + additional pages. + :paramtype next_link: str + :keyword value: An array of objects of type JobBase. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.JobBaseData] + """ + super(JobBaseResourceArmPaginatedResult, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class JobService(msrest.serialization.Model): + """Job endpoint definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar endpoint: Url for endpoint. + :vartype endpoint: str + :ivar error_message: Any error in the service. + :vartype error_message: str + :ivar job_service_type: Endpoint type. + :vartype job_service_type: str + :ivar port: Port for endpoint. + :vartype port: int + :ivar properties: Additional properties to set on the endpoint. + :vartype properties: dict[str, str] + :ivar status: Status of endpoint. + :vartype status: str + """ + + _validation = { + 'error_message': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'job_service_type': {'key': 'jobServiceType', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword endpoint: Url for endpoint. + :paramtype endpoint: str + :keyword job_service_type: Endpoint type. + :paramtype job_service_type: str + :keyword port: Port for endpoint. + :paramtype port: int + :keyword properties: Additional properties to set on the endpoint. + :paramtype properties: dict[str, str] + """ + super(JobService, self).__init__(**kwargs) + self.endpoint = kwargs.get('endpoint', None) + self.error_message = None + self.job_service_type = kwargs.get('job_service_type', None) + self.port = kwargs.get('port', None) + self.properties = kwargs.get('properties', None) + self.status = None + + +class KubernetesSchema(msrest.serialization.Model): + """Kubernetes Compute Schema. + + :ivar properties: Properties of Kubernetes. + :vartype properties: ~azure.mgmt.machinelearningservices.models.KubernetesProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'KubernetesProperties'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: Properties of Kubernetes. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.KubernetesProperties + """ + super(KubernetesSchema, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class Kubernetes(Compute, KubernetesSchema): + """A Machine Learning compute based on Kubernetes Compute. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar properties: Properties of Kubernetes. + :vartype properties: ~azure.mgmt.machinelearningservices.models.KubernetesProperties + :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values + include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", + "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark". + :vartype compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType + :ivar compute_location: Location for the underlying compute. + :vartype compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values are Unknown, + Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating", + "Creating", "Deleting", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :ivar description: The description of the Machine Learning compute. + :vartype description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: ~datetime.datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: ~datetime.datetime + :ivar resource_id: ARM resource id of the underlying compute. + :vartype resource_id: str + :ivar provisioning_errors: Errors during provisioning. + :vartype provisioning_errors: list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought + from outside if true, or machine learning service provisioned it if false. + :vartype is_attached_compute: bool + :ivar disable_local_auth: Opt-out of local authentication and ensure customers can use only MSI + and AAD exclusively for authentication. + :vartype disable_local_auth: bool + """ + + _validation = { + 'compute_type': {'required': True}, + 'compute_location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'KubernetesProperties'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: Properties of Kubernetes. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.KubernetesProperties + :keyword description: The description of the Machine Learning compute. + :paramtype description: str + :keyword resource_id: ARM resource id of the underlying compute. + :paramtype resource_id: str + :keyword disable_local_auth: Opt-out of local authentication and ensure customers can use only + MSI and AAD exclusively for authentication. + :paramtype disable_local_auth: bool + """ + super(Kubernetes, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.compute_type = 'Kubernetes' # type: str + self.compute_type = 'Kubernetes' # type: str + self.compute_location = None + self.provisioning_state = None + self.description = kwargs.get('description', None) + self.created_on = None + self.modified_on = None + self.resource_id = kwargs.get('resource_id', None) + self.provisioning_errors = None + self.is_attached_compute = None + self.disable_local_auth = kwargs.get('disable_local_auth', None) + + +class OnlineDeploymentDetails(EndpointDeploymentPropertiesBase): + """OnlineDeploymentDetails. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: KubernetesOnlineDeployment, ManagedOnlineDeployment. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar code_configuration: Code configuration for the endpoint deployment. + :vartype code_configuration: ~azure.mgmt.machinelearningservices.models.CodeConfiguration + :ivar description: Description of the endpoint deployment. + :vartype description: str + :ivar environment_id: ARM resource ID of the environment specification for the endpoint + deployment. + :vartype environment_id: str + :ivar environment_variables: Environment variables configuration for the deployment. + :vartype environment_variables: dict[str, str] + :ivar properties: Property dictionary. Properties can be added, but not removed or altered. + :vartype properties: dict[str, str] + :ivar app_insights_enabled: If true, enables Application Insights logging. + :vartype app_insights_enabled: bool + :ivar endpoint_compute_type: Required. [Required] The compute type of the endpoint.Constant + filled by server. Possible values include: "Managed", "Kubernetes", "AzureMLCompute". + :vartype endpoint_compute_type: str or + ~azure.mgmt.machinelearningservices.models.EndpointComputeType + :ivar instance_type: Compute instance type. + :vartype instance_type: str + :ivar liveness_probe: Liveness probe monitors the health of the container regularly. + :vartype liveness_probe: ~azure.mgmt.machinelearningservices.models.ProbeSettings + :ivar model: The URI path to the model. + :vartype model: str + :ivar model_mount_path: The path to mount the model in custom container. + :vartype model_mount_path: str + :ivar provisioning_state: Provisioning state for the endpoint deployment. Possible values + include: "Creating", "Deleting", "Scaling", "Updating", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.DeploymentProvisioningState + :ivar readiness_probe: Readiness probe validates if the container is ready to serve traffic. + The properties and defaults are the same as liveness probe. + :vartype readiness_probe: ~azure.mgmt.machinelearningservices.models.ProbeSettings + :ivar request_settings: Request settings for the deployment. + :vartype request_settings: ~azure.mgmt.machinelearningservices.models.OnlineRequestSettings + :ivar scale_settings: Scale settings for the deployment. + If it is null or not provided, + it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment + and to DefaultScaleSettings for ManagedOnlineDeployment. + :vartype scale_settings: ~azure.mgmt.machinelearningservices.models.OnlineScaleSettings + """ + + _validation = { + 'endpoint_compute_type': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'code_configuration': {'key': 'codeConfiguration', 'type': 'CodeConfiguration'}, + 'description': {'key': 'description', 'type': 'str'}, + 'environment_id': {'key': 'environmentId', 'type': 'str'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'app_insights_enabled': {'key': 'appInsightsEnabled', 'type': 'bool'}, + 'endpoint_compute_type': {'key': 'endpointComputeType', 'type': 'str'}, + 'instance_type': {'key': 'instanceType', 'type': 'str'}, + 'liveness_probe': {'key': 'livenessProbe', 'type': 'ProbeSettings'}, + 'model': {'key': 'model', 'type': 'str'}, + 'model_mount_path': {'key': 'modelMountPath', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'readiness_probe': {'key': 'readinessProbe', 'type': 'ProbeSettings'}, + 'request_settings': {'key': 'requestSettings', 'type': 'OnlineRequestSettings'}, + 'scale_settings': {'key': 'scaleSettings', 'type': 'OnlineScaleSettings'}, + } + + _subtype_map = { + 'endpoint_compute_type': {'Kubernetes': 'KubernetesOnlineDeployment', 'Managed': 'ManagedOnlineDeployment'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword code_configuration: Code configuration for the endpoint deployment. + :paramtype code_configuration: ~azure.mgmt.machinelearningservices.models.CodeConfiguration + :keyword description: Description of the endpoint deployment. + :paramtype description: str + :keyword environment_id: ARM resource ID of the environment specification for the endpoint + deployment. + :paramtype environment_id: str + :keyword environment_variables: Environment variables configuration for the deployment. + :paramtype environment_variables: dict[str, str] + :keyword properties: Property dictionary. Properties can be added, but not removed or altered. + :paramtype properties: dict[str, str] + :keyword app_insights_enabled: If true, enables Application Insights logging. + :paramtype app_insights_enabled: bool + :keyword instance_type: Compute instance type. + :paramtype instance_type: str + :keyword liveness_probe: Liveness probe monitors the health of the container regularly. + :paramtype liveness_probe: ~azure.mgmt.machinelearningservices.models.ProbeSettings + :keyword model: The URI path to the model. + :paramtype model: str + :keyword model_mount_path: The path to mount the model in custom container. + :paramtype model_mount_path: str + :keyword readiness_probe: Readiness probe validates if the container is ready to serve traffic. + The properties and defaults are the same as liveness probe. + :paramtype readiness_probe: ~azure.mgmt.machinelearningservices.models.ProbeSettings + :keyword request_settings: Request settings for the deployment. + :paramtype request_settings: ~azure.mgmt.machinelearningservices.models.OnlineRequestSettings + :keyword scale_settings: Scale settings for the deployment. + If it is null or not provided, + it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment + and to DefaultScaleSettings for ManagedOnlineDeployment. + :paramtype scale_settings: ~azure.mgmt.machinelearningservices.models.OnlineScaleSettings + """ + super(OnlineDeploymentDetails, self).__init__(**kwargs) + self.app_insights_enabled = kwargs.get('app_insights_enabled', False) + self.endpoint_compute_type = 'OnlineDeploymentDetails' # type: str + self.instance_type = kwargs.get('instance_type', None) + self.liveness_probe = kwargs.get('liveness_probe', None) + self.model = kwargs.get('model', None) + self.model_mount_path = kwargs.get('model_mount_path', None) + self.provisioning_state = None + self.readiness_probe = kwargs.get('readiness_probe', None) + self.request_settings = kwargs.get('request_settings', None) + self.scale_settings = kwargs.get('scale_settings', None) + + +class KubernetesOnlineDeployment(OnlineDeploymentDetails): + """Properties specific to a KubernetesOnlineDeployment. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar code_configuration: Code configuration for the endpoint deployment. + :vartype code_configuration: ~azure.mgmt.machinelearningservices.models.CodeConfiguration + :ivar description: Description of the endpoint deployment. + :vartype description: str + :ivar environment_id: ARM resource ID of the environment specification for the endpoint + deployment. + :vartype environment_id: str + :ivar environment_variables: Environment variables configuration for the deployment. + :vartype environment_variables: dict[str, str] + :ivar properties: Property dictionary. Properties can be added, but not removed or altered. + :vartype properties: dict[str, str] + :ivar app_insights_enabled: If true, enables Application Insights logging. + :vartype app_insights_enabled: bool + :ivar endpoint_compute_type: Required. [Required] The compute type of the endpoint.Constant + filled by server. Possible values include: "Managed", "Kubernetes", "AzureMLCompute". + :vartype endpoint_compute_type: str or + ~azure.mgmt.machinelearningservices.models.EndpointComputeType + :ivar instance_type: Compute instance type. + :vartype instance_type: str + :ivar liveness_probe: Liveness probe monitors the health of the container regularly. + :vartype liveness_probe: ~azure.mgmt.machinelearningservices.models.ProbeSettings + :ivar model: The URI path to the model. + :vartype model: str + :ivar model_mount_path: The path to mount the model in custom container. + :vartype model_mount_path: str + :ivar provisioning_state: Provisioning state for the endpoint deployment. Possible values + include: "Creating", "Deleting", "Scaling", "Updating", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.DeploymentProvisioningState + :ivar readiness_probe: Readiness probe validates if the container is ready to serve traffic. + The properties and defaults are the same as liveness probe. + :vartype readiness_probe: ~azure.mgmt.machinelearningservices.models.ProbeSettings + :ivar request_settings: Request settings for the deployment. + :vartype request_settings: ~azure.mgmt.machinelearningservices.models.OnlineRequestSettings + :ivar scale_settings: Scale settings for the deployment. + If it is null or not provided, + it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment + and to DefaultScaleSettings for ManagedOnlineDeployment. + :vartype scale_settings: ~azure.mgmt.machinelearningservices.models.OnlineScaleSettings + :ivar container_resource_requirements: The resource requirements for the container (cpu and + memory). + :vartype container_resource_requirements: + ~azure.mgmt.machinelearningservices.models.ContainerResourceRequirements + """ + + _validation = { + 'endpoint_compute_type': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'code_configuration': {'key': 'codeConfiguration', 'type': 'CodeConfiguration'}, + 'description': {'key': 'description', 'type': 'str'}, + 'environment_id': {'key': 'environmentId', 'type': 'str'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'app_insights_enabled': {'key': 'appInsightsEnabled', 'type': 'bool'}, + 'endpoint_compute_type': {'key': 'endpointComputeType', 'type': 'str'}, + 'instance_type': {'key': 'instanceType', 'type': 'str'}, + 'liveness_probe': {'key': 'livenessProbe', 'type': 'ProbeSettings'}, + 'model': {'key': 'model', 'type': 'str'}, + 'model_mount_path': {'key': 'modelMountPath', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'readiness_probe': {'key': 'readinessProbe', 'type': 'ProbeSettings'}, + 'request_settings': {'key': 'requestSettings', 'type': 'OnlineRequestSettings'}, + 'scale_settings': {'key': 'scaleSettings', 'type': 'OnlineScaleSettings'}, + 'container_resource_requirements': {'key': 'containerResourceRequirements', 'type': 'ContainerResourceRequirements'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword code_configuration: Code configuration for the endpoint deployment. + :paramtype code_configuration: ~azure.mgmt.machinelearningservices.models.CodeConfiguration + :keyword description: Description of the endpoint deployment. + :paramtype description: str + :keyword environment_id: ARM resource ID of the environment specification for the endpoint + deployment. + :paramtype environment_id: str + :keyword environment_variables: Environment variables configuration for the deployment. + :paramtype environment_variables: dict[str, str] + :keyword properties: Property dictionary. Properties can be added, but not removed or altered. + :paramtype properties: dict[str, str] + :keyword app_insights_enabled: If true, enables Application Insights logging. + :paramtype app_insights_enabled: bool + :keyword instance_type: Compute instance type. + :paramtype instance_type: str + :keyword liveness_probe: Liveness probe monitors the health of the container regularly. + :paramtype liveness_probe: ~azure.mgmt.machinelearningservices.models.ProbeSettings + :keyword model: The URI path to the model. + :paramtype model: str + :keyword model_mount_path: The path to mount the model in custom container. + :paramtype model_mount_path: str + :keyword readiness_probe: Readiness probe validates if the container is ready to serve traffic. + The properties and defaults are the same as liveness probe. + :paramtype readiness_probe: ~azure.mgmt.machinelearningservices.models.ProbeSettings + :keyword request_settings: Request settings for the deployment. + :paramtype request_settings: ~azure.mgmt.machinelearningservices.models.OnlineRequestSettings + :keyword scale_settings: Scale settings for the deployment. + If it is null or not provided, + it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment + and to DefaultScaleSettings for ManagedOnlineDeployment. + :paramtype scale_settings: ~azure.mgmt.machinelearningservices.models.OnlineScaleSettings + :keyword container_resource_requirements: The resource requirements for the container (cpu and + memory). + :paramtype container_resource_requirements: + ~azure.mgmt.machinelearningservices.models.ContainerResourceRequirements + """ + super(KubernetesOnlineDeployment, self).__init__(**kwargs) + self.endpoint_compute_type = 'Kubernetes' # type: str + self.container_resource_requirements = kwargs.get('container_resource_requirements', None) + + +class KubernetesProperties(msrest.serialization.Model): + """Kubernetes properties. + + :ivar relay_connection_string: Relay connection string. + :vartype relay_connection_string: str + :ivar service_bus_connection_string: ServiceBus connection string. + :vartype service_bus_connection_string: str + :ivar extension_principal_id: Extension principal-id. + :vartype extension_principal_id: str + :ivar extension_instance_release_train: Extension instance release train. + :vartype extension_instance_release_train: str + :ivar vc_name: VC name. + :vartype vc_name: str + :ivar namespace: Compute namespace. + :vartype namespace: str + :ivar default_instance_type: Default instance type. + :vartype default_instance_type: str + :ivar instance_types: Instance Type Schema. + :vartype instance_types: dict[str, + ~azure.mgmt.machinelearningservices.models.InstanceTypeSchema] + """ + + _attribute_map = { + 'relay_connection_string': {'key': 'relayConnectionString', 'type': 'str'}, + 'service_bus_connection_string': {'key': 'serviceBusConnectionString', 'type': 'str'}, + 'extension_principal_id': {'key': 'extensionPrincipalId', 'type': 'str'}, + 'extension_instance_release_train': {'key': 'extensionInstanceReleaseTrain', 'type': 'str'}, + 'vc_name': {'key': 'vcName', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'default_instance_type': {'key': 'defaultInstanceType', 'type': 'str'}, + 'instance_types': {'key': 'instanceTypes', 'type': '{InstanceTypeSchema}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword relay_connection_string: Relay connection string. + :paramtype relay_connection_string: str + :keyword service_bus_connection_string: ServiceBus connection string. + :paramtype service_bus_connection_string: str + :keyword extension_principal_id: Extension principal-id. + :paramtype extension_principal_id: str + :keyword extension_instance_release_train: Extension instance release train. + :paramtype extension_instance_release_train: str + :keyword vc_name: VC name. + :paramtype vc_name: str + :keyword namespace: Compute namespace. + :paramtype namespace: str + :keyword default_instance_type: Default instance type. + :paramtype default_instance_type: str + :keyword instance_types: Instance Type Schema. + :paramtype instance_types: dict[str, + ~azure.mgmt.machinelearningservices.models.InstanceTypeSchema] + """ + super(KubernetesProperties, self).__init__(**kwargs) + self.relay_connection_string = kwargs.get('relay_connection_string', None) + self.service_bus_connection_string = kwargs.get('service_bus_connection_string', None) + self.extension_principal_id = kwargs.get('extension_principal_id', None) + self.extension_instance_release_train = kwargs.get('extension_instance_release_train', None) + self.vc_name = kwargs.get('vc_name', None) + self.namespace = kwargs.get('namespace', "default") + self.default_instance_type = kwargs.get('default_instance_type', None) + self.instance_types = kwargs.get('instance_types', None) + + +class ListAmlUserFeatureResult(msrest.serialization.Model): + """The List Aml user feature operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of AML user facing features. + :vartype value: list[~azure.mgmt.machinelearningservices.models.AmlUserFeature] + :ivar next_link: The URI to fetch the next page of AML user features information. Call + ListNext() with this to fetch the next page of AML user features information. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AmlUserFeature]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ListAmlUserFeatureResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class ListNotebookKeysResult(msrest.serialization.Model): + """ListNotebookKeysResult. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar primary_access_key: + :vartype primary_access_key: str + :ivar secondary_access_key: + :vartype secondary_access_key: str + """ + + _validation = { + 'primary_access_key': {'readonly': True}, + 'secondary_access_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_access_key': {'key': 'primaryAccessKey', 'type': 'str'}, + 'secondary_access_key': {'key': 'secondaryAccessKey', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ListNotebookKeysResult, self).__init__(**kwargs) + self.primary_access_key = None + self.secondary_access_key = None + + +class ListStorageAccountKeysResult(msrest.serialization.Model): + """ListStorageAccountKeysResult. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar user_storage_key: + :vartype user_storage_key: str + """ + + _validation = { + 'user_storage_key': {'readonly': True}, + } + + _attribute_map = { + 'user_storage_key': {'key': 'userStorageKey', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ListStorageAccountKeysResult, self).__init__(**kwargs) + self.user_storage_key = None + + +class ListUsagesResult(msrest.serialization.Model): + """The List Usages operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of AML resource usages. + :vartype value: list[~azure.mgmt.machinelearningservices.models.Usage] + :ivar next_link: The URI to fetch the next page of AML resource usage information. Call + ListNext() with this to fetch the next page of AML resource usage information. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Usage]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ListUsagesResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class ListWorkspaceKeysResult(msrest.serialization.Model): + """ListWorkspaceKeysResult. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar user_storage_key: + :vartype user_storage_key: str + :ivar user_storage_resource_id: + :vartype user_storage_resource_id: str + :ivar app_insights_instrumentation_key: + :vartype app_insights_instrumentation_key: str + :ivar container_registry_credentials: + :vartype container_registry_credentials: + ~azure.mgmt.machinelearningservices.models.RegistryListCredentialsResult + :ivar notebook_access_keys: + :vartype notebook_access_keys: + ~azure.mgmt.machinelearningservices.models.ListNotebookKeysResult + """ + + _validation = { + 'user_storage_key': {'readonly': True}, + 'user_storage_resource_id': {'readonly': True}, + 'app_insights_instrumentation_key': {'readonly': True}, + 'container_registry_credentials': {'readonly': True}, + 'notebook_access_keys': {'readonly': True}, + } + + _attribute_map = { + 'user_storage_key': {'key': 'userStorageKey', 'type': 'str'}, + 'user_storage_resource_id': {'key': 'userStorageResourceId', 'type': 'str'}, + 'app_insights_instrumentation_key': {'key': 'appInsightsInstrumentationKey', 'type': 'str'}, + 'container_registry_credentials': {'key': 'containerRegistryCredentials', 'type': 'RegistryListCredentialsResult'}, + 'notebook_access_keys': {'key': 'notebookAccessKeys', 'type': 'ListNotebookKeysResult'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ListWorkspaceKeysResult, self).__init__(**kwargs) + self.user_storage_key = None + self.user_storage_resource_id = None + self.app_insights_instrumentation_key = None + self.container_registry_credentials = None + self.notebook_access_keys = None + + +class ListWorkspaceQuotas(msrest.serialization.Model): + """The List WorkspaceQuotasByVMFamily operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of Workspace Quotas by VM Family. + :vartype value: list[~azure.mgmt.machinelearningservices.models.ResourceQuota] + :ivar next_link: The URI to fetch the next page of workspace quota information by VM Family. + Call ListNext() with this to fetch the next page of Workspace Quota information. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ResourceQuota]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ListWorkspaceQuotas, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class LiteralJobInput(JobInput): + """Literal input type. + + All required parameters must be populated in order to send to Azure. + + :ivar description: Description for the input. + :vartype description: str + :ivar job_input_type: Required. [Required] Specifies the type of job.Constant filled by server. + Possible values include: "literal", "uri_file", "uri_folder", "mltable", "custom_model", + "mlflow_model", "triton_model". + :vartype job_input_type: str or ~azure.mgmt.machinelearningservices.models.JobInputType + :ivar value: Required. [Required] Literal value for the input. + :vartype value: str + """ + + _validation = { + 'job_input_type': {'required': True}, + 'value': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'job_input_type': {'key': 'jobInputType', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: Description for the input. + :paramtype description: str + :keyword value: Required. [Required] Literal value for the input. + :paramtype value: str + """ + super(LiteralJobInput, self).__init__(**kwargs) + self.job_input_type = 'literal' # type: str + self.value = kwargs['value'] + + +class ManagedIdentity(IdentityConfiguration): + """Managed identity configuration. + + All required parameters must be populated in order to send to Azure. + + :ivar identity_type: Required. [Required] Specifies the type of identity framework.Constant + filled by server. Possible values include: "Managed", "AMLToken", "UserIdentity". + :vartype identity_type: str or + ~azure.mgmt.machinelearningservices.models.IdentityConfigurationType + :ivar client_id: Specifies a user-assigned identity by client ID. For system-assigned, do not + set this field. + :vartype client_id: str + :ivar object_id: Specifies a user-assigned identity by object ID. For system-assigned, do not + set this field. + :vartype object_id: str + :ivar resource_id: Specifies a user-assigned identity by ARM resource ID. For system-assigned, + do not set this field. + :vartype resource_id: str + """ + + _validation = { + 'identity_type': {'required': True}, + } + + _attribute_map = { + 'identity_type': {'key': 'identityType', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword client_id: Specifies a user-assigned identity by client ID. For system-assigned, do + not set this field. + :paramtype client_id: str + :keyword object_id: Specifies a user-assigned identity by object ID. For system-assigned, do + not set this field. + :paramtype object_id: str + :keyword resource_id: Specifies a user-assigned identity by ARM resource ID. For + system-assigned, do not set this field. + :paramtype resource_id: str + """ + super(ManagedIdentity, self).__init__(**kwargs) + self.identity_type = 'Managed' # type: str + self.client_id = kwargs.get('client_id', None) + self.object_id = kwargs.get('object_id', None) + self.resource_id = kwargs.get('resource_id', None) + + +class WorkspaceConnectionPropertiesV2(msrest.serialization.Model): + """WorkspaceConnectionPropertiesV2. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ManagedIdentityAuthTypeWorkspaceConnectionProperties, NoneAuthTypeWorkspaceConnectionProperties, PATAuthTypeWorkspaceConnectionProperties, SASAuthTypeWorkspaceConnectionProperties, UsernamePasswordAuthTypeWorkspaceConnectionProperties. + + All required parameters must be populated in order to send to Azure. + + :ivar auth_type: Required. Authentication type of the connection target.Constant filled by + server. Possible values include: "PAT", "ManagedIdentity", "UsernamePassword", "None", "SAS". + :vartype auth_type: str or ~azure.mgmt.machinelearningservices.models.ConnectionAuthType + :ivar category: Category of the connection. Possible values include: "PythonFeed", + "ContainerRegistry", "Git". + :vartype category: str or ~azure.mgmt.machinelearningservices.models.ConnectionCategory + :ivar target: + :vartype target: str + :ivar value: Value details of the workspace connection. + :vartype value: str + :ivar value_format: format for the workspace connection value. Possible values include: "JSON". + :vartype value_format: str or ~azure.mgmt.machinelearningservices.models.ValueFormat + """ + + _validation = { + 'auth_type': {'required': True}, + } + + _attribute_map = { + 'auth_type': {'key': 'authType', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'value_format': {'key': 'valueFormat', 'type': 'str'}, + } + + _subtype_map = { + 'auth_type': {'ManagedIdentity': 'ManagedIdentityAuthTypeWorkspaceConnectionProperties', 'None': 'NoneAuthTypeWorkspaceConnectionProperties', 'PAT': 'PATAuthTypeWorkspaceConnectionProperties', 'SAS': 'SASAuthTypeWorkspaceConnectionProperties', 'UsernamePassword': 'UsernamePasswordAuthTypeWorkspaceConnectionProperties'} + } + + def __init__( + self, + **kwargs + ): + """ + :keyword category: Category of the connection. Possible values include: "PythonFeed", + "ContainerRegistry", "Git". + :paramtype category: str or ~azure.mgmt.machinelearningservices.models.ConnectionCategory + :keyword target: + :paramtype target: str + :keyword value: Value details of the workspace connection. + :paramtype value: str + :keyword value_format: format for the workspace connection value. Possible values include: + "JSON". + :paramtype value_format: str or ~azure.mgmt.machinelearningservices.models.ValueFormat + """ + super(WorkspaceConnectionPropertiesV2, self).__init__(**kwargs) + self.auth_type = None # type: Optional[str] + self.category = kwargs.get('category', None) + self.target = kwargs.get('target', None) + self.value = kwargs.get('value', None) + self.value_format = kwargs.get('value_format', None) + + +class ManagedIdentityAuthTypeWorkspaceConnectionProperties(WorkspaceConnectionPropertiesV2): + """ManagedIdentityAuthTypeWorkspaceConnectionProperties. + + All required parameters must be populated in order to send to Azure. + + :ivar auth_type: Required. Authentication type of the connection target.Constant filled by + server. Possible values include: "PAT", "ManagedIdentity", "UsernamePassword", "None", "SAS". + :vartype auth_type: str or ~azure.mgmt.machinelearningservices.models.ConnectionAuthType + :ivar category: Category of the connection. Possible values include: "PythonFeed", + "ContainerRegistry", "Git". + :vartype category: str or ~azure.mgmt.machinelearningservices.models.ConnectionCategory + :ivar target: + :vartype target: str + :ivar value: Value details of the workspace connection. + :vartype value: str + :ivar value_format: format for the workspace connection value. Possible values include: "JSON". + :vartype value_format: str or ~azure.mgmt.machinelearningservices.models.ValueFormat + :ivar credentials: + :vartype credentials: + ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionManagedIdentity + """ + + _validation = { + 'auth_type': {'required': True}, + } + + _attribute_map = { + 'auth_type': {'key': 'authType', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'value_format': {'key': 'valueFormat', 'type': 'str'}, + 'credentials': {'key': 'credentials', 'type': 'WorkspaceConnectionManagedIdentity'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword category: Category of the connection. Possible values include: "PythonFeed", + "ContainerRegistry", "Git". + :paramtype category: str or ~azure.mgmt.machinelearningservices.models.ConnectionCategory + :keyword target: + :paramtype target: str + :keyword value: Value details of the workspace connection. + :paramtype value: str + :keyword value_format: format for the workspace connection value. Possible values include: + "JSON". + :paramtype value_format: str or ~azure.mgmt.machinelearningservices.models.ValueFormat + :keyword credentials: + :paramtype credentials: + ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionManagedIdentity + """ + super(ManagedIdentityAuthTypeWorkspaceConnectionProperties, self).__init__(**kwargs) + self.auth_type = 'ManagedIdentity' # type: str + self.credentials = kwargs.get('credentials', None) + + +class ManagedOnlineDeployment(OnlineDeploymentDetails): + """Properties specific to a ManagedOnlineDeployment. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar code_configuration: Code configuration for the endpoint deployment. + :vartype code_configuration: ~azure.mgmt.machinelearningservices.models.CodeConfiguration + :ivar description: Description of the endpoint deployment. + :vartype description: str + :ivar environment_id: ARM resource ID of the environment specification for the endpoint + deployment. + :vartype environment_id: str + :ivar environment_variables: Environment variables configuration for the deployment. + :vartype environment_variables: dict[str, str] + :ivar properties: Property dictionary. Properties can be added, but not removed or altered. + :vartype properties: dict[str, str] + :ivar app_insights_enabled: If true, enables Application Insights logging. + :vartype app_insights_enabled: bool + :ivar endpoint_compute_type: Required. [Required] The compute type of the endpoint.Constant + filled by server. Possible values include: "Managed", "Kubernetes", "AzureMLCompute". + :vartype endpoint_compute_type: str or + ~azure.mgmt.machinelearningservices.models.EndpointComputeType + :ivar instance_type: Compute instance type. + :vartype instance_type: str + :ivar liveness_probe: Liveness probe monitors the health of the container regularly. + :vartype liveness_probe: ~azure.mgmt.machinelearningservices.models.ProbeSettings + :ivar model: The URI path to the model. + :vartype model: str + :ivar model_mount_path: The path to mount the model in custom container. + :vartype model_mount_path: str + :ivar provisioning_state: Provisioning state for the endpoint deployment. Possible values + include: "Creating", "Deleting", "Scaling", "Updating", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.DeploymentProvisioningState + :ivar readiness_probe: Readiness probe validates if the container is ready to serve traffic. + The properties and defaults are the same as liveness probe. + :vartype readiness_probe: ~azure.mgmt.machinelearningservices.models.ProbeSettings + :ivar request_settings: Request settings for the deployment. + :vartype request_settings: ~azure.mgmt.machinelearningservices.models.OnlineRequestSettings + :ivar scale_settings: Scale settings for the deployment. + If it is null or not provided, + it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment + and to DefaultScaleSettings for ManagedOnlineDeployment. + :vartype scale_settings: ~azure.mgmt.machinelearningservices.models.OnlineScaleSettings + """ + + _validation = { + 'endpoint_compute_type': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'code_configuration': {'key': 'codeConfiguration', 'type': 'CodeConfiguration'}, + 'description': {'key': 'description', 'type': 'str'}, + 'environment_id': {'key': 'environmentId', 'type': 'str'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'app_insights_enabled': {'key': 'appInsightsEnabled', 'type': 'bool'}, + 'endpoint_compute_type': {'key': 'endpointComputeType', 'type': 'str'}, + 'instance_type': {'key': 'instanceType', 'type': 'str'}, + 'liveness_probe': {'key': 'livenessProbe', 'type': 'ProbeSettings'}, + 'model': {'key': 'model', 'type': 'str'}, + 'model_mount_path': {'key': 'modelMountPath', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'readiness_probe': {'key': 'readinessProbe', 'type': 'ProbeSettings'}, + 'request_settings': {'key': 'requestSettings', 'type': 'OnlineRequestSettings'}, + 'scale_settings': {'key': 'scaleSettings', 'type': 'OnlineScaleSettings'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword code_configuration: Code configuration for the endpoint deployment. + :paramtype code_configuration: ~azure.mgmt.machinelearningservices.models.CodeConfiguration + :keyword description: Description of the endpoint deployment. + :paramtype description: str + :keyword environment_id: ARM resource ID of the environment specification for the endpoint + deployment. + :paramtype environment_id: str + :keyword environment_variables: Environment variables configuration for the deployment. + :paramtype environment_variables: dict[str, str] + :keyword properties: Property dictionary. Properties can be added, but not removed or altered. + :paramtype properties: dict[str, str] + :keyword app_insights_enabled: If true, enables Application Insights logging. + :paramtype app_insights_enabled: bool + :keyword instance_type: Compute instance type. + :paramtype instance_type: str + :keyword liveness_probe: Liveness probe monitors the health of the container regularly. + :paramtype liveness_probe: ~azure.mgmt.machinelearningservices.models.ProbeSettings + :keyword model: The URI path to the model. + :paramtype model: str + :keyword model_mount_path: The path to mount the model in custom container. + :paramtype model_mount_path: str + :keyword readiness_probe: Readiness probe validates if the container is ready to serve traffic. + The properties and defaults are the same as liveness probe. + :paramtype readiness_probe: ~azure.mgmt.machinelearningservices.models.ProbeSettings + :keyword request_settings: Request settings for the deployment. + :paramtype request_settings: ~azure.mgmt.machinelearningservices.models.OnlineRequestSettings + :keyword scale_settings: Scale settings for the deployment. + If it is null or not provided, + it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment + and to DefaultScaleSettings for ManagedOnlineDeployment. + :paramtype scale_settings: ~azure.mgmt.machinelearningservices.models.OnlineScaleSettings + """ + super(ManagedOnlineDeployment, self).__init__(**kwargs) + self.endpoint_compute_type = 'Managed' # type: str + + +class ManagedServiceIdentity(msrest.serialization.Model): + """Managed service identity (system assigned and/or user assigned identities). + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar principal_id: The service principal ID of the system assigned identity. This property + will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of the system assigned identity. This property will only be + provided for a system assigned identity. + :vartype tenant_id: str + :ivar type: Required. Type of managed service identity (where both SystemAssigned and + UserAssigned types are allowed). Possible values include: "None", "SystemAssigned", + "UserAssigned", "SystemAssigned,UserAssigned". + :vartype type: str or ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentityType + :ivar user_assigned_identities: The set of user assigned identities associated with the + resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + The dictionary values can be empty objects ({}) in requests. + :vartype user_assigned_identities: dict[str, + ~azure.mgmt.machinelearningservices.models.UserAssignedIdentity] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentity}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword type: Required. Type of managed service identity (where both SystemAssigned and + UserAssigned types are allowed). Possible values include: "None", "SystemAssigned", + "UserAssigned", "SystemAssigned,UserAssigned". + :paramtype type: str or ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentityType + :keyword user_assigned_identities: The set of user assigned identities associated with the + resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + The dictionary values can be empty objects ({}) in requests. + :paramtype user_assigned_identities: dict[str, + ~azure.mgmt.machinelearningservices.models.UserAssignedIdentity] + """ + super(ManagedServiceIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs['type'] + self.user_assigned_identities = kwargs.get('user_assigned_identities', None) + + +class MedianStoppingPolicy(EarlyTerminationPolicy): + """Defines an early termination policy based on running averages of the primary metric of all runs. + + All required parameters must be populated in order to send to Azure. + + :ivar delay_evaluation: Number of intervals by which to delay the first evaluation. + :vartype delay_evaluation: int + :ivar evaluation_interval: Interval (number of runs) between policy evaluations. + :vartype evaluation_interval: int + :ivar policy_type: Required. [Required] Name of policy configuration.Constant filled by server. + Possible values include: "Bandit", "MedianStopping", "TruncationSelection". + :vartype policy_type: str or + ~azure.mgmt.machinelearningservices.models.EarlyTerminationPolicyType + """ + + _validation = { + 'policy_type': {'required': True}, + } + + _attribute_map = { + 'delay_evaluation': {'key': 'delayEvaluation', 'type': 'int'}, + 'evaluation_interval': {'key': 'evaluationInterval', 'type': 'int'}, + 'policy_type': {'key': 'policyType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword delay_evaluation: Number of intervals by which to delay the first evaluation. + :paramtype delay_evaluation: int + :keyword evaluation_interval: Interval (number of runs) between policy evaluations. + :paramtype evaluation_interval: int + """ + super(MedianStoppingPolicy, self).__init__(**kwargs) + self.policy_type = 'MedianStopping' # type: str + + +class MLFlowModelJobInput(JobInput, AssetJobInput): + """MLFlowModelJobInput. + + All required parameters must be populated in order to send to Azure. + + :ivar mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", + "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". + :vartype mode: str or ~azure.mgmt.machinelearningservices.models.InputDeliveryMode + :ivar uri: Required. [Required] Input Asset URI. + :vartype uri: str + :ivar description: Description for the input. + :vartype description: str + :ivar job_input_type: Required. [Required] Specifies the type of job.Constant filled by server. + Possible values include: "literal", "uri_file", "uri_folder", "mltable", "custom_model", + "mlflow_model", "triton_model". + :vartype job_input_type: str or ~azure.mgmt.machinelearningservices.models.JobInputType + """ + + _validation = { + 'uri': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + 'job_input_type': {'required': True}, + } + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'job_input_type': {'key': 'jobInputType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", + "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". + :paramtype mode: str or ~azure.mgmt.machinelearningservices.models.InputDeliveryMode + :keyword uri: Required. [Required] Input Asset URI. + :paramtype uri: str + :keyword description: Description for the input. + :paramtype description: str + """ + super(MLFlowModelJobInput, self).__init__(**kwargs) + self.mode = kwargs.get('mode', None) + self.uri = kwargs['uri'] + self.job_input_type = 'mlflow_model' # type: str + self.description = kwargs.get('description', None) + self.job_input_type = 'mlflow_model' # type: str + + +class MLFlowModelJobOutput(JobOutput, AssetJobOutput): + """MLFlowModelJobOutput. + + All required parameters must be populated in order to send to Azure. + + :ivar mode: Output Asset Delivery Mode. Possible values include: "ReadWriteMount", "Upload". + :vartype mode: str or ~azure.mgmt.machinelearningservices.models.OutputDeliveryMode + :ivar uri: Output Asset URI. + :vartype uri: str + :ivar description: Description for the output. + :vartype description: str + :ivar job_output_type: Required. [Required] Specifies the type of job.Constant filled by + server. Possible values include: "uri_file", "uri_folder", "mltable", "custom_model", + "mlflow_model", "triton_model". + :vartype job_output_type: str or ~azure.mgmt.machinelearningservices.models.JobOutputType + """ + + _validation = { + 'job_output_type': {'required': True}, + } + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'job_output_type': {'key': 'jobOutputType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword mode: Output Asset Delivery Mode. Possible values include: "ReadWriteMount", "Upload". + :paramtype mode: str or ~azure.mgmt.machinelearningservices.models.OutputDeliveryMode + :keyword uri: Output Asset URI. + :paramtype uri: str + :keyword description: Description for the output. + :paramtype description: str + """ + super(MLFlowModelJobOutput, self).__init__(**kwargs) + self.mode = kwargs.get('mode', None) + self.uri = kwargs.get('uri', None) + self.job_output_type = 'mlflow_model' # type: str + self.description = kwargs.get('description', None) + self.job_output_type = 'mlflow_model' # type: str + + +class MLTableData(DataVersionBaseDetails): + """MLTable data definition. + + All required parameters must be populated in order to send to Azure. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar is_anonymous: If the name version are system generated (anonymous registration). + :vartype is_anonymous: bool + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar data_type: Required. [Required] Specifies the type of data.Constant filled by server. + Possible values include: "uri_file", "uri_folder", "mltable". + :vartype data_type: str or ~azure.mgmt.machinelearningservices.models.DataType + :ivar data_uri: Required. [Required] Uri of the data. Usage/meaning depends on + Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220501.Assets.DataVersionBase.DataType. + :vartype data_uri: str + :ivar referenced_uris: Uris referenced in the MLTable definition (required for lineage). + :vartype referenced_uris: list[str] + """ + + _validation = { + 'data_type': {'required': True}, + 'data_uri': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + 'data_uri': {'key': 'dataUri', 'type': 'str'}, + 'referenced_uris': {'key': 'referencedUris', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword is_anonymous: If the name version are system generated (anonymous registration). + :paramtype is_anonymous: bool + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + :keyword data_uri: Required. [Required] Uri of the data. Usage/meaning depends on + Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220501.Assets.DataVersionBase.DataType. + :paramtype data_uri: str + :keyword referenced_uris: Uris referenced in the MLTable definition (required for lineage). + :paramtype referenced_uris: list[str] + """ + super(MLTableData, self).__init__(**kwargs) + self.data_type = 'mltable' # type: str + self.referenced_uris = kwargs.get('referenced_uris', None) + + +class MLTableJobInput(JobInput, AssetJobInput): + """MLTableJobInput. + + All required parameters must be populated in order to send to Azure. + + :ivar mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", + "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". + :vartype mode: str or ~azure.mgmt.machinelearningservices.models.InputDeliveryMode + :ivar uri: Required. [Required] Input Asset URI. + :vartype uri: str + :ivar description: Description for the input. + :vartype description: str + :ivar job_input_type: Required. [Required] Specifies the type of job.Constant filled by server. + Possible values include: "literal", "uri_file", "uri_folder", "mltable", "custom_model", + "mlflow_model", "triton_model". + :vartype job_input_type: str or ~azure.mgmt.machinelearningservices.models.JobInputType + """ + + _validation = { + 'uri': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + 'job_input_type': {'required': True}, + } + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'job_input_type': {'key': 'jobInputType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", + "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". + :paramtype mode: str or ~azure.mgmt.machinelearningservices.models.InputDeliveryMode + :keyword uri: Required. [Required] Input Asset URI. + :paramtype uri: str + :keyword description: Description for the input. + :paramtype description: str + """ + super(MLTableJobInput, self).__init__(**kwargs) + self.mode = kwargs.get('mode', None) + self.uri = kwargs['uri'] + self.job_input_type = 'mltable' # type: str + self.description = kwargs.get('description', None) + self.job_input_type = 'mltable' # type: str + + +class MLTableJobOutput(JobOutput, AssetJobOutput): + """MLTableJobOutput. + + All required parameters must be populated in order to send to Azure. + + :ivar mode: Output Asset Delivery Mode. Possible values include: "ReadWriteMount", "Upload". + :vartype mode: str or ~azure.mgmt.machinelearningservices.models.OutputDeliveryMode + :ivar uri: Output Asset URI. + :vartype uri: str + :ivar description: Description for the output. + :vartype description: str + :ivar job_output_type: Required. [Required] Specifies the type of job.Constant filled by + server. Possible values include: "uri_file", "uri_folder", "mltable", "custom_model", + "mlflow_model", "triton_model". + :vartype job_output_type: str or ~azure.mgmt.machinelearningservices.models.JobOutputType + """ + + _validation = { + 'job_output_type': {'required': True}, + } + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'job_output_type': {'key': 'jobOutputType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword mode: Output Asset Delivery Mode. Possible values include: "ReadWriteMount", "Upload". + :paramtype mode: str or ~azure.mgmt.machinelearningservices.models.OutputDeliveryMode + :keyword uri: Output Asset URI. + :paramtype uri: str + :keyword description: Description for the output. + :paramtype description: str + """ + super(MLTableJobOutput, self).__init__(**kwargs) + self.mode = kwargs.get('mode', None) + self.uri = kwargs.get('uri', None) + self.job_output_type = 'mltable' # type: str + self.description = kwargs.get('description', None) + self.job_output_type = 'mltable' # type: str + + +class ModelContainerData(Resource): + """Azure Resource Manager resource envelope. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar properties: Required. [Required] Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.ModelContainerDetails + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'ModelContainerDetails'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: Required. [Required] Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.ModelContainerDetails + """ + super(ModelContainerData, self).__init__(**kwargs) + self.properties = kwargs['properties'] + + +class ModelContainerDetails(AssetContainer): + """ModelContainerDetails. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar latest_version: The latest version inside this container. + :vartype latest_version: str + :ivar next_version: The next auto incremental version. + :vartype next_version: str + """ + + _validation = { + 'latest_version': {'readonly': True}, + 'next_version': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'latest_version': {'key': 'latestVersion', 'type': 'str'}, + 'next_version': {'key': 'nextVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + """ + super(ModelContainerDetails, self).__init__(**kwargs) + + +class ModelContainerResourceArmPaginatedResult(msrest.serialization.Model): + """A paginated list of ModelContainer entities. + + :ivar next_link: The link to the next page of ModelContainer objects. If null, there are no + additional pages. + :vartype next_link: str + :ivar value: An array of objects of type ModelContainer. + :vartype value: list[~azure.mgmt.machinelearningservices.models.ModelContainerData] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ModelContainerData]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword next_link: The link to the next page of ModelContainer objects. If null, there are no + additional pages. + :paramtype next_link: str + :keyword value: An array of objects of type ModelContainer. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.ModelContainerData] + """ + super(ModelContainerResourceArmPaginatedResult, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class ModelVersionData(Resource): + """Azure Resource Manager resource envelope. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar properties: Required. [Required] Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.ModelVersionDetails + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'ModelVersionDetails'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: Required. [Required] Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.ModelVersionDetails + """ + super(ModelVersionData, self).__init__(**kwargs) + self.properties = kwargs['properties'] + + +class ModelVersionDetails(AssetBase): + """Model asset version details. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar is_anonymous: If the name version are system generated (anonymous registration). + :vartype is_anonymous: bool + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar flavors: Mapping of model flavors to their properties. + :vartype flavors: dict[str, ~azure.mgmt.machinelearningservices.models.FlavorData] + :ivar job_name: Name of the training job which produced this model. + :vartype job_name: str + :ivar model_type: The storage format for this entity. Used for NCD. + :vartype model_type: str + :ivar model_uri: The URI path to the model contents. + :vartype model_uri: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'flavors': {'key': 'flavors', 'type': '{FlavorData}'}, + 'job_name': {'key': 'jobName', 'type': 'str'}, + 'model_type': {'key': 'modelType', 'type': 'str'}, + 'model_uri': {'key': 'modelUri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword is_anonymous: If the name version are system generated (anonymous registration). + :paramtype is_anonymous: bool + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + :keyword flavors: Mapping of model flavors to their properties. + :paramtype flavors: dict[str, ~azure.mgmt.machinelearningservices.models.FlavorData] + :keyword job_name: Name of the training job which produced this model. + :paramtype job_name: str + :keyword model_type: The storage format for this entity. Used for NCD. + :paramtype model_type: str + :keyword model_uri: The URI path to the model contents. + :paramtype model_uri: str + """ + super(ModelVersionDetails, self).__init__(**kwargs) + self.flavors = kwargs.get('flavors', None) + self.job_name = kwargs.get('job_name', None) + self.model_type = kwargs.get('model_type', None) + self.model_uri = kwargs.get('model_uri', None) + + +class ModelVersionResourceArmPaginatedResult(msrest.serialization.Model): + """A paginated list of ModelVersion entities. + + :ivar next_link: The link to the next page of ModelVersion objects. If null, there are no + additional pages. + :vartype next_link: str + :ivar value: An array of objects of type ModelVersion. + :vartype value: list[~azure.mgmt.machinelearningservices.models.ModelVersionData] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ModelVersionData]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword next_link: The link to the next page of ModelVersion objects. If null, there are no + additional pages. + :paramtype next_link: str + :keyword value: An array of objects of type ModelVersion. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.ModelVersionData] + """ + super(ModelVersionResourceArmPaginatedResult, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class Mpi(DistributionConfiguration): + """MPI distribution configuration. + + All required parameters must be populated in order to send to Azure. + + :ivar distribution_type: Required. [Required] Specifies the type of distribution + framework.Constant filled by server. Possible values include: "PyTorch", "TensorFlow", "Mpi". + :vartype distribution_type: str or ~azure.mgmt.machinelearningservices.models.DistributionType + :ivar process_count_per_instance: Number of processes per MPI node. + :vartype process_count_per_instance: int + """ + + _validation = { + 'distribution_type': {'required': True}, + } + + _attribute_map = { + 'distribution_type': {'key': 'distributionType', 'type': 'str'}, + 'process_count_per_instance': {'key': 'processCountPerInstance', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword process_count_per_instance: Number of processes per MPI node. + :paramtype process_count_per_instance: int + """ + super(Mpi, self).__init__(**kwargs) + self.distribution_type = 'Mpi' # type: str + self.process_count_per_instance = kwargs.get('process_count_per_instance', None) + + +class NodeStateCounts(msrest.serialization.Model): + """Counts of various compute node states on the amlCompute. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar idle_node_count: Number of compute nodes in idle state. + :vartype idle_node_count: int + :ivar running_node_count: Number of compute nodes which are running jobs. + :vartype running_node_count: int + :ivar preparing_node_count: Number of compute nodes which are being prepared. + :vartype preparing_node_count: int + :ivar unusable_node_count: Number of compute nodes which are in unusable state. + :vartype unusable_node_count: int + :ivar leaving_node_count: Number of compute nodes which are leaving the amlCompute. + :vartype leaving_node_count: int + :ivar preempted_node_count: Number of compute nodes which are in preempted state. + :vartype preempted_node_count: int + """ + + _validation = { + 'idle_node_count': {'readonly': True}, + 'running_node_count': {'readonly': True}, + 'preparing_node_count': {'readonly': True}, + 'unusable_node_count': {'readonly': True}, + 'leaving_node_count': {'readonly': True}, + 'preempted_node_count': {'readonly': True}, + } + + _attribute_map = { + 'idle_node_count': {'key': 'idleNodeCount', 'type': 'int'}, + 'running_node_count': {'key': 'runningNodeCount', 'type': 'int'}, + 'preparing_node_count': {'key': 'preparingNodeCount', 'type': 'int'}, + 'unusable_node_count': {'key': 'unusableNodeCount', 'type': 'int'}, + 'leaving_node_count': {'key': 'leavingNodeCount', 'type': 'int'}, + 'preempted_node_count': {'key': 'preemptedNodeCount', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(NodeStateCounts, self).__init__(**kwargs) + self.idle_node_count = None + self.running_node_count = None + self.preparing_node_count = None + self.unusable_node_count = None + self.leaving_node_count = None + self.preempted_node_count = None + + +class NoneAuthTypeWorkspaceConnectionProperties(WorkspaceConnectionPropertiesV2): + """NoneAuthTypeWorkspaceConnectionProperties. + + All required parameters must be populated in order to send to Azure. + + :ivar auth_type: Required. Authentication type of the connection target.Constant filled by + server. Possible values include: "PAT", "ManagedIdentity", "UsernamePassword", "None", "SAS". + :vartype auth_type: str or ~azure.mgmt.machinelearningservices.models.ConnectionAuthType + :ivar category: Category of the connection. Possible values include: "PythonFeed", + "ContainerRegistry", "Git". + :vartype category: str or ~azure.mgmt.machinelearningservices.models.ConnectionCategory + :ivar target: + :vartype target: str + :ivar value: Value details of the workspace connection. + :vartype value: str + :ivar value_format: format for the workspace connection value. Possible values include: "JSON". + :vartype value_format: str or ~azure.mgmt.machinelearningservices.models.ValueFormat + """ + + _validation = { + 'auth_type': {'required': True}, + } + + _attribute_map = { + 'auth_type': {'key': 'authType', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'value_format': {'key': 'valueFormat', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword category: Category of the connection. Possible values include: "PythonFeed", + "ContainerRegistry", "Git". + :paramtype category: str or ~azure.mgmt.machinelearningservices.models.ConnectionCategory + :keyword target: + :paramtype target: str + :keyword value: Value details of the workspace connection. + :paramtype value: str + :keyword value_format: format for the workspace connection value. Possible values include: + "JSON". + :paramtype value_format: str or ~azure.mgmt.machinelearningservices.models.ValueFormat + """ + super(NoneAuthTypeWorkspaceConnectionProperties, self).__init__(**kwargs) + self.auth_type = 'None' # type: str + + +class NoneDatastoreCredentials(DatastoreCredentials): + """Empty/none datastore credentials. + + All required parameters must be populated in order to send to Azure. + + :ivar credentials_type: Required. [Required] Credential type used to authentication with + storage.Constant filled by server. Possible values include: "AccountKey", "Certificate", + "None", "Sas", "ServicePrincipal". + :vartype credentials_type: str or ~azure.mgmt.machinelearningservices.models.CredentialsType + """ + + _validation = { + 'credentials_type': {'required': True}, + } + + _attribute_map = { + 'credentials_type': {'key': 'credentialsType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(NoneDatastoreCredentials, self).__init__(**kwargs) + self.credentials_type = 'None' # type: str + + +class NotebookAccessTokenResult(msrest.serialization.Model): + """NotebookAccessTokenResult. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar notebook_resource_id: + :vartype notebook_resource_id: str + :ivar host_name: + :vartype host_name: str + :ivar public_dns: + :vartype public_dns: str + :ivar access_token: + :vartype access_token: str + :ivar token_type: + :vartype token_type: str + :ivar expires_in: + :vartype expires_in: int + :ivar refresh_token: + :vartype refresh_token: str + :ivar scope: + :vartype scope: str + """ + + _validation = { + 'notebook_resource_id': {'readonly': True}, + 'host_name': {'readonly': True}, + 'public_dns': {'readonly': True}, + 'access_token': {'readonly': True}, + 'token_type': {'readonly': True}, + 'expires_in': {'readonly': True}, + 'refresh_token': {'readonly': True}, + 'scope': {'readonly': True}, + } + + _attribute_map = { + 'notebook_resource_id': {'key': 'notebookResourceId', 'type': 'str'}, + 'host_name': {'key': 'hostName', 'type': 'str'}, + 'public_dns': {'key': 'publicDns', 'type': 'str'}, + 'access_token': {'key': 'accessToken', 'type': 'str'}, + 'token_type': {'key': 'tokenType', 'type': 'str'}, + 'expires_in': {'key': 'expiresIn', 'type': 'int'}, + 'refresh_token': {'key': 'refreshToken', 'type': 'str'}, + 'scope': {'key': 'scope', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(NotebookAccessTokenResult, self).__init__(**kwargs) + self.notebook_resource_id = None + self.host_name = None + self.public_dns = None + self.access_token = None + self.token_type = None + self.expires_in = None + self.refresh_token = None + self.scope = None + + +class NotebookPreparationError(msrest.serialization.Model): + """NotebookPreparationError. + + :ivar error_message: + :vartype error_message: str + :ivar status_code: + :vartype status_code: int + """ + + _attribute_map = { + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'status_code': {'key': 'statusCode', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword error_message: + :paramtype error_message: str + :keyword status_code: + :paramtype status_code: int + """ + super(NotebookPreparationError, self).__init__(**kwargs) + self.error_message = kwargs.get('error_message', None) + self.status_code = kwargs.get('status_code', None) + + +class NotebookResourceInfo(msrest.serialization.Model): + """NotebookResourceInfo. + + :ivar fqdn: + :vartype fqdn: str + :ivar resource_id: the data plane resourceId that used to initialize notebook component. + :vartype resource_id: str + :ivar notebook_preparation_error: The error that occurs when preparing notebook. + :vartype notebook_preparation_error: + ~azure.mgmt.machinelearningservices.models.NotebookPreparationError + """ + + _attribute_map = { + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'notebook_preparation_error': {'key': 'notebookPreparationError', 'type': 'NotebookPreparationError'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword fqdn: + :paramtype fqdn: str + :keyword resource_id: the data plane resourceId that used to initialize notebook component. + :paramtype resource_id: str + :keyword notebook_preparation_error: The error that occurs when preparing notebook. + :paramtype notebook_preparation_error: + ~azure.mgmt.machinelearningservices.models.NotebookPreparationError + """ + super(NotebookResourceInfo, self).__init__(**kwargs) + self.fqdn = kwargs.get('fqdn', None) + self.resource_id = kwargs.get('resource_id', None) + self.notebook_preparation_error = kwargs.get('notebook_preparation_error', None) + + +class Objective(msrest.serialization.Model): + """Optimization objective. + + All required parameters must be populated in order to send to Azure. + + :ivar goal: Required. [Required] Defines supported metric goals for hyperparameter tuning. + Possible values include: "Minimize", "Maximize". + :vartype goal: str or ~azure.mgmt.machinelearningservices.models.Goal + :ivar primary_metric: Required. [Required] Name of the metric to optimize. + :vartype primary_metric: str + """ + + _validation = { + 'goal': {'required': True}, + 'primary_metric': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + } + + _attribute_map = { + 'goal': {'key': 'goal', 'type': 'str'}, + 'primary_metric': {'key': 'primaryMetric', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword goal: Required. [Required] Defines supported metric goals for hyperparameter tuning. + Possible values include: "Minimize", "Maximize". + :paramtype goal: str or ~azure.mgmt.machinelearningservices.models.Goal + :keyword primary_metric: Required. [Required] Name of the metric to optimize. + :paramtype primary_metric: str + """ + super(Objective, self).__init__(**kwargs) + self.goal = kwargs['goal'] + self.primary_metric = kwargs['primary_metric'] + + +class OnlineDeploymentData(TrackedResource): + """OnlineDeploymentData. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar location: Required. The geo-location where the resource lives. + :vartype location: str + :ivar identity: Managed service identity (system assigned and/or user assigned identities). + :vartype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :ivar kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type. + :vartype kind: str + :ivar properties: Required. [Required] Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.OnlineDeploymentDetails + :ivar sku: Sku details required for ARM contract for Autoscaling. + :vartype sku: ~azure.mgmt.machinelearningservices.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'location': {'required': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'OnlineDeploymentDetails'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword location: Required. The geo-location where the resource lives. + :paramtype location: str + :keyword identity: Managed service identity (system assigned and/or user assigned identities). + :paramtype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :keyword kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type. + :paramtype kind: str + :keyword properties: Required. [Required] Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.OnlineDeploymentDetails + :keyword sku: Sku details required for ARM contract for Autoscaling. + :paramtype sku: ~azure.mgmt.machinelearningservices.models.Sku + """ + super(OnlineDeploymentData, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.kind = kwargs.get('kind', None) + self.properties = kwargs['properties'] + self.sku = kwargs.get('sku', None) + + +class OnlineDeploymentTrackedResourceArmPaginatedResult(msrest.serialization.Model): + """A paginated list of OnlineDeployment entities. + + :ivar next_link: The link to the next page of OnlineDeployment objects. If null, there are no + additional pages. + :vartype next_link: str + :ivar value: An array of objects of type OnlineDeployment. + :vartype value: list[~azure.mgmt.machinelearningservices.models.OnlineDeploymentData] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[OnlineDeploymentData]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword next_link: The link to the next page of OnlineDeployment objects. If null, there are + no additional pages. + :paramtype next_link: str + :keyword value: An array of objects of type OnlineDeployment. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.OnlineDeploymentData] + """ + super(OnlineDeploymentTrackedResourceArmPaginatedResult, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class OnlineEndpointData(TrackedResource): + """OnlineEndpointData. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar location: Required. The geo-location where the resource lives. + :vartype location: str + :ivar identity: Managed service identity (system assigned and/or user assigned identities). + :vartype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :ivar kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type. + :vartype kind: str + :ivar properties: Required. [Required] Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.OnlineEndpointDetails + :ivar sku: Sku details required for ARM contract for Autoscaling. + :vartype sku: ~azure.mgmt.machinelearningservices.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'location': {'required': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'OnlineEndpointDetails'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword location: Required. The geo-location where the resource lives. + :paramtype location: str + :keyword identity: Managed service identity (system assigned and/or user assigned identities). + :paramtype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :keyword kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type. + :paramtype kind: str + :keyword properties: Required. [Required] Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.OnlineEndpointDetails + :keyword sku: Sku details required for ARM contract for Autoscaling. + :paramtype sku: ~azure.mgmt.machinelearningservices.models.Sku + """ + super(OnlineEndpointData, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.kind = kwargs.get('kind', None) + self.properties = kwargs['properties'] + self.sku = kwargs.get('sku', None) + + +class OnlineEndpointDetails(EndpointPropertiesBase): + """Online endpoint configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar auth_mode: Required. [Required] Use 'Key' for key based authentication and 'AMLToken' for + Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. + Possible values include: "AMLToken", "Key", "AADToken". + :vartype auth_mode: str or ~azure.mgmt.machinelearningservices.models.EndpointAuthMode + :ivar description: Description of the inference endpoint. + :vartype description: str + :ivar keys: EndpointAuthKeys to set initially on an Endpoint. + This property will always be returned as null. AuthKey values must be retrieved using the + ListKeys API. + :vartype keys: ~azure.mgmt.machinelearningservices.models.EndpointAuthKeys + :ivar properties: Property dictionary. Properties can be added, but not removed or altered. + :vartype properties: dict[str, str] + :ivar scoring_uri: Endpoint URI. + :vartype scoring_uri: str + :ivar swagger_uri: Endpoint Swagger URI. + :vartype swagger_uri: str + :ivar compute: ARM resource ID of the compute if it exists. + optional. + :vartype compute: str + :ivar provisioning_state: Provisioning state for the endpoint. Possible values include: + "Creating", "Deleting", "Succeeded", "Failed", "Updating", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.EndpointProvisioningState + :ivar traffic: Percentage of traffic from endpoint to divert to each deployment. Traffic values + need to sum to 100. + :vartype traffic: dict[str, int] + """ + + _validation = { + 'auth_mode': {'required': True}, + 'scoring_uri': {'readonly': True}, + 'swagger_uri': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'auth_mode': {'key': 'authMode', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'keys': {'key': 'keys', 'type': 'EndpointAuthKeys'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'scoring_uri': {'key': 'scoringUri', 'type': 'str'}, + 'swagger_uri': {'key': 'swaggerUri', 'type': 'str'}, + 'compute': {'key': 'compute', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'traffic': {'key': 'traffic', 'type': '{int}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword auth_mode: Required. [Required] Use 'Key' for key based authentication and 'AMLToken' + for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' + does. Possible values include: "AMLToken", "Key", "AADToken". + :paramtype auth_mode: str or ~azure.mgmt.machinelearningservices.models.EndpointAuthMode + :keyword description: Description of the inference endpoint. + :paramtype description: str + :keyword keys: EndpointAuthKeys to set initially on an Endpoint. + This property will always be returned as null. AuthKey values must be retrieved using the + ListKeys API. + :paramtype keys: ~azure.mgmt.machinelearningservices.models.EndpointAuthKeys + :keyword properties: Property dictionary. Properties can be added, but not removed or altered. + :paramtype properties: dict[str, str] + :keyword compute: ARM resource ID of the compute if it exists. + optional. + :paramtype compute: str + :keyword traffic: Percentage of traffic from endpoint to divert to each deployment. Traffic + values need to sum to 100. + :paramtype traffic: dict[str, int] + """ + super(OnlineEndpointDetails, self).__init__(**kwargs) + self.compute = kwargs.get('compute', None) + self.provisioning_state = None + self.traffic = kwargs.get('traffic', None) + + +class OnlineEndpointTrackedResourceArmPaginatedResult(msrest.serialization.Model): + """A paginated list of OnlineEndpoint entities. + + :ivar next_link: The link to the next page of OnlineEndpoint objects. If null, there are no + additional pages. + :vartype next_link: str + :ivar value: An array of objects of type OnlineEndpoint. + :vartype value: list[~azure.mgmt.machinelearningservices.models.OnlineEndpointData] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[OnlineEndpointData]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword next_link: The link to the next page of OnlineEndpoint objects. If null, there are no + additional pages. + :paramtype next_link: str + :keyword value: An array of objects of type OnlineEndpoint. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.OnlineEndpointData] + """ + super(OnlineEndpointTrackedResourceArmPaginatedResult, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class OnlineRequestSettings(msrest.serialization.Model): + """Online deployment scoring requests configuration. + + :ivar max_concurrent_requests_per_instance: The number of maximum concurrent requests per node + allowed per deployment. Defaults to 1. + :vartype max_concurrent_requests_per_instance: int + :ivar max_queue_wait: The maximum amount of time a request will stay in the queue in ISO 8601 + format. + Defaults to 500ms. + :vartype max_queue_wait: ~datetime.timedelta + :ivar request_timeout: The scoring timeout in ISO 8601 format. + Defaults to 5000ms. + :vartype request_timeout: ~datetime.timedelta + """ + + _attribute_map = { + 'max_concurrent_requests_per_instance': {'key': 'maxConcurrentRequestsPerInstance', 'type': 'int'}, + 'max_queue_wait': {'key': 'maxQueueWait', 'type': 'duration'}, + 'request_timeout': {'key': 'requestTimeout', 'type': 'duration'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword max_concurrent_requests_per_instance: The number of maximum concurrent requests per + node allowed per deployment. Defaults to 1. + :paramtype max_concurrent_requests_per_instance: int + :keyword max_queue_wait: The maximum amount of time a request will stay in the queue in ISO + 8601 format. + Defaults to 500ms. + :paramtype max_queue_wait: ~datetime.timedelta + :keyword request_timeout: The scoring timeout in ISO 8601 format. + Defaults to 5000ms. + :paramtype request_timeout: ~datetime.timedelta + """ + super(OnlineRequestSettings, self).__init__(**kwargs) + self.max_concurrent_requests_per_instance = kwargs.get('max_concurrent_requests_per_instance', 1) + self.max_queue_wait = kwargs.get('max_queue_wait', "PT0.5S") + self.request_timeout = kwargs.get('request_timeout', "PT5S") + + +class OutputPathAssetReference(AssetReferenceBase): + """Reference to an asset via its path in a job output. + + All required parameters must be populated in order to send to Azure. + + :ivar reference_type: Required. [Required] Specifies the type of asset reference.Constant + filled by server. Possible values include: "Id", "DataPath", "OutputPath". + :vartype reference_type: str or ~azure.mgmt.machinelearningservices.models.ReferenceType + :ivar job_id: ARM resource ID of the job. + :vartype job_id: str + :ivar path: The path of the file/directory in the job output. + :vartype path: str + """ + + _validation = { + 'reference_type': {'required': True}, + } + + _attribute_map = { + 'reference_type': {'key': 'referenceType', 'type': 'str'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword job_id: ARM resource ID of the job. + :paramtype job_id: str + :keyword path: The path of the file/directory in the job output. + :paramtype path: str + """ + super(OutputPathAssetReference, self).__init__(**kwargs) + self.reference_type = 'OutputPath' # type: str + self.job_id = kwargs.get('job_id', None) + self.path = kwargs.get('path', None) + + +class PaginatedComputeResourcesList(msrest.serialization.Model): + """Paginated list of Machine Learning compute objects wrapped in ARM resource envelope. + + :ivar value: An array of Machine Learning compute objects wrapped in ARM resource envelope. + :vartype value: list[~azure.mgmt.machinelearningservices.models.ComputeResource] + :ivar next_link: A continuation link (absolute URI) to the next page of results in the list. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ComputeResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword value: An array of Machine Learning compute objects wrapped in ARM resource envelope. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.ComputeResource] + :keyword next_link: A continuation link (absolute URI) to the next page of results in the list. + :paramtype next_link: str + """ + super(PaginatedComputeResourcesList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class PartialAssetReferenceBase(msrest.serialization.Model): + """Base definition for asset references. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PartialDataPathAssetReference, PartialIdAssetReference, PartialOutputPathAssetReference. + + All required parameters must be populated in order to send to Azure. + + :ivar reference_type: Required. [Required] Specifies the type of asset reference.Constant + filled by server. Possible values include: "Id", "DataPath", "OutputPath". + :vartype reference_type: str or ~azure.mgmt.machinelearningservices.models.ReferenceType + """ + + _validation = { + 'reference_type': {'required': True}, + } + + _attribute_map = { + 'reference_type': {'key': 'referenceType', 'type': 'str'}, + } + + _subtype_map = { + 'reference_type': {'DataPath': 'PartialDataPathAssetReference', 'Id': 'PartialIdAssetReference', 'OutputPath': 'PartialOutputPathAssetReference'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(PartialAssetReferenceBase, self).__init__(**kwargs) + self.reference_type = None # type: Optional[str] + + +class PartialBatchDeployment(msrest.serialization.Model): + """Mutable batch inference settings per deployment. + + :ivar code_configuration: Code configuration for the endpoint deployment. + :vartype code_configuration: + ~azure.mgmt.machinelearningservices.models.PartialCodeConfiguration + :ivar compute: Compute binding definition. + :vartype compute: str + :ivar description: Description of the endpoint deployment. + :vartype description: str + :ivar environment_id: ARM resource ID of the environment specification for the endpoint + deployment. + :vartype environment_id: str + :ivar environment_variables: Environment variables configuration for the deployment. + :vartype environment_variables: dict[str, str] + :ivar error_threshold: Error threshold, if the error count for the entire input goes above this + value, + the batch inference will be aborted. Range is [-1, int.MaxValue]. + For FileDataset, this value is the count of file failures. + For TabularDataset, this value is the count of record failures. + If set to -1 (the lower bound), all failures during batch inference will be ignored. + :vartype error_threshold: int + :ivar logging_level: Logging level for batch inference operation. Possible values include: + "Info", "Warning", "Debug". + :vartype logging_level: str or ~azure.mgmt.machinelearningservices.models.BatchLoggingLevel + :ivar max_concurrency_per_instance: Indicates number of processes per instance. + :vartype max_concurrency_per_instance: int + :ivar mini_batch_size: Size of the mini-batch passed to each batch invocation. + For FileDataset, this is the number of files per mini-batch. + For TabularDataset, this is the size of the records in bytes, per mini-batch. + :vartype mini_batch_size: long + :ivar model: Reference to the model asset for the endpoint deployment. + :vartype model: ~azure.mgmt.machinelearningservices.models.PartialAssetReferenceBase + :ivar output_action: Indicates how the output will be organized. Possible values include: + "SummaryOnly", "AppendRow". + :vartype output_action: str or ~azure.mgmt.machinelearningservices.models.BatchOutputAction + :ivar output_file_name: Customized output file name for append_row output action. + :vartype output_file_name: str + :ivar properties: Property dictionary. Properties can be added, but not removed or altered. + :vartype properties: dict[str, str] + :ivar retry_settings: Retry Settings for the batch inference operation. + :vartype retry_settings: ~azure.mgmt.machinelearningservices.models.PartialBatchRetrySettings + """ + + _attribute_map = { + 'code_configuration': {'key': 'codeConfiguration', 'type': 'PartialCodeConfiguration'}, + 'compute': {'key': 'compute', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'environment_id': {'key': 'environmentId', 'type': 'str'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, + 'error_threshold': {'key': 'errorThreshold', 'type': 'int'}, + 'logging_level': {'key': 'loggingLevel', 'type': 'str'}, + 'max_concurrency_per_instance': {'key': 'maxConcurrencyPerInstance', 'type': 'int'}, + 'mini_batch_size': {'key': 'miniBatchSize', 'type': 'long'}, + 'model': {'key': 'model', 'type': 'PartialAssetReferenceBase'}, + 'output_action': {'key': 'outputAction', 'type': 'str'}, + 'output_file_name': {'key': 'outputFileName', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'retry_settings': {'key': 'retrySettings', 'type': 'PartialBatchRetrySettings'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword code_configuration: Code configuration for the endpoint deployment. + :paramtype code_configuration: + ~azure.mgmt.machinelearningservices.models.PartialCodeConfiguration + :keyword compute: Compute binding definition. + :paramtype compute: str + :keyword description: Description of the endpoint deployment. + :paramtype description: str + :keyword environment_id: ARM resource ID of the environment specification for the endpoint + deployment. + :paramtype environment_id: str + :keyword environment_variables: Environment variables configuration for the deployment. + :paramtype environment_variables: dict[str, str] + :keyword error_threshold: Error threshold, if the error count for the entire input goes above + this value, + the batch inference will be aborted. Range is [-1, int.MaxValue]. + For FileDataset, this value is the count of file failures. + For TabularDataset, this value is the count of record failures. + If set to -1 (the lower bound), all failures during batch inference will be ignored. + :paramtype error_threshold: int + :keyword logging_level: Logging level for batch inference operation. Possible values include: + "Info", "Warning", "Debug". + :paramtype logging_level: str or ~azure.mgmt.machinelearningservices.models.BatchLoggingLevel + :keyword max_concurrency_per_instance: Indicates number of processes per instance. + :paramtype max_concurrency_per_instance: int + :keyword mini_batch_size: Size of the mini-batch passed to each batch invocation. + For FileDataset, this is the number of files per mini-batch. + For TabularDataset, this is the size of the records in bytes, per mini-batch. + :paramtype mini_batch_size: long + :keyword model: Reference to the model asset for the endpoint deployment. + :paramtype model: ~azure.mgmt.machinelearningservices.models.PartialAssetReferenceBase + :keyword output_action: Indicates how the output will be organized. Possible values include: + "SummaryOnly", "AppendRow". + :paramtype output_action: str or ~azure.mgmt.machinelearningservices.models.BatchOutputAction + :keyword output_file_name: Customized output file name for append_row output action. + :paramtype output_file_name: str + :keyword properties: Property dictionary. Properties can be added, but not removed or altered. + :paramtype properties: dict[str, str] + :keyword retry_settings: Retry Settings for the batch inference operation. + :paramtype retry_settings: ~azure.mgmt.machinelearningservices.models.PartialBatchRetrySettings + """ + super(PartialBatchDeployment, self).__init__(**kwargs) + self.code_configuration = kwargs.get('code_configuration', None) + self.compute = kwargs.get('compute', None) + self.description = kwargs.get('description', None) + self.environment_id = kwargs.get('environment_id', None) + self.environment_variables = kwargs.get('environment_variables', None) + self.error_threshold = kwargs.get('error_threshold', None) + self.logging_level = kwargs.get('logging_level', None) + self.max_concurrency_per_instance = kwargs.get('max_concurrency_per_instance', None) + self.mini_batch_size = kwargs.get('mini_batch_size', None) + self.model = kwargs.get('model', None) + self.output_action = kwargs.get('output_action', None) + self.output_file_name = kwargs.get('output_file_name', None) + self.properties = kwargs.get('properties', None) + self.retry_settings = kwargs.get('retry_settings', None) + + +class PartialBatchDeploymentPartialTrackedResource(msrest.serialization.Model): + """Strictly used in update requests. + + :ivar identity: Managed service identity (system assigned and/or user assigned identities). + :vartype identity: ~azure.mgmt.machinelearningservices.models.PartialManagedServiceIdentity + :ivar kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type. + :vartype kind: str + :ivar location: The geo-location where the resource lives. + :vartype location: str + :ivar properties: Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.PartialBatchDeployment + :ivar sku: Sku details required for ARM contract for Autoscaling. + :vartype sku: ~azure.mgmt.machinelearningservices.models.PartialSku + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + """ + + _attribute_map = { + 'identity': {'key': 'identity', 'type': 'PartialManagedServiceIdentity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'PartialBatchDeployment'}, + 'sku': {'key': 'sku', 'type': 'PartialSku'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword identity: Managed service identity (system assigned and/or user assigned identities). + :paramtype identity: ~azure.mgmt.machinelearningservices.models.PartialManagedServiceIdentity + :keyword kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type. + :paramtype kind: str + :keyword location: The geo-location where the resource lives. + :paramtype location: str + :keyword properties: Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.PartialBatchDeployment + :keyword sku: Sku details required for ARM contract for Autoscaling. + :paramtype sku: ~azure.mgmt.machinelearningservices.models.PartialSku + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + """ + super(PartialBatchDeploymentPartialTrackedResource, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.kind = kwargs.get('kind', None) + self.location = kwargs.get('location', None) + self.properties = kwargs.get('properties', None) + self.sku = kwargs.get('sku', None) + self.tags = kwargs.get('tags', None) + + +class PartialBatchEndpoint(msrest.serialization.Model): + """Mutable Batch endpoint configuration. + + :ivar defaults: Default values for Batch Endpoint. + :vartype defaults: ~azure.mgmt.machinelearningservices.models.BatchEndpointDefaults + """ + + _attribute_map = { + 'defaults': {'key': 'defaults', 'type': 'BatchEndpointDefaults'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword defaults: Default values for Batch Endpoint. + :paramtype defaults: ~azure.mgmt.machinelearningservices.models.BatchEndpointDefaults + """ + super(PartialBatchEndpoint, self).__init__(**kwargs) + self.defaults = kwargs.get('defaults', None) + + +class PartialBatchEndpointPartialTrackedResource(msrest.serialization.Model): + """Strictly used in update requests. + + :ivar identity: Managed service identity (system assigned and/or user assigned identities). + :vartype identity: ~azure.mgmt.machinelearningservices.models.PartialManagedServiceIdentity + :ivar kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type. + :vartype kind: str + :ivar location: The geo-location where the resource lives. + :vartype location: str + :ivar properties: Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.PartialBatchEndpoint + :ivar sku: Sku details required for ARM contract for Autoscaling. + :vartype sku: ~azure.mgmt.machinelearningservices.models.PartialSku + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + """ + + _attribute_map = { + 'identity': {'key': 'identity', 'type': 'PartialManagedServiceIdentity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'PartialBatchEndpoint'}, + 'sku': {'key': 'sku', 'type': 'PartialSku'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword identity: Managed service identity (system assigned and/or user assigned identities). + :paramtype identity: ~azure.mgmt.machinelearningservices.models.PartialManagedServiceIdentity + :keyword kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type. + :paramtype kind: str + :keyword location: The geo-location where the resource lives. + :paramtype location: str + :keyword properties: Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.PartialBatchEndpoint + :keyword sku: Sku details required for ARM contract for Autoscaling. + :paramtype sku: ~azure.mgmt.machinelearningservices.models.PartialSku + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + """ + super(PartialBatchEndpointPartialTrackedResource, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.kind = kwargs.get('kind', None) + self.location = kwargs.get('location', None) + self.properties = kwargs.get('properties', None) + self.sku = kwargs.get('sku', None) + self.tags = kwargs.get('tags', None) + + +class PartialBatchRetrySettings(msrest.serialization.Model): + """Retry settings for a batch inference operation. + + :ivar max_retries: Maximum retry count for a mini-batch. + :vartype max_retries: int + :ivar timeout: Invocation timeout for a mini-batch, in ISO 8601 format. + :vartype timeout: ~datetime.timedelta + """ + + _attribute_map = { + 'max_retries': {'key': 'maxRetries', 'type': 'int'}, + 'timeout': {'key': 'timeout', 'type': 'duration'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword max_retries: Maximum retry count for a mini-batch. + :paramtype max_retries: int + :keyword timeout: Invocation timeout for a mini-batch, in ISO 8601 format. + :paramtype timeout: ~datetime.timedelta + """ + super(PartialBatchRetrySettings, self).__init__(**kwargs) + self.max_retries = kwargs.get('max_retries', None) + self.timeout = kwargs.get('timeout', None) + + +class PartialCodeConfiguration(msrest.serialization.Model): + """Configuration for a scoring code asset. + + :ivar code_id: ARM resource ID of the code asset. + :vartype code_id: str + :ivar scoring_script: The script to execute on startup. eg. "score.py". + :vartype scoring_script: str + """ + + _validation = { + 'scoring_script': {'min_length': 1}, + } + + _attribute_map = { + 'code_id': {'key': 'codeId', 'type': 'str'}, + 'scoring_script': {'key': 'scoringScript', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword code_id: ARM resource ID of the code asset. + :paramtype code_id: str + :keyword scoring_script: The script to execute on startup. eg. "score.py". + :paramtype scoring_script: str + """ + super(PartialCodeConfiguration, self).__init__(**kwargs) + self.code_id = kwargs.get('code_id', None) + self.scoring_script = kwargs.get('scoring_script', None) + + +class PartialDataPathAssetReference(PartialAssetReferenceBase): + """Reference to an asset via its path in a datastore. + + All required parameters must be populated in order to send to Azure. + + :ivar reference_type: Required. [Required] Specifies the type of asset reference.Constant + filled by server. Possible values include: "Id", "DataPath", "OutputPath". + :vartype reference_type: str or ~azure.mgmt.machinelearningservices.models.ReferenceType + :ivar datastore_id: ARM resource ID of the datastore where the asset is located. + :vartype datastore_id: str + :ivar path: The path of the file/directory in the datastore. + :vartype path: str + """ + + _validation = { + 'reference_type': {'required': True}, + } + + _attribute_map = { + 'reference_type': {'key': 'referenceType', 'type': 'str'}, + 'datastore_id': {'key': 'datastoreId', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword datastore_id: ARM resource ID of the datastore where the asset is located. + :paramtype datastore_id: str + :keyword path: The path of the file/directory in the datastore. + :paramtype path: str + """ + super(PartialDataPathAssetReference, self).__init__(**kwargs) + self.reference_type = 'DataPath' # type: str + self.datastore_id = kwargs.get('datastore_id', None) + self.path = kwargs.get('path', None) + + +class PartialIdAssetReference(PartialAssetReferenceBase): + """Reference to an asset via its ARM resource ID. + + All required parameters must be populated in order to send to Azure. + + :ivar reference_type: Required. [Required] Specifies the type of asset reference.Constant + filled by server. Possible values include: "Id", "DataPath", "OutputPath". + :vartype reference_type: str or ~azure.mgmt.machinelearningservices.models.ReferenceType + :ivar asset_id: ARM resource ID of the asset. + :vartype asset_id: str + """ + + _validation = { + 'reference_type': {'required': True}, + } + + _attribute_map = { + 'reference_type': {'key': 'referenceType', 'type': 'str'}, + 'asset_id': {'key': 'assetId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword asset_id: ARM resource ID of the asset. + :paramtype asset_id: str + """ + super(PartialIdAssetReference, self).__init__(**kwargs) + self.reference_type = 'Id' # type: str + self.asset_id = kwargs.get('asset_id', None) + + +class PartialOnlineDeployment(msrest.serialization.Model): + """Mutable online deployment configuration. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PartialKubernetesOnlineDeployment, PartialManagedOnlineDeployment. + + All required parameters must be populated in order to send to Azure. + + :ivar endpoint_compute_type: Required. [Required] The compute type of the endpoint.Constant + filled by server. Possible values include: "Managed", "Kubernetes", "AzureMLCompute". + :vartype endpoint_compute_type: str or + ~azure.mgmt.machinelearningservices.models.EndpointComputeType + """ + + _validation = { + 'endpoint_compute_type': {'required': True}, + } + + _attribute_map = { + 'endpoint_compute_type': {'key': 'endpointComputeType', 'type': 'str'}, + } + + _subtype_map = { + 'endpoint_compute_type': {'Kubernetes': 'PartialKubernetesOnlineDeployment', 'Managed': 'PartialManagedOnlineDeployment'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(PartialOnlineDeployment, self).__init__(**kwargs) + self.endpoint_compute_type = None # type: Optional[str] + + +class PartialKubernetesOnlineDeployment(PartialOnlineDeployment): + """Properties specific to a KubernetesOnlineDeployment. + + All required parameters must be populated in order to send to Azure. + + :ivar endpoint_compute_type: Required. [Required] The compute type of the endpoint.Constant + filled by server. Possible values include: "Managed", "Kubernetes", "AzureMLCompute". + :vartype endpoint_compute_type: str or + ~azure.mgmt.machinelearningservices.models.EndpointComputeType + """ + + _validation = { + 'endpoint_compute_type': {'required': True}, + } + + _attribute_map = { + 'endpoint_compute_type': {'key': 'endpointComputeType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(PartialKubernetesOnlineDeployment, self).__init__(**kwargs) + self.endpoint_compute_type = 'Kubernetes' # type: str + + +class PartialManagedOnlineDeployment(PartialOnlineDeployment): + """Properties specific to a ManagedOnlineDeployment. + + All required parameters must be populated in order to send to Azure. + + :ivar endpoint_compute_type: Required. [Required] The compute type of the endpoint.Constant + filled by server. Possible values include: "Managed", "Kubernetes", "AzureMLCompute". + :vartype endpoint_compute_type: str or + ~azure.mgmt.machinelearningservices.models.EndpointComputeType + """ + + _validation = { + 'endpoint_compute_type': {'required': True}, + } + + _attribute_map = { + 'endpoint_compute_type': {'key': 'endpointComputeType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(PartialManagedOnlineDeployment, self).__init__(**kwargs) + self.endpoint_compute_type = 'Managed' # type: str + + +class PartialManagedServiceIdentity(msrest.serialization.Model): + """Managed service identity (system assigned and/or user assigned identities). + + :ivar type: Managed service identity (system assigned and/or user assigned identities). + Possible values include: "None", "SystemAssigned", "UserAssigned", + "SystemAssigned,UserAssigned". + :vartype type: str or ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentityType + :ivar user_assigned_identities: The set of user assigned identities associated with the + resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + The dictionary values can be empty objects ({}) in requests. + :vartype user_assigned_identities: dict[str, any] + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{object}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword type: Managed service identity (system assigned and/or user assigned identities). + Possible values include: "None", "SystemAssigned", "UserAssigned", + "SystemAssigned,UserAssigned". + :paramtype type: str or ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentityType + :keyword user_assigned_identities: The set of user assigned identities associated with the + resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + The dictionary values can be empty objects ({}) in requests. + :paramtype user_assigned_identities: dict[str, any] + """ + super(PartialManagedServiceIdentity, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.user_assigned_identities = kwargs.get('user_assigned_identities', None) + + +class PartialOnlineDeploymentPartialTrackedResource(msrest.serialization.Model): + """Strictly used in update requests. + + :ivar identity: Managed service identity (system assigned and/or user assigned identities). + :vartype identity: ~azure.mgmt.machinelearningservices.models.PartialManagedServiceIdentity + :ivar kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type. + :vartype kind: str + :ivar location: The geo-location where the resource lives. + :vartype location: str + :ivar properties: Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.PartialOnlineDeployment + :ivar sku: Sku details required for ARM contract for Autoscaling. + :vartype sku: ~azure.mgmt.machinelearningservices.models.PartialSku + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + """ + + _attribute_map = { + 'identity': {'key': 'identity', 'type': 'PartialManagedServiceIdentity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'PartialOnlineDeployment'}, + 'sku': {'key': 'sku', 'type': 'PartialSku'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword identity: Managed service identity (system assigned and/or user assigned identities). + :paramtype identity: ~azure.mgmt.machinelearningservices.models.PartialManagedServiceIdentity + :keyword kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type. + :paramtype kind: str + :keyword location: The geo-location where the resource lives. + :paramtype location: str + :keyword properties: Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.PartialOnlineDeployment + :keyword sku: Sku details required for ARM contract for Autoscaling. + :paramtype sku: ~azure.mgmt.machinelearningservices.models.PartialSku + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + """ + super(PartialOnlineDeploymentPartialTrackedResource, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.kind = kwargs.get('kind', None) + self.location = kwargs.get('location', None) + self.properties = kwargs.get('properties', None) + self.sku = kwargs.get('sku', None) + self.tags = kwargs.get('tags', None) + + +class PartialOnlineEndpointPartialTrackedResource(msrest.serialization.Model): + """Strictly used in update requests. + + :ivar identity: Managed service identity (system assigned and/or user assigned identities). + :vartype identity: ~azure.mgmt.machinelearningservices.models.PartialManagedServiceIdentity + :ivar kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type. + :vartype kind: str + :ivar location: The geo-location where the resource lives. + :vartype location: str + :ivar properties: Additional attributes of the entity. + :vartype properties: any + :ivar sku: Sku details required for ARM contract for Autoscaling. + :vartype sku: ~azure.mgmt.machinelearningservices.models.PartialSku + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + """ + + _attribute_map = { + 'identity': {'key': 'identity', 'type': 'PartialManagedServiceIdentity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'sku': {'key': 'sku', 'type': 'PartialSku'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword identity: Managed service identity (system assigned and/or user assigned identities). + :paramtype identity: ~azure.mgmt.machinelearningservices.models.PartialManagedServiceIdentity + :keyword kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type. + :paramtype kind: str + :keyword location: The geo-location where the resource lives. + :paramtype location: str + :keyword properties: Additional attributes of the entity. + :paramtype properties: any + :keyword sku: Sku details required for ARM contract for Autoscaling. + :paramtype sku: ~azure.mgmt.machinelearningservices.models.PartialSku + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + """ + super(PartialOnlineEndpointPartialTrackedResource, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.kind = kwargs.get('kind', None) + self.location = kwargs.get('location', None) + self.properties = kwargs.get('properties', None) + self.sku = kwargs.get('sku', None) + self.tags = kwargs.get('tags', None) + + +class PartialOutputPathAssetReference(PartialAssetReferenceBase): + """Reference to an asset via its path in a job output. + + All required parameters must be populated in order to send to Azure. + + :ivar reference_type: Required. [Required] Specifies the type of asset reference.Constant + filled by server. Possible values include: "Id", "DataPath", "OutputPath". + :vartype reference_type: str or ~azure.mgmt.machinelearningservices.models.ReferenceType + :ivar job_id: ARM resource ID of the job. + :vartype job_id: str + :ivar path: The path of the file/directory in the job output. + :vartype path: str + """ + + _validation = { + 'reference_type': {'required': True}, + } + + _attribute_map = { + 'reference_type': {'key': 'referenceType', 'type': 'str'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword job_id: ARM resource ID of the job. + :paramtype job_id: str + :keyword path: The path of the file/directory in the job output. + :paramtype path: str + """ + super(PartialOutputPathAssetReference, self).__init__(**kwargs) + self.reference_type = 'OutputPath' # type: str + self.job_id = kwargs.get('job_id', None) + self.path = kwargs.get('path', None) + + +class PartialSku(msrest.serialization.Model): + """Common SKU definition. + + :ivar capacity: If the SKU supports scale out/in then the capacity integer should be included. + If scale out/in is not possible for the resource this may be omitted. + :vartype capacity: int + :ivar family: If the service has different generations of hardware, for the same SKU, then that + can be captured here. + :vartype family: str + :ivar name: The name of the SKU. Ex - P3. It is typically a letter+number code. + :vartype name: str + :ivar size: The SKU size. When the name field is the combination of tier and some other value, + this would be the standalone code. + :vartype size: str + :ivar tier: This field is required to be implemented by the Resource Provider if the service + has more than one tier, but is not required on a PUT. Possible values include: "Free", "Basic", + "Standard", "Premium". + :vartype tier: str or ~azure.mgmt.machinelearningservices.models.SkuTier + """ + + _attribute_map = { + 'capacity': {'key': 'capacity', 'type': 'int'}, + 'family': {'key': 'family', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword capacity: If the SKU supports scale out/in then the capacity integer should be + included. If scale out/in is not possible for the resource this may be omitted. + :paramtype capacity: int + :keyword family: If the service has different generations of hardware, for the same SKU, then + that can be captured here. + :paramtype family: str + :keyword name: The name of the SKU. Ex - P3. It is typically a letter+number code. + :paramtype name: str + :keyword size: The SKU size. When the name field is the combination of tier and some other + value, this would be the standalone code. + :paramtype size: str + :keyword tier: This field is required to be implemented by the Resource Provider if the service + has more than one tier, but is not required on a PUT. Possible values include: "Free", "Basic", + "Standard", "Premium". + :paramtype tier: str or ~azure.mgmt.machinelearningservices.models.SkuTier + """ + super(PartialSku, self).__init__(**kwargs) + self.capacity = kwargs.get('capacity', None) + self.family = kwargs.get('family', None) + self.name = kwargs.get('name', None) + self.size = kwargs.get('size', None) + self.tier = kwargs.get('tier', None) + + +class Password(msrest.serialization.Model): + """Password. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: + :vartype name: str + :ivar value: + :vartype value: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(Password, self).__init__(**kwargs) + self.name = None + self.value = None + + +class PATAuthTypeWorkspaceConnectionProperties(WorkspaceConnectionPropertiesV2): + """PATAuthTypeWorkspaceConnectionProperties. + + All required parameters must be populated in order to send to Azure. + + :ivar auth_type: Required. Authentication type of the connection target.Constant filled by + server. Possible values include: "PAT", "ManagedIdentity", "UsernamePassword", "None", "SAS". + :vartype auth_type: str or ~azure.mgmt.machinelearningservices.models.ConnectionAuthType + :ivar category: Category of the connection. Possible values include: "PythonFeed", + "ContainerRegistry", "Git". + :vartype category: str or ~azure.mgmt.machinelearningservices.models.ConnectionCategory + :ivar target: + :vartype target: str + :ivar value: Value details of the workspace connection. + :vartype value: str + :ivar value_format: format for the workspace connection value. Possible values include: "JSON". + :vartype value_format: str or ~azure.mgmt.machinelearningservices.models.ValueFormat + :ivar credentials: + :vartype credentials: + ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionPersonalAccessToken + """ + + _validation = { + 'auth_type': {'required': True}, + } + + _attribute_map = { + 'auth_type': {'key': 'authType', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'value_format': {'key': 'valueFormat', 'type': 'str'}, + 'credentials': {'key': 'credentials', 'type': 'WorkspaceConnectionPersonalAccessToken'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword category: Category of the connection. Possible values include: "PythonFeed", + "ContainerRegistry", "Git". + :paramtype category: str or ~azure.mgmt.machinelearningservices.models.ConnectionCategory + :keyword target: + :paramtype target: str + :keyword value: Value details of the workspace connection. + :paramtype value: str + :keyword value_format: format for the workspace connection value. Possible values include: + "JSON". + :paramtype value_format: str or ~azure.mgmt.machinelearningservices.models.ValueFormat + :keyword credentials: + :paramtype credentials: + ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionPersonalAccessToken + """ + super(PATAuthTypeWorkspaceConnectionProperties, self).__init__(**kwargs) + self.auth_type = 'PAT' # type: str + self.credentials = kwargs.get('credentials', None) + + +class PersonalComputeInstanceSettings(msrest.serialization.Model): + """Settings for a personal compute instance. + + :ivar assigned_user: A user explicitly assigned to a personal compute instance. + :vartype assigned_user: ~azure.mgmt.machinelearningservices.models.AssignedUser + """ + + _attribute_map = { + 'assigned_user': {'key': 'assignedUser', 'type': 'AssignedUser'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword assigned_user: A user explicitly assigned to a personal compute instance. + :paramtype assigned_user: ~azure.mgmt.machinelearningservices.models.AssignedUser + """ + super(PersonalComputeInstanceSettings, self).__init__(**kwargs) + self.assigned_user = kwargs.get('assigned_user', None) + + +class PipelineJob(JobBaseDetails): + """Pipeline Job definition: defines generic to MFE attributes. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar compute_id: ARM resource ID of the compute resource. + :vartype compute_id: str + :ivar display_name: Display name of job. + :vartype display_name: str + :ivar experiment_name: The name of the experiment the job belongs to. If not set, the job is + placed in the "Default" experiment. + :vartype experiment_name: str + :ivar identity: Identity configuration. If set, this should be one of AmlToken, + ManagedIdentity, UserIdentity or null. + Defaults to AmlToken if null. + :vartype identity: ~azure.mgmt.machinelearningservices.models.IdentityConfiguration + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar job_type: Required. [Required] Specifies the type of job.Constant filled by server. + Possible values include: "Command", "Sweep", "Pipeline". + :vartype job_type: str or ~azure.mgmt.machinelearningservices.models.JobType + :ivar services: List of JobEndpoints. + For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + :vartype services: dict[str, ~azure.mgmt.machinelearningservices.models.JobService] + :ivar status: Status of the job. Possible values include: "NotStarted", "Starting", + "Provisioning", "Preparing", "Queued", "Running", "Finalizing", "CancelRequested", "Completed", + "Failed", "Canceled", "NotResponding", "Paused", "Unknown". + :vartype status: str or ~azure.mgmt.machinelearningservices.models.JobStatus + :ivar inputs: Inputs for the pipeline job. + :vartype inputs: dict[str, ~azure.mgmt.machinelearningservices.models.JobInput] + :ivar jobs: Jobs construct the Pipeline Job. + :vartype jobs: dict[str, any] + :ivar outputs: Outputs for the pipeline job. + :vartype outputs: dict[str, ~azure.mgmt.machinelearningservices.models.JobOutput] + :ivar settings: Pipeline settings, for things like ContinueRunOnStepFailure etc. + :vartype settings: any + """ + + _validation = { + 'job_type': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'compute_id': {'key': 'computeId', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'experiment_name': {'key': 'experimentName', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'IdentityConfiguration'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'services': {'key': 'services', 'type': '{JobService}'}, + 'status': {'key': 'status', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '{JobInput}'}, + 'jobs': {'key': 'jobs', 'type': '{object}'}, + 'outputs': {'key': 'outputs', 'type': '{JobOutput}'}, + 'settings': {'key': 'settings', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword compute_id: ARM resource ID of the compute resource. + :paramtype compute_id: str + :keyword display_name: Display name of job. + :paramtype display_name: str + :keyword experiment_name: The name of the experiment the job belongs to. If not set, the job is + placed in the "Default" experiment. + :paramtype experiment_name: str + :keyword identity: Identity configuration. If set, this should be one of AmlToken, + ManagedIdentity, UserIdentity or null. + Defaults to AmlToken if null. + :paramtype identity: ~azure.mgmt.machinelearningservices.models.IdentityConfiguration + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + :keyword services: List of JobEndpoints. + For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + :paramtype services: dict[str, ~azure.mgmt.machinelearningservices.models.JobService] + :keyword inputs: Inputs for the pipeline job. + :paramtype inputs: dict[str, ~azure.mgmt.machinelearningservices.models.JobInput] + :keyword jobs: Jobs construct the Pipeline Job. + :paramtype jobs: dict[str, any] + :keyword outputs: Outputs for the pipeline job. + :paramtype outputs: dict[str, ~azure.mgmt.machinelearningservices.models.JobOutput] + :keyword settings: Pipeline settings, for things like ContinueRunOnStepFailure etc. + :paramtype settings: any + """ + super(PipelineJob, self).__init__(**kwargs) + self.job_type = 'Pipeline' # type: str + self.inputs = kwargs.get('inputs', None) + self.jobs = kwargs.get('jobs', None) + self.outputs = kwargs.get('outputs', None) + self.settings = kwargs.get('settings', None) + + +class PrivateEndpoint(msrest.serialization.Model): + """The Private Endpoint resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The ARM identifier for Private Endpoint. + :vartype id: str + :ivar subnet_arm_id: The ARM identifier for Subnet resource that private endpoint links to. + :vartype subnet_arm_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'subnet_arm_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'subnet_arm_id': {'key': 'subnetArmId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = None + self.subnet_arm_id = None + + +class PrivateEndpointConnection(Resource): + """The Private Endpoint Connection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar identity: The identity of the resource. + :vartype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :ivar location: Specifies the location of the resource. + :vartype location: str + :ivar tags: A set of tags. Contains resource tags defined as key/value pairs. + :vartype tags: dict[str, str] + :ivar sku: The sku of the workspace. + :vartype sku: ~azure.mgmt.machinelearningservices.models.Sku + :ivar private_endpoint: The resource of private end point. + :vartype private_endpoint: ~azure.mgmt.machinelearningservices.models.PrivateEndpoint + :ivar private_link_service_connection_state: A collection of information about the state of the + connection between service consumer and provider. + :vartype private_link_service_connection_state: + ~azure.mgmt.machinelearningservices.models.PrivateLinkServiceConnectionState + :ivar provisioning_state: The provisioning state of the private endpoint connection resource. + Possible values include: "Succeeded", "Creating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.PrivateEndpointConnectionProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword identity: The identity of the resource. + :paramtype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :keyword location: Specifies the location of the resource. + :paramtype location: str + :keyword tags: A set of tags. Contains resource tags defined as key/value pairs. + :paramtype tags: dict[str, str] + :keyword sku: The sku of the workspace. + :paramtype sku: ~azure.mgmt.machinelearningservices.models.Sku + :keyword private_endpoint: The resource of private end point. + :paramtype private_endpoint: ~azure.mgmt.machinelearningservices.models.PrivateEndpoint + :keyword private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. + :paramtype private_link_service_connection_state: + ~azure.mgmt.machinelearningservices.models.PrivateLinkServiceConnectionState + """ + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + self.private_endpoint = kwargs.get('private_endpoint', None) + self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + self.provisioning_state = None + + +class PrivateEndpointConnectionListResult(msrest.serialization.Model): + """List of private endpoint connection associated with the specified workspace. + + :ivar value: Array of private endpoint connections. + :vartype value: list[~azure.mgmt.machinelearningservices.models.PrivateEndpointConnection] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword value: Array of private endpoint connections. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.PrivateEndpointConnection] + """ + super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class PrivateLinkResource(Resource): + """A private link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar identity: The identity of the resource. + :vartype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :ivar location: Specifies the location of the resource. + :vartype location: str + :ivar tags: A set of tags. Contains resource tags defined as key/value pairs. + :vartype tags: dict[str, str] + :ivar sku: The sku of the workspace. + :vartype sku: ~azure.mgmt.machinelearningservices.models.Sku + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + :ivar required_zone_names: The private link resource Private link DNS zone name. + :vartype required_zone_names: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword identity: The identity of the resource. + :paramtype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :keyword location: Specifies the location of the resource. + :paramtype location: str + :keyword tags: A set of tags. Contains resource tags defined as key/value pairs. + :paramtype tags: dict[str, str] + :keyword sku: The sku of the workspace. + :paramtype sku: ~azure.mgmt.machinelearningservices.models.Sku + :keyword required_zone_names: The private link resource Private link DNS zone name. + :paramtype required_zone_names: list[str] + """ + super(PrivateLinkResource, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + self.group_id = None + self.required_members = None + self.required_zone_names = kwargs.get('required_zone_names', None) + + +class PrivateLinkResourceListResult(msrest.serialization.Model): + """A list of private link resources. + + :ivar value: Array of private link resources. + :vartype value: list[~azure.mgmt.machinelearningservices.models.PrivateLinkResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword value: Array of private link resources. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.PrivateLinkResource] + """ + super(PrivateLinkResourceListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class PrivateLinkServiceConnectionState(msrest.serialization.Model): + """A collection of information about the state of the connection between service consumer and provider. + + :ivar status: Indicates whether the connection has been Approved/Rejected/Removed by the owner + of the service. Possible values include: "Pending", "Approved", "Rejected", "Disconnected", + "Timeout". + :vartype status: str or + ~azure.mgmt.machinelearningservices.models.PrivateEndpointServiceConnectionStatus + :ivar description: The reason for approval/rejection of the connection. + :vartype description: str + :ivar actions_required: A message indicating if changes on the service provider require any + updates on the consumer. + :vartype actions_required: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword status: Indicates whether the connection has been Approved/Rejected/Removed by the + owner of the service. Possible values include: "Pending", "Approved", "Rejected", + "Disconnected", "Timeout". + :paramtype status: str or + ~azure.mgmt.machinelearningservices.models.PrivateEndpointServiceConnectionStatus + :keyword description: The reason for approval/rejection of the connection. + :paramtype description: str + :keyword actions_required: A message indicating if changes on the service provider require any + updates on the consumer. + :paramtype actions_required: str + """ + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.description = kwargs.get('description', None) + self.actions_required = kwargs.get('actions_required', None) + + +class ProbeSettings(msrest.serialization.Model): + """Deployment container liveness/readiness probe configuration. + + :ivar failure_threshold: The number of failures to allow before returning an unhealthy status. + :vartype failure_threshold: int + :ivar initial_delay: The delay before the first probe in ISO 8601 format. + :vartype initial_delay: ~datetime.timedelta + :ivar period: The length of time between probes in ISO 8601 format. + :vartype period: ~datetime.timedelta + :ivar success_threshold: The number of successful probes before returning a healthy status. + :vartype success_threshold: int + :ivar timeout: The probe timeout in ISO 8601 format. + :vartype timeout: ~datetime.timedelta + """ + + _attribute_map = { + 'failure_threshold': {'key': 'failureThreshold', 'type': 'int'}, + 'initial_delay': {'key': 'initialDelay', 'type': 'duration'}, + 'period': {'key': 'period', 'type': 'duration'}, + 'success_threshold': {'key': 'successThreshold', 'type': 'int'}, + 'timeout': {'key': 'timeout', 'type': 'duration'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword failure_threshold: The number of failures to allow before returning an unhealthy + status. + :paramtype failure_threshold: int + :keyword initial_delay: The delay before the first probe in ISO 8601 format. + :paramtype initial_delay: ~datetime.timedelta + :keyword period: The length of time between probes in ISO 8601 format. + :paramtype period: ~datetime.timedelta + :keyword success_threshold: The number of successful probes before returning a healthy status. + :paramtype success_threshold: int + :keyword timeout: The probe timeout in ISO 8601 format. + :paramtype timeout: ~datetime.timedelta + """ + super(ProbeSettings, self).__init__(**kwargs) + self.failure_threshold = kwargs.get('failure_threshold', 30) + self.initial_delay = kwargs.get('initial_delay', None) + self.period = kwargs.get('period', "PT10S") + self.success_threshold = kwargs.get('success_threshold', 1) + self.timeout = kwargs.get('timeout', "PT2S") + + +class PyTorch(DistributionConfiguration): + """PyTorch distribution configuration. + + All required parameters must be populated in order to send to Azure. + + :ivar distribution_type: Required. [Required] Specifies the type of distribution + framework.Constant filled by server. Possible values include: "PyTorch", "TensorFlow", "Mpi". + :vartype distribution_type: str or ~azure.mgmt.machinelearningservices.models.DistributionType + :ivar process_count_per_instance: Number of processes per node. + :vartype process_count_per_instance: int + """ + + _validation = { + 'distribution_type': {'required': True}, + } + + _attribute_map = { + 'distribution_type': {'key': 'distributionType', 'type': 'str'}, + 'process_count_per_instance': {'key': 'processCountPerInstance', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword process_count_per_instance: Number of processes per node. + :paramtype process_count_per_instance: int + """ + super(PyTorch, self).__init__(**kwargs) + self.distribution_type = 'PyTorch' # type: str + self.process_count_per_instance = kwargs.get('process_count_per_instance', None) + + +class QuotaBaseProperties(msrest.serialization.Model): + """The properties for Quota update or retrieval. + + :ivar id: Specifies the resource ID. + :vartype id: str + :ivar type: Specifies the resource type. + :vartype type: str + :ivar limit: The maximum permitted quota of the resource. + :vartype limit: long + :ivar unit: An enum describing the unit of quota measurement. Possible values include: "Count". + :vartype unit: str or ~azure.mgmt.machinelearningservices.models.QuotaUnit + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: Specifies the resource ID. + :paramtype id: str + :keyword type: Specifies the resource type. + :paramtype type: str + :keyword limit: The maximum permitted quota of the resource. + :paramtype limit: long + :keyword unit: An enum describing the unit of quota measurement. Possible values include: + "Count". + :paramtype unit: str or ~azure.mgmt.machinelearningservices.models.QuotaUnit + """ + super(QuotaBaseProperties, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.type = kwargs.get('type', None) + self.limit = kwargs.get('limit', None) + self.unit = kwargs.get('unit', None) + + +class QuotaUpdateParameters(msrest.serialization.Model): + """Quota update parameters. + + :ivar value: The list for update quota. + :vartype value: list[~azure.mgmt.machinelearningservices.models.QuotaBaseProperties] + :ivar location: Region of workspace quota to be updated. + :vartype location: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[QuotaBaseProperties]'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword value: The list for update quota. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.QuotaBaseProperties] + :keyword location: Region of workspace quota to be updated. + :paramtype location: str + """ + super(QuotaUpdateParameters, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.location = kwargs.get('location', None) + + +class RandomSamplingAlgorithm(SamplingAlgorithm): + """Defines a Sampling Algorithm that generates values randomly. + + All required parameters must be populated in order to send to Azure. + + :ivar sampling_algorithm_type: Required. [Required] The algorithm used for generating + hyperparameter values, along with configuration properties.Constant filled by server. Possible + values include: "Grid", "Random", "Bayesian". + :vartype sampling_algorithm_type: str or + ~azure.mgmt.machinelearningservices.models.SamplingAlgorithmType + :ivar rule: The specific type of random algorithm. Possible values include: "Random", "Sobol". + :vartype rule: str or ~azure.mgmt.machinelearningservices.models.RandomSamplingAlgorithmRule + :ivar seed: An optional integer to use as the seed for random number generation. + :vartype seed: int + """ + + _validation = { + 'sampling_algorithm_type': {'required': True}, + } + + _attribute_map = { + 'sampling_algorithm_type': {'key': 'samplingAlgorithmType', 'type': 'str'}, + 'rule': {'key': 'rule', 'type': 'str'}, + 'seed': {'key': 'seed', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword rule: The specific type of random algorithm. Possible values include: "Random", + "Sobol". + :paramtype rule: str or ~azure.mgmt.machinelearningservices.models.RandomSamplingAlgorithmRule + :keyword seed: An optional integer to use as the seed for random number generation. + :paramtype seed: int + """ + super(RandomSamplingAlgorithm, self).__init__(**kwargs) + self.sampling_algorithm_type = 'Random' # type: str + self.rule = kwargs.get('rule', None) + self.seed = kwargs.get('seed', None) + + +class RecurrencePattern(msrest.serialization.Model): + """Recurrence schedule pattern definition. + + All required parameters must be populated in order to send to Azure. + + :ivar hours: Required. [Required] List of hours for recurrence schedule pattern. + :vartype hours: list[int] + :ivar minutes: Required. [Required] List of minutes for recurrence schedule pattern. + :vartype minutes: list[int] + :ivar weekdays: List of weekdays for recurrence schedule pattern. + :vartype weekdays: list[str or ~azure.mgmt.machinelearningservices.models.Weekday] + """ + + _validation = { + 'hours': {'required': True}, + 'minutes': {'required': True}, + } + + _attribute_map = { + 'hours': {'key': 'hours', 'type': '[int]'}, + 'minutes': {'key': 'minutes', 'type': '[int]'}, + 'weekdays': {'key': 'weekdays', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword hours: Required. [Required] List of hours for recurrence schedule pattern. + :paramtype hours: list[int] + :keyword minutes: Required. [Required] List of minutes for recurrence schedule pattern. + :paramtype minutes: list[int] + :keyword weekdays: List of weekdays for recurrence schedule pattern. + :paramtype weekdays: list[str or ~azure.mgmt.machinelearningservices.models.Weekday] + """ + super(RecurrencePattern, self).__init__(**kwargs) + self.hours = kwargs['hours'] + self.minutes = kwargs['minutes'] + self.weekdays = kwargs.get('weekdays', None) + + +class RecurrenceSchedule(ScheduleBase): + """Recurrence schedule definition. + + All required parameters must be populated in order to send to Azure. + + :ivar end_time: Specifies end time of schedule in ISO 8601 format. + If not present, the schedule will run indefinitely. + :vartype end_time: ~datetime.datetime + :ivar schedule_status: Specifies the schedule's status. Possible values include: "Enabled", + "Disabled". + :vartype schedule_status: str or ~azure.mgmt.machinelearningservices.models.ScheduleStatus + :ivar schedule_type: Required. [Required] Specifies the schedule type.Constant filled by + server. Possible values include: "Cron", "Recurrence". + :vartype schedule_type: str or ~azure.mgmt.machinelearningservices.models.ScheduleType + :ivar start_time: Specifies start time of schedule in ISO 8601 format. + :vartype start_time: ~datetime.datetime + :ivar time_zone: Specifies time zone in which the schedule runs. + TimeZone should follow Windows time zone format. + :vartype time_zone: str + :ivar frequency: Required. [Required] Specifies frequency with with which to trigger schedule. + Possible values include: "Minute", "Hour", "Day", "Week", "Month". + :vartype frequency: str or ~azure.mgmt.machinelearningservices.models.RecurrenceFrequency + :ivar interval: Required. [Required] Specifies schedule interval in conjunction with frequency. + :vartype interval: int + :ivar pattern: Specifies the recurrence schedule pattern. + :vartype pattern: ~azure.mgmt.machinelearningservices.models.RecurrencePattern + """ + + _validation = { + 'schedule_type': {'required': True}, + 'frequency': {'required': True}, + 'interval': {'required': True}, + } + + _attribute_map = { + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'schedule_status': {'key': 'scheduleStatus', 'type': 'str'}, + 'schedule_type': {'key': 'scheduleType', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'frequency': {'key': 'frequency', 'type': 'str'}, + 'interval': {'key': 'interval', 'type': 'int'}, + 'pattern': {'key': 'pattern', 'type': 'RecurrencePattern'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword end_time: Specifies end time of schedule in ISO 8601 format. + If not present, the schedule will run indefinitely. + :paramtype end_time: ~datetime.datetime + :keyword schedule_status: Specifies the schedule's status. Possible values include: "Enabled", + "Disabled". + :paramtype schedule_status: str or ~azure.mgmt.machinelearningservices.models.ScheduleStatus + :keyword start_time: Specifies start time of schedule in ISO 8601 format. + :paramtype start_time: ~datetime.datetime + :keyword time_zone: Specifies time zone in which the schedule runs. + TimeZone should follow Windows time zone format. + :paramtype time_zone: str + :keyword frequency: Required. [Required] Specifies frequency with with which to trigger + schedule. Possible values include: "Minute", "Hour", "Day", "Week", "Month". + :paramtype frequency: str or ~azure.mgmt.machinelearningservices.models.RecurrenceFrequency + :keyword interval: Required. [Required] Specifies schedule interval in conjunction with + frequency. + :paramtype interval: int + :keyword pattern: Specifies the recurrence schedule pattern. + :paramtype pattern: ~azure.mgmt.machinelearningservices.models.RecurrencePattern + """ + super(RecurrenceSchedule, self).__init__(**kwargs) + self.schedule_type = 'Recurrence' # type: str + self.frequency = kwargs['frequency'] + self.interval = kwargs['interval'] + self.pattern = kwargs.get('pattern', None) + + +class RegenerateEndpointKeysRequest(msrest.serialization.Model): + """RegenerateEndpointKeysRequest. + + All required parameters must be populated in order to send to Azure. + + :ivar key_type: Required. [Required] Specification for which type of key to generate. Primary + or Secondary. Possible values include: "Primary", "Secondary". + :vartype key_type: str or ~azure.mgmt.machinelearningservices.models.KeyType + :ivar key_value: The value the key is set to. + :vartype key_value: str + """ + + _validation = { + 'key_type': {'required': True}, + } + + _attribute_map = { + 'key_type': {'key': 'keyType', 'type': 'str'}, + 'key_value': {'key': 'keyValue', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword key_type: Required. [Required] Specification for which type of key to generate. + Primary or Secondary. Possible values include: "Primary", "Secondary". + :paramtype key_type: str or ~azure.mgmt.machinelearningservices.models.KeyType + :keyword key_value: The value the key is set to. + :paramtype key_value: str + """ + super(RegenerateEndpointKeysRequest, self).__init__(**kwargs) + self.key_type = kwargs['key_type'] + self.key_value = kwargs.get('key_value', None) + + +class RegistryListCredentialsResult(msrest.serialization.Model): + """RegistryListCredentialsResult. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar location: + :vartype location: str + :ivar username: + :vartype username: str + :ivar passwords: + :vartype passwords: list[~azure.mgmt.machinelearningservices.models.Password] + """ + + _validation = { + 'location': {'readonly': True}, + 'username': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'passwords': {'key': 'passwords', 'type': '[Password]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword passwords: + :paramtype passwords: list[~azure.mgmt.machinelearningservices.models.Password] + """ + super(RegistryListCredentialsResult, self).__init__(**kwargs) + self.location = None + self.username = None + self.passwords = kwargs.get('passwords', None) + + +class ResourceConfiguration(msrest.serialization.Model): + """ResourceConfiguration. + + :ivar instance_count: Optional number of instances or nodes used by the compute target. + :vartype instance_count: int + :ivar instance_type: Optional type of VM used as supported by the compute target. + :vartype instance_type: str + :ivar properties: Additional properties bag. + :vartype properties: dict[str, any] + """ + + _attribute_map = { + 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + 'instance_type': {'key': 'instanceType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{object}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword instance_count: Optional number of instances or nodes used by the compute target. + :paramtype instance_count: int + :keyword instance_type: Optional type of VM used as supported by the compute target. + :paramtype instance_type: str + :keyword properties: Additional properties bag. + :paramtype properties: dict[str, any] + """ + super(ResourceConfiguration, self).__init__(**kwargs) + self.instance_count = kwargs.get('instance_count', 1) + self.instance_type = kwargs.get('instance_type', None) + self.properties = kwargs.get('properties', None) + + +class ResourceId(msrest.serialization.Model): + """Represents a resource ID. For example, for a subnet, it is the resource URL for the subnet. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Required. The ID of the resource. + :vartype id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: Required. The ID of the resource. + :paramtype id: str + """ + super(ResourceId, self).__init__(**kwargs) + self.id = kwargs['id'] + + +class ResourceName(msrest.serialization.Model): + """The Resource Name. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The name of the resource. + :vartype value: str + :ivar localized_value: The localized name of the resource. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ResourceName, self).__init__(**kwargs) + self.value = None + self.localized_value = None + + +class ResourceQuota(msrest.serialization.Model): + """The quota assigned to a resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Specifies the resource ID. + :vartype id: str + :ivar aml_workspace_location: Region of the AML workspace in the id. + :vartype aml_workspace_location: str + :ivar type: Specifies the resource type. + :vartype type: str + :ivar name: Name of the resource. + :vartype name: ~azure.mgmt.machinelearningservices.models.ResourceName + :ivar limit: The maximum permitted quota of the resource. + :vartype limit: long + :ivar unit: An enum describing the unit of quota measurement. Possible values include: "Count". + :vartype unit: str or ~azure.mgmt.machinelearningservices.models.QuotaUnit + """ + + _validation = { + 'id': {'readonly': True}, + 'aml_workspace_location': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'aml_workspace_location': {'key': 'amlWorkspaceLocation', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'ResourceName'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ResourceQuota, self).__init__(**kwargs) + self.id = None + self.aml_workspace_location = None + self.type = None + self.name = None + self.limit = None + self.unit = None + + +class Route(msrest.serialization.Model): + """Route. + + All required parameters must be populated in order to send to Azure. + + :ivar path: Required. [Required] The path for the route. + :vartype path: str + :ivar port: Required. [Required] The port for the route. + :vartype port: int + """ + + _validation = { + 'path': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + 'port': {'required': True}, + } + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword path: Required. [Required] The path for the route. + :paramtype path: str + :keyword port: Required. [Required] The port for the route. + :paramtype port: int + """ + super(Route, self).__init__(**kwargs) + self.path = kwargs['path'] + self.port = kwargs['port'] + + +class SASAuthTypeWorkspaceConnectionProperties(WorkspaceConnectionPropertiesV2): + """SASAuthTypeWorkspaceConnectionProperties. + + All required parameters must be populated in order to send to Azure. + + :ivar auth_type: Required. Authentication type of the connection target.Constant filled by + server. Possible values include: "PAT", "ManagedIdentity", "UsernamePassword", "None", "SAS". + :vartype auth_type: str or ~azure.mgmt.machinelearningservices.models.ConnectionAuthType + :ivar category: Category of the connection. Possible values include: "PythonFeed", + "ContainerRegistry", "Git". + :vartype category: str or ~azure.mgmt.machinelearningservices.models.ConnectionCategory + :ivar target: + :vartype target: str + :ivar value: Value details of the workspace connection. + :vartype value: str + :ivar value_format: format for the workspace connection value. Possible values include: "JSON". + :vartype value_format: str or ~azure.mgmt.machinelearningservices.models.ValueFormat + :ivar credentials: + :vartype credentials: + ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionSharedAccessSignature + """ + + _validation = { + 'auth_type': {'required': True}, + } + + _attribute_map = { + 'auth_type': {'key': 'authType', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'value_format': {'key': 'valueFormat', 'type': 'str'}, + 'credentials': {'key': 'credentials', 'type': 'WorkspaceConnectionSharedAccessSignature'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword category: Category of the connection. Possible values include: "PythonFeed", + "ContainerRegistry", "Git". + :paramtype category: str or ~azure.mgmt.machinelearningservices.models.ConnectionCategory + :keyword target: + :paramtype target: str + :keyword value: Value details of the workspace connection. + :paramtype value: str + :keyword value_format: format for the workspace connection value. Possible values include: + "JSON". + :paramtype value_format: str or ~azure.mgmt.machinelearningservices.models.ValueFormat + :keyword credentials: + :paramtype credentials: + ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionSharedAccessSignature + """ + super(SASAuthTypeWorkspaceConnectionProperties, self).__init__(**kwargs) + self.auth_type = 'SAS' # type: str + self.credentials = kwargs.get('credentials', None) + + +class SasDatastoreCredentials(DatastoreCredentials): + """SAS datastore credentials configuration. + + All required parameters must be populated in order to send to Azure. + + :ivar credentials_type: Required. [Required] Credential type used to authentication with + storage.Constant filled by server. Possible values include: "AccountKey", "Certificate", + "None", "Sas", "ServicePrincipal". + :vartype credentials_type: str or ~azure.mgmt.machinelearningservices.models.CredentialsType + :ivar secrets: Required. [Required] Storage container secrets. + :vartype secrets: ~azure.mgmt.machinelearningservices.models.SasDatastoreSecrets + """ + + _validation = { + 'credentials_type': {'required': True}, + 'secrets': {'required': True}, + } + + _attribute_map = { + 'credentials_type': {'key': 'credentialsType', 'type': 'str'}, + 'secrets': {'key': 'secrets', 'type': 'SasDatastoreSecrets'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword secrets: Required. [Required] Storage container secrets. + :paramtype secrets: ~azure.mgmt.machinelearningservices.models.SasDatastoreSecrets + """ + super(SasDatastoreCredentials, self).__init__(**kwargs) + self.credentials_type = 'Sas' # type: str + self.secrets = kwargs['secrets'] + + +class SasDatastoreSecrets(DatastoreSecrets): + """Datastore SAS secrets. + + All required parameters must be populated in order to send to Azure. + + :ivar secrets_type: Required. [Required] Credential type used to authentication with + storage.Constant filled by server. Possible values include: "AccountKey", "Certificate", "Sas", + "ServicePrincipal". + :vartype secrets_type: str or ~azure.mgmt.machinelearningservices.models.SecretsType + :ivar sas_token: Storage container SAS token. + :vartype sas_token: str + """ + + _validation = { + 'secrets_type': {'required': True}, + } + + _attribute_map = { + 'secrets_type': {'key': 'secretsType', 'type': 'str'}, + 'sas_token': {'key': 'sasToken', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword sas_token: Storage container SAS token. + :paramtype sas_token: str + """ + super(SasDatastoreSecrets, self).__init__(**kwargs) + self.secrets_type = 'Sas' # type: str + self.sas_token = kwargs.get('sas_token', None) + + +class ScaleSettings(msrest.serialization.Model): + """scale settings for AML Compute. + + All required parameters must be populated in order to send to Azure. + + :ivar max_node_count: Required. Max number of nodes to use. + :vartype max_node_count: int + :ivar min_node_count: Min number of nodes to use. + :vartype min_node_count: int + :ivar node_idle_time_before_scale_down: Node Idle Time before scaling down amlCompute. This + string needs to be in the RFC Format. + :vartype node_idle_time_before_scale_down: ~datetime.timedelta + """ + + _validation = { + 'max_node_count': {'required': True}, + } + + _attribute_map = { + 'max_node_count': {'key': 'maxNodeCount', 'type': 'int'}, + 'min_node_count': {'key': 'minNodeCount', 'type': 'int'}, + 'node_idle_time_before_scale_down': {'key': 'nodeIdleTimeBeforeScaleDown', 'type': 'duration'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword max_node_count: Required. Max number of nodes to use. + :paramtype max_node_count: int + :keyword min_node_count: Min number of nodes to use. + :paramtype min_node_count: int + :keyword node_idle_time_before_scale_down: Node Idle Time before scaling down amlCompute. This + string needs to be in the RFC Format. + :paramtype node_idle_time_before_scale_down: ~datetime.timedelta + """ + super(ScaleSettings, self).__init__(**kwargs) + self.max_node_count = kwargs['max_node_count'] + self.min_node_count = kwargs.get('min_node_count', 0) + self.node_idle_time_before_scale_down = kwargs.get('node_idle_time_before_scale_down', None) + + +class ScaleSettingsInformation(msrest.serialization.Model): + """Desired scale settings for the amlCompute. + + :ivar scale_settings: scale settings for AML Compute. + :vartype scale_settings: ~azure.mgmt.machinelearningservices.models.ScaleSettings + """ + + _attribute_map = { + 'scale_settings': {'key': 'scaleSettings', 'type': 'ScaleSettings'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword scale_settings: scale settings for AML Compute. + :paramtype scale_settings: ~azure.mgmt.machinelearningservices.models.ScaleSettings + """ + super(ScaleSettingsInformation, self).__init__(**kwargs) + self.scale_settings = kwargs.get('scale_settings', None) + + +class ScriptReference(msrest.serialization.Model): + """Script reference. + + :ivar script_source: The storage source of the script: inline, workspace. + :vartype script_source: str + :ivar script_data: The location of scripts in the mounted volume. + :vartype script_data: str + :ivar script_arguments: Optional command line arguments passed to the script to run. + :vartype script_arguments: str + :ivar timeout: Optional time period passed to timeout command. + :vartype timeout: str + """ + + _attribute_map = { + 'script_source': {'key': 'scriptSource', 'type': 'str'}, + 'script_data': {'key': 'scriptData', 'type': 'str'}, + 'script_arguments': {'key': 'scriptArguments', 'type': 'str'}, + 'timeout': {'key': 'timeout', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword script_source: The storage source of the script: inline, workspace. + :paramtype script_source: str + :keyword script_data: The location of scripts in the mounted volume. + :paramtype script_data: str + :keyword script_arguments: Optional command line arguments passed to the script to run. + :paramtype script_arguments: str + :keyword timeout: Optional time period passed to timeout command. + :paramtype timeout: str + """ + super(ScriptReference, self).__init__(**kwargs) + self.script_source = kwargs.get('script_source', None) + self.script_data = kwargs.get('script_data', None) + self.script_arguments = kwargs.get('script_arguments', None) + self.timeout = kwargs.get('timeout', None) + + +class ScriptsToExecute(msrest.serialization.Model): + """Customized setup scripts. + + :ivar startup_script: Script that's run every time the machine starts. + :vartype startup_script: ~azure.mgmt.machinelearningservices.models.ScriptReference + :ivar creation_script: Script that's run only once during provision of the compute. + :vartype creation_script: ~azure.mgmt.machinelearningservices.models.ScriptReference + """ + + _attribute_map = { + 'startup_script': {'key': 'startupScript', 'type': 'ScriptReference'}, + 'creation_script': {'key': 'creationScript', 'type': 'ScriptReference'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword startup_script: Script that's run every time the machine starts. + :paramtype startup_script: ~azure.mgmt.machinelearningservices.models.ScriptReference + :keyword creation_script: Script that's run only once during provision of the compute. + :paramtype creation_script: ~azure.mgmt.machinelearningservices.models.ScriptReference + """ + super(ScriptsToExecute, self).__init__(**kwargs) + self.startup_script = kwargs.get('startup_script', None) + self.creation_script = kwargs.get('creation_script', None) + + +class ServiceManagedResourcesSettings(msrest.serialization.Model): + """ServiceManagedResourcesSettings. + + :ivar cosmos_db: The settings for the service managed cosmosdb account. + :vartype cosmos_db: ~azure.mgmt.machinelearningservices.models.CosmosDbSettings + """ + + _attribute_map = { + 'cosmos_db': {'key': 'cosmosDb', 'type': 'CosmosDbSettings'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword cosmos_db: The settings for the service managed cosmosdb account. + :paramtype cosmos_db: ~azure.mgmt.machinelearningservices.models.CosmosDbSettings + """ + super(ServiceManagedResourcesSettings, self).__init__(**kwargs) + self.cosmos_db = kwargs.get('cosmos_db', None) + + +class ServicePrincipalDatastoreCredentials(DatastoreCredentials): + """Service Principal datastore credentials configuration. + + All required parameters must be populated in order to send to Azure. + + :ivar credentials_type: Required. [Required] Credential type used to authentication with + storage.Constant filled by server. Possible values include: "AccountKey", "Certificate", + "None", "Sas", "ServicePrincipal". + :vartype credentials_type: str or ~azure.mgmt.machinelearningservices.models.CredentialsType + :ivar authority_url: Authority URL used for authentication. + :vartype authority_url: str + :ivar client_id: Required. [Required] Service principal client ID. + :vartype client_id: str + :ivar resource_url: Resource the service principal has access to. + :vartype resource_url: str + :ivar secrets: Required. [Required] Service principal secrets. + :vartype secrets: ~azure.mgmt.machinelearningservices.models.ServicePrincipalDatastoreSecrets + :ivar tenant_id: Required. [Required] ID of the tenant to which the service principal belongs. + :vartype tenant_id: str + """ + + _validation = { + 'credentials_type': {'required': True}, + 'client_id': {'required': True}, + 'secrets': {'required': True}, + 'tenant_id': {'required': True}, + } + + _attribute_map = { + 'credentials_type': {'key': 'credentialsType', 'type': 'str'}, + 'authority_url': {'key': 'authorityUrl', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'resource_url': {'key': 'resourceUrl', 'type': 'str'}, + 'secrets': {'key': 'secrets', 'type': 'ServicePrincipalDatastoreSecrets'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword authority_url: Authority URL used for authentication. + :paramtype authority_url: str + :keyword client_id: Required. [Required] Service principal client ID. + :paramtype client_id: str + :keyword resource_url: Resource the service principal has access to. + :paramtype resource_url: str + :keyword secrets: Required. [Required] Service principal secrets. + :paramtype secrets: ~azure.mgmt.machinelearningservices.models.ServicePrincipalDatastoreSecrets + :keyword tenant_id: Required. [Required] ID of the tenant to which the service principal + belongs. + :paramtype tenant_id: str + """ + super(ServicePrincipalDatastoreCredentials, self).__init__(**kwargs) + self.credentials_type = 'ServicePrincipal' # type: str + self.authority_url = kwargs.get('authority_url', None) + self.client_id = kwargs['client_id'] + self.resource_url = kwargs.get('resource_url', None) + self.secrets = kwargs['secrets'] + self.tenant_id = kwargs['tenant_id'] + + +class ServicePrincipalDatastoreSecrets(DatastoreSecrets): + """Datastore Service Principal secrets. + + All required parameters must be populated in order to send to Azure. + + :ivar secrets_type: Required. [Required] Credential type used to authentication with + storage.Constant filled by server. Possible values include: "AccountKey", "Certificate", "Sas", + "ServicePrincipal". + :vartype secrets_type: str or ~azure.mgmt.machinelearningservices.models.SecretsType + :ivar client_secret: Service principal secret. + :vartype client_secret: str + """ + + _validation = { + 'secrets_type': {'required': True}, + } + + _attribute_map = { + 'secrets_type': {'key': 'secretsType', 'type': 'str'}, + 'client_secret': {'key': 'clientSecret', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword client_secret: Service principal secret. + :paramtype client_secret: str + """ + super(ServicePrincipalDatastoreSecrets, self).__init__(**kwargs) + self.secrets_type = 'ServicePrincipal' # type: str + self.client_secret = kwargs.get('client_secret', None) + + +class SetupScripts(msrest.serialization.Model): + """Details of customized scripts to execute for setting up the cluster. + + :ivar scripts: Customized setup scripts. + :vartype scripts: ~azure.mgmt.machinelearningservices.models.ScriptsToExecute + """ + + _attribute_map = { + 'scripts': {'key': 'scripts', 'type': 'ScriptsToExecute'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword scripts: Customized setup scripts. + :paramtype scripts: ~azure.mgmt.machinelearningservices.models.ScriptsToExecute + """ + super(SetupScripts, self).__init__(**kwargs) + self.scripts = kwargs.get('scripts', None) + + +class SharedPrivateLinkResource(msrest.serialization.Model): + """SharedPrivateLinkResource. + + :ivar name: Unique name of the private link. + :vartype name: str + :ivar private_link_resource_id: The resource id that private link links to. + :vartype private_link_resource_id: str + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar request_message: Request message. + :vartype request_message: str + :ivar status: Indicates whether the connection has been Approved/Rejected/Removed by the owner + of the service. Possible values include: "Pending", "Approved", "Rejected", "Disconnected", + "Timeout". + :vartype status: str or + ~azure.mgmt.machinelearningservices.models.PrivateEndpointServiceConnectionStatus + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'private_link_resource_id': {'key': 'properties.privateLinkResourceId', 'type': 'str'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'request_message': {'key': 'properties.requestMessage', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Unique name of the private link. + :paramtype name: str + :keyword private_link_resource_id: The resource id that private link links to. + :paramtype private_link_resource_id: str + :keyword group_id: The private link resource group id. + :paramtype group_id: str + :keyword request_message: Request message. + :paramtype request_message: str + :keyword status: Indicates whether the connection has been Approved/Rejected/Removed by the + owner of the service. Possible values include: "Pending", "Approved", "Rejected", + "Disconnected", "Timeout". + :paramtype status: str or + ~azure.mgmt.machinelearningservices.models.PrivateEndpointServiceConnectionStatus + """ + super(SharedPrivateLinkResource, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.private_link_resource_id = kwargs.get('private_link_resource_id', None) + self.group_id = kwargs.get('group_id', None) + self.request_message = kwargs.get('request_message', None) + self.status = kwargs.get('status', None) + + +class Sku(msrest.serialization.Model): + """The resource model definition representing SKU. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The name of the SKU. Ex - P3. It is typically a letter+number code. + :vartype name: str + :ivar tier: This field is required to be implemented by the Resource Provider if the service + has more than one tier, but is not required on a PUT. Possible values include: "Free", "Basic", + "Standard", "Premium". + :vartype tier: str or ~azure.mgmt.machinelearningservices.models.SkuTier + :ivar size: The SKU size. When the name field is the combination of tier and some other value, + this would be the standalone code. + :vartype size: str + :ivar family: If the service has different generations of hardware, for the same SKU, then that + can be captured here. + :vartype family: str + :ivar capacity: If the SKU supports scale out/in then the capacity integer should be included. + If scale out/in is not possible for the resource this may be omitted. + :vartype capacity: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Required. The name of the SKU. Ex - P3. It is typically a letter+number code. + :paramtype name: str + :keyword tier: This field is required to be implemented by the Resource Provider if the service + has more than one tier, but is not required on a PUT. Possible values include: "Free", "Basic", + "Standard", "Premium". + :paramtype tier: str or ~azure.mgmt.machinelearningservices.models.SkuTier + :keyword size: The SKU size. When the name field is the combination of tier and some other + value, this would be the standalone code. + :paramtype size: str + :keyword family: If the service has different generations of hardware, for the same SKU, then + that can be captured here. + :paramtype family: str + :keyword capacity: If the SKU supports scale out/in then the capacity integer should be + included. If scale out/in is not possible for the resource this may be omitted. + :paramtype capacity: int + """ + super(Sku, self).__init__(**kwargs) + self.name = kwargs['name'] + self.tier = kwargs.get('tier', None) + self.size = kwargs.get('size', None) + self.family = kwargs.get('family', None) + self.capacity = kwargs.get('capacity', None) + + +class SkuCapacity(msrest.serialization.Model): + """SKU capacity information. + + :ivar default: Gets or sets the default capacity. + :vartype default: int + :ivar maximum: Gets or sets the maximum. + :vartype maximum: int + :ivar minimum: Gets or sets the minimum. + :vartype minimum: int + :ivar scale_type: Gets or sets the type of the scale. Possible values include: "Automatic", + "Manual", "None". + :vartype scale_type: str or ~azure.mgmt.machinelearningservices.models.SkuScaleType + """ + + _attribute_map = { + 'default': {'key': 'default', 'type': 'int'}, + 'maximum': {'key': 'maximum', 'type': 'int'}, + 'minimum': {'key': 'minimum', 'type': 'int'}, + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword default: Gets or sets the default capacity. + :paramtype default: int + :keyword maximum: Gets or sets the maximum. + :paramtype maximum: int + :keyword minimum: Gets or sets the minimum. + :paramtype minimum: int + :keyword scale_type: Gets or sets the type of the scale. Possible values include: "Automatic", + "Manual", "None". + :paramtype scale_type: str or ~azure.mgmt.machinelearningservices.models.SkuScaleType + """ + super(SkuCapacity, self).__init__(**kwargs) + self.default = kwargs.get('default', 0) + self.maximum = kwargs.get('maximum', 0) + self.minimum = kwargs.get('minimum', 0) + self.scale_type = kwargs.get('scale_type', None) + + +class SkuResource(msrest.serialization.Model): + """Fulfills ARM Contract requirement to list all available SKUS for a resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar capacity: Gets or sets the Sku Capacity. + :vartype capacity: ~azure.mgmt.machinelearningservices.models.SkuCapacity + :ivar resource_type: The resource type name. + :vartype resource_type: str + :ivar sku: Gets or sets the Sku. + :vartype sku: ~azure.mgmt.machinelearningservices.models.SkuSetting + """ + + _validation = { + 'resource_type': {'readonly': True}, + } + + _attribute_map = { + 'capacity': {'key': 'capacity', 'type': 'SkuCapacity'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'SkuSetting'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword capacity: Gets or sets the Sku Capacity. + :paramtype capacity: ~azure.mgmt.machinelearningservices.models.SkuCapacity + :keyword sku: Gets or sets the Sku. + :paramtype sku: ~azure.mgmt.machinelearningservices.models.SkuSetting + """ + super(SkuResource, self).__init__(**kwargs) + self.capacity = kwargs.get('capacity', None) + self.resource_type = None + self.sku = kwargs.get('sku', None) + + +class SkuResourceArmPaginatedResult(msrest.serialization.Model): + """A paginated list of SkuResource entities. + + :ivar next_link: The link to the next page of SkuResource objects. If null, there are no + additional pages. + :vartype next_link: str + :ivar value: An array of objects of type SkuResource. + :vartype value: list[~azure.mgmt.machinelearningservices.models.SkuResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[SkuResource]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword next_link: The link to the next page of SkuResource objects. If null, there are no + additional pages. + :paramtype next_link: str + :keyword value: An array of objects of type SkuResource. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.SkuResource] + """ + super(SkuResourceArmPaginatedResult, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class SkuSetting(msrest.serialization.Model): + """SkuSetting fulfills the need for stripped down SKU info in ARM contract. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. [Required] The name of the SKU. Ex - P3. It is typically a letter+number + code. + :vartype name: str + :ivar tier: This field is required to be implemented by the Resource Provider if the service + has more than one tier, but is not required on a PUT. Possible values include: "Free", "Basic", + "Standard", "Premium". + :vartype tier: str or ~azure.mgmt.machinelearningservices.models.SkuTier + """ + + _validation = { + 'name': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Required. [Required] The name of the SKU. Ex - P3. It is typically a + letter+number code. + :paramtype name: str + :keyword tier: This field is required to be implemented by the Resource Provider if the service + has more than one tier, but is not required on a PUT. Possible values include: "Free", "Basic", + "Standard", "Premium". + :paramtype tier: str or ~azure.mgmt.machinelearningservices.models.SkuTier + """ + super(SkuSetting, self).__init__(**kwargs) + self.name = kwargs['name'] + self.tier = kwargs.get('tier', None) + + +class SslConfiguration(msrest.serialization.Model): + """The ssl configuration for scoring. + + :ivar status: Enable or disable ssl for scoring. Possible values include: "Disabled", + "Enabled", "Auto". + :vartype status: str or ~azure.mgmt.machinelearningservices.models.SslConfigurationStatus + :ivar cert: Cert data. + :vartype cert: str + :ivar key: Key data. + :vartype key: str + :ivar cname: CNAME of the cert. + :vartype cname: str + :ivar leaf_domain_label: Leaf domain label of public endpoint. + :vartype leaf_domain_label: str + :ivar overwrite_existing_domain: Indicates whether to overwrite existing domain label. + :vartype overwrite_existing_domain: bool + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'cert': {'key': 'cert', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'str'}, + 'cname': {'key': 'cname', 'type': 'str'}, + 'leaf_domain_label': {'key': 'leafDomainLabel', 'type': 'str'}, + 'overwrite_existing_domain': {'key': 'overwriteExistingDomain', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword status: Enable or disable ssl for scoring. Possible values include: "Disabled", + "Enabled", "Auto". + :paramtype status: str or ~azure.mgmt.machinelearningservices.models.SslConfigurationStatus + :keyword cert: Cert data. + :paramtype cert: str + :keyword key: Key data. + :paramtype key: str + :keyword cname: CNAME of the cert. + :paramtype cname: str + :keyword leaf_domain_label: Leaf domain label of public endpoint. + :paramtype leaf_domain_label: str + :keyword overwrite_existing_domain: Indicates whether to overwrite existing domain label. + :paramtype overwrite_existing_domain: bool + """ + super(SslConfiguration, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.cert = kwargs.get('cert', None) + self.key = kwargs.get('key', None) + self.cname = kwargs.get('cname', None) + self.leaf_domain_label = kwargs.get('leaf_domain_label', None) + self.overwrite_existing_domain = kwargs.get('overwrite_existing_domain', None) + + +class SweepJob(JobBaseDetails): + """Sweep job definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar compute_id: ARM resource ID of the compute resource. + :vartype compute_id: str + :ivar display_name: Display name of job. + :vartype display_name: str + :ivar experiment_name: The name of the experiment the job belongs to. If not set, the job is + placed in the "Default" experiment. + :vartype experiment_name: str + :ivar identity: Identity configuration. If set, this should be one of AmlToken, + ManagedIdentity, UserIdentity or null. + Defaults to AmlToken if null. + :vartype identity: ~azure.mgmt.machinelearningservices.models.IdentityConfiguration + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar job_type: Required. [Required] Specifies the type of job.Constant filled by server. + Possible values include: "Command", "Sweep", "Pipeline". + :vartype job_type: str or ~azure.mgmt.machinelearningservices.models.JobType + :ivar services: List of JobEndpoints. + For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + :vartype services: dict[str, ~azure.mgmt.machinelearningservices.models.JobService] + :ivar status: Status of the job. Possible values include: "NotStarted", "Starting", + "Provisioning", "Preparing", "Queued", "Running", "Finalizing", "CancelRequested", "Completed", + "Failed", "Canceled", "NotResponding", "Paused", "Unknown". + :vartype status: str or ~azure.mgmt.machinelearningservices.models.JobStatus + :ivar early_termination: Early termination policies enable canceling poor-performing runs + before they complete. + :vartype early_termination: ~azure.mgmt.machinelearningservices.models.EarlyTerminationPolicy + :ivar inputs: Mapping of input data bindings used in the job. + :vartype inputs: dict[str, ~azure.mgmt.machinelearningservices.models.JobInput] + :ivar limits: Sweep Job limit. + :vartype limits: ~azure.mgmt.machinelearningservices.models.SweepJobLimits + :ivar objective: Required. [Required] Optimization objective. + :vartype objective: ~azure.mgmt.machinelearningservices.models.Objective + :ivar outputs: Mapping of output data bindings used in the job. + :vartype outputs: dict[str, ~azure.mgmt.machinelearningservices.models.JobOutput] + :ivar sampling_algorithm: Required. [Required] The hyperparameter sampling algorithm. + :vartype sampling_algorithm: ~azure.mgmt.machinelearningservices.models.SamplingAlgorithm + :ivar search_space: Required. [Required] A dictionary containing each parameter and its + distribution. The dictionary key is the name of the parameter. + :vartype search_space: any + :ivar trial: Required. [Required] Trial component definition. + :vartype trial: ~azure.mgmt.machinelearningservices.models.TrialComponent + """ + + _validation = { + 'job_type': {'required': True}, + 'status': {'readonly': True}, + 'objective': {'required': True}, + 'sampling_algorithm': {'required': True}, + 'search_space': {'required': True}, + 'trial': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'compute_id': {'key': 'computeId', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'experiment_name': {'key': 'experimentName', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'IdentityConfiguration'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'services': {'key': 'services', 'type': '{JobService}'}, + 'status': {'key': 'status', 'type': 'str'}, + 'early_termination': {'key': 'earlyTermination', 'type': 'EarlyTerminationPolicy'}, + 'inputs': {'key': 'inputs', 'type': '{JobInput}'}, + 'limits': {'key': 'limits', 'type': 'SweepJobLimits'}, + 'objective': {'key': 'objective', 'type': 'Objective'}, + 'outputs': {'key': 'outputs', 'type': '{JobOutput}'}, + 'sampling_algorithm': {'key': 'samplingAlgorithm', 'type': 'SamplingAlgorithm'}, + 'search_space': {'key': 'searchSpace', 'type': 'object'}, + 'trial': {'key': 'trial', 'type': 'TrialComponent'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword compute_id: ARM resource ID of the compute resource. + :paramtype compute_id: str + :keyword display_name: Display name of job. + :paramtype display_name: str + :keyword experiment_name: The name of the experiment the job belongs to. If not set, the job is + placed in the "Default" experiment. + :paramtype experiment_name: str + :keyword identity: Identity configuration. If set, this should be one of AmlToken, + ManagedIdentity, UserIdentity or null. + Defaults to AmlToken if null. + :paramtype identity: ~azure.mgmt.machinelearningservices.models.IdentityConfiguration + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + :keyword services: List of JobEndpoints. + For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + :paramtype services: dict[str, ~azure.mgmt.machinelearningservices.models.JobService] + :keyword early_termination: Early termination policies enable canceling poor-performing runs + before they complete. + :paramtype early_termination: ~azure.mgmt.machinelearningservices.models.EarlyTerminationPolicy + :keyword inputs: Mapping of input data bindings used in the job. + :paramtype inputs: dict[str, ~azure.mgmt.machinelearningservices.models.JobInput] + :keyword limits: Sweep Job limit. + :paramtype limits: ~azure.mgmt.machinelearningservices.models.SweepJobLimits + :keyword objective: Required. [Required] Optimization objective. + :paramtype objective: ~azure.mgmt.machinelearningservices.models.Objective + :keyword outputs: Mapping of output data bindings used in the job. + :paramtype outputs: dict[str, ~azure.mgmt.machinelearningservices.models.JobOutput] + :keyword sampling_algorithm: Required. [Required] The hyperparameter sampling algorithm. + :paramtype sampling_algorithm: ~azure.mgmt.machinelearningservices.models.SamplingAlgorithm + :keyword search_space: Required. [Required] A dictionary containing each parameter and its + distribution. The dictionary key is the name of the parameter. + :paramtype search_space: any + :keyword trial: Required. [Required] Trial component definition. + :paramtype trial: ~azure.mgmt.machinelearningservices.models.TrialComponent + """ + super(SweepJob, self).__init__(**kwargs) + self.job_type = 'Sweep' # type: str + self.early_termination = kwargs.get('early_termination', None) + self.inputs = kwargs.get('inputs', None) + self.limits = kwargs.get('limits', None) + self.objective = kwargs['objective'] + self.outputs = kwargs.get('outputs', None) + self.sampling_algorithm = kwargs['sampling_algorithm'] + self.search_space = kwargs['search_space'] + self.trial = kwargs['trial'] + + +class SweepJobLimits(JobLimits): + """Sweep Job limit class. + + All required parameters must be populated in order to send to Azure. + + :ivar job_limits_type: Required. [Required] JobLimit type.Constant filled by server. Possible + values include: "Command", "Sweep". + :vartype job_limits_type: str or ~azure.mgmt.machinelearningservices.models.JobLimitsType + :ivar timeout: The max run duration in ISO 8601 format, after which the job will be cancelled. + Only supports duration with precision as low as Seconds. + :vartype timeout: ~datetime.timedelta + :ivar max_concurrent_trials: Sweep Job max concurrent trials. + :vartype max_concurrent_trials: int + :ivar max_total_trials: Sweep Job max total trials. + :vartype max_total_trials: int + :ivar trial_timeout: Sweep Job Trial timeout value. + :vartype trial_timeout: ~datetime.timedelta + """ + + _validation = { + 'job_limits_type': {'required': True}, + } + + _attribute_map = { + 'job_limits_type': {'key': 'jobLimitsType', 'type': 'str'}, + 'timeout': {'key': 'timeout', 'type': 'duration'}, + 'max_concurrent_trials': {'key': 'maxConcurrentTrials', 'type': 'int'}, + 'max_total_trials': {'key': 'maxTotalTrials', 'type': 'int'}, + 'trial_timeout': {'key': 'trialTimeout', 'type': 'duration'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword timeout: The max run duration in ISO 8601 format, after which the job will be + cancelled. Only supports duration with precision as low as Seconds. + :paramtype timeout: ~datetime.timedelta + :keyword max_concurrent_trials: Sweep Job max concurrent trials. + :paramtype max_concurrent_trials: int + :keyword max_total_trials: Sweep Job max total trials. + :paramtype max_total_trials: int + :keyword trial_timeout: Sweep Job Trial timeout value. + :paramtype trial_timeout: ~datetime.timedelta + """ + super(SweepJobLimits, self).__init__(**kwargs) + self.job_limits_type = 'Sweep' # type: str + self.max_concurrent_trials = kwargs.get('max_concurrent_trials', None) + self.max_total_trials = kwargs.get('max_total_trials', None) + self.trial_timeout = kwargs.get('trial_timeout', None) + + +class SynapseSpark(Compute): + """A SynapseSpark compute. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values + include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", + "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark". + :vartype compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType + :ivar compute_location: Location for the underlying compute. + :vartype compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values are Unknown, + Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating", + "Creating", "Deleting", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :ivar description: The description of the Machine Learning compute. + :vartype description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: ~datetime.datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: ~datetime.datetime + :ivar resource_id: ARM resource id of the underlying compute. + :vartype resource_id: str + :ivar provisioning_errors: Errors during provisioning. + :vartype provisioning_errors: list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought + from outside if true, or machine learning service provisioned it if false. + :vartype is_attached_compute: bool + :ivar disable_local_auth: Opt-out of local authentication and ensure customers can use only MSI + and AAD exclusively for authentication. + :vartype disable_local_auth: bool + :ivar properties: + :vartype properties: ~azure.mgmt.machinelearningservices.models.SynapseSparkProperties + """ + + _validation = { + 'compute_type': {'required': True}, + 'compute_location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'readonly': True}, + } + + _attribute_map = { + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + 'properties': {'key': 'properties', 'type': 'SynapseSparkProperties'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: The description of the Machine Learning compute. + :paramtype description: str + :keyword resource_id: ARM resource id of the underlying compute. + :paramtype resource_id: str + :keyword disable_local_auth: Opt-out of local authentication and ensure customers can use only + MSI and AAD exclusively for authentication. + :paramtype disable_local_auth: bool + :keyword properties: + :paramtype properties: ~azure.mgmt.machinelearningservices.models.SynapseSparkProperties + """ + super(SynapseSpark, self).__init__(**kwargs) + self.compute_type = 'SynapseSpark' # type: str + self.properties = kwargs.get('properties', None) + + +class SynapseSparkProperties(msrest.serialization.Model): + """SynapseSparkProperties. + + :ivar auto_scale_properties: Auto scale properties. + :vartype auto_scale_properties: ~azure.mgmt.machinelearningservices.models.AutoScaleProperties + :ivar auto_pause_properties: Auto pause properties. + :vartype auto_pause_properties: ~azure.mgmt.machinelearningservices.models.AutoPauseProperties + :ivar spark_version: Spark version. + :vartype spark_version: str + :ivar node_count: The number of compute nodes currently assigned to the compute. + :vartype node_count: int + :ivar node_size: Node size. + :vartype node_size: str + :ivar node_size_family: Node size family. + :vartype node_size_family: str + :ivar subscription_id: Azure subscription identifier. + :vartype subscription_id: str + :ivar resource_group: Name of the resource group in which workspace is located. + :vartype resource_group: str + :ivar workspace_name: Name of Azure Machine Learning workspace. + :vartype workspace_name: str + :ivar pool_name: Pool name. + :vartype pool_name: str + """ + + _attribute_map = { + 'auto_scale_properties': {'key': 'autoScaleProperties', 'type': 'AutoScaleProperties'}, + 'auto_pause_properties': {'key': 'autoPauseProperties', 'type': 'AutoPauseProperties'}, + 'spark_version': {'key': 'sparkVersion', 'type': 'str'}, + 'node_count': {'key': 'nodeCount', 'type': 'int'}, + 'node_size': {'key': 'nodeSize', 'type': 'str'}, + 'node_size_family': {'key': 'nodeSizeFamily', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'workspace_name': {'key': 'workspaceName', 'type': 'str'}, + 'pool_name': {'key': 'poolName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword auto_scale_properties: Auto scale properties. + :paramtype auto_scale_properties: + ~azure.mgmt.machinelearningservices.models.AutoScaleProperties + :keyword auto_pause_properties: Auto pause properties. + :paramtype auto_pause_properties: + ~azure.mgmt.machinelearningservices.models.AutoPauseProperties + :keyword spark_version: Spark version. + :paramtype spark_version: str + :keyword node_count: The number of compute nodes currently assigned to the compute. + :paramtype node_count: int + :keyword node_size: Node size. + :paramtype node_size: str + :keyword node_size_family: Node size family. + :paramtype node_size_family: str + :keyword subscription_id: Azure subscription identifier. + :paramtype subscription_id: str + :keyword resource_group: Name of the resource group in which workspace is located. + :paramtype resource_group: str + :keyword workspace_name: Name of Azure Machine Learning workspace. + :paramtype workspace_name: str + :keyword pool_name: Pool name. + :paramtype pool_name: str + """ + super(SynapseSparkProperties, self).__init__(**kwargs) + self.auto_scale_properties = kwargs.get('auto_scale_properties', None) + self.auto_pause_properties = kwargs.get('auto_pause_properties', None) + self.spark_version = kwargs.get('spark_version', None) + self.node_count = kwargs.get('node_count', None) + self.node_size = kwargs.get('node_size', None) + self.node_size_family = kwargs.get('node_size_family', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group = kwargs.get('resource_group', None) + self.workspace_name = kwargs.get('workspace_name', None) + self.pool_name = kwargs.get('pool_name', None) + + +class SystemData(msrest.serialization.Model): + """Metadata pertaining to creation and last modification of the resource. + + :ivar created_by: The identity that created the resource. + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource. Possible values include: + "User", "Application", "ManagedIdentity", "Key". + :vartype created_by_type: str or ~azure.mgmt.machinelearningservices.models.CreatedByType + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: ~datetime.datetime + :ivar last_modified_by: The identity that last modified the resource. + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :vartype last_modified_by_type: str or ~azure.mgmt.machinelearningservices.models.CreatedByType + :ivar last_modified_at: The timestamp of resource last modification (UTC). + :vartype last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword created_by: The identity that created the resource. + :paramtype created_by: str + :keyword created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :paramtype created_by_type: str or ~azure.mgmt.machinelearningservices.models.CreatedByType + :keyword created_at: The timestamp of resource creation (UTC). + :paramtype created_at: ~datetime.datetime + :keyword last_modified_by: The identity that last modified the resource. + :paramtype last_modified_by: str + :keyword last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :paramtype last_modified_by_type: str or + ~azure.mgmt.machinelearningservices.models.CreatedByType + :keyword last_modified_at: The timestamp of resource last modification (UTC). + :paramtype last_modified_at: ~datetime.datetime + """ + super(SystemData, self).__init__(**kwargs) + self.created_by = kwargs.get('created_by', None) + self.created_by_type = kwargs.get('created_by_type', None) + self.created_at = kwargs.get('created_at', None) + self.last_modified_by = kwargs.get('last_modified_by', None) + self.last_modified_by_type = kwargs.get('last_modified_by_type', None) + self.last_modified_at = kwargs.get('last_modified_at', None) + + +class SystemService(msrest.serialization.Model): + """A system service running on a compute. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar system_service_type: The type of this system service. + :vartype system_service_type: str + :ivar public_ip_address: Public IP address. + :vartype public_ip_address: str + :ivar version: The version for this type. + :vartype version: str + """ + + _validation = { + 'system_service_type': {'readonly': True}, + 'public_ip_address': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'system_service_type': {'key': 'systemServiceType', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(SystemService, self).__init__(**kwargs) + self.system_service_type = None + self.public_ip_address = None + self.version = None + + +class TargetUtilizationScaleSettings(OnlineScaleSettings): + """TargetUtilizationScaleSettings. + + All required parameters must be populated in order to send to Azure. + + :ivar scale_type: Required. [Required] Type of deployment scaling algorithm.Constant filled by + server. Possible values include: "Default", "TargetUtilization". + :vartype scale_type: str or ~azure.mgmt.machinelearningservices.models.ScaleType + :ivar max_instances: The maximum number of instances that the deployment can scale to. The + quota will be reserved for max_instances. + :vartype max_instances: int + :ivar min_instances: The minimum number of instances to always be present. + :vartype min_instances: int + :ivar polling_interval: The polling interval in ISO 8691 format. Only supports duration with + precision as low as Seconds. + :vartype polling_interval: ~datetime.timedelta + :ivar target_utilization_percentage: Target CPU usage for the autoscaler. + :vartype target_utilization_percentage: int + """ + + _validation = { + 'scale_type': {'required': True}, + } + + _attribute_map = { + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + 'max_instances': {'key': 'maxInstances', 'type': 'int'}, + 'min_instances': {'key': 'minInstances', 'type': 'int'}, + 'polling_interval': {'key': 'pollingInterval', 'type': 'duration'}, + 'target_utilization_percentage': {'key': 'targetUtilizationPercentage', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword max_instances: The maximum number of instances that the deployment can scale to. The + quota will be reserved for max_instances. + :paramtype max_instances: int + :keyword min_instances: The minimum number of instances to always be present. + :paramtype min_instances: int + :keyword polling_interval: The polling interval in ISO 8691 format. Only supports duration with + precision as low as Seconds. + :paramtype polling_interval: ~datetime.timedelta + :keyword target_utilization_percentage: Target CPU usage for the autoscaler. + :paramtype target_utilization_percentage: int + """ + super(TargetUtilizationScaleSettings, self).__init__(**kwargs) + self.scale_type = 'TargetUtilization' # type: str + self.max_instances = kwargs.get('max_instances', 1) + self.min_instances = kwargs.get('min_instances', 1) + self.polling_interval = kwargs.get('polling_interval', "PT1S") + self.target_utilization_percentage = kwargs.get('target_utilization_percentage', 70) + + +class TensorFlow(DistributionConfiguration): + """TensorFlow distribution configuration. + + All required parameters must be populated in order to send to Azure. + + :ivar distribution_type: Required. [Required] Specifies the type of distribution + framework.Constant filled by server. Possible values include: "PyTorch", "TensorFlow", "Mpi". + :vartype distribution_type: str or ~azure.mgmt.machinelearningservices.models.DistributionType + :ivar parameter_server_count: Number of parameter server tasks. + :vartype parameter_server_count: int + :ivar worker_count: Number of workers. If not specified, will default to the instance count. + :vartype worker_count: int + """ + + _validation = { + 'distribution_type': {'required': True}, + } + + _attribute_map = { + 'distribution_type': {'key': 'distributionType', 'type': 'str'}, + 'parameter_server_count': {'key': 'parameterServerCount', 'type': 'int'}, + 'worker_count': {'key': 'workerCount', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword parameter_server_count: Number of parameter server tasks. + :paramtype parameter_server_count: int + :keyword worker_count: Number of workers. If not specified, will default to the instance count. + :paramtype worker_count: int + """ + super(TensorFlow, self).__init__(**kwargs) + self.distribution_type = 'TensorFlow' # type: str + self.parameter_server_count = kwargs.get('parameter_server_count', 0) + self.worker_count = kwargs.get('worker_count', None) + + +class TrialComponent(msrest.serialization.Model): + """Trial component definition. + + All required parameters must be populated in order to send to Azure. + + :ivar code_id: ARM resource ID of the code asset. + :vartype code_id: str + :ivar command: Required. [Required] The command to execute on startup of the job. eg. "python + train.py". + :vartype command: str + :ivar distribution: Distribution configuration of the job. If set, this should be one of Mpi, + Tensorflow, PyTorch, or null. + :vartype distribution: ~azure.mgmt.machinelearningservices.models.DistributionConfiguration + :ivar environment_id: Required. [Required] The ARM resource ID of the Environment specification + for the job. + :vartype environment_id: str + :ivar environment_variables: Environment variables included in the job. + :vartype environment_variables: dict[str, str] + :ivar resources: Compute Resource configuration for the job. + :vartype resources: ~azure.mgmt.machinelearningservices.models.ResourceConfiguration + """ + + _validation = { + 'command': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + 'environment_id': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + } + + _attribute_map = { + 'code_id': {'key': 'codeId', 'type': 'str'}, + 'command': {'key': 'command', 'type': 'str'}, + 'distribution': {'key': 'distribution', 'type': 'DistributionConfiguration'}, + 'environment_id': {'key': 'environmentId', 'type': 'str'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, + 'resources': {'key': 'resources', 'type': 'ResourceConfiguration'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword code_id: ARM resource ID of the code asset. + :paramtype code_id: str + :keyword command: Required. [Required] The command to execute on startup of the job. eg. + "python train.py". + :paramtype command: str + :keyword distribution: Distribution configuration of the job. If set, this should be one of + Mpi, Tensorflow, PyTorch, or null. + :paramtype distribution: ~azure.mgmt.machinelearningservices.models.DistributionConfiguration + :keyword environment_id: Required. [Required] The ARM resource ID of the Environment + specification for the job. + :paramtype environment_id: str + :keyword environment_variables: Environment variables included in the job. + :paramtype environment_variables: dict[str, str] + :keyword resources: Compute Resource configuration for the job. + :paramtype resources: ~azure.mgmt.machinelearningservices.models.ResourceConfiguration + """ + super(TrialComponent, self).__init__(**kwargs) + self.code_id = kwargs.get('code_id', None) + self.command = kwargs['command'] + self.distribution = kwargs.get('distribution', None) + self.environment_id = kwargs['environment_id'] + self.environment_variables = kwargs.get('environment_variables', None) + self.resources = kwargs.get('resources', None) + + +class TritonModelJobInput(JobInput, AssetJobInput): + """TritonModelJobInput. + + All required parameters must be populated in order to send to Azure. + + :ivar mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", + "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". + :vartype mode: str or ~azure.mgmt.machinelearningservices.models.InputDeliveryMode + :ivar uri: Required. [Required] Input Asset URI. + :vartype uri: str + :ivar description: Description for the input. + :vartype description: str + :ivar job_input_type: Required. [Required] Specifies the type of job.Constant filled by server. + Possible values include: "literal", "uri_file", "uri_folder", "mltable", "custom_model", + "mlflow_model", "triton_model". + :vartype job_input_type: str or ~azure.mgmt.machinelearningservices.models.JobInputType + """ + + _validation = { + 'uri': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + 'job_input_type': {'required': True}, + } + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'job_input_type': {'key': 'jobInputType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", + "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". + :paramtype mode: str or ~azure.mgmt.machinelearningservices.models.InputDeliveryMode + :keyword uri: Required. [Required] Input Asset URI. + :paramtype uri: str + :keyword description: Description for the input. + :paramtype description: str + """ + super(TritonModelJobInput, self).__init__(**kwargs) + self.mode = kwargs.get('mode', None) + self.uri = kwargs['uri'] + self.job_input_type = 'triton_model' # type: str + self.description = kwargs.get('description', None) + self.job_input_type = 'triton_model' # type: str + + +class TritonModelJobOutput(JobOutput, AssetJobOutput): + """TritonModelJobOutput. + + All required parameters must be populated in order to send to Azure. + + :ivar mode: Output Asset Delivery Mode. Possible values include: "ReadWriteMount", "Upload". + :vartype mode: str or ~azure.mgmt.machinelearningservices.models.OutputDeliveryMode + :ivar uri: Output Asset URI. + :vartype uri: str + :ivar description: Description for the output. + :vartype description: str + :ivar job_output_type: Required. [Required] Specifies the type of job.Constant filled by + server. Possible values include: "uri_file", "uri_folder", "mltable", "custom_model", + "mlflow_model", "triton_model". + :vartype job_output_type: str or ~azure.mgmt.machinelearningservices.models.JobOutputType + """ + + _validation = { + 'job_output_type': {'required': True}, + } + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'job_output_type': {'key': 'jobOutputType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword mode: Output Asset Delivery Mode. Possible values include: "ReadWriteMount", "Upload". + :paramtype mode: str or ~azure.mgmt.machinelearningservices.models.OutputDeliveryMode + :keyword uri: Output Asset URI. + :paramtype uri: str + :keyword description: Description for the output. + :paramtype description: str + """ + super(TritonModelJobOutput, self).__init__(**kwargs) + self.mode = kwargs.get('mode', None) + self.uri = kwargs.get('uri', None) + self.job_output_type = 'triton_model' # type: str + self.description = kwargs.get('description', None) + self.job_output_type = 'triton_model' # type: str + + +class TruncationSelectionPolicy(EarlyTerminationPolicy): + """Defines an early termination policy that cancels a given percentage of runs at each evaluation interval. + + All required parameters must be populated in order to send to Azure. + + :ivar delay_evaluation: Number of intervals by which to delay the first evaluation. + :vartype delay_evaluation: int + :ivar evaluation_interval: Interval (number of runs) between policy evaluations. + :vartype evaluation_interval: int + :ivar policy_type: Required. [Required] Name of policy configuration.Constant filled by server. + Possible values include: "Bandit", "MedianStopping", "TruncationSelection". + :vartype policy_type: str or + ~azure.mgmt.machinelearningservices.models.EarlyTerminationPolicyType + :ivar truncation_percentage: The percentage of runs to cancel at each evaluation interval. + :vartype truncation_percentage: int + """ + + _validation = { + 'policy_type': {'required': True}, + } + + _attribute_map = { + 'delay_evaluation': {'key': 'delayEvaluation', 'type': 'int'}, + 'evaluation_interval': {'key': 'evaluationInterval', 'type': 'int'}, + 'policy_type': {'key': 'policyType', 'type': 'str'}, + 'truncation_percentage': {'key': 'truncationPercentage', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword delay_evaluation: Number of intervals by which to delay the first evaluation. + :paramtype delay_evaluation: int + :keyword evaluation_interval: Interval (number of runs) between policy evaluations. + :paramtype evaluation_interval: int + :keyword truncation_percentage: The percentage of runs to cancel at each evaluation interval. + :paramtype truncation_percentage: int + """ + super(TruncationSelectionPolicy, self).__init__(**kwargs) + self.policy_type = 'TruncationSelection' # type: str + self.truncation_percentage = kwargs.get('truncation_percentage', 0) + + +class UpdateWorkspaceQuotas(msrest.serialization.Model): + """The properties for update Quota response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Specifies the resource ID. + :vartype id: str + :ivar type: Specifies the resource type. + :vartype type: str + :ivar limit: The maximum permitted quota of the resource. + :vartype limit: long + :ivar unit: An enum describing the unit of quota measurement. Possible values include: "Count". + :vartype unit: str or ~azure.mgmt.machinelearningservices.models.QuotaUnit + :ivar status: Status of update workspace quota. Possible values include: "Undefined", + "Success", "Failure", "InvalidQuotaBelowClusterMinimum", + "InvalidQuotaExceedsSubscriptionLimit", "InvalidVMFamilyName", "OperationNotSupportedForSku", + "OperationNotEnabledForRegion". + :vartype status: str or ~azure.mgmt.machinelearningservices.models.Status + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword limit: The maximum permitted quota of the resource. + :paramtype limit: long + :keyword status: Status of update workspace quota. Possible values include: "Undefined", + "Success", "Failure", "InvalidQuotaBelowClusterMinimum", + "InvalidQuotaExceedsSubscriptionLimit", "InvalidVMFamilyName", "OperationNotSupportedForSku", + "OperationNotEnabledForRegion". + :paramtype status: str or ~azure.mgmt.machinelearningservices.models.Status + """ + super(UpdateWorkspaceQuotas, self).__init__(**kwargs) + self.id = None + self.type = None + self.limit = kwargs.get('limit', None) + self.unit = None + self.status = kwargs.get('status', None) + + +class UpdateWorkspaceQuotasResult(msrest.serialization.Model): + """The result of update workspace quota. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of workspace quota update result. + :vartype value: list[~azure.mgmt.machinelearningservices.models.UpdateWorkspaceQuotas] + :ivar next_link: The URI to fetch the next page of workspace quota update result. Call + ListNext() with this to fetch the next page of Workspace Quota update result. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[UpdateWorkspaceQuotas]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(UpdateWorkspaceQuotasResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class UriFileDataVersion(DataVersionBaseDetails): + """uri-file data version entity. + + All required parameters must be populated in order to send to Azure. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar is_anonymous: If the name version are system generated (anonymous registration). + :vartype is_anonymous: bool + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar data_type: Required. [Required] Specifies the type of data.Constant filled by server. + Possible values include: "uri_file", "uri_folder", "mltable". + :vartype data_type: str or ~azure.mgmt.machinelearningservices.models.DataType + :ivar data_uri: Required. [Required] Uri of the data. Usage/meaning depends on + Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220501.Assets.DataVersionBase.DataType. + :vartype data_uri: str + """ + + _validation = { + 'data_type': {'required': True}, + 'data_uri': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + 'data_uri': {'key': 'dataUri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword is_anonymous: If the name version are system generated (anonymous registration). + :paramtype is_anonymous: bool + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + :keyword data_uri: Required. [Required] Uri of the data. Usage/meaning depends on + Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220501.Assets.DataVersionBase.DataType. + :paramtype data_uri: str + """ + super(UriFileDataVersion, self).__init__(**kwargs) + self.data_type = 'uri_file' # type: str + + +class UriFileJobInput(JobInput, AssetJobInput): + """UriFileJobInput. + + All required parameters must be populated in order to send to Azure. + + :ivar mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", + "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". + :vartype mode: str or ~azure.mgmt.machinelearningservices.models.InputDeliveryMode + :ivar uri: Required. [Required] Input Asset URI. + :vartype uri: str + :ivar description: Description for the input. + :vartype description: str + :ivar job_input_type: Required. [Required] Specifies the type of job.Constant filled by server. + Possible values include: "literal", "uri_file", "uri_folder", "mltable", "custom_model", + "mlflow_model", "triton_model". + :vartype job_input_type: str or ~azure.mgmt.machinelearningservices.models.JobInputType + """ + + _validation = { + 'uri': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + 'job_input_type': {'required': True}, + } + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'job_input_type': {'key': 'jobInputType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", + "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". + :paramtype mode: str or ~azure.mgmt.machinelearningservices.models.InputDeliveryMode + :keyword uri: Required. [Required] Input Asset URI. + :paramtype uri: str + :keyword description: Description for the input. + :paramtype description: str + """ + super(UriFileJobInput, self).__init__(**kwargs) + self.mode = kwargs.get('mode', None) + self.uri = kwargs['uri'] + self.job_input_type = 'uri_file' # type: str + self.description = kwargs.get('description', None) + self.job_input_type = 'uri_file' # type: str + + +class UriFileJobOutput(JobOutput, AssetJobOutput): + """UriFileJobOutput. + + All required parameters must be populated in order to send to Azure. + + :ivar mode: Output Asset Delivery Mode. Possible values include: "ReadWriteMount", "Upload". + :vartype mode: str or ~azure.mgmt.machinelearningservices.models.OutputDeliveryMode + :ivar uri: Output Asset URI. + :vartype uri: str + :ivar description: Description for the output. + :vartype description: str + :ivar job_output_type: Required. [Required] Specifies the type of job.Constant filled by + server. Possible values include: "uri_file", "uri_folder", "mltable", "custom_model", + "mlflow_model", "triton_model". + :vartype job_output_type: str or ~azure.mgmt.machinelearningservices.models.JobOutputType + """ + + _validation = { + 'job_output_type': {'required': True}, + } + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'job_output_type': {'key': 'jobOutputType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword mode: Output Asset Delivery Mode. Possible values include: "ReadWriteMount", "Upload". + :paramtype mode: str or ~azure.mgmt.machinelearningservices.models.OutputDeliveryMode + :keyword uri: Output Asset URI. + :paramtype uri: str + :keyword description: Description for the output. + :paramtype description: str + """ + super(UriFileJobOutput, self).__init__(**kwargs) + self.mode = kwargs.get('mode', None) + self.uri = kwargs.get('uri', None) + self.job_output_type = 'uri_file' # type: str + self.description = kwargs.get('description', None) + self.job_output_type = 'uri_file' # type: str + + +class UriFolderDataVersion(DataVersionBaseDetails): + """uri-folder data version entity. + + All required parameters must be populated in order to send to Azure. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar is_anonymous: If the name version are system generated (anonymous registration). + :vartype is_anonymous: bool + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar data_type: Required. [Required] Specifies the type of data.Constant filled by server. + Possible values include: "uri_file", "uri_folder", "mltable". + :vartype data_type: str or ~azure.mgmt.machinelearningservices.models.DataType + :ivar data_uri: Required. [Required] Uri of the data. Usage/meaning depends on + Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220501.Assets.DataVersionBase.DataType. + :vartype data_uri: str + """ + + _validation = { + 'data_type': {'required': True}, + 'data_uri': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + 'data_uri': {'key': 'dataUri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword is_anonymous: If the name version are system generated (anonymous registration). + :paramtype is_anonymous: bool + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + :keyword data_uri: Required. [Required] Uri of the data. Usage/meaning depends on + Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220501.Assets.DataVersionBase.DataType. + :paramtype data_uri: str + """ + super(UriFolderDataVersion, self).__init__(**kwargs) + self.data_type = 'uri_folder' # type: str + + +class UriFolderJobInput(JobInput, AssetJobInput): + """UriFolderJobInput. + + All required parameters must be populated in order to send to Azure. + + :ivar mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", + "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". + :vartype mode: str or ~azure.mgmt.machinelearningservices.models.InputDeliveryMode + :ivar uri: Required. [Required] Input Asset URI. + :vartype uri: str + :ivar description: Description for the input. + :vartype description: str + :ivar job_input_type: Required. [Required] Specifies the type of job.Constant filled by server. + Possible values include: "literal", "uri_file", "uri_folder", "mltable", "custom_model", + "mlflow_model", "triton_model". + :vartype job_input_type: str or ~azure.mgmt.machinelearningservices.models.JobInputType + """ + + _validation = { + 'uri': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + 'job_input_type': {'required': True}, + } + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'job_input_type': {'key': 'jobInputType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", + "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". + :paramtype mode: str or ~azure.mgmt.machinelearningservices.models.InputDeliveryMode + :keyword uri: Required. [Required] Input Asset URI. + :paramtype uri: str + :keyword description: Description for the input. + :paramtype description: str + """ + super(UriFolderJobInput, self).__init__(**kwargs) + self.mode = kwargs.get('mode', None) + self.uri = kwargs['uri'] + self.job_input_type = 'uri_folder' # type: str + self.description = kwargs.get('description', None) + self.job_input_type = 'uri_folder' # type: str + + +class UriFolderJobOutput(JobOutput, AssetJobOutput): + """UriFolderJobOutput. + + All required parameters must be populated in order to send to Azure. + + :ivar mode: Output Asset Delivery Mode. Possible values include: "ReadWriteMount", "Upload". + :vartype mode: str or ~azure.mgmt.machinelearningservices.models.OutputDeliveryMode + :ivar uri: Output Asset URI. + :vartype uri: str + :ivar description: Description for the output. + :vartype description: str + :ivar job_output_type: Required. [Required] Specifies the type of job.Constant filled by + server. Possible values include: "uri_file", "uri_folder", "mltable", "custom_model", + "mlflow_model", "triton_model". + :vartype job_output_type: str or ~azure.mgmt.machinelearningservices.models.JobOutputType + """ + + _validation = { + 'job_output_type': {'required': True}, + } + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'job_output_type': {'key': 'jobOutputType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword mode: Output Asset Delivery Mode. Possible values include: "ReadWriteMount", "Upload". + :paramtype mode: str or ~azure.mgmt.machinelearningservices.models.OutputDeliveryMode + :keyword uri: Output Asset URI. + :paramtype uri: str + :keyword description: Description for the output. + :paramtype description: str + """ + super(UriFolderJobOutput, self).__init__(**kwargs) + self.mode = kwargs.get('mode', None) + self.uri = kwargs.get('uri', None) + self.job_output_type = 'uri_folder' # type: str + self.description = kwargs.get('description', None) + self.job_output_type = 'uri_folder' # type: str + + +class Usage(msrest.serialization.Model): + """Describes AML Resource Usage. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Specifies the resource ID. + :vartype id: str + :ivar aml_workspace_location: Region of the AML workspace in the id. + :vartype aml_workspace_location: str + :ivar type: Specifies the resource type. + :vartype type: str + :ivar unit: An enum describing the unit of usage measurement. Possible values include: "Count". + :vartype unit: str or ~azure.mgmt.machinelearningservices.models.UsageUnit + :ivar current_value: The current usage of the resource. + :vartype current_value: long + :ivar limit: The maximum permitted usage of the resource. + :vartype limit: long + :ivar name: The name of the type of usage. + :vartype name: ~azure.mgmt.machinelearningservices.models.UsageName + """ + + _validation = { + 'id': {'readonly': True}, + 'aml_workspace_location': {'readonly': True}, + 'type': {'readonly': True}, + 'unit': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'aml_workspace_location': {'key': 'amlWorkspaceLocation', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(Usage, self).__init__(**kwargs) + self.id = None + self.aml_workspace_location = None + self.type = None + self.unit = None + self.current_value = None + self.limit = None + self.name = None + + +class UsageName(msrest.serialization.Model): + """The Usage Names. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The name of the resource. + :vartype value: str + :ivar localized_value: The localized name of the resource. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(UsageName, self).__init__(**kwargs) + self.value = None + self.localized_value = None + + +class UserAccountCredentials(msrest.serialization.Model): + """Settings for user account that gets created on each on the nodes of a compute. + + All required parameters must be populated in order to send to Azure. + + :ivar admin_user_name: Required. Name of the administrator user account which can be used to + SSH to nodes. + :vartype admin_user_name: str + :ivar admin_user_ssh_public_key: SSH public key of the administrator user account. + :vartype admin_user_ssh_public_key: str + :ivar admin_user_password: Password of the administrator user account. + :vartype admin_user_password: str + """ + + _validation = { + 'admin_user_name': {'required': True}, + } + + _attribute_map = { + 'admin_user_name': {'key': 'adminUserName', 'type': 'str'}, + 'admin_user_ssh_public_key': {'key': 'adminUserSshPublicKey', 'type': 'str'}, + 'admin_user_password': {'key': 'adminUserPassword', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword admin_user_name: Required. Name of the administrator user account which can be used to + SSH to nodes. + :paramtype admin_user_name: str + :keyword admin_user_ssh_public_key: SSH public key of the administrator user account. + :paramtype admin_user_ssh_public_key: str + :keyword admin_user_password: Password of the administrator user account. + :paramtype admin_user_password: str + """ + super(UserAccountCredentials, self).__init__(**kwargs) + self.admin_user_name = kwargs['admin_user_name'] + self.admin_user_ssh_public_key = kwargs.get('admin_user_ssh_public_key', None) + self.admin_user_password = kwargs.get('admin_user_password', None) + + +class UserAssignedIdentity(msrest.serialization.Model): + """User assigned identity properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal ID of the assigned identity. + :vartype principal_id: str + :ivar client_id: The client ID of the assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(UserAssignedIdentity, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class UserIdentity(IdentityConfiguration): + """User identity configuration. + + All required parameters must be populated in order to send to Azure. + + :ivar identity_type: Required. [Required] Specifies the type of identity framework.Constant + filled by server. Possible values include: "Managed", "AMLToken", "UserIdentity". + :vartype identity_type: str or + ~azure.mgmt.machinelearningservices.models.IdentityConfigurationType + """ + + _validation = { + 'identity_type': {'required': True}, + } + + _attribute_map = { + 'identity_type': {'key': 'identityType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(UserIdentity, self).__init__(**kwargs) + self.identity_type = 'UserIdentity' # type: str + + +class UsernamePasswordAuthTypeWorkspaceConnectionProperties(WorkspaceConnectionPropertiesV2): + """UsernamePasswordAuthTypeWorkspaceConnectionProperties. + + All required parameters must be populated in order to send to Azure. + + :ivar auth_type: Required. Authentication type of the connection target.Constant filled by + server. Possible values include: "PAT", "ManagedIdentity", "UsernamePassword", "None", "SAS". + :vartype auth_type: str or ~azure.mgmt.machinelearningservices.models.ConnectionAuthType + :ivar category: Category of the connection. Possible values include: "PythonFeed", + "ContainerRegistry", "Git". + :vartype category: str or ~azure.mgmt.machinelearningservices.models.ConnectionCategory + :ivar target: + :vartype target: str + :ivar value: Value details of the workspace connection. + :vartype value: str + :ivar value_format: format for the workspace connection value. Possible values include: "JSON". + :vartype value_format: str or ~azure.mgmt.machinelearningservices.models.ValueFormat + :ivar credentials: + :vartype credentials: + ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionUsernamePassword + """ + + _validation = { + 'auth_type': {'required': True}, + } + + _attribute_map = { + 'auth_type': {'key': 'authType', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'value_format': {'key': 'valueFormat', 'type': 'str'}, + 'credentials': {'key': 'credentials', 'type': 'WorkspaceConnectionUsernamePassword'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword category: Category of the connection. Possible values include: "PythonFeed", + "ContainerRegistry", "Git". + :paramtype category: str or ~azure.mgmt.machinelearningservices.models.ConnectionCategory + :keyword target: + :paramtype target: str + :keyword value: Value details of the workspace connection. + :paramtype value: str + :keyword value_format: format for the workspace connection value. Possible values include: + "JSON". + :paramtype value_format: str or ~azure.mgmt.machinelearningservices.models.ValueFormat + :keyword credentials: + :paramtype credentials: + ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionUsernamePassword + """ + super(UsernamePasswordAuthTypeWorkspaceConnectionProperties, self).__init__(**kwargs) + self.auth_type = 'UsernamePassword' # type: str + self.credentials = kwargs.get('credentials', None) + + +class VirtualMachineSchema(msrest.serialization.Model): + """VirtualMachineSchema. + + :ivar properties: + :vartype properties: ~azure.mgmt.machinelearningservices.models.VirtualMachineSchemaProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'VirtualMachineSchemaProperties'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: + :paramtype properties: + ~azure.mgmt.machinelearningservices.models.VirtualMachineSchemaProperties + """ + super(VirtualMachineSchema, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class VirtualMachine(Compute, VirtualMachineSchema): + """A Machine Learning compute based on Azure Virtual Machines. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar properties: + :vartype properties: ~azure.mgmt.machinelearningservices.models.VirtualMachineSchemaProperties + :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values + include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", + "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark". + :vartype compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType + :ivar compute_location: Location for the underlying compute. + :vartype compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values are Unknown, + Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating", + "Creating", "Deleting", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :ivar description: The description of the Machine Learning compute. + :vartype description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: ~datetime.datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: ~datetime.datetime + :ivar resource_id: ARM resource id of the underlying compute. + :vartype resource_id: str + :ivar provisioning_errors: Errors during provisioning. + :vartype provisioning_errors: list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought + from outside if true, or machine learning service provisioned it if false. + :vartype is_attached_compute: bool + :ivar disable_local_auth: Opt-out of local authentication and ensure customers can use only MSI + and AAD exclusively for authentication. + :vartype disable_local_auth: bool + """ + + _validation = { + 'compute_type': {'required': True}, + 'compute_location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'VirtualMachineSchemaProperties'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: + :paramtype properties: + ~azure.mgmt.machinelearningservices.models.VirtualMachineSchemaProperties + :keyword description: The description of the Machine Learning compute. + :paramtype description: str + :keyword resource_id: ARM resource id of the underlying compute. + :paramtype resource_id: str + :keyword disable_local_auth: Opt-out of local authentication and ensure customers can use only + MSI and AAD exclusively for authentication. + :paramtype disable_local_auth: bool + """ + super(VirtualMachine, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.compute_type = 'VirtualMachine' # type: str + self.compute_type = 'VirtualMachine' # type: str + self.compute_location = None + self.provisioning_state = None + self.description = kwargs.get('description', None) + self.created_on = None + self.modified_on = None + self.resource_id = kwargs.get('resource_id', None) + self.provisioning_errors = None + self.is_attached_compute = None + self.disable_local_auth = kwargs.get('disable_local_auth', None) + + +class VirtualMachineImage(msrest.serialization.Model): + """Virtual Machine image for Windows AML Compute. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Required. Virtual Machine image path. + :vartype id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: Required. Virtual Machine image path. + :paramtype id: str + """ + super(VirtualMachineImage, self).__init__(**kwargs) + self.id = kwargs['id'] + + +class VirtualMachineSchemaProperties(msrest.serialization.Model): + """VirtualMachineSchemaProperties. + + :ivar virtual_machine_size: Virtual Machine size. + :vartype virtual_machine_size: str + :ivar ssh_port: Port open for ssh connections. + :vartype ssh_port: int + :ivar notebook_server_port: Notebook server port open for ssh connections. + :vartype notebook_server_port: int + :ivar address: Public IP address of the virtual machine. + :vartype address: str + :ivar administrator_account: Admin credentials for virtual machine. + :vartype administrator_account: + ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials + :ivar is_notebook_instance_compute: Indicates whether this compute will be used for running + notebooks. + :vartype is_notebook_instance_compute: bool + """ + + _attribute_map = { + 'virtual_machine_size': {'key': 'virtualMachineSize', 'type': 'str'}, + 'ssh_port': {'key': 'sshPort', 'type': 'int'}, + 'notebook_server_port': {'key': 'notebookServerPort', 'type': 'int'}, + 'address': {'key': 'address', 'type': 'str'}, + 'administrator_account': {'key': 'administratorAccount', 'type': 'VirtualMachineSshCredentials'}, + 'is_notebook_instance_compute': {'key': 'isNotebookInstanceCompute', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword virtual_machine_size: Virtual Machine size. + :paramtype virtual_machine_size: str + :keyword ssh_port: Port open for ssh connections. + :paramtype ssh_port: int + :keyword notebook_server_port: Notebook server port open for ssh connections. + :paramtype notebook_server_port: int + :keyword address: Public IP address of the virtual machine. + :paramtype address: str + :keyword administrator_account: Admin credentials for virtual machine. + :paramtype administrator_account: + ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials + :keyword is_notebook_instance_compute: Indicates whether this compute will be used for running + notebooks. + :paramtype is_notebook_instance_compute: bool + """ + super(VirtualMachineSchemaProperties, self).__init__(**kwargs) + self.virtual_machine_size = kwargs.get('virtual_machine_size', None) + self.ssh_port = kwargs.get('ssh_port', None) + self.notebook_server_port = kwargs.get('notebook_server_port', None) + self.address = kwargs.get('address', None) + self.administrator_account = kwargs.get('administrator_account', None) + self.is_notebook_instance_compute = kwargs.get('is_notebook_instance_compute', None) + + +class VirtualMachineSecretsSchema(msrest.serialization.Model): + """VirtualMachineSecretsSchema. + + :ivar administrator_account: Admin credentials for virtual machine. + :vartype administrator_account: + ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials + """ + + _attribute_map = { + 'administrator_account': {'key': 'administratorAccount', 'type': 'VirtualMachineSshCredentials'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword administrator_account: Admin credentials for virtual machine. + :paramtype administrator_account: + ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials + """ + super(VirtualMachineSecretsSchema, self).__init__(**kwargs) + self.administrator_account = kwargs.get('administrator_account', None) + + +class VirtualMachineSecrets(ComputeSecrets, VirtualMachineSecretsSchema): + """Secrets related to a Machine Learning compute based on AKS. + + All required parameters must be populated in order to send to Azure. + + :ivar administrator_account: Admin credentials for virtual machine. + :vartype administrator_account: + ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials + :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values + include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", + "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark". + :vartype compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType + """ + + _validation = { + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'administrator_account': {'key': 'administratorAccount', 'type': 'VirtualMachineSshCredentials'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword administrator_account: Admin credentials for virtual machine. + :paramtype administrator_account: + ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials + """ + super(VirtualMachineSecrets, self).__init__(**kwargs) + self.administrator_account = kwargs.get('administrator_account', None) + self.compute_type = 'VirtualMachine' # type: str + self.compute_type = 'VirtualMachine' # type: str + + +class VirtualMachineSize(msrest.serialization.Model): + """Describes the properties of a VM size. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the virtual machine size. + :vartype name: str + :ivar family: The family name of the virtual machine size. + :vartype family: str + :ivar v_cp_us: The number of vCPUs supported by the virtual machine size. + :vartype v_cp_us: int + :ivar gpus: The number of gPUs supported by the virtual machine size. + :vartype gpus: int + :ivar os_vhd_size_mb: The OS VHD disk size, in MB, allowed by the virtual machine size. + :vartype os_vhd_size_mb: int + :ivar max_resource_volume_mb: The resource volume size, in MB, allowed by the virtual machine + size. + :vartype max_resource_volume_mb: int + :ivar memory_gb: The amount of memory, in GB, supported by the virtual machine size. + :vartype memory_gb: float + :ivar low_priority_capable: Specifies if the virtual machine size supports low priority VMs. + :vartype low_priority_capable: bool + :ivar premium_io: Specifies if the virtual machine size supports premium IO. + :vartype premium_io: bool + :ivar estimated_vm_prices: The estimated price information for using a VM. + :vartype estimated_vm_prices: ~azure.mgmt.machinelearningservices.models.EstimatedVMPrices + :ivar supported_compute_types: Specifies the compute types supported by the virtual machine + size. + :vartype supported_compute_types: list[str] + """ + + _validation = { + 'name': {'readonly': True}, + 'family': {'readonly': True}, + 'v_cp_us': {'readonly': True}, + 'gpus': {'readonly': True}, + 'os_vhd_size_mb': {'readonly': True}, + 'max_resource_volume_mb': {'readonly': True}, + 'memory_gb': {'readonly': True}, + 'low_priority_capable': {'readonly': True}, + 'premium_io': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'v_cp_us': {'key': 'vCPUs', 'type': 'int'}, + 'gpus': {'key': 'gpus', 'type': 'int'}, + 'os_vhd_size_mb': {'key': 'osVhdSizeMB', 'type': 'int'}, + 'max_resource_volume_mb': {'key': 'maxResourceVolumeMB', 'type': 'int'}, + 'memory_gb': {'key': 'memoryGB', 'type': 'float'}, + 'low_priority_capable': {'key': 'lowPriorityCapable', 'type': 'bool'}, + 'premium_io': {'key': 'premiumIO', 'type': 'bool'}, + 'estimated_vm_prices': {'key': 'estimatedVMPrices', 'type': 'EstimatedVMPrices'}, + 'supported_compute_types': {'key': 'supportedComputeTypes', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword estimated_vm_prices: The estimated price information for using a VM. + :paramtype estimated_vm_prices: ~azure.mgmt.machinelearningservices.models.EstimatedVMPrices + :keyword supported_compute_types: Specifies the compute types supported by the virtual machine + size. + :paramtype supported_compute_types: list[str] + """ + super(VirtualMachineSize, self).__init__(**kwargs) + self.name = None + self.family = None + self.v_cp_us = None + self.gpus = None + self.os_vhd_size_mb = None + self.max_resource_volume_mb = None + self.memory_gb = None + self.low_priority_capable = None + self.premium_io = None + self.estimated_vm_prices = kwargs.get('estimated_vm_prices', None) + self.supported_compute_types = kwargs.get('supported_compute_types', None) + + +class VirtualMachineSizeListResult(msrest.serialization.Model): + """The List Virtual Machine size operation response. + + :ivar value: The list of virtual machine sizes supported by AmlCompute. + :vartype value: list[~azure.mgmt.machinelearningservices.models.VirtualMachineSize] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualMachineSize]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword value: The list of virtual machine sizes supported by AmlCompute. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.VirtualMachineSize] + """ + super(VirtualMachineSizeListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class VirtualMachineSshCredentials(msrest.serialization.Model): + """Admin credentials for virtual machine. + + :ivar username: Username of admin account. + :vartype username: str + :ivar password: Password of admin account. + :vartype password: str + :ivar public_key_data: Public key data. + :vartype public_key_data: str + :ivar private_key_data: Private key data. + :vartype private_key_data: str + """ + + _attribute_map = { + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'public_key_data': {'key': 'publicKeyData', 'type': 'str'}, + 'private_key_data': {'key': 'privateKeyData', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword username: Username of admin account. + :paramtype username: str + :keyword password: Password of admin account. + :paramtype password: str + :keyword public_key_data: Public key data. + :paramtype public_key_data: str + :keyword private_key_data: Private key data. + :paramtype private_key_data: str + """ + super(VirtualMachineSshCredentials, self).__init__(**kwargs) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.public_key_data = kwargs.get('public_key_data', None) + self.private_key_data = kwargs.get('private_key_data', None) + + +class Workspace(Resource): + """An object that represents a machine learning workspace. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar identity: The identity of the resource. + :vartype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :ivar location: Specifies the location of the resource. + :vartype location: str + :ivar tags: A set of tags. Contains resource tags defined as key/value pairs. + :vartype tags: dict[str, str] + :ivar sku: The sku of the workspace. + :vartype sku: ~azure.mgmt.machinelearningservices.models.Sku + :ivar workspace_id: The immutable id associated with this workspace. + :vartype workspace_id: str + :ivar description: The description of this workspace. + :vartype description: str + :ivar friendly_name: The friendly name for this workspace. This name in mutable. + :vartype friendly_name: str + :ivar key_vault: ARM id of the key vault associated with this workspace. This cannot be changed + once the workspace has been created. + :vartype key_vault: str + :ivar application_insights: ARM id of the application insights associated with this workspace. + :vartype application_insights: str + :ivar container_registry: ARM id of the container registry associated with this workspace. + :vartype container_registry: str + :ivar storage_account: ARM id of the storage account associated with this workspace. This + cannot be changed once the workspace has been created. + :vartype storage_account: str + :ivar discovery_url: Url for the discovery service to identify regional endpoints for machine + learning experimentation services. + :vartype discovery_url: str + :ivar provisioning_state: The current deployment state of workspace resource. The + provisioningState is to indicate states for resource provisioning. Possible values include: + "Unknown", "Updating", "Creating", "Deleting", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :ivar encryption: The encryption settings of Azure ML workspace. + :vartype encryption: ~azure.mgmt.machinelearningservices.models.EncryptionProperty + :ivar hbi_workspace: The flag to signal HBI data in the workspace and reduce diagnostic data + collected by the service. + :vartype hbi_workspace: bool + :ivar service_provisioned_resource_group: The name of the managed resource group created by + workspace RP in customer subscription if the workspace is CMK workspace. + :vartype service_provisioned_resource_group: str + :ivar private_link_count: Count of private connections in the workspace. + :vartype private_link_count: int + :ivar image_build_compute: The compute name for image build. + :vartype image_build_compute: str + :ivar allow_public_access_when_behind_vnet: The flag to indicate whether to allow public access + when behind VNet. + :vartype allow_public_access_when_behind_vnet: bool + :ivar public_network_access: Whether requests from Public Network are allowed. Possible values + include: "Enabled", "Disabled". + :vartype public_network_access: str or + ~azure.mgmt.machinelearningservices.models.PublicNetworkAccess + :ivar private_endpoint_connections: The list of private endpoint connections in the workspace. + :vartype private_endpoint_connections: + list[~azure.mgmt.machinelearningservices.models.PrivateEndpointConnection] + :ivar shared_private_link_resources: The list of shared private link resources in this + workspace. + :vartype shared_private_link_resources: + list[~azure.mgmt.machinelearningservices.models.SharedPrivateLinkResource] + :ivar notebook_info: The notebook info of Azure ML workspace. + :vartype notebook_info: ~azure.mgmt.machinelearningservices.models.NotebookResourceInfo + :ivar service_managed_resources_settings: The service managed resource settings. + :vartype service_managed_resources_settings: + ~azure.mgmt.machinelearningservices.models.ServiceManagedResourcesSettings + :ivar primary_user_assigned_identity: The user assigned identity resource id that represents + the workspace identity. + :vartype primary_user_assigned_identity: str + :ivar tenant_id: The tenant id associated with this workspace. + :vartype tenant_id: str + :ivar storage_hns_enabled: If the storage associated with the workspace has hierarchical + namespace(HNS) enabled. + :vartype storage_hns_enabled: bool + :ivar ml_flow_tracking_uri: The URI associated with this workspace that machine learning flow + must point at to set up tracking. + :vartype ml_flow_tracking_uri: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'workspace_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'service_provisioned_resource_group': {'readonly': True}, + 'private_link_count': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'notebook_info': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'storage_hns_enabled': {'readonly': True}, + 'ml_flow_tracking_uri': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'key_vault': {'key': 'properties.keyVault', 'type': 'str'}, + 'application_insights': {'key': 'properties.applicationInsights', 'type': 'str'}, + 'container_registry': {'key': 'properties.containerRegistry', 'type': 'str'}, + 'storage_account': {'key': 'properties.storageAccount', 'type': 'str'}, + 'discovery_url': {'key': 'properties.discoveryUrl', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperty'}, + 'hbi_workspace': {'key': 'properties.hbiWorkspace', 'type': 'bool'}, + 'service_provisioned_resource_group': {'key': 'properties.serviceProvisionedResourceGroup', 'type': 'str'}, + 'private_link_count': {'key': 'properties.privateLinkCount', 'type': 'int'}, + 'image_build_compute': {'key': 'properties.imageBuildCompute', 'type': 'str'}, + 'allow_public_access_when_behind_vnet': {'key': 'properties.allowPublicAccessWhenBehindVnet', 'type': 'bool'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'shared_private_link_resources': {'key': 'properties.sharedPrivateLinkResources', 'type': '[SharedPrivateLinkResource]'}, + 'notebook_info': {'key': 'properties.notebookInfo', 'type': 'NotebookResourceInfo'}, + 'service_managed_resources_settings': {'key': 'properties.serviceManagedResourcesSettings', 'type': 'ServiceManagedResourcesSettings'}, + 'primary_user_assigned_identity': {'key': 'properties.primaryUserAssignedIdentity', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'storage_hns_enabled': {'key': 'properties.storageHnsEnabled', 'type': 'bool'}, + 'ml_flow_tracking_uri': {'key': 'properties.mlFlowTrackingUri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword identity: The identity of the resource. + :paramtype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :keyword location: Specifies the location of the resource. + :paramtype location: str + :keyword tags: A set of tags. Contains resource tags defined as key/value pairs. + :paramtype tags: dict[str, str] + :keyword sku: The sku of the workspace. + :paramtype sku: ~azure.mgmt.machinelearningservices.models.Sku + :keyword description: The description of this workspace. + :paramtype description: str + :keyword friendly_name: The friendly name for this workspace. This name in mutable. + :paramtype friendly_name: str + :keyword key_vault: ARM id of the key vault associated with this workspace. This cannot be + changed once the workspace has been created. + :paramtype key_vault: str + :keyword application_insights: ARM id of the application insights associated with this + workspace. + :paramtype application_insights: str + :keyword container_registry: ARM id of the container registry associated with this workspace. + :paramtype container_registry: str + :keyword storage_account: ARM id of the storage account associated with this workspace. This + cannot be changed once the workspace has been created. + :paramtype storage_account: str + :keyword discovery_url: Url for the discovery service to identify regional endpoints for + machine learning experimentation services. + :paramtype discovery_url: str + :keyword encryption: The encryption settings of Azure ML workspace. + :paramtype encryption: ~azure.mgmt.machinelearningservices.models.EncryptionProperty + :keyword hbi_workspace: The flag to signal HBI data in the workspace and reduce diagnostic data + collected by the service. + :paramtype hbi_workspace: bool + :keyword image_build_compute: The compute name for image build. + :paramtype image_build_compute: str + :keyword allow_public_access_when_behind_vnet: The flag to indicate whether to allow public + access when behind VNet. + :paramtype allow_public_access_when_behind_vnet: bool + :keyword public_network_access: Whether requests from Public Network are allowed. Possible + values include: "Enabled", "Disabled". + :paramtype public_network_access: str or + ~azure.mgmt.machinelearningservices.models.PublicNetworkAccess + :keyword shared_private_link_resources: The list of shared private link resources in this + workspace. + :paramtype shared_private_link_resources: + list[~azure.mgmt.machinelearningservices.models.SharedPrivateLinkResource] + :keyword service_managed_resources_settings: The service managed resource settings. + :paramtype service_managed_resources_settings: + ~azure.mgmt.machinelearningservices.models.ServiceManagedResourcesSettings + :keyword primary_user_assigned_identity: The user assigned identity resource id that represents + the workspace identity. + :paramtype primary_user_assigned_identity: str + """ + super(Workspace, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + self.workspace_id = None + self.description = kwargs.get('description', None) + self.friendly_name = kwargs.get('friendly_name', None) + self.key_vault = kwargs.get('key_vault', None) + self.application_insights = kwargs.get('application_insights', None) + self.container_registry = kwargs.get('container_registry', None) + self.storage_account = kwargs.get('storage_account', None) + self.discovery_url = kwargs.get('discovery_url', None) + self.provisioning_state = None + self.encryption = kwargs.get('encryption', None) + self.hbi_workspace = kwargs.get('hbi_workspace', False) + self.service_provisioned_resource_group = None + self.private_link_count = None + self.image_build_compute = kwargs.get('image_build_compute', None) + self.allow_public_access_when_behind_vnet = kwargs.get('allow_public_access_when_behind_vnet', False) + self.public_network_access = kwargs.get('public_network_access', None) + self.private_endpoint_connections = None + self.shared_private_link_resources = kwargs.get('shared_private_link_resources', None) + self.notebook_info = None + self.service_managed_resources_settings = kwargs.get('service_managed_resources_settings', None) + self.primary_user_assigned_identity = kwargs.get('primary_user_assigned_identity', None) + self.tenant_id = None + self.storage_hns_enabled = None + self.ml_flow_tracking_uri = None + + +class WorkspaceConnectionManagedIdentity(msrest.serialization.Model): + """WorkspaceConnectionManagedIdentity. + + :ivar resource_id: + :vartype resource_id: str + :ivar client_id: + :vartype client_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword resource_id: + :paramtype resource_id: str + :keyword client_id: + :paramtype client_id: str + """ + super(WorkspaceConnectionManagedIdentity, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.client_id = kwargs.get('client_id', None) + + +class WorkspaceConnectionPersonalAccessToken(msrest.serialization.Model): + """WorkspaceConnectionPersonalAccessToken. + + :ivar pat: + :vartype pat: str + """ + + _attribute_map = { + 'pat': {'key': 'pat', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword pat: + :paramtype pat: str + """ + super(WorkspaceConnectionPersonalAccessToken, self).__init__(**kwargs) + self.pat = kwargs.get('pat', None) + + +class WorkspaceConnectionPropertiesV2BasicResource(Resource): + """WorkspaceConnectionPropertiesV2BasicResource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar properties: Required. + :vartype properties: ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionPropertiesV2 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'WorkspaceConnectionPropertiesV2'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword properties: Required. + :paramtype properties: + ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionPropertiesV2 + """ + super(WorkspaceConnectionPropertiesV2BasicResource, self).__init__(**kwargs) + self.properties = kwargs['properties'] + + +class WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult(msrest.serialization.Model): + """WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: + :vartype value: + list[~azure.mgmt.machinelearningservices.models.WorkspaceConnectionPropertiesV2BasicResource] + :ivar next_link: + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[WorkspaceConnectionPropertiesV2BasicResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword value: + :paramtype value: + list[~azure.mgmt.machinelearningservices.models.WorkspaceConnectionPropertiesV2BasicResource] + """ + super(WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class WorkspaceConnectionSharedAccessSignature(msrest.serialization.Model): + """WorkspaceConnectionSharedAccessSignature. + + :ivar sas: + :vartype sas: str + """ + + _attribute_map = { + 'sas': {'key': 'sas', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword sas: + :paramtype sas: str + """ + super(WorkspaceConnectionSharedAccessSignature, self).__init__(**kwargs) + self.sas = kwargs.get('sas', None) + + +class WorkspaceConnectionUsernamePassword(msrest.serialization.Model): + """WorkspaceConnectionUsernamePassword. + + :ivar username: + :vartype username: str + :ivar password: + :vartype password: str + """ + + _attribute_map = { + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword username: + :paramtype username: str + :keyword password: + :paramtype password: str + """ + super(WorkspaceConnectionUsernamePassword, self).__init__(**kwargs) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + + +class WorkspaceListResult(msrest.serialization.Model): + """The result of a request to list machine learning workspaces. + + :ivar value: The list of machine learning workspaces. Since this list may be incomplete, the + nextLink field should be used to request the next list of machine learning workspaces. + :vartype value: list[~azure.mgmt.machinelearningservices.models.Workspace] + :ivar next_link: The URI that can be used to request the next list of machine learning + workspaces. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Workspace]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword value: The list of machine learning workspaces. Since this list may be incomplete, the + nextLink field should be used to request the next list of machine learning workspaces. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.Workspace] + :keyword next_link: The URI that can be used to request the next list of machine learning + workspaces. + :paramtype next_link: str + """ + super(WorkspaceListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class WorkspaceUpdateParameters(msrest.serialization.Model): + """The parameters for updating a machine learning workspace. + + :ivar tags: A set of tags. The resource tags for the machine learning workspace. + :vartype tags: dict[str, str] + :ivar sku: The sku of the workspace. + :vartype sku: ~azure.mgmt.machinelearningservices.models.Sku + :ivar identity: The identity of the resource. + :vartype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :ivar description: The description of this workspace. + :vartype description: str + :ivar friendly_name: The friendly name for this workspace. + :vartype friendly_name: str + :ivar image_build_compute: The compute name for image build. + :vartype image_build_compute: str + :ivar service_managed_resources_settings: The service managed resource settings. + :vartype service_managed_resources_settings: + ~azure.mgmt.machinelearningservices.models.ServiceManagedResourcesSettings + :ivar primary_user_assigned_identity: The user assigned identity resource id that represents + the workspace identity. + :vartype primary_user_assigned_identity: str + :ivar public_network_access: Whether requests from Public Network are allowed. Possible values + include: "Enabled", "Disabled". + :vartype public_network_access: str or + ~azure.mgmt.machinelearningservices.models.PublicNetworkAccess + :ivar application_insights: ARM id of the application insights associated with this workspace. + :vartype application_insights: str + :ivar container_registry: ARM id of the container registry associated with this workspace. + :vartype container_registry: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'image_build_compute': {'key': 'properties.imageBuildCompute', 'type': 'str'}, + 'service_managed_resources_settings': {'key': 'properties.serviceManagedResourcesSettings', 'type': 'ServiceManagedResourcesSettings'}, + 'primary_user_assigned_identity': {'key': 'properties.primaryUserAssignedIdentity', 'type': 'str'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'application_insights': {'key': 'properties.applicationInsights', 'type': 'str'}, + 'container_registry': {'key': 'properties.containerRegistry', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword tags: A set of tags. The resource tags for the machine learning workspace. + :paramtype tags: dict[str, str] + :keyword sku: The sku of the workspace. + :paramtype sku: ~azure.mgmt.machinelearningservices.models.Sku + :keyword identity: The identity of the resource. + :paramtype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :keyword description: The description of this workspace. + :paramtype description: str + :keyword friendly_name: The friendly name for this workspace. + :paramtype friendly_name: str + :keyword image_build_compute: The compute name for image build. + :paramtype image_build_compute: str + :keyword service_managed_resources_settings: The service managed resource settings. + :paramtype service_managed_resources_settings: + ~azure.mgmt.machinelearningservices.models.ServiceManagedResourcesSettings + :keyword primary_user_assigned_identity: The user assigned identity resource id that represents + the workspace identity. + :paramtype primary_user_assigned_identity: str + :keyword public_network_access: Whether requests from Public Network are allowed. Possible + values include: "Enabled", "Disabled". + :paramtype public_network_access: str or + ~azure.mgmt.machinelearningservices.models.PublicNetworkAccess + :keyword application_insights: ARM id of the application insights associated with this + workspace. + :paramtype application_insights: str + :keyword container_registry: ARM id of the container registry associated with this workspace. + :paramtype container_registry: str + """ + super(WorkspaceUpdateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + self.identity = kwargs.get('identity', None) + self.description = kwargs.get('description', None) + self.friendly_name = kwargs.get('friendly_name', None) + self.image_build_compute = kwargs.get('image_build_compute', None) + self.service_managed_resources_settings = kwargs.get('service_managed_resources_settings', None) + self.primary_user_assigned_identity = kwargs.get('primary_user_assigned_identity', None) + self.public_network_access = kwargs.get('public_network_access', None) + self.application_insights = kwargs.get('application_insights', None) + self.container_registry = kwargs.get('container_registry', None) diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/models/_models_py3.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/models/_models_py3.py new file mode 100644 index 00000000..d66af565 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/models/_models_py3.py @@ -0,0 +1,16274 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +import datetime +from typing import Any, Dict, List, Optional, Union + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + +from ._azure_machine_learning_workspaces_enums import * + + +class DatastoreCredentials(msrest.serialization.Model): + """Base definition for datastore credentials. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AccountKeyDatastoreCredentials, CertificateDatastoreCredentials, NoneDatastoreCredentials, SasDatastoreCredentials, ServicePrincipalDatastoreCredentials. + + All required parameters must be populated in order to send to Azure. + + :ivar credentials_type: Required. [Required] Credential type used to authentication with + storage.Constant filled by server. Possible values include: "AccountKey", "Certificate", + "None", "Sas", "ServicePrincipal". + :vartype credentials_type: str or ~azure.mgmt.machinelearningservices.models.CredentialsType + """ + + _validation = { + 'credentials_type': {'required': True}, + } + + _attribute_map = { + 'credentials_type': {'key': 'credentialsType', 'type': 'str'}, + } + + _subtype_map = { + 'credentials_type': {'AccountKey': 'AccountKeyDatastoreCredentials', 'Certificate': 'CertificateDatastoreCredentials', 'None': 'NoneDatastoreCredentials', 'Sas': 'SasDatastoreCredentials', 'ServicePrincipal': 'ServicePrincipalDatastoreCredentials'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(DatastoreCredentials, self).__init__(**kwargs) + self.credentials_type = None # type: Optional[str] + + +class AccountKeyDatastoreCredentials(DatastoreCredentials): + """Account key datastore credentials configuration. + + All required parameters must be populated in order to send to Azure. + + :ivar credentials_type: Required. [Required] Credential type used to authentication with + storage.Constant filled by server. Possible values include: "AccountKey", "Certificate", + "None", "Sas", "ServicePrincipal". + :vartype credentials_type: str or ~azure.mgmt.machinelearningservices.models.CredentialsType + :ivar secrets: Required. [Required] Storage account secrets. + :vartype secrets: ~azure.mgmt.machinelearningservices.models.AccountKeyDatastoreSecrets + """ + + _validation = { + 'credentials_type': {'required': True}, + 'secrets': {'required': True}, + } + + _attribute_map = { + 'credentials_type': {'key': 'credentialsType', 'type': 'str'}, + 'secrets': {'key': 'secrets', 'type': 'AccountKeyDatastoreSecrets'}, + } + + def __init__( + self, + *, + secrets: "AccountKeyDatastoreSecrets", + **kwargs + ): + """ + :keyword secrets: Required. [Required] Storage account secrets. + :paramtype secrets: ~azure.mgmt.machinelearningservices.models.AccountKeyDatastoreSecrets + """ + super(AccountKeyDatastoreCredentials, self).__init__(**kwargs) + self.credentials_type = 'AccountKey' # type: str + self.secrets = secrets + + +class DatastoreSecrets(msrest.serialization.Model): + """Base definition for datastore secrets. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AccountKeyDatastoreSecrets, CertificateDatastoreSecrets, SasDatastoreSecrets, ServicePrincipalDatastoreSecrets. + + All required parameters must be populated in order to send to Azure. + + :ivar secrets_type: Required. [Required] Credential type used to authentication with + storage.Constant filled by server. Possible values include: "AccountKey", "Certificate", "Sas", + "ServicePrincipal". + :vartype secrets_type: str or ~azure.mgmt.machinelearningservices.models.SecretsType + """ + + _validation = { + 'secrets_type': {'required': True}, + } + + _attribute_map = { + 'secrets_type': {'key': 'secretsType', 'type': 'str'}, + } + + _subtype_map = { + 'secrets_type': {'AccountKey': 'AccountKeyDatastoreSecrets', 'Certificate': 'CertificateDatastoreSecrets', 'Sas': 'SasDatastoreSecrets', 'ServicePrincipal': 'ServicePrincipalDatastoreSecrets'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(DatastoreSecrets, self).__init__(**kwargs) + self.secrets_type = None # type: Optional[str] + + +class AccountKeyDatastoreSecrets(DatastoreSecrets): + """Datastore account key secrets. + + All required parameters must be populated in order to send to Azure. + + :ivar secrets_type: Required. [Required] Credential type used to authentication with + storage.Constant filled by server. Possible values include: "AccountKey", "Certificate", "Sas", + "ServicePrincipal". + :vartype secrets_type: str or ~azure.mgmt.machinelearningservices.models.SecretsType + :ivar key: Storage account key. + :vartype key: str + """ + + _validation = { + 'secrets_type': {'required': True}, + } + + _attribute_map = { + 'secrets_type': {'key': 'secretsType', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__( + self, + *, + key: Optional[str] = None, + **kwargs + ): + """ + :keyword key: Storage account key. + :paramtype key: str + """ + super(AccountKeyDatastoreSecrets, self).__init__(**kwargs) + self.secrets_type = 'AccountKey' # type: str + self.key = key + + +class AKSSchema(msrest.serialization.Model): + """AKSSchema. + + :ivar properties: AKS properties. + :vartype properties: ~azure.mgmt.machinelearningservices.models.AKSSchemaProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'AKSSchemaProperties'}, + } + + def __init__( + self, + *, + properties: Optional["AKSSchemaProperties"] = None, + **kwargs + ): + """ + :keyword properties: AKS properties. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.AKSSchemaProperties + """ + super(AKSSchema, self).__init__(**kwargs) + self.properties = properties + + +class Compute(msrest.serialization.Model): + """Machine Learning compute object. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AKS, AmlCompute, ComputeInstance, DataFactory, DataLakeAnalytics, Databricks, HDInsight, Kubernetes, SynapseSpark, VirtualMachine. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values + include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", + "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark". + :vartype compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType + :ivar compute_location: Location for the underlying compute. + :vartype compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values are Unknown, + Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating", + "Creating", "Deleting", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :ivar description: The description of the Machine Learning compute. + :vartype description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: ~datetime.datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: ~datetime.datetime + :ivar resource_id: ARM resource id of the underlying compute. + :vartype resource_id: str + :ivar provisioning_errors: Errors during provisioning. + :vartype provisioning_errors: list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought + from outside if true, or machine learning service provisioned it if false. + :vartype is_attached_compute: bool + :ivar disable_local_auth: Opt-out of local authentication and ensure customers can use only MSI + and AAD exclusively for authentication. + :vartype disable_local_auth: bool + """ + + _validation = { + 'compute_type': {'required': True}, + 'compute_location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'readonly': True}, + } + + _attribute_map = { + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + } + + _subtype_map = { + 'compute_type': {'AKS': 'AKS', 'AmlCompute': 'AmlCompute', 'ComputeInstance': 'ComputeInstance', 'DataFactory': 'DataFactory', 'DataLakeAnalytics': 'DataLakeAnalytics', 'Databricks': 'Databricks', 'HDInsight': 'HDInsight', 'Kubernetes': 'Kubernetes', 'SynapseSpark': 'SynapseSpark', 'VirtualMachine': 'VirtualMachine'} + } + + def __init__( + self, + *, + description: Optional[str] = None, + resource_id: Optional[str] = None, + disable_local_auth: Optional[bool] = None, + **kwargs + ): + """ + :keyword description: The description of the Machine Learning compute. + :paramtype description: str + :keyword resource_id: ARM resource id of the underlying compute. + :paramtype resource_id: str + :keyword disable_local_auth: Opt-out of local authentication and ensure customers can use only + MSI and AAD exclusively for authentication. + :paramtype disable_local_auth: bool + """ + super(Compute, self).__init__(**kwargs) + self.compute_type = None # type: Optional[str] + self.compute_location = None + self.provisioning_state = None + self.description = description + self.created_on = None + self.modified_on = None + self.resource_id = resource_id + self.provisioning_errors = None + self.is_attached_compute = None + self.disable_local_auth = disable_local_auth + + +class AKS(Compute, AKSSchema): + """A Machine Learning compute based on AKS. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar properties: AKS properties. + :vartype properties: ~azure.mgmt.machinelearningservices.models.AKSSchemaProperties + :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values + include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", + "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark". + :vartype compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType + :ivar compute_location: Location for the underlying compute. + :vartype compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values are Unknown, + Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating", + "Creating", "Deleting", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :ivar description: The description of the Machine Learning compute. + :vartype description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: ~datetime.datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: ~datetime.datetime + :ivar resource_id: ARM resource id of the underlying compute. + :vartype resource_id: str + :ivar provisioning_errors: Errors during provisioning. + :vartype provisioning_errors: list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought + from outside if true, or machine learning service provisioned it if false. + :vartype is_attached_compute: bool + :ivar disable_local_auth: Opt-out of local authentication and ensure customers can use only MSI + and AAD exclusively for authentication. + :vartype disable_local_auth: bool + """ + + _validation = { + 'compute_type': {'required': True}, + 'compute_location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'AKSSchemaProperties'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + } + + def __init__( + self, + *, + properties: Optional["AKSSchemaProperties"] = None, + description: Optional[str] = None, + resource_id: Optional[str] = None, + disable_local_auth: Optional[bool] = None, + **kwargs + ): + """ + :keyword properties: AKS properties. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.AKSSchemaProperties + :keyword description: The description of the Machine Learning compute. + :paramtype description: str + :keyword resource_id: ARM resource id of the underlying compute. + :paramtype resource_id: str + :keyword disable_local_auth: Opt-out of local authentication and ensure customers can use only + MSI and AAD exclusively for authentication. + :paramtype disable_local_auth: bool + """ + super(AKS, self).__init__(description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, properties=properties, **kwargs) + self.properties = properties + self.compute_type = 'AKS' # type: str + self.compute_type = 'AKS' # type: str + self.compute_location = None + self.provisioning_state = None + self.description = description + self.created_on = None + self.modified_on = None + self.resource_id = resource_id + self.provisioning_errors = None + self.is_attached_compute = None + self.disable_local_auth = disable_local_auth + + +class AksComputeSecretsProperties(msrest.serialization.Model): + """Properties of AksComputeSecrets. + + :ivar user_kube_config: Content of kubeconfig file that can be used to connect to the + Kubernetes cluster. + :vartype user_kube_config: str + :ivar admin_kube_config: Content of kubeconfig file that can be used to connect to the + Kubernetes cluster. + :vartype admin_kube_config: str + :ivar image_pull_secret_name: Image registry pull secret. + :vartype image_pull_secret_name: str + """ + + _attribute_map = { + 'user_kube_config': {'key': 'userKubeConfig', 'type': 'str'}, + 'admin_kube_config': {'key': 'adminKubeConfig', 'type': 'str'}, + 'image_pull_secret_name': {'key': 'imagePullSecretName', 'type': 'str'}, + } + + def __init__( + self, + *, + user_kube_config: Optional[str] = None, + admin_kube_config: Optional[str] = None, + image_pull_secret_name: Optional[str] = None, + **kwargs + ): + """ + :keyword user_kube_config: Content of kubeconfig file that can be used to connect to the + Kubernetes cluster. + :paramtype user_kube_config: str + :keyword admin_kube_config: Content of kubeconfig file that can be used to connect to the + Kubernetes cluster. + :paramtype admin_kube_config: str + :keyword image_pull_secret_name: Image registry pull secret. + :paramtype image_pull_secret_name: str + """ + super(AksComputeSecretsProperties, self).__init__(**kwargs) + self.user_kube_config = user_kube_config + self.admin_kube_config = admin_kube_config + self.image_pull_secret_name = image_pull_secret_name + + +class ComputeSecrets(msrest.serialization.Model): + """Secrets related to a Machine Learning compute. Might differ for every type of compute. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AksComputeSecrets, DatabricksComputeSecrets, VirtualMachineSecrets. + + All required parameters must be populated in order to send to Azure. + + :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values + include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", + "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark". + :vartype compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType + """ + + _validation = { + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'compute_type': {'key': 'computeType', 'type': 'str'}, + } + + _subtype_map = { + 'compute_type': {'AKS': 'AksComputeSecrets', 'Databricks': 'DatabricksComputeSecrets', 'VirtualMachine': 'VirtualMachineSecrets'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ComputeSecrets, self).__init__(**kwargs) + self.compute_type = None # type: Optional[str] + + +class AksComputeSecrets(ComputeSecrets, AksComputeSecretsProperties): + """Secrets related to a Machine Learning compute based on AKS. + + All required parameters must be populated in order to send to Azure. + + :ivar user_kube_config: Content of kubeconfig file that can be used to connect to the + Kubernetes cluster. + :vartype user_kube_config: str + :ivar admin_kube_config: Content of kubeconfig file that can be used to connect to the + Kubernetes cluster. + :vartype admin_kube_config: str + :ivar image_pull_secret_name: Image registry pull secret. + :vartype image_pull_secret_name: str + :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values + include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", + "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark". + :vartype compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType + """ + + _validation = { + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'user_kube_config': {'key': 'userKubeConfig', 'type': 'str'}, + 'admin_kube_config': {'key': 'adminKubeConfig', 'type': 'str'}, + 'image_pull_secret_name': {'key': 'imagePullSecretName', 'type': 'str'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + } + + def __init__( + self, + *, + user_kube_config: Optional[str] = None, + admin_kube_config: Optional[str] = None, + image_pull_secret_name: Optional[str] = None, + **kwargs + ): + """ + :keyword user_kube_config: Content of kubeconfig file that can be used to connect to the + Kubernetes cluster. + :paramtype user_kube_config: str + :keyword admin_kube_config: Content of kubeconfig file that can be used to connect to the + Kubernetes cluster. + :paramtype admin_kube_config: str + :keyword image_pull_secret_name: Image registry pull secret. + :paramtype image_pull_secret_name: str + """ + super(AksComputeSecrets, self).__init__(user_kube_config=user_kube_config, admin_kube_config=admin_kube_config, image_pull_secret_name=image_pull_secret_name, **kwargs) + self.user_kube_config = user_kube_config + self.admin_kube_config = admin_kube_config + self.image_pull_secret_name = image_pull_secret_name + self.compute_type = 'AKS' # type: str + self.compute_type = 'AKS' # type: str + + +class AksNetworkingConfiguration(msrest.serialization.Model): + """Advance configuration for AKS networking. + + :ivar subnet_id: Virtual network subnet resource ID the compute nodes belong to. + :vartype subnet_id: str + :ivar service_cidr: A CIDR notation IP range from which to assign service cluster IPs. It must + not overlap with any Subnet IP ranges. + :vartype service_cidr: str + :ivar dns_service_ip: An IP address assigned to the Kubernetes DNS service. It must be within + the Kubernetes service address range specified in serviceCidr. + :vartype dns_service_ip: str + :ivar docker_bridge_cidr: A CIDR notation IP range assigned to the Docker bridge network. It + must not overlap with any Subnet IP ranges or the Kubernetes service address range. + :vartype docker_bridge_cidr: str + """ + + _validation = { + 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, + 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + } + + _attribute_map = { + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, + 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, + 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, + } + + def __init__( + self, + *, + subnet_id: Optional[str] = None, + service_cidr: Optional[str] = None, + dns_service_ip: Optional[str] = None, + docker_bridge_cidr: Optional[str] = None, + **kwargs + ): + """ + :keyword subnet_id: Virtual network subnet resource ID the compute nodes belong to. + :paramtype subnet_id: str + :keyword service_cidr: A CIDR notation IP range from which to assign service cluster IPs. It + must not overlap with any Subnet IP ranges. + :paramtype service_cidr: str + :keyword dns_service_ip: An IP address assigned to the Kubernetes DNS service. It must be + within the Kubernetes service address range specified in serviceCidr. + :paramtype dns_service_ip: str + :keyword docker_bridge_cidr: A CIDR notation IP range assigned to the Docker bridge network. It + must not overlap with any Subnet IP ranges or the Kubernetes service address range. + :paramtype docker_bridge_cidr: str + """ + super(AksNetworkingConfiguration, self).__init__(**kwargs) + self.subnet_id = subnet_id + self.service_cidr = service_cidr + self.dns_service_ip = dns_service_ip + self.docker_bridge_cidr = docker_bridge_cidr + + +class AKSSchemaProperties(msrest.serialization.Model): + """AKS properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar cluster_fqdn: Cluster full qualified domain name. + :vartype cluster_fqdn: str + :ivar system_services: System services. + :vartype system_services: list[~azure.mgmt.machinelearningservices.models.SystemService] + :ivar agent_count: Number of agents. + :vartype agent_count: int + :ivar agent_vm_size: Agent virtual machine size. + :vartype agent_vm_size: str + :ivar cluster_purpose: Intended usage of the cluster. Possible values include: "FastProd", + "DenseProd", "DevTest". Default value: "FastProd". + :vartype cluster_purpose: str or ~azure.mgmt.machinelearningservices.models.ClusterPurpose + :ivar ssl_configuration: SSL configuration. + :vartype ssl_configuration: ~azure.mgmt.machinelearningservices.models.SslConfiguration + :ivar aks_networking_configuration: AKS networking configuration for vnet. + :vartype aks_networking_configuration: + ~azure.mgmt.machinelearningservices.models.AksNetworkingConfiguration + :ivar load_balancer_type: Load Balancer Type. Possible values include: "PublicIp", + "InternalLoadBalancer". Default value: "PublicIp". + :vartype load_balancer_type: str or ~azure.mgmt.machinelearningservices.models.LoadBalancerType + :ivar load_balancer_subnet: Load Balancer Subnet. + :vartype load_balancer_subnet: str + """ + + _validation = { + 'system_services': {'readonly': True}, + 'agent_count': {'minimum': 0}, + } + + _attribute_map = { + 'cluster_fqdn': {'key': 'clusterFqdn', 'type': 'str'}, + 'system_services': {'key': 'systemServices', 'type': '[SystemService]'}, + 'agent_count': {'key': 'agentCount', 'type': 'int'}, + 'agent_vm_size': {'key': 'agentVmSize', 'type': 'str'}, + 'cluster_purpose': {'key': 'clusterPurpose', 'type': 'str'}, + 'ssl_configuration': {'key': 'sslConfiguration', 'type': 'SslConfiguration'}, + 'aks_networking_configuration': {'key': 'aksNetworkingConfiguration', 'type': 'AksNetworkingConfiguration'}, + 'load_balancer_type': {'key': 'loadBalancerType', 'type': 'str'}, + 'load_balancer_subnet': {'key': 'loadBalancerSubnet', 'type': 'str'}, + } + + def __init__( + self, + *, + cluster_fqdn: Optional[str] = None, + agent_count: Optional[int] = None, + agent_vm_size: Optional[str] = None, + cluster_purpose: Optional[Union[str, "ClusterPurpose"]] = "FastProd", + ssl_configuration: Optional["SslConfiguration"] = None, + aks_networking_configuration: Optional["AksNetworkingConfiguration"] = None, + load_balancer_type: Optional[Union[str, "LoadBalancerType"]] = "PublicIp", + load_balancer_subnet: Optional[str] = None, + **kwargs + ): + """ + :keyword cluster_fqdn: Cluster full qualified domain name. + :paramtype cluster_fqdn: str + :keyword agent_count: Number of agents. + :paramtype agent_count: int + :keyword agent_vm_size: Agent virtual machine size. + :paramtype agent_vm_size: str + :keyword cluster_purpose: Intended usage of the cluster. Possible values include: "FastProd", + "DenseProd", "DevTest". Default value: "FastProd". + :paramtype cluster_purpose: str or ~azure.mgmt.machinelearningservices.models.ClusterPurpose + :keyword ssl_configuration: SSL configuration. + :paramtype ssl_configuration: ~azure.mgmt.machinelearningservices.models.SslConfiguration + :keyword aks_networking_configuration: AKS networking configuration for vnet. + :paramtype aks_networking_configuration: + ~azure.mgmt.machinelearningservices.models.AksNetworkingConfiguration + :keyword load_balancer_type: Load Balancer Type. Possible values include: "PublicIp", + "InternalLoadBalancer". Default value: "PublicIp". + :paramtype load_balancer_type: str or + ~azure.mgmt.machinelearningservices.models.LoadBalancerType + :keyword load_balancer_subnet: Load Balancer Subnet. + :paramtype load_balancer_subnet: str + """ + super(AKSSchemaProperties, self).__init__(**kwargs) + self.cluster_fqdn = cluster_fqdn + self.system_services = None + self.agent_count = agent_count + self.agent_vm_size = agent_vm_size + self.cluster_purpose = cluster_purpose + self.ssl_configuration = ssl_configuration + self.aks_networking_configuration = aks_networking_configuration + self.load_balancer_type = load_balancer_type + self.load_balancer_subnet = load_balancer_subnet + + +class AmlComputeSchema(msrest.serialization.Model): + """Properties(top level) of AmlCompute. + + :ivar properties: Properties of AmlCompute. + :vartype properties: ~azure.mgmt.machinelearningservices.models.AmlComputeProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'AmlComputeProperties'}, + } + + def __init__( + self, + *, + properties: Optional["AmlComputeProperties"] = None, + **kwargs + ): + """ + :keyword properties: Properties of AmlCompute. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.AmlComputeProperties + """ + super(AmlComputeSchema, self).__init__(**kwargs) + self.properties = properties + + +class AmlCompute(Compute, AmlComputeSchema): + """An Azure Machine Learning compute. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar properties: Properties of AmlCompute. + :vartype properties: ~azure.mgmt.machinelearningservices.models.AmlComputeProperties + :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values + include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", + "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark". + :vartype compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType + :ivar compute_location: Location for the underlying compute. + :vartype compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values are Unknown, + Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating", + "Creating", "Deleting", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :ivar description: The description of the Machine Learning compute. + :vartype description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: ~datetime.datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: ~datetime.datetime + :ivar resource_id: ARM resource id of the underlying compute. + :vartype resource_id: str + :ivar provisioning_errors: Errors during provisioning. + :vartype provisioning_errors: list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought + from outside if true, or machine learning service provisioned it if false. + :vartype is_attached_compute: bool + :ivar disable_local_auth: Opt-out of local authentication and ensure customers can use only MSI + and AAD exclusively for authentication. + :vartype disable_local_auth: bool + """ + + _validation = { + 'compute_type': {'required': True}, + 'compute_location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'AmlComputeProperties'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + } + + def __init__( + self, + *, + properties: Optional["AmlComputeProperties"] = None, + description: Optional[str] = None, + resource_id: Optional[str] = None, + disable_local_auth: Optional[bool] = None, + **kwargs + ): + """ + :keyword properties: Properties of AmlCompute. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.AmlComputeProperties + :keyword description: The description of the Machine Learning compute. + :paramtype description: str + :keyword resource_id: ARM resource id of the underlying compute. + :paramtype resource_id: str + :keyword disable_local_auth: Opt-out of local authentication and ensure customers can use only + MSI and AAD exclusively for authentication. + :paramtype disable_local_auth: bool + """ + super(AmlCompute, self).__init__(description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, properties=properties, **kwargs) + self.properties = properties + self.compute_type = 'AmlCompute' # type: str + self.compute_type = 'AmlCompute' # type: str + self.compute_location = None + self.provisioning_state = None + self.description = description + self.created_on = None + self.modified_on = None + self.resource_id = resource_id + self.provisioning_errors = None + self.is_attached_compute = None + self.disable_local_auth = disable_local_auth + + +class AmlComputeNodeInformation(msrest.serialization.Model): + """Compute node information related to a AmlCompute. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar node_id: ID of the compute node. + :vartype node_id: str + :ivar private_ip_address: Private IP address of the compute node. + :vartype private_ip_address: str + :ivar public_ip_address: Public IP address of the compute node. + :vartype public_ip_address: str + :ivar port: SSH port number of the node. + :vartype port: int + :ivar node_state: State of the compute node. Values are idle, running, preparing, unusable, + leaving and preempted. Possible values include: "idle", "running", "preparing", "unusable", + "leaving", "preempted". + :vartype node_state: str or ~azure.mgmt.machinelearningservices.models.NodeState + :ivar run_id: ID of the Experiment running on the node, if any else null. + :vartype run_id: str + """ + + _validation = { + 'node_id': {'readonly': True}, + 'private_ip_address': {'readonly': True}, + 'public_ip_address': {'readonly': True}, + 'port': {'readonly': True}, + 'node_state': {'readonly': True}, + 'run_id': {'readonly': True}, + } + + _attribute_map = { + 'node_id': {'key': 'nodeId', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'node_state': {'key': 'nodeState', 'type': 'str'}, + 'run_id': {'key': 'runId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(AmlComputeNodeInformation, self).__init__(**kwargs) + self.node_id = None + self.private_ip_address = None + self.public_ip_address = None + self.port = None + self.node_state = None + self.run_id = None + + +class AmlComputeNodesInformation(msrest.serialization.Model): + """Result of AmlCompute Nodes. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar nodes: The collection of returned AmlCompute nodes details. + :vartype nodes: list[~azure.mgmt.machinelearningservices.models.AmlComputeNodeInformation] + :ivar next_link: The continuation token. + :vartype next_link: str + """ + + _validation = { + 'nodes': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'nodes': {'key': 'nodes', 'type': '[AmlComputeNodeInformation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(AmlComputeNodesInformation, self).__init__(**kwargs) + self.nodes = None + self.next_link = None + + +class AmlComputeProperties(msrest.serialization.Model): + """AML Compute properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar os_type: Compute OS Type. Possible values include: "Linux", "Windows". Default value: + "Linux". + :vartype os_type: str or ~azure.mgmt.machinelearningservices.models.OsType + :ivar vm_size: Virtual Machine Size. + :vartype vm_size: str + :ivar vm_priority: Virtual Machine priority. Possible values include: "Dedicated", + "LowPriority". + :vartype vm_priority: str or ~azure.mgmt.machinelearningservices.models.VmPriority + :ivar virtual_machine_image: Virtual Machine image for AML Compute - windows only. + :vartype virtual_machine_image: ~azure.mgmt.machinelearningservices.models.VirtualMachineImage + :ivar isolated_network: Network is isolated or not. + :vartype isolated_network: bool + :ivar scale_settings: Scale settings for AML Compute. + :vartype scale_settings: ~azure.mgmt.machinelearningservices.models.ScaleSettings + :ivar user_account_credentials: Credentials for an administrator user account that will be + created on each compute node. + :vartype user_account_credentials: + ~azure.mgmt.machinelearningservices.models.UserAccountCredentials + :ivar subnet: Virtual network subnet resource ID the compute nodes belong to. + :vartype subnet: ~azure.mgmt.machinelearningservices.models.ResourceId + :ivar remote_login_port_public_access: State of the public SSH port. Possible values are: + Disabled - Indicates that the public ssh port is closed on all nodes of the cluster. Enabled - + Indicates that the public ssh port is open on all nodes of the cluster. NotSpecified - + Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, + else is open all public nodes. It can be default only during cluster creation time, after + creation it will be either enabled or disabled. Possible values include: "Enabled", "Disabled", + "NotSpecified". Default value: "NotSpecified". + :vartype remote_login_port_public_access: str or + ~azure.mgmt.machinelearningservices.models.RemoteLoginPortPublicAccess + :ivar allocation_state: Allocation state of the compute. Possible values are: steady - + Indicates that the compute is not resizing. There are no changes to the number of compute nodes + in the compute in progress. A compute enters this state when it is created and when no + operations are being performed on the compute to change the number of compute nodes. resizing - + Indicates that the compute is resizing; that is, compute nodes are being added to or removed + from the compute. Possible values include: "Steady", "Resizing". + :vartype allocation_state: str or ~azure.mgmt.machinelearningservices.models.AllocationState + :ivar allocation_state_transition_time: The time at which the compute entered its current + allocation state. + :vartype allocation_state_transition_time: ~datetime.datetime + :ivar errors: Collection of errors encountered by various compute nodes during node setup. + :vartype errors: list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar current_node_count: The number of compute nodes currently assigned to the compute. + :vartype current_node_count: int + :ivar target_node_count: The target number of compute nodes for the compute. If the + allocationState is resizing, this property denotes the target node count for the ongoing resize + operation. If the allocationState is steady, this property denotes the target node count for + the previous resize operation. + :vartype target_node_count: int + :ivar node_state_counts: Counts of various node states on the compute. + :vartype node_state_counts: ~azure.mgmt.machinelearningservices.models.NodeStateCounts + :ivar enable_node_public_ip: Enable or disable node public IP address provisioning. Possible + values are: Possible values are: true - Indicates that the compute nodes will have public IPs + provisioned. false - Indicates that the compute nodes will have a private endpoint and no + public IPs. + :vartype enable_node_public_ip: bool + :ivar property_bag: A property bag containing additional properties. + :vartype property_bag: any + """ + + _validation = { + 'allocation_state': {'readonly': True}, + 'allocation_state_transition_time': {'readonly': True}, + 'errors': {'readonly': True}, + 'current_node_count': {'readonly': True}, + 'target_node_count': {'readonly': True}, + 'node_state_counts': {'readonly': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'vm_priority': {'key': 'vmPriority', 'type': 'str'}, + 'virtual_machine_image': {'key': 'virtualMachineImage', 'type': 'VirtualMachineImage'}, + 'isolated_network': {'key': 'isolatedNetwork', 'type': 'bool'}, + 'scale_settings': {'key': 'scaleSettings', 'type': 'ScaleSettings'}, + 'user_account_credentials': {'key': 'userAccountCredentials', 'type': 'UserAccountCredentials'}, + 'subnet': {'key': 'subnet', 'type': 'ResourceId'}, + 'remote_login_port_public_access': {'key': 'remoteLoginPortPublicAccess', 'type': 'str'}, + 'allocation_state': {'key': 'allocationState', 'type': 'str'}, + 'allocation_state_transition_time': {'key': 'allocationStateTransitionTime', 'type': 'iso-8601'}, + 'errors': {'key': 'errors', 'type': '[ErrorResponse]'}, + 'current_node_count': {'key': 'currentNodeCount', 'type': 'int'}, + 'target_node_count': {'key': 'targetNodeCount', 'type': 'int'}, + 'node_state_counts': {'key': 'nodeStateCounts', 'type': 'NodeStateCounts'}, + 'enable_node_public_ip': {'key': 'enableNodePublicIp', 'type': 'bool'}, + 'property_bag': {'key': 'propertyBag', 'type': 'object'}, + } + + def __init__( + self, + *, + os_type: Optional[Union[str, "OsType"]] = "Linux", + vm_size: Optional[str] = None, + vm_priority: Optional[Union[str, "VmPriority"]] = None, + virtual_machine_image: Optional["VirtualMachineImage"] = None, + isolated_network: Optional[bool] = None, + scale_settings: Optional["ScaleSettings"] = None, + user_account_credentials: Optional["UserAccountCredentials"] = None, + subnet: Optional["ResourceId"] = None, + remote_login_port_public_access: Optional[Union[str, "RemoteLoginPortPublicAccess"]] = "NotSpecified", + enable_node_public_ip: Optional[bool] = True, + property_bag: Optional[Any] = None, + **kwargs + ): + """ + :keyword os_type: Compute OS Type. Possible values include: "Linux", "Windows". Default value: + "Linux". + :paramtype os_type: str or ~azure.mgmt.machinelearningservices.models.OsType + :keyword vm_size: Virtual Machine Size. + :paramtype vm_size: str + :keyword vm_priority: Virtual Machine priority. Possible values include: "Dedicated", + "LowPriority". + :paramtype vm_priority: str or ~azure.mgmt.machinelearningservices.models.VmPriority + :keyword virtual_machine_image: Virtual Machine image for AML Compute - windows only. + :paramtype virtual_machine_image: + ~azure.mgmt.machinelearningservices.models.VirtualMachineImage + :keyword isolated_network: Network is isolated or not. + :paramtype isolated_network: bool + :keyword scale_settings: Scale settings for AML Compute. + :paramtype scale_settings: ~azure.mgmt.machinelearningservices.models.ScaleSettings + :keyword user_account_credentials: Credentials for an administrator user account that will be + created on each compute node. + :paramtype user_account_credentials: + ~azure.mgmt.machinelearningservices.models.UserAccountCredentials + :keyword subnet: Virtual network subnet resource ID the compute nodes belong to. + :paramtype subnet: ~azure.mgmt.machinelearningservices.models.ResourceId + :keyword remote_login_port_public_access: State of the public SSH port. Possible values are: + Disabled - Indicates that the public ssh port is closed on all nodes of the cluster. Enabled - + Indicates that the public ssh port is open on all nodes of the cluster. NotSpecified - + Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, + else is open all public nodes. It can be default only during cluster creation time, after + creation it will be either enabled or disabled. Possible values include: "Enabled", "Disabled", + "NotSpecified". Default value: "NotSpecified". + :paramtype remote_login_port_public_access: str or + ~azure.mgmt.machinelearningservices.models.RemoteLoginPortPublicAccess + :keyword enable_node_public_ip: Enable or disable node public IP address provisioning. Possible + values are: Possible values are: true - Indicates that the compute nodes will have public IPs + provisioned. false - Indicates that the compute nodes will have a private endpoint and no + public IPs. + :paramtype enable_node_public_ip: bool + :keyword property_bag: A property bag containing additional properties. + :paramtype property_bag: any + """ + super(AmlComputeProperties, self).__init__(**kwargs) + self.os_type = os_type + self.vm_size = vm_size + self.vm_priority = vm_priority + self.virtual_machine_image = virtual_machine_image + self.isolated_network = isolated_network + self.scale_settings = scale_settings + self.user_account_credentials = user_account_credentials + self.subnet = subnet + self.remote_login_port_public_access = remote_login_port_public_access + self.allocation_state = None + self.allocation_state_transition_time = None + self.errors = None + self.current_node_count = None + self.target_node_count = None + self.node_state_counts = None + self.enable_node_public_ip = enable_node_public_ip + self.property_bag = property_bag + + +class AmlOperation(msrest.serialization.Model): + """Azure Machine Learning workspace REST API operation. + + :ivar name: Operation name: {provider}/{resource}/{operation}. + :vartype name: str + :ivar display: Display name of operation. + :vartype display: ~azure.mgmt.machinelearningservices.models.AmlOperationDisplay + :ivar is_data_action: Indicates whether the operation applies to data-plane. + :vartype is_data_action: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'AmlOperationDisplay'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display: Optional["AmlOperationDisplay"] = None, + is_data_action: Optional[bool] = None, + **kwargs + ): + """ + :keyword name: Operation name: {provider}/{resource}/{operation}. + :paramtype name: str + :keyword display: Display name of operation. + :paramtype display: ~azure.mgmt.machinelearningservices.models.AmlOperationDisplay + :keyword is_data_action: Indicates whether the operation applies to data-plane. + :paramtype is_data_action: bool + """ + super(AmlOperation, self).__init__(**kwargs) + self.name = name + self.display = display + self.is_data_action = is_data_action + + +class AmlOperationDisplay(msrest.serialization.Model): + """Display name of operation. + + :ivar provider: The resource provider name: Microsoft.MachineLearningExperimentation. + :vartype provider: str + :ivar resource: The resource on which the operation is performed. + :vartype resource: str + :ivar operation: The operation that users can perform. + :vartype operation: str + :ivar description: The description for the operation. + :vartype description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + *, + provider: Optional[str] = None, + resource: Optional[str] = None, + operation: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + """ + :keyword provider: The resource provider name: Microsoft.MachineLearningExperimentation. + :paramtype provider: str + :keyword resource: The resource on which the operation is performed. + :paramtype resource: str + :keyword operation: The operation that users can perform. + :paramtype operation: str + :keyword description: The description for the operation. + :paramtype description: str + """ + super(AmlOperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class AmlOperationListResult(msrest.serialization.Model): + """An array of operations supported by the resource provider. + + :ivar value: List of AML workspace operations supported by the AML workspace resource provider. + :vartype value: list[~azure.mgmt.machinelearningservices.models.AmlOperation] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AmlOperation]'}, + } + + def __init__( + self, + *, + value: Optional[List["AmlOperation"]] = None, + **kwargs + ): + """ + :keyword value: List of AML workspace operations supported by the AML workspace resource + provider. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.AmlOperation] + """ + super(AmlOperationListResult, self).__init__(**kwargs) + self.value = value + + +class IdentityConfiguration(msrest.serialization.Model): + """Base definition for identity configuration. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AmlToken, ManagedIdentity, UserIdentity. + + All required parameters must be populated in order to send to Azure. + + :ivar identity_type: Required. [Required] Specifies the type of identity framework.Constant + filled by server. Possible values include: "Managed", "AMLToken", "UserIdentity". + :vartype identity_type: str or + ~azure.mgmt.machinelearningservices.models.IdentityConfigurationType + """ + + _validation = { + 'identity_type': {'required': True}, + } + + _attribute_map = { + 'identity_type': {'key': 'identityType', 'type': 'str'}, + } + + _subtype_map = { + 'identity_type': {'AMLToken': 'AmlToken', 'Managed': 'ManagedIdentity', 'UserIdentity': 'UserIdentity'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(IdentityConfiguration, self).__init__(**kwargs) + self.identity_type = None # type: Optional[str] + + +class AmlToken(IdentityConfiguration): + """AML Token identity configuration. + + All required parameters must be populated in order to send to Azure. + + :ivar identity_type: Required. [Required] Specifies the type of identity framework.Constant + filled by server. Possible values include: "Managed", "AMLToken", "UserIdentity". + :vartype identity_type: str or + ~azure.mgmt.machinelearningservices.models.IdentityConfigurationType + """ + + _validation = { + 'identity_type': {'required': True}, + } + + _attribute_map = { + 'identity_type': {'key': 'identityType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(AmlToken, self).__init__(**kwargs) + self.identity_type = 'AMLToken' # type: str + + +class AmlUserFeature(msrest.serialization.Model): + """Features enabled for a workspace. + + :ivar id: Specifies the feature ID. + :vartype id: str + :ivar display_name: Specifies the feature name. + :vartype display_name: str + :ivar description: Describes the feature for user experience. + :vartype description: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + display_name: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + """ + :keyword id: Specifies the feature ID. + :paramtype id: str + :keyword display_name: Specifies the feature name. + :paramtype display_name: str + :keyword description: Describes the feature for user experience. + :paramtype description: str + """ + super(AmlUserFeature, self).__init__(**kwargs) + self.id = id + self.display_name = display_name + self.description = description + + +class ResourceBase(msrest.serialization.Model): + """ResourceBase. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + properties: Optional[Dict[str, str]] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + """ + super(ResourceBase, self).__init__(**kwargs) + self.description = description + self.properties = properties + self.tags = tags + + +class AssetBase(ResourceBase): + """AssetBase. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar is_anonymous: If the name version are system generated (anonymous registration). + :vartype is_anonymous: bool + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + properties: Optional[Dict[str, str]] = None, + tags: Optional[Dict[str, str]] = None, + is_anonymous: Optional[bool] = False, + is_archived: Optional[bool] = False, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword is_anonymous: If the name version are system generated (anonymous registration). + :paramtype is_anonymous: bool + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + """ + super(AssetBase, self).__init__(description=description, properties=properties, tags=tags, **kwargs) + self.is_anonymous = is_anonymous + self.is_archived = is_archived + + +class AssetContainer(ResourceBase): + """AssetContainer. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar latest_version: The latest version inside this container. + :vartype latest_version: str + :ivar next_version: The next auto incremental version. + :vartype next_version: str + """ + + _validation = { + 'latest_version': {'readonly': True}, + 'next_version': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'latest_version': {'key': 'latestVersion', 'type': 'str'}, + 'next_version': {'key': 'nextVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + properties: Optional[Dict[str, str]] = None, + tags: Optional[Dict[str, str]] = None, + is_archived: Optional[bool] = False, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + """ + super(AssetContainer, self).__init__(description=description, properties=properties, tags=tags, **kwargs) + self.is_archived = is_archived + self.latest_version = None + self.next_version = None + + +class AssetJobInput(msrest.serialization.Model): + """Asset input type. + + All required parameters must be populated in order to send to Azure. + + :ivar mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", + "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". + :vartype mode: str or ~azure.mgmt.machinelearningservices.models.InputDeliveryMode + :ivar uri: Required. [Required] Input Asset URI. + :vartype uri: str + """ + + _validation = { + 'uri': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + } + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + } + + def __init__( + self, + *, + uri: str, + mode: Optional[Union[str, "InputDeliveryMode"]] = None, + **kwargs + ): + """ + :keyword mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", + "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". + :paramtype mode: str or ~azure.mgmt.machinelearningservices.models.InputDeliveryMode + :keyword uri: Required. [Required] Input Asset URI. + :paramtype uri: str + """ + super(AssetJobInput, self).__init__(**kwargs) + self.mode = mode + self.uri = uri + + +class AssetJobOutput(msrest.serialization.Model): + """Asset output type. + + :ivar mode: Output Asset Delivery Mode. Possible values include: "ReadWriteMount", "Upload". + :vartype mode: str or ~azure.mgmt.machinelearningservices.models.OutputDeliveryMode + :ivar uri: Output Asset URI. + :vartype uri: str + """ + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + } + + def __init__( + self, + *, + mode: Optional[Union[str, "OutputDeliveryMode"]] = None, + uri: Optional[str] = None, + **kwargs + ): + """ + :keyword mode: Output Asset Delivery Mode. Possible values include: "ReadWriteMount", "Upload". + :paramtype mode: str or ~azure.mgmt.machinelearningservices.models.OutputDeliveryMode + :keyword uri: Output Asset URI. + :paramtype uri: str + """ + super(AssetJobOutput, self).__init__(**kwargs) + self.mode = mode + self.uri = uri + + +class AssetReferenceBase(msrest.serialization.Model): + """Base definition for asset references. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DataPathAssetReference, IdAssetReference, OutputPathAssetReference. + + All required parameters must be populated in order to send to Azure. + + :ivar reference_type: Required. [Required] Specifies the type of asset reference.Constant + filled by server. Possible values include: "Id", "DataPath", "OutputPath". + :vartype reference_type: str or ~azure.mgmt.machinelearningservices.models.ReferenceType + """ + + _validation = { + 'reference_type': {'required': True}, + } + + _attribute_map = { + 'reference_type': {'key': 'referenceType', 'type': 'str'}, + } + + _subtype_map = { + 'reference_type': {'DataPath': 'DataPathAssetReference', 'Id': 'IdAssetReference', 'OutputPath': 'OutputPathAssetReference'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(AssetReferenceBase, self).__init__(**kwargs) + self.reference_type = None # type: Optional[str] + + +class AssignedUser(msrest.serialization.Model): + """A user that can be assigned to a compute instance. + + All required parameters must be populated in order to send to Azure. + + :ivar object_id: Required. User�s AAD Object Id. + :vartype object_id: str + :ivar tenant_id: Required. User�s AAD Tenant Id. + :vartype tenant_id: str + """ + + _validation = { + 'object_id': {'required': True}, + 'tenant_id': {'required': True}, + } + + _attribute_map = { + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__( + self, + *, + object_id: str, + tenant_id: str, + **kwargs + ): + """ + :keyword object_id: Required. User�s AAD Object Id. + :paramtype object_id: str + :keyword tenant_id: Required. User�s AAD Tenant Id. + :paramtype tenant_id: str + """ + super(AssignedUser, self).__init__(**kwargs) + self.object_id = object_id + self.tenant_id = tenant_id + + +class AutoPauseProperties(msrest.serialization.Model): + """Auto pause properties. + + :ivar delay_in_minutes: + :vartype delay_in_minutes: int + :ivar enabled: + :vartype enabled: bool + """ + + _attribute_map = { + 'delay_in_minutes': {'key': 'delayInMinutes', 'type': 'int'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__( + self, + *, + delay_in_minutes: Optional[int] = None, + enabled: Optional[bool] = None, + **kwargs + ): + """ + :keyword delay_in_minutes: + :paramtype delay_in_minutes: int + :keyword enabled: + :paramtype enabled: bool + """ + super(AutoPauseProperties, self).__init__(**kwargs) + self.delay_in_minutes = delay_in_minutes + self.enabled = enabled + + +class AutoScaleProperties(msrest.serialization.Model): + """Auto scale properties. + + :ivar min_node_count: + :vartype min_node_count: int + :ivar enabled: + :vartype enabled: bool + :ivar max_node_count: + :vartype max_node_count: int + """ + + _attribute_map = { + 'min_node_count': {'key': 'minNodeCount', 'type': 'int'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'max_node_count': {'key': 'maxNodeCount', 'type': 'int'}, + } + + def __init__( + self, + *, + min_node_count: Optional[int] = None, + enabled: Optional[bool] = None, + max_node_count: Optional[int] = None, + **kwargs + ): + """ + :keyword min_node_count: + :paramtype min_node_count: int + :keyword enabled: + :paramtype enabled: bool + :keyword max_node_count: + :paramtype max_node_count: int + """ + super(AutoScaleProperties, self).__init__(**kwargs) + self.min_node_count = min_node_count + self.enabled = enabled + self.max_node_count = max_node_count + + +class DatastoreDetails(ResourceBase): + """Base definition for datastore contents configuration. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBlobDatastore, AzureDataLakeGen1Datastore, AzureDataLakeGen2Datastore, AzureFileDatastore. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar credentials: Required. [Required] Account credentials. + :vartype credentials: ~azure.mgmt.machinelearningservices.models.DatastoreCredentials + :ivar datastore_type: Required. [Required] Storage type backing the datastore.Constant filled + by server. Possible values include: "AzureBlob", "AzureDataLakeGen1", "AzureDataLakeGen2", + "AzureFile". + :vartype datastore_type: str or ~azure.mgmt.machinelearningservices.models.DatastoreType + :ivar is_default: Readonly property to indicate if datastore is the workspace default + datastore. + :vartype is_default: bool + """ + + _validation = { + 'credentials': {'required': True}, + 'datastore_type': {'required': True}, + 'is_default': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'credentials': {'key': 'credentials', 'type': 'DatastoreCredentials'}, + 'datastore_type': {'key': 'datastoreType', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + } + + _subtype_map = { + 'datastore_type': {'AzureBlob': 'AzureBlobDatastore', 'AzureDataLakeGen1': 'AzureDataLakeGen1Datastore', 'AzureDataLakeGen2': 'AzureDataLakeGen2Datastore', 'AzureFile': 'AzureFileDatastore'} + } + + def __init__( + self, + *, + credentials: "DatastoreCredentials", + description: Optional[str] = None, + properties: Optional[Dict[str, str]] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword credentials: Required. [Required] Account credentials. + :paramtype credentials: ~azure.mgmt.machinelearningservices.models.DatastoreCredentials + """ + super(DatastoreDetails, self).__init__(description=description, properties=properties, tags=tags, **kwargs) + self.credentials = credentials + self.datastore_type = 'DatastoreDetails' # type: str + self.is_default = None + + +class AzureBlobDatastore(DatastoreDetails): + """Azure Blob datastore configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar credentials: Required. [Required] Account credentials. + :vartype credentials: ~azure.mgmt.machinelearningservices.models.DatastoreCredentials + :ivar datastore_type: Required. [Required] Storage type backing the datastore.Constant filled + by server. Possible values include: "AzureBlob", "AzureDataLakeGen1", "AzureDataLakeGen2", + "AzureFile". + :vartype datastore_type: str or ~azure.mgmt.machinelearningservices.models.DatastoreType + :ivar is_default: Readonly property to indicate if datastore is the workspace default + datastore. + :vartype is_default: bool + :ivar account_name: Storage account name. + :vartype account_name: str + :ivar container_name: Storage account container name. + :vartype container_name: str + :ivar endpoint: Azure cloud endpoint for the storage account. + :vartype endpoint: str + :ivar protocol: Protocol used to communicate with the storage account. + :vartype protocol: str + :ivar service_data_access_auth_identity: Indicates which identity to use to authenticate + service data access to customer's storage. Possible values include: "None", + "WorkspaceSystemAssignedIdentity", "WorkspaceUserAssignedIdentity". + :vartype service_data_access_auth_identity: str or + ~azure.mgmt.machinelearningservices.models.ServiceDataAccessAuthIdentity + """ + + _validation = { + 'credentials': {'required': True}, + 'datastore_type': {'required': True}, + 'is_default': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'credentials': {'key': 'credentials', 'type': 'DatastoreCredentials'}, + 'datastore_type': {'key': 'datastoreType', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'service_data_access_auth_identity': {'key': 'serviceDataAccessAuthIdentity', 'type': 'str'}, + } + + def __init__( + self, + *, + credentials: "DatastoreCredentials", + description: Optional[str] = None, + properties: Optional[Dict[str, str]] = None, + tags: Optional[Dict[str, str]] = None, + account_name: Optional[str] = None, + container_name: Optional[str] = None, + endpoint: Optional[str] = None, + protocol: Optional[str] = None, + service_data_access_auth_identity: Optional[Union[str, "ServiceDataAccessAuthIdentity"]] = None, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword credentials: Required. [Required] Account credentials. + :paramtype credentials: ~azure.mgmt.machinelearningservices.models.DatastoreCredentials + :keyword account_name: Storage account name. + :paramtype account_name: str + :keyword container_name: Storage account container name. + :paramtype container_name: str + :keyword endpoint: Azure cloud endpoint for the storage account. + :paramtype endpoint: str + :keyword protocol: Protocol used to communicate with the storage account. + :paramtype protocol: str + :keyword service_data_access_auth_identity: Indicates which identity to use to authenticate + service data access to customer's storage. Possible values include: "None", + "WorkspaceSystemAssignedIdentity", "WorkspaceUserAssignedIdentity". + :paramtype service_data_access_auth_identity: str or + ~azure.mgmt.machinelearningservices.models.ServiceDataAccessAuthIdentity + """ + super(AzureBlobDatastore, self).__init__(description=description, properties=properties, tags=tags, credentials=credentials, **kwargs) + self.datastore_type = 'AzureBlob' # type: str + self.account_name = account_name + self.container_name = container_name + self.endpoint = endpoint + self.protocol = protocol + self.service_data_access_auth_identity = service_data_access_auth_identity + + +class AzureDataLakeGen1Datastore(DatastoreDetails): + """Azure Data Lake Gen1 datastore configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar credentials: Required. [Required] Account credentials. + :vartype credentials: ~azure.mgmt.machinelearningservices.models.DatastoreCredentials + :ivar datastore_type: Required. [Required] Storage type backing the datastore.Constant filled + by server. Possible values include: "AzureBlob", "AzureDataLakeGen1", "AzureDataLakeGen2", + "AzureFile". + :vartype datastore_type: str or ~azure.mgmt.machinelearningservices.models.DatastoreType + :ivar is_default: Readonly property to indicate if datastore is the workspace default + datastore. + :vartype is_default: bool + :ivar service_data_access_auth_identity: Indicates which identity to use to authenticate + service data access to customer's storage. Possible values include: "None", + "WorkspaceSystemAssignedIdentity", "WorkspaceUserAssignedIdentity". + :vartype service_data_access_auth_identity: str or + ~azure.mgmt.machinelearningservices.models.ServiceDataAccessAuthIdentity + :ivar store_name: Required. [Required] Azure Data Lake store name. + :vartype store_name: str + """ + + _validation = { + 'credentials': {'required': True}, + 'datastore_type': {'required': True}, + 'is_default': {'readonly': True}, + 'store_name': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'credentials': {'key': 'credentials', 'type': 'DatastoreCredentials'}, + 'datastore_type': {'key': 'datastoreType', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'service_data_access_auth_identity': {'key': 'serviceDataAccessAuthIdentity', 'type': 'str'}, + 'store_name': {'key': 'storeName', 'type': 'str'}, + } + + def __init__( + self, + *, + credentials: "DatastoreCredentials", + store_name: str, + description: Optional[str] = None, + properties: Optional[Dict[str, str]] = None, + tags: Optional[Dict[str, str]] = None, + service_data_access_auth_identity: Optional[Union[str, "ServiceDataAccessAuthIdentity"]] = None, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword credentials: Required. [Required] Account credentials. + :paramtype credentials: ~azure.mgmt.machinelearningservices.models.DatastoreCredentials + :keyword service_data_access_auth_identity: Indicates which identity to use to authenticate + service data access to customer's storage. Possible values include: "None", + "WorkspaceSystemAssignedIdentity", "WorkspaceUserAssignedIdentity". + :paramtype service_data_access_auth_identity: str or + ~azure.mgmt.machinelearningservices.models.ServiceDataAccessAuthIdentity + :keyword store_name: Required. [Required] Azure Data Lake store name. + :paramtype store_name: str + """ + super(AzureDataLakeGen1Datastore, self).__init__(description=description, properties=properties, tags=tags, credentials=credentials, **kwargs) + self.datastore_type = 'AzureDataLakeGen1' # type: str + self.service_data_access_auth_identity = service_data_access_auth_identity + self.store_name = store_name + + +class AzureDataLakeGen2Datastore(DatastoreDetails): + """Azure Data Lake Gen2 datastore configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar credentials: Required. [Required] Account credentials. + :vartype credentials: ~azure.mgmt.machinelearningservices.models.DatastoreCredentials + :ivar datastore_type: Required. [Required] Storage type backing the datastore.Constant filled + by server. Possible values include: "AzureBlob", "AzureDataLakeGen1", "AzureDataLakeGen2", + "AzureFile". + :vartype datastore_type: str or ~azure.mgmt.machinelearningservices.models.DatastoreType + :ivar is_default: Readonly property to indicate if datastore is the workspace default + datastore. + :vartype is_default: bool + :ivar account_name: Required. [Required] Storage account name. + :vartype account_name: str + :ivar endpoint: Azure cloud endpoint for the storage account. + :vartype endpoint: str + :ivar filesystem: Required. [Required] The name of the Data Lake Gen2 filesystem. + :vartype filesystem: str + :ivar protocol: Protocol used to communicate with the storage account. + :vartype protocol: str + :ivar service_data_access_auth_identity: Indicates which identity to use to authenticate + service data access to customer's storage. Possible values include: "None", + "WorkspaceSystemAssignedIdentity", "WorkspaceUserAssignedIdentity". + :vartype service_data_access_auth_identity: str or + ~azure.mgmt.machinelearningservices.models.ServiceDataAccessAuthIdentity + """ + + _validation = { + 'credentials': {'required': True}, + 'datastore_type': {'required': True}, + 'is_default': {'readonly': True}, + 'account_name': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + 'filesystem': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'credentials': {'key': 'credentials', 'type': 'DatastoreCredentials'}, + 'datastore_type': {'key': 'datastoreType', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + 'filesystem': {'key': 'filesystem', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'service_data_access_auth_identity': {'key': 'serviceDataAccessAuthIdentity', 'type': 'str'}, + } + + def __init__( + self, + *, + credentials: "DatastoreCredentials", + account_name: str, + filesystem: str, + description: Optional[str] = None, + properties: Optional[Dict[str, str]] = None, + tags: Optional[Dict[str, str]] = None, + endpoint: Optional[str] = None, + protocol: Optional[str] = None, + service_data_access_auth_identity: Optional[Union[str, "ServiceDataAccessAuthIdentity"]] = None, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword credentials: Required. [Required] Account credentials. + :paramtype credentials: ~azure.mgmt.machinelearningservices.models.DatastoreCredentials + :keyword account_name: Required. [Required] Storage account name. + :paramtype account_name: str + :keyword endpoint: Azure cloud endpoint for the storage account. + :paramtype endpoint: str + :keyword filesystem: Required. [Required] The name of the Data Lake Gen2 filesystem. + :paramtype filesystem: str + :keyword protocol: Protocol used to communicate with the storage account. + :paramtype protocol: str + :keyword service_data_access_auth_identity: Indicates which identity to use to authenticate + service data access to customer's storage. Possible values include: "None", + "WorkspaceSystemAssignedIdentity", "WorkspaceUserAssignedIdentity". + :paramtype service_data_access_auth_identity: str or + ~azure.mgmt.machinelearningservices.models.ServiceDataAccessAuthIdentity + """ + super(AzureDataLakeGen2Datastore, self).__init__(description=description, properties=properties, tags=tags, credentials=credentials, **kwargs) + self.datastore_type = 'AzureDataLakeGen2' # type: str + self.account_name = account_name + self.endpoint = endpoint + self.filesystem = filesystem + self.protocol = protocol + self.service_data_access_auth_identity = service_data_access_auth_identity + + +class AzureFileDatastore(DatastoreDetails): + """Azure File datastore configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar credentials: Required. [Required] Account credentials. + :vartype credentials: ~azure.mgmt.machinelearningservices.models.DatastoreCredentials + :ivar datastore_type: Required. [Required] Storage type backing the datastore.Constant filled + by server. Possible values include: "AzureBlob", "AzureDataLakeGen1", "AzureDataLakeGen2", + "AzureFile". + :vartype datastore_type: str or ~azure.mgmt.machinelearningservices.models.DatastoreType + :ivar is_default: Readonly property to indicate if datastore is the workspace default + datastore. + :vartype is_default: bool + :ivar account_name: Required. [Required] Storage account name. + :vartype account_name: str + :ivar endpoint: Azure cloud endpoint for the storage account. + :vartype endpoint: str + :ivar file_share_name: Required. [Required] TODO - File share name. + :vartype file_share_name: str + :ivar protocol: Protocol used to communicate with the storage account. + :vartype protocol: str + :ivar service_data_access_auth_identity: Indicates which identity to use to authenticate + service data access to customer's storage. Possible values include: "None", + "WorkspaceSystemAssignedIdentity", "WorkspaceUserAssignedIdentity". + :vartype service_data_access_auth_identity: str or + ~azure.mgmt.machinelearningservices.models.ServiceDataAccessAuthIdentity + """ + + _validation = { + 'credentials': {'required': True}, + 'datastore_type': {'required': True}, + 'is_default': {'readonly': True}, + 'account_name': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + 'file_share_name': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'credentials': {'key': 'credentials', 'type': 'DatastoreCredentials'}, + 'datastore_type': {'key': 'datastoreType', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + 'file_share_name': {'key': 'fileShareName', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'service_data_access_auth_identity': {'key': 'serviceDataAccessAuthIdentity', 'type': 'str'}, + } + + def __init__( + self, + *, + credentials: "DatastoreCredentials", + account_name: str, + file_share_name: str, + description: Optional[str] = None, + properties: Optional[Dict[str, str]] = None, + tags: Optional[Dict[str, str]] = None, + endpoint: Optional[str] = None, + protocol: Optional[str] = None, + service_data_access_auth_identity: Optional[Union[str, "ServiceDataAccessAuthIdentity"]] = None, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword credentials: Required. [Required] Account credentials. + :paramtype credentials: ~azure.mgmt.machinelearningservices.models.DatastoreCredentials + :keyword account_name: Required. [Required] Storage account name. + :paramtype account_name: str + :keyword endpoint: Azure cloud endpoint for the storage account. + :paramtype endpoint: str + :keyword file_share_name: Required. [Required] TODO - File share name. + :paramtype file_share_name: str + :keyword protocol: Protocol used to communicate with the storage account. + :paramtype protocol: str + :keyword service_data_access_auth_identity: Indicates which identity to use to authenticate + service data access to customer's storage. Possible values include: "None", + "WorkspaceSystemAssignedIdentity", "WorkspaceUserAssignedIdentity". + :paramtype service_data_access_auth_identity: str or + ~azure.mgmt.machinelearningservices.models.ServiceDataAccessAuthIdentity + """ + super(AzureFileDatastore, self).__init__(description=description, properties=properties, tags=tags, credentials=credentials, **kwargs) + self.datastore_type = 'AzureFile' # type: str + self.account_name = account_name + self.endpoint = endpoint + self.file_share_name = file_share_name + self.protocol = protocol + self.service_data_access_auth_identity = service_data_access_auth_identity + + +class EarlyTerminationPolicy(msrest.serialization.Model): + """Early termination policies enable canceling poor-performing runs before they complete. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: BanditPolicy, MedianStoppingPolicy, TruncationSelectionPolicy. + + All required parameters must be populated in order to send to Azure. + + :ivar delay_evaluation: Number of intervals by which to delay the first evaluation. + :vartype delay_evaluation: int + :ivar evaluation_interval: Interval (number of runs) between policy evaluations. + :vartype evaluation_interval: int + :ivar policy_type: Required. [Required] Name of policy configuration.Constant filled by server. + Possible values include: "Bandit", "MedianStopping", "TruncationSelection". + :vartype policy_type: str or + ~azure.mgmt.machinelearningservices.models.EarlyTerminationPolicyType + """ + + _validation = { + 'policy_type': {'required': True}, + } + + _attribute_map = { + 'delay_evaluation': {'key': 'delayEvaluation', 'type': 'int'}, + 'evaluation_interval': {'key': 'evaluationInterval', 'type': 'int'}, + 'policy_type': {'key': 'policyType', 'type': 'str'}, + } + + _subtype_map = { + 'policy_type': {'Bandit': 'BanditPolicy', 'MedianStopping': 'MedianStoppingPolicy', 'TruncationSelection': 'TruncationSelectionPolicy'} + } + + def __init__( + self, + *, + delay_evaluation: Optional[int] = 0, + evaluation_interval: Optional[int] = 0, + **kwargs + ): + """ + :keyword delay_evaluation: Number of intervals by which to delay the first evaluation. + :paramtype delay_evaluation: int + :keyword evaluation_interval: Interval (number of runs) between policy evaluations. + :paramtype evaluation_interval: int + """ + super(EarlyTerminationPolicy, self).__init__(**kwargs) + self.delay_evaluation = delay_evaluation + self.evaluation_interval = evaluation_interval + self.policy_type = None # type: Optional[str] + + +class BanditPolicy(EarlyTerminationPolicy): + """Defines an early termination policy based on slack criteria, and a frequency and delay interval for evaluation. + + All required parameters must be populated in order to send to Azure. + + :ivar delay_evaluation: Number of intervals by which to delay the first evaluation. + :vartype delay_evaluation: int + :ivar evaluation_interval: Interval (number of runs) between policy evaluations. + :vartype evaluation_interval: int + :ivar policy_type: Required. [Required] Name of policy configuration.Constant filled by server. + Possible values include: "Bandit", "MedianStopping", "TruncationSelection". + :vartype policy_type: str or + ~azure.mgmt.machinelearningservices.models.EarlyTerminationPolicyType + :ivar slack_amount: Absolute distance allowed from the best performing run. + :vartype slack_amount: float + :ivar slack_factor: Ratio of the allowed distance from the best performing run. + :vartype slack_factor: float + """ + + _validation = { + 'policy_type': {'required': True}, + } + + _attribute_map = { + 'delay_evaluation': {'key': 'delayEvaluation', 'type': 'int'}, + 'evaluation_interval': {'key': 'evaluationInterval', 'type': 'int'}, + 'policy_type': {'key': 'policyType', 'type': 'str'}, + 'slack_amount': {'key': 'slackAmount', 'type': 'float'}, + 'slack_factor': {'key': 'slackFactor', 'type': 'float'}, + } + + def __init__( + self, + *, + delay_evaluation: Optional[int] = 0, + evaluation_interval: Optional[int] = 0, + slack_amount: Optional[float] = 0, + slack_factor: Optional[float] = 0, + **kwargs + ): + """ + :keyword delay_evaluation: Number of intervals by which to delay the first evaluation. + :paramtype delay_evaluation: int + :keyword evaluation_interval: Interval (number of runs) between policy evaluations. + :paramtype evaluation_interval: int + :keyword slack_amount: Absolute distance allowed from the best performing run. + :paramtype slack_amount: float + :keyword slack_factor: Ratio of the allowed distance from the best performing run. + :paramtype slack_factor: float + """ + super(BanditPolicy, self).__init__(delay_evaluation=delay_evaluation, evaluation_interval=evaluation_interval, **kwargs) + self.policy_type = 'Bandit' # type: str + self.slack_amount = slack_amount + self.slack_factor = slack_factor + + +class Resource(msrest.serialization.Model): + """Common fields that are returned in the response for all Azure Resource Manager resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.system_data = None + + +class TrackedResource(Resource): + """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar location: Required. The geo-location where the resource lives. + :vartype location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword location: Required. The geo-location where the resource lives. + :paramtype location: str + """ + super(TrackedResource, self).__init__(**kwargs) + self.tags = tags + self.location = location + + +class BatchDeploymentData(TrackedResource): + """BatchDeploymentData. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar location: Required. The geo-location where the resource lives. + :vartype location: str + :ivar identity: Managed service identity (system assigned and/or user assigned identities). + :vartype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :ivar kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type. + :vartype kind: str + :ivar properties: Required. [Required] Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.BatchDeploymentDetails + :ivar sku: Sku details required for ARM contract for Autoscaling. + :vartype sku: ~azure.mgmt.machinelearningservices.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'location': {'required': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'BatchDeploymentDetails'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__( + self, + *, + location: str, + properties: "BatchDeploymentDetails", + tags: Optional[Dict[str, str]] = None, + identity: Optional["ManagedServiceIdentity"] = None, + kind: Optional[str] = None, + sku: Optional["Sku"] = None, + **kwargs + ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword location: Required. The geo-location where the resource lives. + :paramtype location: str + :keyword identity: Managed service identity (system assigned and/or user assigned identities). + :paramtype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :keyword kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type. + :paramtype kind: str + :keyword properties: Required. [Required] Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.BatchDeploymentDetails + :keyword sku: Sku details required for ARM contract for Autoscaling. + :paramtype sku: ~azure.mgmt.machinelearningservices.models.Sku + """ + super(BatchDeploymentData, self).__init__(tags=tags, location=location, **kwargs) + self.identity = identity + self.kind = kind + self.properties = properties + self.sku = sku + + +class EndpointDeploymentPropertiesBase(msrest.serialization.Model): + """Base definition for endpoint deployment. + + :ivar code_configuration: Code configuration for the endpoint deployment. + :vartype code_configuration: ~azure.mgmt.machinelearningservices.models.CodeConfiguration + :ivar description: Description of the endpoint deployment. + :vartype description: str + :ivar environment_id: ARM resource ID of the environment specification for the endpoint + deployment. + :vartype environment_id: str + :ivar environment_variables: Environment variables configuration for the deployment. + :vartype environment_variables: dict[str, str] + :ivar properties: Property dictionary. Properties can be added, but not removed or altered. + :vartype properties: dict[str, str] + """ + + _attribute_map = { + 'code_configuration': {'key': 'codeConfiguration', 'type': 'CodeConfiguration'}, + 'description': {'key': 'description', 'type': 'str'}, + 'environment_id': {'key': 'environmentId', 'type': 'str'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + } + + def __init__( + self, + *, + code_configuration: Optional["CodeConfiguration"] = None, + description: Optional[str] = None, + environment_id: Optional[str] = None, + environment_variables: Optional[Dict[str, str]] = None, + properties: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword code_configuration: Code configuration for the endpoint deployment. + :paramtype code_configuration: ~azure.mgmt.machinelearningservices.models.CodeConfiguration + :keyword description: Description of the endpoint deployment. + :paramtype description: str + :keyword environment_id: ARM resource ID of the environment specification for the endpoint + deployment. + :paramtype environment_id: str + :keyword environment_variables: Environment variables configuration for the deployment. + :paramtype environment_variables: dict[str, str] + :keyword properties: Property dictionary. Properties can be added, but not removed or altered. + :paramtype properties: dict[str, str] + """ + super(EndpointDeploymentPropertiesBase, self).__init__(**kwargs) + self.code_configuration = code_configuration + self.description = description + self.environment_id = environment_id + self.environment_variables = environment_variables + self.properties = properties + + +class BatchDeploymentDetails(EndpointDeploymentPropertiesBase): + """Batch inference settings per deployment. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code_configuration: Code configuration for the endpoint deployment. + :vartype code_configuration: ~azure.mgmt.machinelearningservices.models.CodeConfiguration + :ivar description: Description of the endpoint deployment. + :vartype description: str + :ivar environment_id: ARM resource ID of the environment specification for the endpoint + deployment. + :vartype environment_id: str + :ivar environment_variables: Environment variables configuration for the deployment. + :vartype environment_variables: dict[str, str] + :ivar properties: Property dictionary. Properties can be added, but not removed or altered. + :vartype properties: dict[str, str] + :ivar compute: Compute target for batch inference operation. + :vartype compute: str + :ivar error_threshold: Error threshold, if the error count for the entire input goes above this + value, + the batch inference will be aborted. Range is [-1, int.MaxValue]. + For FileDataset, this value is the count of file failures. + For TabularDataset, this value is the count of record failures. + If set to -1 (the lower bound), all failures during batch inference will be ignored. + :vartype error_threshold: int + :ivar logging_level: Logging level for batch inference operation. Possible values include: + "Info", "Warning", "Debug". + :vartype logging_level: str or ~azure.mgmt.machinelearningservices.models.BatchLoggingLevel + :ivar max_concurrency_per_instance: Indicates maximum number of parallelism per instance. + :vartype max_concurrency_per_instance: int + :ivar mini_batch_size: Size of the mini-batch passed to each batch invocation. + For FileDataset, this is the number of files per mini-batch. + For TabularDataset, this is the size of the records in bytes, per mini-batch. + :vartype mini_batch_size: long + :ivar model: Reference to the model asset for the endpoint deployment. + :vartype model: ~azure.mgmt.machinelearningservices.models.AssetReferenceBase + :ivar output_action: Indicates how the output will be organized. Possible values include: + "SummaryOnly", "AppendRow". + :vartype output_action: str or ~azure.mgmt.machinelearningservices.models.BatchOutputAction + :ivar output_file_name: Customized output file name for append_row output action. + :vartype output_file_name: str + :ivar provisioning_state: Provisioning state for the endpoint deployment. Possible values + include: "Creating", "Deleting", "Scaling", "Updating", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.DeploymentProvisioningState + :ivar resources: Indicates compute configuration for the job. + If not provided, will default to the defaults defined in ResourceConfiguration. + :vartype resources: ~azure.mgmt.machinelearningservices.models.ResourceConfiguration + :ivar retry_settings: Retry Settings for the batch inference operation. + If not provided, will default to the defaults defined in BatchRetrySettings. + :vartype retry_settings: ~azure.mgmt.machinelearningservices.models.BatchRetrySettings + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'code_configuration': {'key': 'codeConfiguration', 'type': 'CodeConfiguration'}, + 'description': {'key': 'description', 'type': 'str'}, + 'environment_id': {'key': 'environmentId', 'type': 'str'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'compute': {'key': 'compute', 'type': 'str'}, + 'error_threshold': {'key': 'errorThreshold', 'type': 'int'}, + 'logging_level': {'key': 'loggingLevel', 'type': 'str'}, + 'max_concurrency_per_instance': {'key': 'maxConcurrencyPerInstance', 'type': 'int'}, + 'mini_batch_size': {'key': 'miniBatchSize', 'type': 'long'}, + 'model': {'key': 'model', 'type': 'AssetReferenceBase'}, + 'output_action': {'key': 'outputAction', 'type': 'str'}, + 'output_file_name': {'key': 'outputFileName', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': 'ResourceConfiguration'}, + 'retry_settings': {'key': 'retrySettings', 'type': 'BatchRetrySettings'}, + } + + def __init__( + self, + *, + code_configuration: Optional["CodeConfiguration"] = None, + description: Optional[str] = None, + environment_id: Optional[str] = None, + environment_variables: Optional[Dict[str, str]] = None, + properties: Optional[Dict[str, str]] = None, + compute: Optional[str] = None, + error_threshold: Optional[int] = -1, + logging_level: Optional[Union[str, "BatchLoggingLevel"]] = None, + max_concurrency_per_instance: Optional[int] = 1, + mini_batch_size: Optional[int] = 10, + model: Optional["AssetReferenceBase"] = None, + output_action: Optional[Union[str, "BatchOutputAction"]] = None, + output_file_name: Optional[str] = "predictions.csv", + resources: Optional["ResourceConfiguration"] = None, + retry_settings: Optional["BatchRetrySettings"] = None, + **kwargs + ): + """ + :keyword code_configuration: Code configuration for the endpoint deployment. + :paramtype code_configuration: ~azure.mgmt.machinelearningservices.models.CodeConfiguration + :keyword description: Description of the endpoint deployment. + :paramtype description: str + :keyword environment_id: ARM resource ID of the environment specification for the endpoint + deployment. + :paramtype environment_id: str + :keyword environment_variables: Environment variables configuration for the deployment. + :paramtype environment_variables: dict[str, str] + :keyword properties: Property dictionary. Properties can be added, but not removed or altered. + :paramtype properties: dict[str, str] + :keyword compute: Compute target for batch inference operation. + :paramtype compute: str + :keyword error_threshold: Error threshold, if the error count for the entire input goes above + this value, + the batch inference will be aborted. Range is [-1, int.MaxValue]. + For FileDataset, this value is the count of file failures. + For TabularDataset, this value is the count of record failures. + If set to -1 (the lower bound), all failures during batch inference will be ignored. + :paramtype error_threshold: int + :keyword logging_level: Logging level for batch inference operation. Possible values include: + "Info", "Warning", "Debug". + :paramtype logging_level: str or ~azure.mgmt.machinelearningservices.models.BatchLoggingLevel + :keyword max_concurrency_per_instance: Indicates maximum number of parallelism per instance. + :paramtype max_concurrency_per_instance: int + :keyword mini_batch_size: Size of the mini-batch passed to each batch invocation. + For FileDataset, this is the number of files per mini-batch. + For TabularDataset, this is the size of the records in bytes, per mini-batch. + :paramtype mini_batch_size: long + :keyword model: Reference to the model asset for the endpoint deployment. + :paramtype model: ~azure.mgmt.machinelearningservices.models.AssetReferenceBase + :keyword output_action: Indicates how the output will be organized. Possible values include: + "SummaryOnly", "AppendRow". + :paramtype output_action: str or ~azure.mgmt.machinelearningservices.models.BatchOutputAction + :keyword output_file_name: Customized output file name for append_row output action. + :paramtype output_file_name: str + :keyword resources: Indicates compute configuration for the job. + If not provided, will default to the defaults defined in ResourceConfiguration. + :paramtype resources: ~azure.mgmt.machinelearningservices.models.ResourceConfiguration + :keyword retry_settings: Retry Settings for the batch inference operation. + If not provided, will default to the defaults defined in BatchRetrySettings. + :paramtype retry_settings: ~azure.mgmt.machinelearningservices.models.BatchRetrySettings + """ + super(BatchDeploymentDetails, self).__init__(code_configuration=code_configuration, description=description, environment_id=environment_id, environment_variables=environment_variables, properties=properties, **kwargs) + self.compute = compute + self.error_threshold = error_threshold + self.logging_level = logging_level + self.max_concurrency_per_instance = max_concurrency_per_instance + self.mini_batch_size = mini_batch_size + self.model = model + self.output_action = output_action + self.output_file_name = output_file_name + self.provisioning_state = None + self.resources = resources + self.retry_settings = retry_settings + + +class BatchDeploymentTrackedResourceArmPaginatedResult(msrest.serialization.Model): + """A paginated list of BatchDeployment entities. + + :ivar next_link: The link to the next page of BatchDeployment objects. If null, there are no + additional pages. + :vartype next_link: str + :ivar value: An array of objects of type BatchDeployment. + :vartype value: list[~azure.mgmt.machinelearningservices.models.BatchDeploymentData] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[BatchDeploymentData]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["BatchDeploymentData"]] = None, + **kwargs + ): + """ + :keyword next_link: The link to the next page of BatchDeployment objects. If null, there are no + additional pages. + :paramtype next_link: str + :keyword value: An array of objects of type BatchDeployment. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.BatchDeploymentData] + """ + super(BatchDeploymentTrackedResourceArmPaginatedResult, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class BatchEndpointData(TrackedResource): + """BatchEndpointData. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar location: Required. The geo-location where the resource lives. + :vartype location: str + :ivar identity: Managed service identity (system assigned and/or user assigned identities). + :vartype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :ivar kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type. + :vartype kind: str + :ivar properties: Required. [Required] Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.BatchEndpointDetails + :ivar sku: Sku details required for ARM contract for Autoscaling. + :vartype sku: ~azure.mgmt.machinelearningservices.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'location': {'required': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'BatchEndpointDetails'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__( + self, + *, + location: str, + properties: "BatchEndpointDetails", + tags: Optional[Dict[str, str]] = None, + identity: Optional["ManagedServiceIdentity"] = None, + kind: Optional[str] = None, + sku: Optional["Sku"] = None, + **kwargs + ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword location: Required. The geo-location where the resource lives. + :paramtype location: str + :keyword identity: Managed service identity (system assigned and/or user assigned identities). + :paramtype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :keyword kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type. + :paramtype kind: str + :keyword properties: Required. [Required] Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.BatchEndpointDetails + :keyword sku: Sku details required for ARM contract for Autoscaling. + :paramtype sku: ~azure.mgmt.machinelearningservices.models.Sku + """ + super(BatchEndpointData, self).__init__(tags=tags, location=location, **kwargs) + self.identity = identity + self.kind = kind + self.properties = properties + self.sku = sku + + +class BatchEndpointDefaults(msrest.serialization.Model): + """Batch endpoint default values. + + :ivar deployment_name: Name of the deployment that will be default for the endpoint. + This deployment will end up getting 100% traffic when the endpoint scoring URL is invoked. + :vartype deployment_name: str + """ + + _attribute_map = { + 'deployment_name': {'key': 'deploymentName', 'type': 'str'}, + } + + def __init__( + self, + *, + deployment_name: Optional[str] = None, + **kwargs + ): + """ + :keyword deployment_name: Name of the deployment that will be default for the endpoint. + This deployment will end up getting 100% traffic when the endpoint scoring URL is invoked. + :paramtype deployment_name: str + """ + super(BatchEndpointDefaults, self).__init__(**kwargs) + self.deployment_name = deployment_name + + +class EndpointPropertiesBase(msrest.serialization.Model): + """Inference Endpoint base definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar auth_mode: Required. [Required] Use 'Key' for key based authentication and 'AMLToken' for + Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. + Possible values include: "AMLToken", "Key", "AADToken". + :vartype auth_mode: str or ~azure.mgmt.machinelearningservices.models.EndpointAuthMode + :ivar description: Description of the inference endpoint. + :vartype description: str + :ivar keys: EndpointAuthKeys to set initially on an Endpoint. + This property will always be returned as null. AuthKey values must be retrieved using the + ListKeys API. + :vartype keys: ~azure.mgmt.machinelearningservices.models.EndpointAuthKeys + :ivar properties: Property dictionary. Properties can be added, but not removed or altered. + :vartype properties: dict[str, str] + :ivar scoring_uri: Endpoint URI. + :vartype scoring_uri: str + :ivar swagger_uri: Endpoint Swagger URI. + :vartype swagger_uri: str + """ + + _validation = { + 'auth_mode': {'required': True}, + 'scoring_uri': {'readonly': True}, + 'swagger_uri': {'readonly': True}, + } + + _attribute_map = { + 'auth_mode': {'key': 'authMode', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'keys': {'key': 'keys', 'type': 'EndpointAuthKeys'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'scoring_uri': {'key': 'scoringUri', 'type': 'str'}, + 'swagger_uri': {'key': 'swaggerUri', 'type': 'str'}, + } + + def __init__( + self, + *, + auth_mode: Union[str, "EndpointAuthMode"], + description: Optional[str] = None, + keys: Optional["EndpointAuthKeys"] = None, + properties: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword auth_mode: Required. [Required] Use 'Key' for key based authentication and 'AMLToken' + for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' + does. Possible values include: "AMLToken", "Key", "AADToken". + :paramtype auth_mode: str or ~azure.mgmt.machinelearningservices.models.EndpointAuthMode + :keyword description: Description of the inference endpoint. + :paramtype description: str + :keyword keys: EndpointAuthKeys to set initially on an Endpoint. + This property will always be returned as null. AuthKey values must be retrieved using the + ListKeys API. + :paramtype keys: ~azure.mgmt.machinelearningservices.models.EndpointAuthKeys + :keyword properties: Property dictionary. Properties can be added, but not removed or altered. + :paramtype properties: dict[str, str] + """ + super(EndpointPropertiesBase, self).__init__(**kwargs) + self.auth_mode = auth_mode + self.description = description + self.keys = keys + self.properties = properties + self.scoring_uri = None + self.swagger_uri = None + + +class BatchEndpointDetails(EndpointPropertiesBase): + """Batch endpoint configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar auth_mode: Required. [Required] Use 'Key' for key based authentication and 'AMLToken' for + Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. + Possible values include: "AMLToken", "Key", "AADToken". + :vartype auth_mode: str or ~azure.mgmt.machinelearningservices.models.EndpointAuthMode + :ivar description: Description of the inference endpoint. + :vartype description: str + :ivar keys: EndpointAuthKeys to set initially on an Endpoint. + This property will always be returned as null. AuthKey values must be retrieved using the + ListKeys API. + :vartype keys: ~azure.mgmt.machinelearningservices.models.EndpointAuthKeys + :ivar properties: Property dictionary. Properties can be added, but not removed or altered. + :vartype properties: dict[str, str] + :ivar scoring_uri: Endpoint URI. + :vartype scoring_uri: str + :ivar swagger_uri: Endpoint Swagger URI. + :vartype swagger_uri: str + :ivar defaults: Default values for Batch Endpoint. + :vartype defaults: ~azure.mgmt.machinelearningservices.models.BatchEndpointDefaults + :ivar provisioning_state: Provisioning state for the endpoint. Possible values include: + "Creating", "Deleting", "Succeeded", "Failed", "Updating", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.EndpointProvisioningState + """ + + _validation = { + 'auth_mode': {'required': True}, + 'scoring_uri': {'readonly': True}, + 'swagger_uri': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'auth_mode': {'key': 'authMode', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'keys': {'key': 'keys', 'type': 'EndpointAuthKeys'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'scoring_uri': {'key': 'scoringUri', 'type': 'str'}, + 'swagger_uri': {'key': 'swaggerUri', 'type': 'str'}, + 'defaults': {'key': 'defaults', 'type': 'BatchEndpointDefaults'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + auth_mode: Union[str, "EndpointAuthMode"], + description: Optional[str] = None, + keys: Optional["EndpointAuthKeys"] = None, + properties: Optional[Dict[str, str]] = None, + defaults: Optional["BatchEndpointDefaults"] = None, + **kwargs + ): + """ + :keyword auth_mode: Required. [Required] Use 'Key' for key based authentication and 'AMLToken' + for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' + does. Possible values include: "AMLToken", "Key", "AADToken". + :paramtype auth_mode: str or ~azure.mgmt.machinelearningservices.models.EndpointAuthMode + :keyword description: Description of the inference endpoint. + :paramtype description: str + :keyword keys: EndpointAuthKeys to set initially on an Endpoint. + This property will always be returned as null. AuthKey values must be retrieved using the + ListKeys API. + :paramtype keys: ~azure.mgmt.machinelearningservices.models.EndpointAuthKeys + :keyword properties: Property dictionary. Properties can be added, but not removed or altered. + :paramtype properties: dict[str, str] + :keyword defaults: Default values for Batch Endpoint. + :paramtype defaults: ~azure.mgmt.machinelearningservices.models.BatchEndpointDefaults + """ + super(BatchEndpointDetails, self).__init__(auth_mode=auth_mode, description=description, keys=keys, properties=properties, **kwargs) + self.defaults = defaults + self.provisioning_state = None + + +class BatchEndpointTrackedResourceArmPaginatedResult(msrest.serialization.Model): + """A paginated list of BatchEndpoint entities. + + :ivar next_link: The link to the next page of BatchEndpoint objects. If null, there are no + additional pages. + :vartype next_link: str + :ivar value: An array of objects of type BatchEndpoint. + :vartype value: list[~azure.mgmt.machinelearningservices.models.BatchEndpointData] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[BatchEndpointData]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["BatchEndpointData"]] = None, + **kwargs + ): + """ + :keyword next_link: The link to the next page of BatchEndpoint objects. If null, there are no + additional pages. + :paramtype next_link: str + :keyword value: An array of objects of type BatchEndpoint. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.BatchEndpointData] + """ + super(BatchEndpointTrackedResourceArmPaginatedResult, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class BatchRetrySettings(msrest.serialization.Model): + """Retry settings for a batch inference operation. + + :ivar max_retries: Maximum retry count for a mini-batch. + :vartype max_retries: int + :ivar timeout: Invocation timeout for a mini-batch, in ISO 8601 format. + :vartype timeout: ~datetime.timedelta + """ + + _attribute_map = { + 'max_retries': {'key': 'maxRetries', 'type': 'int'}, + 'timeout': {'key': 'timeout', 'type': 'duration'}, + } + + def __init__( + self, + *, + max_retries: Optional[int] = 3, + timeout: Optional[datetime.timedelta] = "PT30S", + **kwargs + ): + """ + :keyword max_retries: Maximum retry count for a mini-batch. + :paramtype max_retries: int + :keyword timeout: Invocation timeout for a mini-batch, in ISO 8601 format. + :paramtype timeout: ~datetime.timedelta + """ + super(BatchRetrySettings, self).__init__(**kwargs) + self.max_retries = max_retries + self.timeout = timeout + + +class SamplingAlgorithm(msrest.serialization.Model): + """The Sampling Algorithm used to generate hyperparameter values, along with properties to +configure the algorithm. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: BayesianSamplingAlgorithm, GridSamplingAlgorithm, RandomSamplingAlgorithm. + + All required parameters must be populated in order to send to Azure. + + :ivar sampling_algorithm_type: Required. [Required] The algorithm used for generating + hyperparameter values, along with configuration properties.Constant filled by server. Possible + values include: "Grid", "Random", "Bayesian". + :vartype sampling_algorithm_type: str or + ~azure.mgmt.machinelearningservices.models.SamplingAlgorithmType + """ + + _validation = { + 'sampling_algorithm_type': {'required': True}, + } + + _attribute_map = { + 'sampling_algorithm_type': {'key': 'samplingAlgorithmType', 'type': 'str'}, + } + + _subtype_map = { + 'sampling_algorithm_type': {'Bayesian': 'BayesianSamplingAlgorithm', 'Grid': 'GridSamplingAlgorithm', 'Random': 'RandomSamplingAlgorithm'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(SamplingAlgorithm, self).__init__(**kwargs) + self.sampling_algorithm_type = None # type: Optional[str] + + +class BayesianSamplingAlgorithm(SamplingAlgorithm): + """Defines a Sampling Algorithm that generates values based on previous values. + + All required parameters must be populated in order to send to Azure. + + :ivar sampling_algorithm_type: Required. [Required] The algorithm used for generating + hyperparameter values, along with configuration properties.Constant filled by server. Possible + values include: "Grid", "Random", "Bayesian". + :vartype sampling_algorithm_type: str or + ~azure.mgmt.machinelearningservices.models.SamplingAlgorithmType + """ + + _validation = { + 'sampling_algorithm_type': {'required': True}, + } + + _attribute_map = { + 'sampling_algorithm_type': {'key': 'samplingAlgorithmType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(BayesianSamplingAlgorithm, self).__init__(**kwargs) + self.sampling_algorithm_type = 'Bayesian' # type: str + + +class BuildContext(msrest.serialization.Model): + """Configuration settings for Docker build context. + + All required parameters must be populated in order to send to Azure. + + :ivar context_uri: Required. [Required] URI of the Docker build context used to build the + image. Supports blob URIs on environment creation and may return blob or Git URIs. + + + .. raw:: html + + <seealso + href="https://docs.docker.com/engine/reference/commandline/build/#extended-description" />. + :vartype context_uri: str + :ivar dockerfile_path: Path to the Dockerfile in the build context. + + + .. raw:: html + + <seealso href="https://docs.docker.com/engine/reference/builder/" />. + :vartype dockerfile_path: str + """ + + _validation = { + 'context_uri': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + } + + _attribute_map = { + 'context_uri': {'key': 'contextUri', 'type': 'str'}, + 'dockerfile_path': {'key': 'dockerfilePath', 'type': 'str'}, + } + + def __init__( + self, + *, + context_uri: str, + dockerfile_path: Optional[str] = "Dockerfile", + **kwargs + ): + """ + :keyword context_uri: Required. [Required] URI of the Docker build context used to build the + image. Supports blob URIs on environment creation and may return blob or Git URIs. + + + .. raw:: html + + <seealso + href="https://docs.docker.com/engine/reference/commandline/build/#extended-description" />. + :paramtype context_uri: str + :keyword dockerfile_path: Path to the Dockerfile in the build context. + + + .. raw:: html + + <seealso href="https://docs.docker.com/engine/reference/builder/" />. + :paramtype dockerfile_path: str + """ + super(BuildContext, self).__init__(**kwargs) + self.context_uri = context_uri + self.dockerfile_path = dockerfile_path + + +class CertificateDatastoreCredentials(DatastoreCredentials): + """Certificate datastore credentials configuration. + + All required parameters must be populated in order to send to Azure. + + :ivar credentials_type: Required. [Required] Credential type used to authentication with + storage.Constant filled by server. Possible values include: "AccountKey", "Certificate", + "None", "Sas", "ServicePrincipal". + :vartype credentials_type: str or ~azure.mgmt.machinelearningservices.models.CredentialsType + :ivar authority_url: Authority URL used for authentication. + :vartype authority_url: str + :ivar client_id: Required. [Required] Service principal client ID. + :vartype client_id: str + :ivar resource_url: Resource the service principal has access to. + :vartype resource_url: str + :ivar secrets: Required. [Required] Service principal secrets. + :vartype secrets: ~azure.mgmt.machinelearningservices.models.CertificateDatastoreSecrets + :ivar tenant_id: Required. [Required] ID of the tenant to which the service principal belongs. + :vartype tenant_id: str + :ivar thumbprint: Required. [Required] Thumbprint of the certificate used for authentication. + :vartype thumbprint: str + """ + + _validation = { + 'credentials_type': {'required': True}, + 'client_id': {'required': True}, + 'secrets': {'required': True}, + 'tenant_id': {'required': True}, + 'thumbprint': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + } + + _attribute_map = { + 'credentials_type': {'key': 'credentialsType', 'type': 'str'}, + 'authority_url': {'key': 'authorityUrl', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'resource_url': {'key': 'resourceUrl', 'type': 'str'}, + 'secrets': {'key': 'secrets', 'type': 'CertificateDatastoreSecrets'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + } + + def __init__( + self, + *, + client_id: str, + secrets: "CertificateDatastoreSecrets", + tenant_id: str, + thumbprint: str, + authority_url: Optional[str] = None, + resource_url: Optional[str] = None, + **kwargs + ): + """ + :keyword authority_url: Authority URL used for authentication. + :paramtype authority_url: str + :keyword client_id: Required. [Required] Service principal client ID. + :paramtype client_id: str + :keyword resource_url: Resource the service principal has access to. + :paramtype resource_url: str + :keyword secrets: Required. [Required] Service principal secrets. + :paramtype secrets: ~azure.mgmt.machinelearningservices.models.CertificateDatastoreSecrets + :keyword tenant_id: Required. [Required] ID of the tenant to which the service principal + belongs. + :paramtype tenant_id: str + :keyword thumbprint: Required. [Required] Thumbprint of the certificate used for + authentication. + :paramtype thumbprint: str + """ + super(CertificateDatastoreCredentials, self).__init__(**kwargs) + self.credentials_type = 'Certificate' # type: str + self.authority_url = authority_url + self.client_id = client_id + self.resource_url = resource_url + self.secrets = secrets + self.tenant_id = tenant_id + self.thumbprint = thumbprint + + +class CertificateDatastoreSecrets(DatastoreSecrets): + """Datastore certificate secrets. + + All required parameters must be populated in order to send to Azure. + + :ivar secrets_type: Required. [Required] Credential type used to authentication with + storage.Constant filled by server. Possible values include: "AccountKey", "Certificate", "Sas", + "ServicePrincipal". + :vartype secrets_type: str or ~azure.mgmt.machinelearningservices.models.SecretsType + :ivar certificate: Service principal certificate. + :vartype certificate: str + """ + + _validation = { + 'secrets_type': {'required': True}, + } + + _attribute_map = { + 'secrets_type': {'key': 'secretsType', 'type': 'str'}, + 'certificate': {'key': 'certificate', 'type': 'str'}, + } + + def __init__( + self, + *, + certificate: Optional[str] = None, + **kwargs + ): + """ + :keyword certificate: Service principal certificate. + :paramtype certificate: str + """ + super(CertificateDatastoreSecrets, self).__init__(**kwargs) + self.secrets_type = 'Certificate' # type: str + self.certificate = certificate + + +class ClusterUpdateParameters(msrest.serialization.Model): + """AmlCompute update parameters. + + :ivar properties: Properties of ClusterUpdate. + :vartype properties: ~azure.mgmt.machinelearningservices.models.ScaleSettingsInformation + """ + + _attribute_map = { + 'properties': {'key': 'properties.properties', 'type': 'ScaleSettingsInformation'}, + } + + def __init__( + self, + *, + properties: Optional["ScaleSettingsInformation"] = None, + **kwargs + ): + """ + :keyword properties: Properties of ClusterUpdate. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.ScaleSettingsInformation + """ + super(ClusterUpdateParameters, self).__init__(**kwargs) + self.properties = properties + + +class CodeConfiguration(msrest.serialization.Model): + """Configuration for a scoring code asset. + + All required parameters must be populated in order to send to Azure. + + :ivar code_id: ARM resource ID of the code asset. + :vartype code_id: str + :ivar scoring_script: Required. [Required] The script to execute on startup. eg. "score.py". + :vartype scoring_script: str + """ + + _validation = { + 'scoring_script': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + } + + _attribute_map = { + 'code_id': {'key': 'codeId', 'type': 'str'}, + 'scoring_script': {'key': 'scoringScript', 'type': 'str'}, + } + + def __init__( + self, + *, + scoring_script: str, + code_id: Optional[str] = None, + **kwargs + ): + """ + :keyword code_id: ARM resource ID of the code asset. + :paramtype code_id: str + :keyword scoring_script: Required. [Required] The script to execute on startup. eg. "score.py". + :paramtype scoring_script: str + """ + super(CodeConfiguration, self).__init__(**kwargs) + self.code_id = code_id + self.scoring_script = scoring_script + + +class CodeContainerData(Resource): + """Azure Resource Manager resource envelope. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar properties: Required. [Required] Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.CodeContainerDetails + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'CodeContainerDetails'}, + } + + def __init__( + self, + *, + properties: "CodeContainerDetails", + **kwargs + ): + """ + :keyword properties: Required. [Required] Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.CodeContainerDetails + """ + super(CodeContainerData, self).__init__(**kwargs) + self.properties = properties + + +class CodeContainerDetails(AssetContainer): + """Container for code asset versions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar latest_version: The latest version inside this container. + :vartype latest_version: str + :ivar next_version: The next auto incremental version. + :vartype next_version: str + """ + + _validation = { + 'latest_version': {'readonly': True}, + 'next_version': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'latest_version': {'key': 'latestVersion', 'type': 'str'}, + 'next_version': {'key': 'nextVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + properties: Optional[Dict[str, str]] = None, + tags: Optional[Dict[str, str]] = None, + is_archived: Optional[bool] = False, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + """ + super(CodeContainerDetails, self).__init__(description=description, properties=properties, tags=tags, is_archived=is_archived, **kwargs) + + +class CodeContainerResourceArmPaginatedResult(msrest.serialization.Model): + """A paginated list of CodeContainer entities. + + :ivar next_link: The link to the next page of CodeContainer objects. If null, there are no + additional pages. + :vartype next_link: str + :ivar value: An array of objects of type CodeContainer. + :vartype value: list[~azure.mgmt.machinelearningservices.models.CodeContainerData] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[CodeContainerData]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["CodeContainerData"]] = None, + **kwargs + ): + """ + :keyword next_link: The link to the next page of CodeContainer objects. If null, there are no + additional pages. + :paramtype next_link: str + :keyword value: An array of objects of type CodeContainer. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.CodeContainerData] + """ + super(CodeContainerResourceArmPaginatedResult, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class CodeVersionData(Resource): + """Azure Resource Manager resource envelope. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar properties: Required. [Required] Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.CodeVersionDetails + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'CodeVersionDetails'}, + } + + def __init__( + self, + *, + properties: "CodeVersionDetails", + **kwargs + ): + """ + :keyword properties: Required. [Required] Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.CodeVersionDetails + """ + super(CodeVersionData, self).__init__(**kwargs) + self.properties = properties + + +class CodeVersionDetails(AssetBase): + """Code asset version details. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar is_anonymous: If the name version are system generated (anonymous registration). + :vartype is_anonymous: bool + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar code_uri: Uri where code is located. + :vartype code_uri: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'code_uri': {'key': 'codeUri', 'type': 'str'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + properties: Optional[Dict[str, str]] = None, + tags: Optional[Dict[str, str]] = None, + is_anonymous: Optional[bool] = False, + is_archived: Optional[bool] = False, + code_uri: Optional[str] = None, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword is_anonymous: If the name version are system generated (anonymous registration). + :paramtype is_anonymous: bool + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + :keyword code_uri: Uri where code is located. + :paramtype code_uri: str + """ + super(CodeVersionDetails, self).__init__(description=description, properties=properties, tags=tags, is_anonymous=is_anonymous, is_archived=is_archived, **kwargs) + self.code_uri = code_uri + + +class CodeVersionResourceArmPaginatedResult(msrest.serialization.Model): + """A paginated list of CodeVersion entities. + + :ivar next_link: The link to the next page of CodeVersion objects. If null, there are no + additional pages. + :vartype next_link: str + :ivar value: An array of objects of type CodeVersion. + :vartype value: list[~azure.mgmt.machinelearningservices.models.CodeVersionData] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[CodeVersionData]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["CodeVersionData"]] = None, + **kwargs + ): + """ + :keyword next_link: The link to the next page of CodeVersion objects. If null, there are no + additional pages. + :paramtype next_link: str + :keyword value: An array of objects of type CodeVersion. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.CodeVersionData] + """ + super(CodeVersionResourceArmPaginatedResult, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class JobBaseDetails(ResourceBase): + """Base definition for a job. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CommandJob, PipelineJob, SweepJob. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar compute_id: ARM resource ID of the compute resource. + :vartype compute_id: str + :ivar display_name: Display name of job. + :vartype display_name: str + :ivar experiment_name: The name of the experiment the job belongs to. If not set, the job is + placed in the "Default" experiment. + :vartype experiment_name: str + :ivar identity: Identity configuration. If set, this should be one of AmlToken, + ManagedIdentity, UserIdentity or null. + Defaults to AmlToken if null. + :vartype identity: ~azure.mgmt.machinelearningservices.models.IdentityConfiguration + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar job_type: Required. [Required] Specifies the type of job.Constant filled by server. + Possible values include: "Command", "Sweep", "Pipeline". + :vartype job_type: str or ~azure.mgmt.machinelearningservices.models.JobType + :ivar services: List of JobEndpoints. + For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + :vartype services: dict[str, ~azure.mgmt.machinelearningservices.models.JobService] + :ivar status: Status of the job. Possible values include: "NotStarted", "Starting", + "Provisioning", "Preparing", "Queued", "Running", "Finalizing", "CancelRequested", "Completed", + "Failed", "Canceled", "NotResponding", "Paused", "Unknown". + :vartype status: str or ~azure.mgmt.machinelearningservices.models.JobStatus + """ + + _validation = { + 'job_type': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'compute_id': {'key': 'computeId', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'experiment_name': {'key': 'experimentName', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'IdentityConfiguration'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'services': {'key': 'services', 'type': '{JobService}'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + _subtype_map = { + 'job_type': {'Command': 'CommandJob', 'Pipeline': 'PipelineJob', 'Sweep': 'SweepJob'} + } + + def __init__( + self, + *, + description: Optional[str] = None, + properties: Optional[Dict[str, str]] = None, + tags: Optional[Dict[str, str]] = None, + compute_id: Optional[str] = None, + display_name: Optional[str] = None, + experiment_name: Optional[str] = "Default", + identity: Optional["IdentityConfiguration"] = None, + is_archived: Optional[bool] = False, + services: Optional[Dict[str, "JobService"]] = None, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword compute_id: ARM resource ID of the compute resource. + :paramtype compute_id: str + :keyword display_name: Display name of job. + :paramtype display_name: str + :keyword experiment_name: The name of the experiment the job belongs to. If not set, the job is + placed in the "Default" experiment. + :paramtype experiment_name: str + :keyword identity: Identity configuration. If set, this should be one of AmlToken, + ManagedIdentity, UserIdentity or null. + Defaults to AmlToken if null. + :paramtype identity: ~azure.mgmt.machinelearningservices.models.IdentityConfiguration + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + :keyword services: List of JobEndpoints. + For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + :paramtype services: dict[str, ~azure.mgmt.machinelearningservices.models.JobService] + """ + super(JobBaseDetails, self).__init__(description=description, properties=properties, tags=tags, **kwargs) + self.compute_id = compute_id + self.display_name = display_name + self.experiment_name = experiment_name + self.identity = identity + self.is_archived = is_archived + self.job_type = 'JobBaseDetails' # type: str + self.services = services + self.status = None + + +class CommandJob(JobBaseDetails): + """Command job definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar compute_id: ARM resource ID of the compute resource. + :vartype compute_id: str + :ivar display_name: Display name of job. + :vartype display_name: str + :ivar experiment_name: The name of the experiment the job belongs to. If not set, the job is + placed in the "Default" experiment. + :vartype experiment_name: str + :ivar identity: Identity configuration. If set, this should be one of AmlToken, + ManagedIdentity, UserIdentity or null. + Defaults to AmlToken if null. + :vartype identity: ~azure.mgmt.machinelearningservices.models.IdentityConfiguration + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar job_type: Required. [Required] Specifies the type of job.Constant filled by server. + Possible values include: "Command", "Sweep", "Pipeline". + :vartype job_type: str or ~azure.mgmt.machinelearningservices.models.JobType + :ivar services: List of JobEndpoints. + For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + :vartype services: dict[str, ~azure.mgmt.machinelearningservices.models.JobService] + :ivar status: Status of the job. Possible values include: "NotStarted", "Starting", + "Provisioning", "Preparing", "Queued", "Running", "Finalizing", "CancelRequested", "Completed", + "Failed", "Canceled", "NotResponding", "Paused", "Unknown". + :vartype status: str or ~azure.mgmt.machinelearningservices.models.JobStatus + :ivar code_id: ARM resource ID of the code asset. + :vartype code_id: str + :ivar command: Required. [Required] The command to execute on startup of the job. eg. "python + train.py". + :vartype command: str + :ivar distribution: Distribution configuration of the job. If set, this should be one of Mpi, + Tensorflow, PyTorch, or null. + :vartype distribution: ~azure.mgmt.machinelearningservices.models.DistributionConfiguration + :ivar environment_id: Required. [Required] The ARM resource ID of the Environment specification + for the job. + :vartype environment_id: str + :ivar environment_variables: Environment variables included in the job. + :vartype environment_variables: dict[str, str] + :ivar inputs: Mapping of input data bindings used in the job. + :vartype inputs: dict[str, ~azure.mgmt.machinelearningservices.models.JobInput] + :ivar limits: Command Job limit. + :vartype limits: ~azure.mgmt.machinelearningservices.models.CommandJobLimits + :ivar outputs: Mapping of output data bindings used in the job. + :vartype outputs: dict[str, ~azure.mgmt.machinelearningservices.models.JobOutput] + :ivar parameters: Input parameters. + :vartype parameters: any + :ivar resources: Compute Resource configuration for the job. + :vartype resources: ~azure.mgmt.machinelearningservices.models.ResourceConfiguration + """ + + _validation = { + 'job_type': {'required': True}, + 'status': {'readonly': True}, + 'command': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + 'environment_id': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + 'parameters': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'compute_id': {'key': 'computeId', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'experiment_name': {'key': 'experimentName', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'IdentityConfiguration'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'services': {'key': 'services', 'type': '{JobService}'}, + 'status': {'key': 'status', 'type': 'str'}, + 'code_id': {'key': 'codeId', 'type': 'str'}, + 'command': {'key': 'command', 'type': 'str'}, + 'distribution': {'key': 'distribution', 'type': 'DistributionConfiguration'}, + 'environment_id': {'key': 'environmentId', 'type': 'str'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, + 'inputs': {'key': 'inputs', 'type': '{JobInput}'}, + 'limits': {'key': 'limits', 'type': 'CommandJobLimits'}, + 'outputs': {'key': 'outputs', 'type': '{JobOutput}'}, + 'parameters': {'key': 'parameters', 'type': 'object'}, + 'resources': {'key': 'resources', 'type': 'ResourceConfiguration'}, + } + + def __init__( + self, + *, + command: str, + environment_id: str, + description: Optional[str] = None, + properties: Optional[Dict[str, str]] = None, + tags: Optional[Dict[str, str]] = None, + compute_id: Optional[str] = None, + display_name: Optional[str] = None, + experiment_name: Optional[str] = "Default", + identity: Optional["IdentityConfiguration"] = None, + is_archived: Optional[bool] = False, + services: Optional[Dict[str, "JobService"]] = None, + code_id: Optional[str] = None, + distribution: Optional["DistributionConfiguration"] = None, + environment_variables: Optional[Dict[str, str]] = None, + inputs: Optional[Dict[str, "JobInput"]] = None, + limits: Optional["CommandJobLimits"] = None, + outputs: Optional[Dict[str, "JobOutput"]] = None, + resources: Optional["ResourceConfiguration"] = None, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword compute_id: ARM resource ID of the compute resource. + :paramtype compute_id: str + :keyword display_name: Display name of job. + :paramtype display_name: str + :keyword experiment_name: The name of the experiment the job belongs to. If not set, the job is + placed in the "Default" experiment. + :paramtype experiment_name: str + :keyword identity: Identity configuration. If set, this should be one of AmlToken, + ManagedIdentity, UserIdentity or null. + Defaults to AmlToken if null. + :paramtype identity: ~azure.mgmt.machinelearningservices.models.IdentityConfiguration + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + :keyword services: List of JobEndpoints. + For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + :paramtype services: dict[str, ~azure.mgmt.machinelearningservices.models.JobService] + :keyword code_id: ARM resource ID of the code asset. + :paramtype code_id: str + :keyword command: Required. [Required] The command to execute on startup of the job. eg. + "python train.py". + :paramtype command: str + :keyword distribution: Distribution configuration of the job. If set, this should be one of + Mpi, Tensorflow, PyTorch, or null. + :paramtype distribution: ~azure.mgmt.machinelearningservices.models.DistributionConfiguration + :keyword environment_id: Required. [Required] The ARM resource ID of the Environment + specification for the job. + :paramtype environment_id: str + :keyword environment_variables: Environment variables included in the job. + :paramtype environment_variables: dict[str, str] + :keyword inputs: Mapping of input data bindings used in the job. + :paramtype inputs: dict[str, ~azure.mgmt.machinelearningservices.models.JobInput] + :keyword limits: Command Job limit. + :paramtype limits: ~azure.mgmt.machinelearningservices.models.CommandJobLimits + :keyword outputs: Mapping of output data bindings used in the job. + :paramtype outputs: dict[str, ~azure.mgmt.machinelearningservices.models.JobOutput] + :keyword resources: Compute Resource configuration for the job. + :paramtype resources: ~azure.mgmt.machinelearningservices.models.ResourceConfiguration + """ + super(CommandJob, self).__init__(description=description, properties=properties, tags=tags, compute_id=compute_id, display_name=display_name, experiment_name=experiment_name, identity=identity, is_archived=is_archived, services=services, **kwargs) + self.job_type = 'Command' # type: str + self.code_id = code_id + self.command = command + self.distribution = distribution + self.environment_id = environment_id + self.environment_variables = environment_variables + self.inputs = inputs + self.limits = limits + self.outputs = outputs + self.parameters = None + self.resources = resources + + +class JobLimits(msrest.serialization.Model): + """JobLimits. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CommandJobLimits, SweepJobLimits. + + All required parameters must be populated in order to send to Azure. + + :ivar job_limits_type: Required. [Required] JobLimit type.Constant filled by server. Possible + values include: "Command", "Sweep". + :vartype job_limits_type: str or ~azure.mgmt.machinelearningservices.models.JobLimitsType + :ivar timeout: The max run duration in ISO 8601 format, after which the job will be cancelled. + Only supports duration with precision as low as Seconds. + :vartype timeout: ~datetime.timedelta + """ + + _validation = { + 'job_limits_type': {'required': True}, + } + + _attribute_map = { + 'job_limits_type': {'key': 'jobLimitsType', 'type': 'str'}, + 'timeout': {'key': 'timeout', 'type': 'duration'}, + } + + _subtype_map = { + 'job_limits_type': {'Command': 'CommandJobLimits', 'Sweep': 'SweepJobLimits'} + } + + def __init__( + self, + *, + timeout: Optional[datetime.timedelta] = None, + **kwargs + ): + """ + :keyword timeout: The max run duration in ISO 8601 format, after which the job will be + cancelled. Only supports duration with precision as low as Seconds. + :paramtype timeout: ~datetime.timedelta + """ + super(JobLimits, self).__init__(**kwargs) + self.job_limits_type = None # type: Optional[str] + self.timeout = timeout + + +class CommandJobLimits(JobLimits): + """Command Job limit class. + + All required parameters must be populated in order to send to Azure. + + :ivar job_limits_type: Required. [Required] JobLimit type.Constant filled by server. Possible + values include: "Command", "Sweep". + :vartype job_limits_type: str or ~azure.mgmt.machinelearningservices.models.JobLimitsType + :ivar timeout: The max run duration in ISO 8601 format, after which the job will be cancelled. + Only supports duration with precision as low as Seconds. + :vartype timeout: ~datetime.timedelta + """ + + _validation = { + 'job_limits_type': {'required': True}, + } + + _attribute_map = { + 'job_limits_type': {'key': 'jobLimitsType', 'type': 'str'}, + 'timeout': {'key': 'timeout', 'type': 'duration'}, + } + + def __init__( + self, + *, + timeout: Optional[datetime.timedelta] = None, + **kwargs + ): + """ + :keyword timeout: The max run duration in ISO 8601 format, after which the job will be + cancelled. Only supports duration with precision as low as Seconds. + :paramtype timeout: ~datetime.timedelta + """ + super(CommandJobLimits, self).__init__(timeout=timeout, **kwargs) + self.job_limits_type = 'Command' # type: str + + +class ComponentContainerData(Resource): + """Azure Resource Manager resource envelope. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar properties: Required. [Required] Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.ComponentContainerDetails + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'ComponentContainerDetails'}, + } + + def __init__( + self, + *, + properties: "ComponentContainerDetails", + **kwargs + ): + """ + :keyword properties: Required. [Required] Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.ComponentContainerDetails + """ + super(ComponentContainerData, self).__init__(**kwargs) + self.properties = properties + + +class ComponentContainerDetails(AssetContainer): + """Component container definition. + + +.. raw:: html + + <see href="https://learn.microsoft.com/azure/machine-learning/reference-yaml-component-command" />. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar latest_version: The latest version inside this container. + :vartype latest_version: str + :ivar next_version: The next auto incremental version. + :vartype next_version: str + """ + + _validation = { + 'latest_version': {'readonly': True}, + 'next_version': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'latest_version': {'key': 'latestVersion', 'type': 'str'}, + 'next_version': {'key': 'nextVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + properties: Optional[Dict[str, str]] = None, + tags: Optional[Dict[str, str]] = None, + is_archived: Optional[bool] = False, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + """ + super(ComponentContainerDetails, self).__init__(description=description, properties=properties, tags=tags, is_archived=is_archived, **kwargs) + + +class ComponentContainerResourceArmPaginatedResult(msrest.serialization.Model): + """A paginated list of ComponentContainer entities. + + :ivar next_link: The link to the next page of ComponentContainer objects. If null, there are no + additional pages. + :vartype next_link: str + :ivar value: An array of objects of type ComponentContainer. + :vartype value: list[~azure.mgmt.machinelearningservices.models.ComponentContainerData] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ComponentContainerData]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["ComponentContainerData"]] = None, + **kwargs + ): + """ + :keyword next_link: The link to the next page of ComponentContainer objects. If null, there are + no additional pages. + :paramtype next_link: str + :keyword value: An array of objects of type ComponentContainer. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.ComponentContainerData] + """ + super(ComponentContainerResourceArmPaginatedResult, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class ComponentVersionData(Resource): + """Azure Resource Manager resource envelope. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar properties: Required. [Required] Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.ComponentVersionDetails + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'ComponentVersionDetails'}, + } + + def __init__( + self, + *, + properties: "ComponentVersionDetails", + **kwargs + ): + """ + :keyword properties: Required. [Required] Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.ComponentVersionDetails + """ + super(ComponentVersionData, self).__init__(**kwargs) + self.properties = properties + + +class ComponentVersionDetails(AssetBase): + """Definition of a component version: defines resources that span component types. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar is_anonymous: If the name version are system generated (anonymous registration). + :vartype is_anonymous: bool + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar component_spec: Defines Component definition details. + + + .. raw:: html + + <see + href="https://learn.microsoft.com/azure/machine-learning/reference-yaml-component-command" + />. + :vartype component_spec: any + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'component_spec': {'key': 'componentSpec', 'type': 'object'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + properties: Optional[Dict[str, str]] = None, + tags: Optional[Dict[str, str]] = None, + is_anonymous: Optional[bool] = False, + is_archived: Optional[bool] = False, + component_spec: Optional[Any] = None, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword is_anonymous: If the name version are system generated (anonymous registration). + :paramtype is_anonymous: bool + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + :keyword component_spec: Defines Component definition details. + + + .. raw:: html + + <see + href="https://learn.microsoft.com/azure/machine-learning/reference-yaml-component-command" + />. + :paramtype component_spec: any + """ + super(ComponentVersionDetails, self).__init__(description=description, properties=properties, tags=tags, is_anonymous=is_anonymous, is_archived=is_archived, **kwargs) + self.component_spec = component_spec + + +class ComponentVersionResourceArmPaginatedResult(msrest.serialization.Model): + """A paginated list of ComponentVersion entities. + + :ivar next_link: The link to the next page of ComponentVersion objects. If null, there are no + additional pages. + :vartype next_link: str + :ivar value: An array of objects of type ComponentVersion. + :vartype value: list[~azure.mgmt.machinelearningservices.models.ComponentVersionData] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ComponentVersionData]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["ComponentVersionData"]] = None, + **kwargs + ): + """ + :keyword next_link: The link to the next page of ComponentVersion objects. If null, there are + no additional pages. + :paramtype next_link: str + :keyword value: An array of objects of type ComponentVersion. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.ComponentVersionData] + """ + super(ComponentVersionResourceArmPaginatedResult, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class ComputeInstanceSchema(msrest.serialization.Model): + """Properties(top level) of ComputeInstance. + + :ivar properties: Properties of ComputeInstance. + :vartype properties: ~azure.mgmt.machinelearningservices.models.ComputeInstanceProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'ComputeInstanceProperties'}, + } + + def __init__( + self, + *, + properties: Optional["ComputeInstanceProperties"] = None, + **kwargs + ): + """ + :keyword properties: Properties of ComputeInstance. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.ComputeInstanceProperties + """ + super(ComputeInstanceSchema, self).__init__(**kwargs) + self.properties = properties + + +class ComputeInstance(Compute, ComputeInstanceSchema): + """An Azure Machine Learning compute instance. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar properties: Properties of ComputeInstance. + :vartype properties: ~azure.mgmt.machinelearningservices.models.ComputeInstanceProperties + :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values + include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", + "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark". + :vartype compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType + :ivar compute_location: Location for the underlying compute. + :vartype compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values are Unknown, + Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating", + "Creating", "Deleting", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :ivar description: The description of the Machine Learning compute. + :vartype description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: ~datetime.datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: ~datetime.datetime + :ivar resource_id: ARM resource id of the underlying compute. + :vartype resource_id: str + :ivar provisioning_errors: Errors during provisioning. + :vartype provisioning_errors: list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought + from outside if true, or machine learning service provisioned it if false. + :vartype is_attached_compute: bool + :ivar disable_local_auth: Opt-out of local authentication and ensure customers can use only MSI + and AAD exclusively for authentication. + :vartype disable_local_auth: bool + """ + + _validation = { + 'compute_type': {'required': True}, + 'compute_location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'ComputeInstanceProperties'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + } + + def __init__( + self, + *, + properties: Optional["ComputeInstanceProperties"] = None, + description: Optional[str] = None, + resource_id: Optional[str] = None, + disable_local_auth: Optional[bool] = None, + **kwargs + ): + """ + :keyword properties: Properties of ComputeInstance. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.ComputeInstanceProperties + :keyword description: The description of the Machine Learning compute. + :paramtype description: str + :keyword resource_id: ARM resource id of the underlying compute. + :paramtype resource_id: str + :keyword disable_local_auth: Opt-out of local authentication and ensure customers can use only + MSI and AAD exclusively for authentication. + :paramtype disable_local_auth: bool + """ + super(ComputeInstance, self).__init__(description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, properties=properties, **kwargs) + self.properties = properties + self.compute_type = 'ComputeInstance' # type: str + self.compute_type = 'ComputeInstance' # type: str + self.compute_location = None + self.provisioning_state = None + self.description = description + self.created_on = None + self.modified_on = None + self.resource_id = resource_id + self.provisioning_errors = None + self.is_attached_compute = None + self.disable_local_auth = disable_local_auth + + +class ComputeInstanceApplication(msrest.serialization.Model): + """Defines an Aml Instance application and its connectivity endpoint URI. + + :ivar display_name: Name of the ComputeInstance application. + :vartype display_name: str + :ivar endpoint_uri: Application' endpoint URI. + :vartype endpoint_uri: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'endpoint_uri': {'key': 'endpointUri', 'type': 'str'}, + } + + def __init__( + self, + *, + display_name: Optional[str] = None, + endpoint_uri: Optional[str] = None, + **kwargs + ): + """ + :keyword display_name: Name of the ComputeInstance application. + :paramtype display_name: str + :keyword endpoint_uri: Application' endpoint URI. + :paramtype endpoint_uri: str + """ + super(ComputeInstanceApplication, self).__init__(**kwargs) + self.display_name = display_name + self.endpoint_uri = endpoint_uri + + +class ComputeInstanceConnectivityEndpoints(msrest.serialization.Model): + """Defines all connectivity endpoints and properties for an ComputeInstance. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar public_ip_address: Public IP Address of this ComputeInstance. + :vartype public_ip_address: str + :ivar private_ip_address: Private IP Address of this ComputeInstance (local to the VNET in + which the compute instance is deployed). + :vartype private_ip_address: str + """ + + _validation = { + 'public_ip_address': {'readonly': True}, + 'private_ip_address': {'readonly': True}, + } + + _attribute_map = { + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ComputeInstanceConnectivityEndpoints, self).__init__(**kwargs) + self.public_ip_address = None + self.private_ip_address = None + + +class ComputeInstanceContainer(msrest.serialization.Model): + """Defines an Aml Instance container. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the ComputeInstance container. + :vartype name: str + :ivar autosave: Auto save settings. Possible values include: "None", "Local", "Remote". + :vartype autosave: str or ~azure.mgmt.machinelearningservices.models.Autosave + :ivar gpu: Information of GPU. + :vartype gpu: str + :ivar network: network of this container. Possible values include: "Bridge", "Host". + :vartype network: str or ~azure.mgmt.machinelearningservices.models.Network + :ivar environment: Environment information of this container. + :vartype environment: ~azure.mgmt.machinelearningservices.models.ComputeInstanceEnvironmentInfo + :ivar services: services of this containers. + :vartype services: list[any] + """ + + _validation = { + 'services': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'autosave': {'key': 'autosave', 'type': 'str'}, + 'gpu': {'key': 'gpu', 'type': 'str'}, + 'network': {'key': 'network', 'type': 'str'}, + 'environment': {'key': 'environment', 'type': 'ComputeInstanceEnvironmentInfo'}, + 'services': {'key': 'services', 'type': '[object]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + autosave: Optional[Union[str, "Autosave"]] = None, + gpu: Optional[str] = None, + network: Optional[Union[str, "Network"]] = None, + environment: Optional["ComputeInstanceEnvironmentInfo"] = None, + **kwargs + ): + """ + :keyword name: Name of the ComputeInstance container. + :paramtype name: str + :keyword autosave: Auto save settings. Possible values include: "None", "Local", "Remote". + :paramtype autosave: str or ~azure.mgmt.machinelearningservices.models.Autosave + :keyword gpu: Information of GPU. + :paramtype gpu: str + :keyword network: network of this container. Possible values include: "Bridge", "Host". + :paramtype network: str or ~azure.mgmt.machinelearningservices.models.Network + :keyword environment: Environment information of this container. + :paramtype environment: + ~azure.mgmt.machinelearningservices.models.ComputeInstanceEnvironmentInfo + """ + super(ComputeInstanceContainer, self).__init__(**kwargs) + self.name = name + self.autosave = autosave + self.gpu = gpu + self.network = network + self.environment = environment + self.services = None + + +class ComputeInstanceCreatedBy(msrest.serialization.Model): + """Describes information on user who created this ComputeInstance. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar user_name: Name of the user. + :vartype user_name: str + :ivar user_org_id: Uniquely identifies user' Azure Active Directory organization. + :vartype user_org_id: str + :ivar user_id: Uniquely identifies the user within his/her organization. + :vartype user_id: str + """ + + _validation = { + 'user_name': {'readonly': True}, + 'user_org_id': {'readonly': True}, + 'user_id': {'readonly': True}, + } + + _attribute_map = { + 'user_name': {'key': 'userName', 'type': 'str'}, + 'user_org_id': {'key': 'userOrgId', 'type': 'str'}, + 'user_id': {'key': 'userId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ComputeInstanceCreatedBy, self).__init__(**kwargs) + self.user_name = None + self.user_org_id = None + self.user_id = None + + +class ComputeInstanceDataDisk(msrest.serialization.Model): + """Defines an Aml Instance DataDisk. + + :ivar caching: Caching type of Data Disk. Possible values include: "None", "ReadOnly", + "ReadWrite". + :vartype caching: str or ~azure.mgmt.machinelearningservices.models.Caching + :ivar disk_size_gb: The initial disk size in gigabytes. + :vartype disk_size_gb: int + :ivar lun: The lun is used to uniquely identify each data disk. If attaching multiple disks, + each should have a distinct lun. + :vartype lun: int + :ivar storage_account_type: type of this storage account. Possible values include: + "Standard_LRS", "Premium_LRS". Default value: "Standard_LRS". + :vartype storage_account_type: str or + ~azure.mgmt.machinelearningservices.models.StorageAccountType + """ + + _attribute_map = { + 'caching': {'key': 'caching', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'lun': {'key': 'lun', 'type': 'int'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + } + + def __init__( + self, + *, + caching: Optional[Union[str, "Caching"]] = None, + disk_size_gb: Optional[int] = None, + lun: Optional[int] = None, + storage_account_type: Optional[Union[str, "StorageAccountType"]] = "Standard_LRS", + **kwargs + ): + """ + :keyword caching: Caching type of Data Disk. Possible values include: "None", "ReadOnly", + "ReadWrite". + :paramtype caching: str or ~azure.mgmt.machinelearningservices.models.Caching + :keyword disk_size_gb: The initial disk size in gigabytes. + :paramtype disk_size_gb: int + :keyword lun: The lun is used to uniquely identify each data disk. If attaching multiple disks, + each should have a distinct lun. + :paramtype lun: int + :keyword storage_account_type: type of this storage account. Possible values include: + "Standard_LRS", "Premium_LRS". Default value: "Standard_LRS". + :paramtype storage_account_type: str or + ~azure.mgmt.machinelearningservices.models.StorageAccountType + """ + super(ComputeInstanceDataDisk, self).__init__(**kwargs) + self.caching = caching + self.disk_size_gb = disk_size_gb + self.lun = lun + self.storage_account_type = storage_account_type + + +class ComputeInstanceDataMount(msrest.serialization.Model): + """Defines an Aml Instance DataMount. + + :ivar source: Source of the ComputeInstance data mount. + :vartype source: str + :ivar source_type: Data source type. Possible values include: "Dataset", "Datastore", "URI". + :vartype source_type: str or ~azure.mgmt.machinelearningservices.models.SourceType + :ivar mount_name: name of the ComputeInstance data mount. + :vartype mount_name: str + :ivar mount_action: Mount Action. Possible values include: "Mount", "Unmount". + :vartype mount_action: str or ~azure.mgmt.machinelearningservices.models.MountAction + :ivar created_by: who this data mount created by. + :vartype created_by: str + :ivar mount_path: Path of this data mount. + :vartype mount_path: str + :ivar mount_state: Mount state. Possible values include: "MountRequested", "Mounted", + "MountFailed", "UnmountRequested", "UnmountFailed", "Unmounted". + :vartype mount_state: str or ~azure.mgmt.machinelearningservices.models.MountState + :ivar mounted_on: The time when the disk mounted. + :vartype mounted_on: ~datetime.datetime + :ivar error: Error of this data mount. + :vartype error: str + """ + + _attribute_map = { + 'source': {'key': 'source', 'type': 'str'}, + 'source_type': {'key': 'sourceType', 'type': 'str'}, + 'mount_name': {'key': 'mountName', 'type': 'str'}, + 'mount_action': {'key': 'mountAction', 'type': 'str'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'mount_path': {'key': 'mountPath', 'type': 'str'}, + 'mount_state': {'key': 'mountState', 'type': 'str'}, + 'mounted_on': {'key': 'mountedOn', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'str'}, + } + + def __init__( + self, + *, + source: Optional[str] = None, + source_type: Optional[Union[str, "SourceType"]] = None, + mount_name: Optional[str] = None, + mount_action: Optional[Union[str, "MountAction"]] = None, + created_by: Optional[str] = None, + mount_path: Optional[str] = None, + mount_state: Optional[Union[str, "MountState"]] = None, + mounted_on: Optional[datetime.datetime] = None, + error: Optional[str] = None, + **kwargs + ): + """ + :keyword source: Source of the ComputeInstance data mount. + :paramtype source: str + :keyword source_type: Data source type. Possible values include: "Dataset", "Datastore", "URI". + :paramtype source_type: str or ~azure.mgmt.machinelearningservices.models.SourceType + :keyword mount_name: name of the ComputeInstance data mount. + :paramtype mount_name: str + :keyword mount_action: Mount Action. Possible values include: "Mount", "Unmount". + :paramtype mount_action: str or ~azure.mgmt.machinelearningservices.models.MountAction + :keyword created_by: who this data mount created by. + :paramtype created_by: str + :keyword mount_path: Path of this data mount. + :paramtype mount_path: str + :keyword mount_state: Mount state. Possible values include: "MountRequested", "Mounted", + "MountFailed", "UnmountRequested", "UnmountFailed", "Unmounted". + :paramtype mount_state: str or ~azure.mgmt.machinelearningservices.models.MountState + :keyword mounted_on: The time when the disk mounted. + :paramtype mounted_on: ~datetime.datetime + :keyword error: Error of this data mount. + :paramtype error: str + """ + super(ComputeInstanceDataMount, self).__init__(**kwargs) + self.source = source + self.source_type = source_type + self.mount_name = mount_name + self.mount_action = mount_action + self.created_by = created_by + self.mount_path = mount_path + self.mount_state = mount_state + self.mounted_on = mounted_on + self.error = error + + +class ComputeInstanceEnvironmentInfo(msrest.serialization.Model): + """Environment information. + + :ivar name: name of environment. + :vartype name: str + :ivar version: version of environment. + :vartype version: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + version: Optional[str] = None, + **kwargs + ): + """ + :keyword name: name of environment. + :paramtype name: str + :keyword version: version of environment. + :paramtype version: str + """ + super(ComputeInstanceEnvironmentInfo, self).__init__(**kwargs) + self.name = name + self.version = version + + +class ComputeInstanceLastOperation(msrest.serialization.Model): + """The last operation on ComputeInstance. + + :ivar operation_name: Name of the last operation. Possible values include: "Create", "Start", + "Stop", "Restart", "Reimage", "Delete". + :vartype operation_name: str or ~azure.mgmt.machinelearningservices.models.OperationName + :ivar operation_time: Time of the last operation. + :vartype operation_time: ~datetime.datetime + :ivar operation_status: Operation status. Possible values include: "InProgress", "Succeeded", + "CreateFailed", "StartFailed", "StopFailed", "RestartFailed", "ReimageFailed", "DeleteFailed". + :vartype operation_status: str or ~azure.mgmt.machinelearningservices.models.OperationStatus + :ivar operation_trigger: Trigger of operation. Possible values include: "User", "Schedule", + "IdleShutdown". + :vartype operation_trigger: str or ~azure.mgmt.machinelearningservices.models.OperationTrigger + """ + + _attribute_map = { + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'operation_time': {'key': 'operationTime', 'type': 'iso-8601'}, + 'operation_status': {'key': 'operationStatus', 'type': 'str'}, + 'operation_trigger': {'key': 'operationTrigger', 'type': 'str'}, + } + + def __init__( + self, + *, + operation_name: Optional[Union[str, "OperationName"]] = None, + operation_time: Optional[datetime.datetime] = None, + operation_status: Optional[Union[str, "OperationStatus"]] = None, + operation_trigger: Optional[Union[str, "OperationTrigger"]] = None, + **kwargs + ): + """ + :keyword operation_name: Name of the last operation. Possible values include: "Create", + "Start", "Stop", "Restart", "Reimage", "Delete". + :paramtype operation_name: str or ~azure.mgmt.machinelearningservices.models.OperationName + :keyword operation_time: Time of the last operation. + :paramtype operation_time: ~datetime.datetime + :keyword operation_status: Operation status. Possible values include: "InProgress", + "Succeeded", "CreateFailed", "StartFailed", "StopFailed", "RestartFailed", "ReimageFailed", + "DeleteFailed". + :paramtype operation_status: str or ~azure.mgmt.machinelearningservices.models.OperationStatus + :keyword operation_trigger: Trigger of operation. Possible values include: "User", "Schedule", + "IdleShutdown". + :paramtype operation_trigger: str or + ~azure.mgmt.machinelearningservices.models.OperationTrigger + """ + super(ComputeInstanceLastOperation, self).__init__(**kwargs) + self.operation_name = operation_name + self.operation_time = operation_time + self.operation_status = operation_status + self.operation_trigger = operation_trigger + + +class ComputeInstanceProperties(msrest.serialization.Model): + """Compute Instance properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar vm_size: Virtual Machine Size. + :vartype vm_size: str + :ivar subnet: Virtual network subnet resource ID the compute nodes belong to. + :vartype subnet: ~azure.mgmt.machinelearningservices.models.ResourceId + :ivar application_sharing_policy: Policy for sharing applications on this compute instance + among users of parent workspace. If Personal, only the creator can access applications on this + compute instance. When Shared, any workspace user can access applications on this instance + depending on his/her assigned role. Possible values include: "Personal", "Shared". Default + value: "Shared". + :vartype application_sharing_policy: str or + ~azure.mgmt.machinelearningservices.models.ApplicationSharingPolicy + :ivar ssh_settings: Specifies policy and settings for SSH access. + :vartype ssh_settings: ~azure.mgmt.machinelearningservices.models.ComputeInstanceSshSettings + :ivar connectivity_endpoints: Describes all connectivity endpoints available for this + ComputeInstance. + :vartype connectivity_endpoints: + ~azure.mgmt.machinelearningservices.models.ComputeInstanceConnectivityEndpoints + :ivar applications: Describes available applications and their endpoints on this + ComputeInstance. + :vartype applications: + list[~azure.mgmt.machinelearningservices.models.ComputeInstanceApplication] + :ivar created_by: Describes information on user who created this ComputeInstance. + :vartype created_by: ~azure.mgmt.machinelearningservices.models.ComputeInstanceCreatedBy + :ivar errors: Collection of errors encountered on this ComputeInstance. + :vartype errors: list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar state: The current state of this ComputeInstance. Possible values include: "Creating", + "CreateFailed", "Deleting", "Running", "Restarting", "JobRunning", "SettingUp", "SetupFailed", + "Starting", "Stopped", "Stopping", "UserSettingUp", "UserSetupFailed", "Unknown", "Unusable". + :vartype state: str or ~azure.mgmt.machinelearningservices.models.ComputeInstanceState + :ivar compute_instance_authorization_type: The Compute Instance Authorization type. Available + values are personal (default). Possible values include: "personal". Default value: "personal". + :vartype compute_instance_authorization_type: str or + ~azure.mgmt.machinelearningservices.models.ComputeInstanceAuthorizationType + :ivar personal_compute_instance_settings: Settings for a personal compute instance. + :vartype personal_compute_instance_settings: + ~azure.mgmt.machinelearningservices.models.PersonalComputeInstanceSettings + :ivar setup_scripts: Details of customized scripts to execute for setting up the cluster. + :vartype setup_scripts: ~azure.mgmt.machinelearningservices.models.SetupScripts + :ivar last_operation: The last operation on ComputeInstance. + :vartype last_operation: + ~azure.mgmt.machinelearningservices.models.ComputeInstanceLastOperation + :ivar schedules: The list of schedules to be applied on the computes. + :vartype schedules: ~azure.mgmt.machinelearningservices.models.ComputeSchedules + :ivar enable_node_public_ip: Enable or disable node public IP address provisioning. Possible + values are: Possible values are: true - Indicates that the compute nodes will have public IPs + provisioned. false - Indicates that the compute nodes will have a private endpoint and no + public IPs. + :vartype enable_node_public_ip: bool + :ivar containers: Describes informations of containers on this ComputeInstance. + :vartype containers: list[~azure.mgmt.machinelearningservices.models.ComputeInstanceContainer] + :ivar data_disks: Describes informations of dataDisks on this ComputeInstance. + :vartype data_disks: list[~azure.mgmt.machinelearningservices.models.ComputeInstanceDataDisk] + :ivar data_mounts: Describes informations of dataMounts on this ComputeInstance. + :vartype data_mounts: list[~azure.mgmt.machinelearningservices.models.ComputeInstanceDataMount] + :ivar versions: ComputeInstance version. + :vartype versions: ~azure.mgmt.machinelearningservices.models.ComputeInstanceVersion + """ + + _validation = { + 'connectivity_endpoints': {'readonly': True}, + 'applications': {'readonly': True}, + 'created_by': {'readonly': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'last_operation': {'readonly': True}, + 'schedules': {'readonly': True}, + 'containers': {'readonly': True}, + 'data_disks': {'readonly': True}, + 'data_mounts': {'readonly': True}, + 'versions': {'readonly': True}, + } + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'subnet': {'key': 'subnet', 'type': 'ResourceId'}, + 'application_sharing_policy': {'key': 'applicationSharingPolicy', 'type': 'str'}, + 'ssh_settings': {'key': 'sshSettings', 'type': 'ComputeInstanceSshSettings'}, + 'connectivity_endpoints': {'key': 'connectivityEndpoints', 'type': 'ComputeInstanceConnectivityEndpoints'}, + 'applications': {'key': 'applications', 'type': '[ComputeInstanceApplication]'}, + 'created_by': {'key': 'createdBy', 'type': 'ComputeInstanceCreatedBy'}, + 'errors': {'key': 'errors', 'type': '[ErrorResponse]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'compute_instance_authorization_type': {'key': 'computeInstanceAuthorizationType', 'type': 'str'}, + 'personal_compute_instance_settings': {'key': 'personalComputeInstanceSettings', 'type': 'PersonalComputeInstanceSettings'}, + 'setup_scripts': {'key': 'setupScripts', 'type': 'SetupScripts'}, + 'last_operation': {'key': 'lastOperation', 'type': 'ComputeInstanceLastOperation'}, + 'schedules': {'key': 'schedules', 'type': 'ComputeSchedules'}, + 'enable_node_public_ip': {'key': 'enableNodePublicIp', 'type': 'bool'}, + 'containers': {'key': 'containers', 'type': '[ComputeInstanceContainer]'}, + 'data_disks': {'key': 'dataDisks', 'type': '[ComputeInstanceDataDisk]'}, + 'data_mounts': {'key': 'dataMounts', 'type': '[ComputeInstanceDataMount]'}, + 'versions': {'key': 'versions', 'type': 'ComputeInstanceVersion'}, + } + + def __init__( + self, + *, + vm_size: Optional[str] = None, + subnet: Optional["ResourceId"] = None, + application_sharing_policy: Optional[Union[str, "ApplicationSharingPolicy"]] = "Shared", + ssh_settings: Optional["ComputeInstanceSshSettings"] = None, + compute_instance_authorization_type: Optional[Union[str, "ComputeInstanceAuthorizationType"]] = "personal", + personal_compute_instance_settings: Optional["PersonalComputeInstanceSettings"] = None, + setup_scripts: Optional["SetupScripts"] = None, + enable_node_public_ip: Optional[bool] = None, + **kwargs + ): + """ + :keyword vm_size: Virtual Machine Size. + :paramtype vm_size: str + :keyword subnet: Virtual network subnet resource ID the compute nodes belong to. + :paramtype subnet: ~azure.mgmt.machinelearningservices.models.ResourceId + :keyword application_sharing_policy: Policy for sharing applications on this compute instance + among users of parent workspace. If Personal, only the creator can access applications on this + compute instance. When Shared, any workspace user can access applications on this instance + depending on his/her assigned role. Possible values include: "Personal", "Shared". Default + value: "Shared". + :paramtype application_sharing_policy: str or + ~azure.mgmt.machinelearningservices.models.ApplicationSharingPolicy + :keyword ssh_settings: Specifies policy and settings for SSH access. + :paramtype ssh_settings: ~azure.mgmt.machinelearningservices.models.ComputeInstanceSshSettings + :keyword compute_instance_authorization_type: The Compute Instance Authorization type. + Available values are personal (default). Possible values include: "personal". Default value: + "personal". + :paramtype compute_instance_authorization_type: str or + ~azure.mgmt.machinelearningservices.models.ComputeInstanceAuthorizationType + :keyword personal_compute_instance_settings: Settings for a personal compute instance. + :paramtype personal_compute_instance_settings: + ~azure.mgmt.machinelearningservices.models.PersonalComputeInstanceSettings + :keyword setup_scripts: Details of customized scripts to execute for setting up the cluster. + :paramtype setup_scripts: ~azure.mgmt.machinelearningservices.models.SetupScripts + :keyword enable_node_public_ip: Enable or disable node public IP address provisioning. Possible + values are: Possible values are: true - Indicates that the compute nodes will have public IPs + provisioned. false - Indicates that the compute nodes will have a private endpoint and no + public IPs. + :paramtype enable_node_public_ip: bool + """ + super(ComputeInstanceProperties, self).__init__(**kwargs) + self.vm_size = vm_size + self.subnet = subnet + self.application_sharing_policy = application_sharing_policy + self.ssh_settings = ssh_settings + self.connectivity_endpoints = None + self.applications = None + self.created_by = None + self.errors = None + self.state = None + self.compute_instance_authorization_type = compute_instance_authorization_type + self.personal_compute_instance_settings = personal_compute_instance_settings + self.setup_scripts = setup_scripts + self.last_operation = None + self.schedules = None + self.enable_node_public_ip = enable_node_public_ip + self.containers = None + self.data_disks = None + self.data_mounts = None + self.versions = None + + +class ComputeInstanceSshSettings(msrest.serialization.Model): + """Specifies policy and settings for SSH access. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar ssh_public_access: State of the public SSH port. Possible values are: Disabled - + Indicates that the public ssh port is closed on this instance. Enabled - Indicates that the + public ssh port is open and accessible according to the VNet/subnet policy if applicable. + Possible values include: "Enabled", "Disabled". Default value: "Disabled". + :vartype ssh_public_access: str or ~azure.mgmt.machinelearningservices.models.SshPublicAccess + :ivar admin_user_name: Describes the admin user name. + :vartype admin_user_name: str + :ivar ssh_port: Describes the port for connecting through SSH. + :vartype ssh_port: int + :ivar admin_public_key: Specifies the SSH rsa public key file as a string. Use "ssh-keygen -t + rsa -b 2048" to generate your SSH key pairs. + :vartype admin_public_key: str + """ + + _validation = { + 'admin_user_name': {'readonly': True}, + 'ssh_port': {'readonly': True}, + } + + _attribute_map = { + 'ssh_public_access': {'key': 'sshPublicAccess', 'type': 'str'}, + 'admin_user_name': {'key': 'adminUserName', 'type': 'str'}, + 'ssh_port': {'key': 'sshPort', 'type': 'int'}, + 'admin_public_key': {'key': 'adminPublicKey', 'type': 'str'}, + } + + def __init__( + self, + *, + ssh_public_access: Optional[Union[str, "SshPublicAccess"]] = "Disabled", + admin_public_key: Optional[str] = None, + **kwargs + ): + """ + :keyword ssh_public_access: State of the public SSH port. Possible values are: Disabled - + Indicates that the public ssh port is closed on this instance. Enabled - Indicates that the + public ssh port is open and accessible according to the VNet/subnet policy if applicable. + Possible values include: "Enabled", "Disabled". Default value: "Disabled". + :paramtype ssh_public_access: str or ~azure.mgmt.machinelearningservices.models.SshPublicAccess + :keyword admin_public_key: Specifies the SSH rsa public key file as a string. Use "ssh-keygen + -t rsa -b 2048" to generate your SSH key pairs. + :paramtype admin_public_key: str + """ + super(ComputeInstanceSshSettings, self).__init__(**kwargs) + self.ssh_public_access = ssh_public_access + self.admin_user_name = None + self.ssh_port = None + self.admin_public_key = admin_public_key + + +class ComputeInstanceVersion(msrest.serialization.Model): + """Version of computeInstance. + + :ivar runtime: Runtime of compute instance. + :vartype runtime: str + """ + + _attribute_map = { + 'runtime': {'key': 'runtime', 'type': 'str'}, + } + + def __init__( + self, + *, + runtime: Optional[str] = None, + **kwargs + ): + """ + :keyword runtime: Runtime of compute instance. + :paramtype runtime: str + """ + super(ComputeInstanceVersion, self).__init__(**kwargs) + self.runtime = runtime + + +class ComputeResourceSchema(msrest.serialization.Model): + """ComputeResourceSchema. + + :ivar properties: Compute properties. + :vartype properties: ~azure.mgmt.machinelearningservices.models.Compute + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'Compute'}, + } + + def __init__( + self, + *, + properties: Optional["Compute"] = None, + **kwargs + ): + """ + :keyword properties: Compute properties. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.Compute + """ + super(ComputeResourceSchema, self).__init__(**kwargs) + self.properties = properties + + +class ComputeResource(Resource, ComputeResourceSchema): + """Machine Learning compute object wrapped into ARM resource envelope. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar properties: Compute properties. + :vartype properties: ~azure.mgmt.machinelearningservices.models.Compute + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar identity: The identity of the resource. + :vartype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :ivar location: Specifies the location of the resource. + :vartype location: str + :ivar tags: A set of tags. Contains resource tags defined as key/value pairs. + :vartype tags: dict[str, str] + :ivar sku: The sku of the workspace. + :vartype sku: ~azure.mgmt.machinelearningservices.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'Compute'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__( + self, + *, + properties: Optional["Compute"] = None, + identity: Optional["ManagedServiceIdentity"] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + sku: Optional["Sku"] = None, + **kwargs + ): + """ + :keyword properties: Compute properties. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.Compute + :keyword identity: The identity of the resource. + :paramtype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :keyword location: Specifies the location of the resource. + :paramtype location: str + :keyword tags: A set of tags. Contains resource tags defined as key/value pairs. + :paramtype tags: dict[str, str] + :keyword sku: The sku of the workspace. + :paramtype sku: ~azure.mgmt.machinelearningservices.models.Sku + """ + super(ComputeResource, self).__init__(properties=properties, **kwargs) + self.properties = properties + self.identity = identity + self.location = location + self.tags = tags + self.sku = sku + self.id = None + self.name = None + self.type = None + self.system_data = None + self.identity = identity + self.location = location + self.tags = tags + self.sku = sku + + +class ComputeSchedules(msrest.serialization.Model): + """The list of schedules to be applied on the computes. + + :ivar compute_start_stop: The list of compute start stop schedules to be applied. + :vartype compute_start_stop: + list[~azure.mgmt.machinelearningservices.models.ComputeStartStopSchedule] + """ + + _attribute_map = { + 'compute_start_stop': {'key': 'computeStartStop', 'type': '[ComputeStartStopSchedule]'}, + } + + def __init__( + self, + *, + compute_start_stop: Optional[List["ComputeStartStopSchedule"]] = None, + **kwargs + ): + """ + :keyword compute_start_stop: The list of compute start stop schedules to be applied. + :paramtype compute_start_stop: + list[~azure.mgmt.machinelearningservices.models.ComputeStartStopSchedule] + """ + super(ComputeSchedules, self).__init__(**kwargs) + self.compute_start_stop = compute_start_stop + + +class ComputeStartStopSchedule(msrest.serialization.Model): + """Compute start stop schedule properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Schedule id. + :vartype id: str + :ivar provisioning_status: The current deployment state of schedule. Possible values include: + "Completed", "Provisioning", "Failed". + :vartype provisioning_status: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningStatus + :ivar action: The compute power action. Possible values include: "Start", "Stop". + :vartype action: str or ~azure.mgmt.machinelearningservices.models.ComputePowerAction + :ivar schedule: Base definition of a schedule. + :vartype schedule: ~azure.mgmt.machinelearningservices.models.ScheduleBase + """ + + _validation = { + 'id': {'readonly': True}, + 'provisioning_status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'provisioning_status': {'key': 'provisioningStatus', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'str'}, + 'schedule': {'key': 'schedule', 'type': 'ScheduleBase'}, + } + + def __init__( + self, + *, + action: Optional[Union[str, "ComputePowerAction"]] = None, + schedule: Optional["ScheduleBase"] = None, + **kwargs + ): + """ + :keyword action: The compute power action. Possible values include: "Start", "Stop". + :paramtype action: str or ~azure.mgmt.machinelearningservices.models.ComputePowerAction + :keyword schedule: Base definition of a schedule. + :paramtype schedule: ~azure.mgmt.machinelearningservices.models.ScheduleBase + """ + super(ComputeStartStopSchedule, self).__init__(**kwargs) + self.id = None + self.provisioning_status = None + self.action = action + self.schedule = schedule + + +class ContainerResourceRequirements(msrest.serialization.Model): + """Resource requirements for each container instance within an online deployment. + + :ivar container_resource_limits: Container resource limit info:. + :vartype container_resource_limits: + ~azure.mgmt.machinelearningservices.models.ContainerResourceSettings + :ivar container_resource_requests: Container resource request info:. + :vartype container_resource_requests: + ~azure.mgmt.machinelearningservices.models.ContainerResourceSettings + """ + + _attribute_map = { + 'container_resource_limits': {'key': 'containerResourceLimits', 'type': 'ContainerResourceSettings'}, + 'container_resource_requests': {'key': 'containerResourceRequests', 'type': 'ContainerResourceSettings'}, + } + + def __init__( + self, + *, + container_resource_limits: Optional["ContainerResourceSettings"] = None, + container_resource_requests: Optional["ContainerResourceSettings"] = None, + **kwargs + ): + """ + :keyword container_resource_limits: Container resource limit info:. + :paramtype container_resource_limits: + ~azure.mgmt.machinelearningservices.models.ContainerResourceSettings + :keyword container_resource_requests: Container resource request info:. + :paramtype container_resource_requests: + ~azure.mgmt.machinelearningservices.models.ContainerResourceSettings + """ + super(ContainerResourceRequirements, self).__init__(**kwargs) + self.container_resource_limits = container_resource_limits + self.container_resource_requests = container_resource_requests + + +class ContainerResourceSettings(msrest.serialization.Model): + """ContainerResourceSettings. + + :ivar cpu: Number of vCPUs request/limit for container. More info: + https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. + :vartype cpu: str + :ivar gpu: Number of Nvidia GPU cards request/limit for container. More info: + https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. + :vartype gpu: str + :ivar memory: Memory size request/limit for container. More info: + https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. + :vartype memory: str + """ + + _attribute_map = { + 'cpu': {'key': 'cpu', 'type': 'str'}, + 'gpu': {'key': 'gpu', 'type': 'str'}, + 'memory': {'key': 'memory', 'type': 'str'}, + } + + def __init__( + self, + *, + cpu: Optional[str] = None, + gpu: Optional[str] = None, + memory: Optional[str] = None, + **kwargs + ): + """ + :keyword cpu: Number of vCPUs request/limit for container. More info: + https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. + :paramtype cpu: str + :keyword gpu: Number of Nvidia GPU cards request/limit for container. More info: + https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. + :paramtype gpu: str + :keyword memory: Memory size request/limit for container. More info: + https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. + :paramtype memory: str + """ + super(ContainerResourceSettings, self).__init__(**kwargs) + self.cpu = cpu + self.gpu = gpu + self.memory = memory + + +class CosmosDbSettings(msrest.serialization.Model): + """CosmosDbSettings. + + :ivar collections_throughput: The throughput of the collections in cosmosdb database. + :vartype collections_throughput: int + """ + + _attribute_map = { + 'collections_throughput': {'key': 'collectionsThroughput', 'type': 'int'}, + } + + def __init__( + self, + *, + collections_throughput: Optional[int] = None, + **kwargs + ): + """ + :keyword collections_throughput: The throughput of the collections in cosmosdb database. + :paramtype collections_throughput: int + """ + super(CosmosDbSettings, self).__init__(**kwargs) + self.collections_throughput = collections_throughput + + +class ScheduleBase(msrest.serialization.Model): + """Base definition of a schedule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CronSchedule, RecurrenceSchedule. + + All required parameters must be populated in order to send to Azure. + + :ivar end_time: Specifies end time of schedule in ISO 8601 format. + If not present, the schedule will run indefinitely. + :vartype end_time: ~datetime.datetime + :ivar schedule_status: Specifies the schedule's status. Possible values include: "Enabled", + "Disabled". + :vartype schedule_status: str or ~azure.mgmt.machinelearningservices.models.ScheduleStatus + :ivar schedule_type: Required. [Required] Specifies the schedule type.Constant filled by + server. Possible values include: "Cron", "Recurrence". + :vartype schedule_type: str or ~azure.mgmt.machinelearningservices.models.ScheduleType + :ivar start_time: Specifies start time of schedule in ISO 8601 format. + :vartype start_time: ~datetime.datetime + :ivar time_zone: Specifies time zone in which the schedule runs. + TimeZone should follow Windows time zone format. + :vartype time_zone: str + """ + + _validation = { + 'schedule_type': {'required': True}, + } + + _attribute_map = { + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'schedule_status': {'key': 'scheduleStatus', 'type': 'str'}, + 'schedule_type': {'key': 'scheduleType', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + } + + _subtype_map = { + 'schedule_type': {'Cron': 'CronSchedule', 'Recurrence': 'RecurrenceSchedule'} + } + + def __init__( + self, + *, + end_time: Optional[datetime.datetime] = None, + schedule_status: Optional[Union[str, "ScheduleStatus"]] = None, + start_time: Optional[datetime.datetime] = None, + time_zone: Optional[str] = "UTC", + **kwargs + ): + """ + :keyword end_time: Specifies end time of schedule in ISO 8601 format. + If not present, the schedule will run indefinitely. + :paramtype end_time: ~datetime.datetime + :keyword schedule_status: Specifies the schedule's status. Possible values include: "Enabled", + "Disabled". + :paramtype schedule_status: str or ~azure.mgmt.machinelearningservices.models.ScheduleStatus + :keyword start_time: Specifies start time of schedule in ISO 8601 format. + :paramtype start_time: ~datetime.datetime + :keyword time_zone: Specifies time zone in which the schedule runs. + TimeZone should follow Windows time zone format. + :paramtype time_zone: str + """ + super(ScheduleBase, self).__init__(**kwargs) + self.end_time = end_time + self.schedule_status = schedule_status + self.schedule_type = None # type: Optional[str] + self.start_time = start_time + self.time_zone = time_zone + + +class CronSchedule(ScheduleBase): + """Cron schedule definition. + + All required parameters must be populated in order to send to Azure. + + :ivar end_time: Specifies end time of schedule in ISO 8601 format. + If not present, the schedule will run indefinitely. + :vartype end_time: ~datetime.datetime + :ivar schedule_status: Specifies the schedule's status. Possible values include: "Enabled", + "Disabled". + :vartype schedule_status: str or ~azure.mgmt.machinelearningservices.models.ScheduleStatus + :ivar schedule_type: Required. [Required] Specifies the schedule type.Constant filled by + server. Possible values include: "Cron", "Recurrence". + :vartype schedule_type: str or ~azure.mgmt.machinelearningservices.models.ScheduleType + :ivar start_time: Specifies start time of schedule in ISO 8601 format. + :vartype start_time: ~datetime.datetime + :ivar time_zone: Specifies time zone in which the schedule runs. + TimeZone should follow Windows time zone format. + :vartype time_zone: str + :ivar expression: Required. [Required] Specifies cron expression of schedule. + The expression should follow NCronTab format. + :vartype expression: str + """ + + _validation = { + 'schedule_type': {'required': True}, + 'expression': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + } + + _attribute_map = { + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'schedule_status': {'key': 'scheduleStatus', 'type': 'str'}, + 'schedule_type': {'key': 'scheduleType', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'expression': {'key': 'expression', 'type': 'str'}, + } + + def __init__( + self, + *, + expression: str, + end_time: Optional[datetime.datetime] = None, + schedule_status: Optional[Union[str, "ScheduleStatus"]] = None, + start_time: Optional[datetime.datetime] = None, + time_zone: Optional[str] = "UTC", + **kwargs + ): + """ + :keyword end_time: Specifies end time of schedule in ISO 8601 format. + If not present, the schedule will run indefinitely. + :paramtype end_time: ~datetime.datetime + :keyword schedule_status: Specifies the schedule's status. Possible values include: "Enabled", + "Disabled". + :paramtype schedule_status: str or ~azure.mgmt.machinelearningservices.models.ScheduleStatus + :keyword start_time: Specifies start time of schedule in ISO 8601 format. + :paramtype start_time: ~datetime.datetime + :keyword time_zone: Specifies time zone in which the schedule runs. + TimeZone should follow Windows time zone format. + :paramtype time_zone: str + :keyword expression: Required. [Required] Specifies cron expression of schedule. + The expression should follow NCronTab format. + :paramtype expression: str + """ + super(CronSchedule, self).__init__(end_time=end_time, schedule_status=schedule_status, start_time=start_time, time_zone=time_zone, **kwargs) + self.schedule_type = 'Cron' # type: str + self.expression = expression + + +class JobInput(msrest.serialization.Model): + """Command job definition. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CustomModelJobInput, LiteralJobInput, MLFlowModelJobInput, MLTableJobInput, TritonModelJobInput, UriFileJobInput, UriFolderJobInput. + + All required parameters must be populated in order to send to Azure. + + :ivar description: Description for the input. + :vartype description: str + :ivar job_input_type: Required. [Required] Specifies the type of job.Constant filled by server. + Possible values include: "literal", "uri_file", "uri_folder", "mltable", "custom_model", + "mlflow_model", "triton_model". + :vartype job_input_type: str or ~azure.mgmt.machinelearningservices.models.JobInputType + """ + + _validation = { + 'job_input_type': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'job_input_type': {'key': 'jobInputType', 'type': 'str'}, + } + + _subtype_map = { + 'job_input_type': {'custom_model': 'CustomModelJobInput', 'literal': 'LiteralJobInput', 'mlflow_model': 'MLFlowModelJobInput', 'mltable': 'MLTableJobInput', 'triton_model': 'TritonModelJobInput', 'uri_file': 'UriFileJobInput', 'uri_folder': 'UriFolderJobInput'} + } + + def __init__( + self, + *, + description: Optional[str] = None, + **kwargs + ): + """ + :keyword description: Description for the input. + :paramtype description: str + """ + super(JobInput, self).__init__(**kwargs) + self.description = description + self.job_input_type = None # type: Optional[str] + + +class CustomModelJobInput(JobInput, AssetJobInput): + """CustomModelJobInput. + + All required parameters must be populated in order to send to Azure. + + :ivar mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", + "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". + :vartype mode: str or ~azure.mgmt.machinelearningservices.models.InputDeliveryMode + :ivar uri: Required. [Required] Input Asset URI. + :vartype uri: str + :ivar description: Description for the input. + :vartype description: str + :ivar job_input_type: Required. [Required] Specifies the type of job.Constant filled by server. + Possible values include: "literal", "uri_file", "uri_folder", "mltable", "custom_model", + "mlflow_model", "triton_model". + :vartype job_input_type: str or ~azure.mgmt.machinelearningservices.models.JobInputType + """ + + _validation = { + 'uri': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + 'job_input_type': {'required': True}, + } + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'job_input_type': {'key': 'jobInputType', 'type': 'str'}, + } + + def __init__( + self, + *, + uri: str, + mode: Optional[Union[str, "InputDeliveryMode"]] = None, + description: Optional[str] = None, + **kwargs + ): + """ + :keyword mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", + "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". + :paramtype mode: str or ~azure.mgmt.machinelearningservices.models.InputDeliveryMode + :keyword uri: Required. [Required] Input Asset URI. + :paramtype uri: str + :keyword description: Description for the input. + :paramtype description: str + """ + super(CustomModelJobInput, self).__init__(description=description, mode=mode, uri=uri, **kwargs) + self.mode = mode + self.uri = uri + self.job_input_type = 'custom_model' # type: str + self.description = description + self.job_input_type = 'custom_model' # type: str + + +class JobOutput(msrest.serialization.Model): + """Job output definition container information on where to find job output/logs. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CustomModelJobOutput, MLFlowModelJobOutput, MLTableJobOutput, TritonModelJobOutput, UriFileJobOutput, UriFolderJobOutput. + + All required parameters must be populated in order to send to Azure. + + :ivar description: Description for the output. + :vartype description: str + :ivar job_output_type: Required. [Required] Specifies the type of job.Constant filled by + server. Possible values include: "uri_file", "uri_folder", "mltable", "custom_model", + "mlflow_model", "triton_model". + :vartype job_output_type: str or ~azure.mgmt.machinelearningservices.models.JobOutputType + """ + + _validation = { + 'job_output_type': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'job_output_type': {'key': 'jobOutputType', 'type': 'str'}, + } + + _subtype_map = { + 'job_output_type': {'custom_model': 'CustomModelJobOutput', 'mlflow_model': 'MLFlowModelJobOutput', 'mltable': 'MLTableJobOutput', 'triton_model': 'TritonModelJobOutput', 'uri_file': 'UriFileJobOutput', 'uri_folder': 'UriFolderJobOutput'} + } + + def __init__( + self, + *, + description: Optional[str] = None, + **kwargs + ): + """ + :keyword description: Description for the output. + :paramtype description: str + """ + super(JobOutput, self).__init__(**kwargs) + self.description = description + self.job_output_type = None # type: Optional[str] + + +class CustomModelJobOutput(JobOutput, AssetJobOutput): + """CustomModelJobOutput. + + All required parameters must be populated in order to send to Azure. + + :ivar mode: Output Asset Delivery Mode. Possible values include: "ReadWriteMount", "Upload". + :vartype mode: str or ~azure.mgmt.machinelearningservices.models.OutputDeliveryMode + :ivar uri: Output Asset URI. + :vartype uri: str + :ivar description: Description for the output. + :vartype description: str + :ivar job_output_type: Required. [Required] Specifies the type of job.Constant filled by + server. Possible values include: "uri_file", "uri_folder", "mltable", "custom_model", + "mlflow_model", "triton_model". + :vartype job_output_type: str or ~azure.mgmt.machinelearningservices.models.JobOutputType + """ + + _validation = { + 'job_output_type': {'required': True}, + } + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'job_output_type': {'key': 'jobOutputType', 'type': 'str'}, + } + + def __init__( + self, + *, + mode: Optional[Union[str, "OutputDeliveryMode"]] = None, + uri: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + """ + :keyword mode: Output Asset Delivery Mode. Possible values include: "ReadWriteMount", "Upload". + :paramtype mode: str or ~azure.mgmt.machinelearningservices.models.OutputDeliveryMode + :keyword uri: Output Asset URI. + :paramtype uri: str + :keyword description: Description for the output. + :paramtype description: str + """ + super(CustomModelJobOutput, self).__init__(description=description, mode=mode, uri=uri, **kwargs) + self.mode = mode + self.uri = uri + self.job_output_type = 'custom_model' # type: str + self.description = description + self.job_output_type = 'custom_model' # type: str + + +class DatabricksSchema(msrest.serialization.Model): + """DatabricksSchema. + + :ivar properties: Properties of Databricks. + :vartype properties: ~azure.mgmt.machinelearningservices.models.DatabricksProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'DatabricksProperties'}, + } + + def __init__( + self, + *, + properties: Optional["DatabricksProperties"] = None, + **kwargs + ): + """ + :keyword properties: Properties of Databricks. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.DatabricksProperties + """ + super(DatabricksSchema, self).__init__(**kwargs) + self.properties = properties + + +class Databricks(Compute, DatabricksSchema): + """A DataFactory compute. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar properties: Properties of Databricks. + :vartype properties: ~azure.mgmt.machinelearningservices.models.DatabricksProperties + :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values + include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", + "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark". + :vartype compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType + :ivar compute_location: Location for the underlying compute. + :vartype compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values are Unknown, + Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating", + "Creating", "Deleting", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :ivar description: The description of the Machine Learning compute. + :vartype description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: ~datetime.datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: ~datetime.datetime + :ivar resource_id: ARM resource id of the underlying compute. + :vartype resource_id: str + :ivar provisioning_errors: Errors during provisioning. + :vartype provisioning_errors: list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought + from outside if true, or machine learning service provisioned it if false. + :vartype is_attached_compute: bool + :ivar disable_local_auth: Opt-out of local authentication and ensure customers can use only MSI + and AAD exclusively for authentication. + :vartype disable_local_auth: bool + """ + + _validation = { + 'compute_type': {'required': True}, + 'compute_location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'DatabricksProperties'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + } + + def __init__( + self, + *, + properties: Optional["DatabricksProperties"] = None, + description: Optional[str] = None, + resource_id: Optional[str] = None, + disable_local_auth: Optional[bool] = None, + **kwargs + ): + """ + :keyword properties: Properties of Databricks. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.DatabricksProperties + :keyword description: The description of the Machine Learning compute. + :paramtype description: str + :keyword resource_id: ARM resource id of the underlying compute. + :paramtype resource_id: str + :keyword disable_local_auth: Opt-out of local authentication and ensure customers can use only + MSI and AAD exclusively for authentication. + :paramtype disable_local_auth: bool + """ + super(Databricks, self).__init__(description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, properties=properties, **kwargs) + self.properties = properties + self.compute_type = 'Databricks' # type: str + self.compute_type = 'Databricks' # type: str + self.compute_location = None + self.provisioning_state = None + self.description = description + self.created_on = None + self.modified_on = None + self.resource_id = resource_id + self.provisioning_errors = None + self.is_attached_compute = None + self.disable_local_auth = disable_local_auth + + +class DatabricksComputeSecretsProperties(msrest.serialization.Model): + """Properties of Databricks Compute Secrets. + + :ivar databricks_access_token: access token for databricks account. + :vartype databricks_access_token: str + """ + + _attribute_map = { + 'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'}, + } + + def __init__( + self, + *, + databricks_access_token: Optional[str] = None, + **kwargs + ): + """ + :keyword databricks_access_token: access token for databricks account. + :paramtype databricks_access_token: str + """ + super(DatabricksComputeSecretsProperties, self).__init__(**kwargs) + self.databricks_access_token = databricks_access_token + + +class DatabricksComputeSecrets(ComputeSecrets, DatabricksComputeSecretsProperties): + """Secrets related to a Machine Learning compute based on Databricks. + + All required parameters must be populated in order to send to Azure. + + :ivar databricks_access_token: access token for databricks account. + :vartype databricks_access_token: str + :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values + include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", + "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark". + :vartype compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType + """ + + _validation = { + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + } + + def __init__( + self, + *, + databricks_access_token: Optional[str] = None, + **kwargs + ): + """ + :keyword databricks_access_token: access token for databricks account. + :paramtype databricks_access_token: str + """ + super(DatabricksComputeSecrets, self).__init__(databricks_access_token=databricks_access_token, **kwargs) + self.databricks_access_token = databricks_access_token + self.compute_type = 'Databricks' # type: str + self.compute_type = 'Databricks' # type: str + + +class DatabricksProperties(msrest.serialization.Model): + """Properties of Databricks. + + :ivar databricks_access_token: Databricks access token. + :vartype databricks_access_token: str + :ivar workspace_url: Workspace Url. + :vartype workspace_url: str + """ + + _attribute_map = { + 'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'}, + 'workspace_url': {'key': 'workspaceUrl', 'type': 'str'}, + } + + def __init__( + self, + *, + databricks_access_token: Optional[str] = None, + workspace_url: Optional[str] = None, + **kwargs + ): + """ + :keyword databricks_access_token: Databricks access token. + :paramtype databricks_access_token: str + :keyword workspace_url: Workspace Url. + :paramtype workspace_url: str + """ + super(DatabricksProperties, self).__init__(**kwargs) + self.databricks_access_token = databricks_access_token + self.workspace_url = workspace_url + + +class DataContainerData(Resource): + """Azure Resource Manager resource envelope. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar properties: Required. [Required] Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.DataContainerDetails + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'DataContainerDetails'}, + } + + def __init__( + self, + *, + properties: "DataContainerDetails", + **kwargs + ): + """ + :keyword properties: Required. [Required] Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.DataContainerDetails + """ + super(DataContainerData, self).__init__(**kwargs) + self.properties = properties + + +class DataContainerDetails(AssetContainer): + """Container for data asset versions. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar latest_version: The latest version inside this container. + :vartype latest_version: str + :ivar next_version: The next auto incremental version. + :vartype next_version: str + :ivar data_type: Required. [Required] Specifies the type of data. Possible values include: + "uri_file", "uri_folder", "mltable". + :vartype data_type: str or ~azure.mgmt.machinelearningservices.models.DataType + """ + + _validation = { + 'latest_version': {'readonly': True}, + 'next_version': {'readonly': True}, + 'data_type': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'latest_version': {'key': 'latestVersion', 'type': 'str'}, + 'next_version': {'key': 'nextVersion', 'type': 'str'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + } + + def __init__( + self, + *, + data_type: Union[str, "DataType"], + description: Optional[str] = None, + properties: Optional[Dict[str, str]] = None, + tags: Optional[Dict[str, str]] = None, + is_archived: Optional[bool] = False, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + :keyword data_type: Required. [Required] Specifies the type of data. Possible values include: + "uri_file", "uri_folder", "mltable". + :paramtype data_type: str or ~azure.mgmt.machinelearningservices.models.DataType + """ + super(DataContainerDetails, self).__init__(description=description, properties=properties, tags=tags, is_archived=is_archived, **kwargs) + self.data_type = data_type + + +class DataContainerResourceArmPaginatedResult(msrest.serialization.Model): + """A paginated list of DataContainer entities. + + :ivar next_link: The link to the next page of DataContainer objects. If null, there are no + additional pages. + :vartype next_link: str + :ivar value: An array of objects of type DataContainer. + :vartype value: list[~azure.mgmt.machinelearningservices.models.DataContainerData] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[DataContainerData]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["DataContainerData"]] = None, + **kwargs + ): + """ + :keyword next_link: The link to the next page of DataContainer objects. If null, there are no + additional pages. + :paramtype next_link: str + :keyword value: An array of objects of type DataContainer. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.DataContainerData] + """ + super(DataContainerResourceArmPaginatedResult, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class DataFactory(Compute): + """A DataFactory compute. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values + include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", + "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark". + :vartype compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType + :ivar compute_location: Location for the underlying compute. + :vartype compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values are Unknown, + Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating", + "Creating", "Deleting", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :ivar description: The description of the Machine Learning compute. + :vartype description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: ~datetime.datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: ~datetime.datetime + :ivar resource_id: ARM resource id of the underlying compute. + :vartype resource_id: str + :ivar provisioning_errors: Errors during provisioning. + :vartype provisioning_errors: list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought + from outside if true, or machine learning service provisioned it if false. + :vartype is_attached_compute: bool + :ivar disable_local_auth: Opt-out of local authentication and ensure customers can use only MSI + and AAD exclusively for authentication. + :vartype disable_local_auth: bool + """ + + _validation = { + 'compute_type': {'required': True}, + 'compute_location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'readonly': True}, + } + + _attribute_map = { + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + resource_id: Optional[str] = None, + disable_local_auth: Optional[bool] = None, + **kwargs + ): + """ + :keyword description: The description of the Machine Learning compute. + :paramtype description: str + :keyword resource_id: ARM resource id of the underlying compute. + :paramtype resource_id: str + :keyword disable_local_auth: Opt-out of local authentication and ensure customers can use only + MSI and AAD exclusively for authentication. + :paramtype disable_local_auth: bool + """ + super(DataFactory, self).__init__(description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, **kwargs) + self.compute_type = 'DataFactory' # type: str + + +class DataLakeAnalyticsSchema(msrest.serialization.Model): + """DataLakeAnalyticsSchema. + + :ivar properties: + :vartype properties: + ~azure.mgmt.machinelearningservices.models.DataLakeAnalyticsSchemaProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'DataLakeAnalyticsSchemaProperties'}, + } + + def __init__( + self, + *, + properties: Optional["DataLakeAnalyticsSchemaProperties"] = None, + **kwargs + ): + """ + :keyword properties: + :paramtype properties: + ~azure.mgmt.machinelearningservices.models.DataLakeAnalyticsSchemaProperties + """ + super(DataLakeAnalyticsSchema, self).__init__(**kwargs) + self.properties = properties + + +class DataLakeAnalytics(Compute, DataLakeAnalyticsSchema): + """A DataLakeAnalytics compute. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar properties: + :vartype properties: + ~azure.mgmt.machinelearningservices.models.DataLakeAnalyticsSchemaProperties + :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values + include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", + "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark". + :vartype compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType + :ivar compute_location: Location for the underlying compute. + :vartype compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values are Unknown, + Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating", + "Creating", "Deleting", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :ivar description: The description of the Machine Learning compute. + :vartype description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: ~datetime.datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: ~datetime.datetime + :ivar resource_id: ARM resource id of the underlying compute. + :vartype resource_id: str + :ivar provisioning_errors: Errors during provisioning. + :vartype provisioning_errors: list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought + from outside if true, or machine learning service provisioned it if false. + :vartype is_attached_compute: bool + :ivar disable_local_auth: Opt-out of local authentication and ensure customers can use only MSI + and AAD exclusively for authentication. + :vartype disable_local_auth: bool + """ + + _validation = { + 'compute_type': {'required': True}, + 'compute_location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'DataLakeAnalyticsSchemaProperties'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + } + + def __init__( + self, + *, + properties: Optional["DataLakeAnalyticsSchemaProperties"] = None, + description: Optional[str] = None, + resource_id: Optional[str] = None, + disable_local_auth: Optional[bool] = None, + **kwargs + ): + """ + :keyword properties: + :paramtype properties: + ~azure.mgmt.machinelearningservices.models.DataLakeAnalyticsSchemaProperties + :keyword description: The description of the Machine Learning compute. + :paramtype description: str + :keyword resource_id: ARM resource id of the underlying compute. + :paramtype resource_id: str + :keyword disable_local_auth: Opt-out of local authentication and ensure customers can use only + MSI and AAD exclusively for authentication. + :paramtype disable_local_auth: bool + """ + super(DataLakeAnalytics, self).__init__(description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, properties=properties, **kwargs) + self.properties = properties + self.compute_type = 'DataLakeAnalytics' # type: str + self.compute_type = 'DataLakeAnalytics' # type: str + self.compute_location = None + self.provisioning_state = None + self.description = description + self.created_on = None + self.modified_on = None + self.resource_id = resource_id + self.provisioning_errors = None + self.is_attached_compute = None + self.disable_local_auth = disable_local_auth + + +class DataLakeAnalyticsSchemaProperties(msrest.serialization.Model): + """DataLakeAnalyticsSchemaProperties. + + :ivar data_lake_store_account_name: DataLake Store Account Name. + :vartype data_lake_store_account_name: str + """ + + _attribute_map = { + 'data_lake_store_account_name': {'key': 'dataLakeStoreAccountName', 'type': 'str'}, + } + + def __init__( + self, + *, + data_lake_store_account_name: Optional[str] = None, + **kwargs + ): + """ + :keyword data_lake_store_account_name: DataLake Store Account Name. + :paramtype data_lake_store_account_name: str + """ + super(DataLakeAnalyticsSchemaProperties, self).__init__(**kwargs) + self.data_lake_store_account_name = data_lake_store_account_name + + +class DataPathAssetReference(AssetReferenceBase): + """Reference to an asset via its path in a datastore. + + All required parameters must be populated in order to send to Azure. + + :ivar reference_type: Required. [Required] Specifies the type of asset reference.Constant + filled by server. Possible values include: "Id", "DataPath", "OutputPath". + :vartype reference_type: str or ~azure.mgmt.machinelearningservices.models.ReferenceType + :ivar datastore_id: ARM resource ID of the datastore where the asset is located. + :vartype datastore_id: str + :ivar path: The path of the file/directory in the datastore. + :vartype path: str + """ + + _validation = { + 'reference_type': {'required': True}, + } + + _attribute_map = { + 'reference_type': {'key': 'referenceType', 'type': 'str'}, + 'datastore_id': {'key': 'datastoreId', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + } + + def __init__( + self, + *, + datastore_id: Optional[str] = None, + path: Optional[str] = None, + **kwargs + ): + """ + :keyword datastore_id: ARM resource ID of the datastore where the asset is located. + :paramtype datastore_id: str + :keyword path: The path of the file/directory in the datastore. + :paramtype path: str + """ + super(DataPathAssetReference, self).__init__(**kwargs) + self.reference_type = 'DataPath' # type: str + self.datastore_id = datastore_id + self.path = path + + +class DatastoreData(Resource): + """Azure Resource Manager resource envelope. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar properties: Required. [Required] Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.DatastoreDetails + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'DatastoreDetails'}, + } + + def __init__( + self, + *, + properties: "DatastoreDetails", + **kwargs + ): + """ + :keyword properties: Required. [Required] Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.DatastoreDetails + """ + super(DatastoreData, self).__init__(**kwargs) + self.properties = properties + + +class DatastoreResourceArmPaginatedResult(msrest.serialization.Model): + """A paginated list of Datastore entities. + + :ivar next_link: The link to the next page of Datastore objects. If null, there are no + additional pages. + :vartype next_link: str + :ivar value: An array of objects of type Datastore. + :vartype value: list[~azure.mgmt.machinelearningservices.models.DatastoreData] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[DatastoreData]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["DatastoreData"]] = None, + **kwargs + ): + """ + :keyword next_link: The link to the next page of Datastore objects. If null, there are no + additional pages. + :paramtype next_link: str + :keyword value: An array of objects of type Datastore. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.DatastoreData] + """ + super(DatastoreResourceArmPaginatedResult, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class DataVersionBaseData(Resource): + """Azure Resource Manager resource envelope. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar properties: Required. [Required] Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.DataVersionBaseDetails + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'DataVersionBaseDetails'}, + } + + def __init__( + self, + *, + properties: "DataVersionBaseDetails", + **kwargs + ): + """ + :keyword properties: Required. [Required] Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.DataVersionBaseDetails + """ + super(DataVersionBaseData, self).__init__(**kwargs) + self.properties = properties + + +class DataVersionBaseDetails(AssetBase): + """Data version base definition. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MLTableData, UriFileDataVersion, UriFolderDataVersion. + + All required parameters must be populated in order to send to Azure. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar is_anonymous: If the name version are system generated (anonymous registration). + :vartype is_anonymous: bool + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar data_type: Required. [Required] Specifies the type of data.Constant filled by server. + Possible values include: "uri_file", "uri_folder", "mltable". + :vartype data_type: str or ~azure.mgmt.machinelearningservices.models.DataType + :ivar data_uri: Required. [Required] Uri of the data. Usage/meaning depends on + Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220501.Assets.DataVersionBase.DataType. + :vartype data_uri: str + """ + + _validation = { + 'data_type': {'required': True}, + 'data_uri': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + 'data_uri': {'key': 'dataUri', 'type': 'str'}, + } + + _subtype_map = { + 'data_type': {'mltable': 'MLTableData', 'uri_file': 'UriFileDataVersion', 'uri_folder': 'UriFolderDataVersion'} + } + + def __init__( + self, + *, + data_uri: str, + description: Optional[str] = None, + properties: Optional[Dict[str, str]] = None, + tags: Optional[Dict[str, str]] = None, + is_anonymous: Optional[bool] = False, + is_archived: Optional[bool] = False, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword is_anonymous: If the name version are system generated (anonymous registration). + :paramtype is_anonymous: bool + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + :keyword data_uri: Required. [Required] Uri of the data. Usage/meaning depends on + Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220501.Assets.DataVersionBase.DataType. + :paramtype data_uri: str + """ + super(DataVersionBaseDetails, self).__init__(description=description, properties=properties, tags=tags, is_anonymous=is_anonymous, is_archived=is_archived, **kwargs) + self.data_type = 'DataVersionBaseDetails' # type: str + self.data_uri = data_uri + + +class DataVersionBaseResourceArmPaginatedResult(msrest.serialization.Model): + """A paginated list of DataVersionBase entities. + + :ivar next_link: The link to the next page of DataVersionBase objects. If null, there are no + additional pages. + :vartype next_link: str + :ivar value: An array of objects of type DataVersionBase. + :vartype value: list[~azure.mgmt.machinelearningservices.models.DataVersionBaseData] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[DataVersionBaseData]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["DataVersionBaseData"]] = None, + **kwargs + ): + """ + :keyword next_link: The link to the next page of DataVersionBase objects. If null, there are no + additional pages. + :paramtype next_link: str + :keyword value: An array of objects of type DataVersionBase. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.DataVersionBaseData] + """ + super(DataVersionBaseResourceArmPaginatedResult, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class OnlineScaleSettings(msrest.serialization.Model): + """Online deployment scaling configuration. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DefaultScaleSettings, TargetUtilizationScaleSettings. + + All required parameters must be populated in order to send to Azure. + + :ivar scale_type: Required. [Required] Type of deployment scaling algorithm.Constant filled by + server. Possible values include: "Default", "TargetUtilization". + :vartype scale_type: str or ~azure.mgmt.machinelearningservices.models.ScaleType + """ + + _validation = { + 'scale_type': {'required': True}, + } + + _attribute_map = { + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + } + + _subtype_map = { + 'scale_type': {'Default': 'DefaultScaleSettings', 'TargetUtilization': 'TargetUtilizationScaleSettings'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(OnlineScaleSettings, self).__init__(**kwargs) + self.scale_type = None # type: Optional[str] + + +class DefaultScaleSettings(OnlineScaleSettings): + """DefaultScaleSettings. + + All required parameters must be populated in order to send to Azure. + + :ivar scale_type: Required. [Required] Type of deployment scaling algorithm.Constant filled by + server. Possible values include: "Default", "TargetUtilization". + :vartype scale_type: str or ~azure.mgmt.machinelearningservices.models.ScaleType + """ + + _validation = { + 'scale_type': {'required': True}, + } + + _attribute_map = { + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(DefaultScaleSettings, self).__init__(**kwargs) + self.scale_type = 'Default' # type: str + + +class DeploymentLogs(msrest.serialization.Model): + """DeploymentLogs. + + :ivar content: The retrieved online deployment logs. + :vartype content: str + """ + + _attribute_map = { + 'content': {'key': 'content', 'type': 'str'}, + } + + def __init__( + self, + *, + content: Optional[str] = None, + **kwargs + ): + """ + :keyword content: The retrieved online deployment logs. + :paramtype content: str + """ + super(DeploymentLogs, self).__init__(**kwargs) + self.content = content + + +class DeploymentLogsRequest(msrest.serialization.Model): + """DeploymentLogsRequest. + + :ivar container_type: The type of container to retrieve logs from. Possible values include: + "StorageInitializer", "InferenceServer". + :vartype container_type: str or ~azure.mgmt.machinelearningservices.models.ContainerType + :ivar tail: The maximum number of lines to tail. + :vartype tail: int + """ + + _attribute_map = { + 'container_type': {'key': 'containerType', 'type': 'str'}, + 'tail': {'key': 'tail', 'type': 'int'}, + } + + def __init__( + self, + *, + container_type: Optional[Union[str, "ContainerType"]] = None, + tail: Optional[int] = None, + **kwargs + ): + """ + :keyword container_type: The type of container to retrieve logs from. Possible values include: + "StorageInitializer", "InferenceServer". + :paramtype container_type: str or ~azure.mgmt.machinelearningservices.models.ContainerType + :keyword tail: The maximum number of lines to tail. + :paramtype tail: int + """ + super(DeploymentLogsRequest, self).__init__(**kwargs) + self.container_type = container_type + self.tail = tail + + +class DiagnoseRequestProperties(msrest.serialization.Model): + """DiagnoseRequestProperties. + + :ivar udr: Setting for diagnosing user defined routing. + :vartype udr: dict[str, any] + :ivar nsg: Setting for diagnosing network security group. + :vartype nsg: dict[str, any] + :ivar resource_lock: Setting for diagnosing resource lock. + :vartype resource_lock: dict[str, any] + :ivar dns_resolution: Setting for diagnosing dns resolution. + :vartype dns_resolution: dict[str, any] + :ivar storage_account: Setting for diagnosing dependent storage account. + :vartype storage_account: dict[str, any] + :ivar key_vault: Setting for diagnosing dependent key vault. + :vartype key_vault: dict[str, any] + :ivar container_registry: Setting for diagnosing dependent container registry. + :vartype container_registry: dict[str, any] + :ivar application_insights: Setting for diagnosing dependent application insights. + :vartype application_insights: dict[str, any] + :ivar others: Setting for diagnosing unclassified category of problems. + :vartype others: dict[str, any] + """ + + _attribute_map = { + 'udr': {'key': 'udr', 'type': '{object}'}, + 'nsg': {'key': 'nsg', 'type': '{object}'}, + 'resource_lock': {'key': 'resourceLock', 'type': '{object}'}, + 'dns_resolution': {'key': 'dnsResolution', 'type': '{object}'}, + 'storage_account': {'key': 'storageAccount', 'type': '{object}'}, + 'key_vault': {'key': 'keyVault', 'type': '{object}'}, + 'container_registry': {'key': 'containerRegistry', 'type': '{object}'}, + 'application_insights': {'key': 'applicationInsights', 'type': '{object}'}, + 'others': {'key': 'others', 'type': '{object}'}, + } + + def __init__( + self, + *, + udr: Optional[Dict[str, Any]] = None, + nsg: Optional[Dict[str, Any]] = None, + resource_lock: Optional[Dict[str, Any]] = None, + dns_resolution: Optional[Dict[str, Any]] = None, + storage_account: Optional[Dict[str, Any]] = None, + key_vault: Optional[Dict[str, Any]] = None, + container_registry: Optional[Dict[str, Any]] = None, + application_insights: Optional[Dict[str, Any]] = None, + others: Optional[Dict[str, Any]] = None, + **kwargs + ): + """ + :keyword udr: Setting for diagnosing user defined routing. + :paramtype udr: dict[str, any] + :keyword nsg: Setting for diagnosing network security group. + :paramtype nsg: dict[str, any] + :keyword resource_lock: Setting for diagnosing resource lock. + :paramtype resource_lock: dict[str, any] + :keyword dns_resolution: Setting for diagnosing dns resolution. + :paramtype dns_resolution: dict[str, any] + :keyword storage_account: Setting for diagnosing dependent storage account. + :paramtype storage_account: dict[str, any] + :keyword key_vault: Setting for diagnosing dependent key vault. + :paramtype key_vault: dict[str, any] + :keyword container_registry: Setting for diagnosing dependent container registry. + :paramtype container_registry: dict[str, any] + :keyword application_insights: Setting for diagnosing dependent application insights. + :paramtype application_insights: dict[str, any] + :keyword others: Setting for diagnosing unclassified category of problems. + :paramtype others: dict[str, any] + """ + super(DiagnoseRequestProperties, self).__init__(**kwargs) + self.udr = udr + self.nsg = nsg + self.resource_lock = resource_lock + self.dns_resolution = dns_resolution + self.storage_account = storage_account + self.key_vault = key_vault + self.container_registry = container_registry + self.application_insights = application_insights + self.others = others + + +class DiagnoseResponseResult(msrest.serialization.Model): + """DiagnoseResponseResult. + + :ivar value: + :vartype value: ~azure.mgmt.machinelearningservices.models.DiagnoseResponseResultValue + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'DiagnoseResponseResultValue'}, + } + + def __init__( + self, + *, + value: Optional["DiagnoseResponseResultValue"] = None, + **kwargs + ): + """ + :keyword value: + :paramtype value: ~azure.mgmt.machinelearningservices.models.DiagnoseResponseResultValue + """ + super(DiagnoseResponseResult, self).__init__(**kwargs) + self.value = value + + +class DiagnoseResponseResultValue(msrest.serialization.Model): + """DiagnoseResponseResultValue. + + :ivar user_defined_route_results: + :vartype user_defined_route_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :ivar network_security_rule_results: + :vartype network_security_rule_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :ivar resource_lock_results: + :vartype resource_lock_results: list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :ivar dns_resolution_results: + :vartype dns_resolution_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :ivar storage_account_results: + :vartype storage_account_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :ivar key_vault_results: + :vartype key_vault_results: list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :ivar container_registry_results: + :vartype container_registry_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :ivar application_insights_results: + :vartype application_insights_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :ivar other_results: + :vartype other_results: list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + """ + + _attribute_map = { + 'user_defined_route_results': {'key': 'userDefinedRouteResults', 'type': '[DiagnoseResult]'}, + 'network_security_rule_results': {'key': 'networkSecurityRuleResults', 'type': '[DiagnoseResult]'}, + 'resource_lock_results': {'key': 'resourceLockResults', 'type': '[DiagnoseResult]'}, + 'dns_resolution_results': {'key': 'dnsResolutionResults', 'type': '[DiagnoseResult]'}, + 'storage_account_results': {'key': 'storageAccountResults', 'type': '[DiagnoseResult]'}, + 'key_vault_results': {'key': 'keyVaultResults', 'type': '[DiagnoseResult]'}, + 'container_registry_results': {'key': 'containerRegistryResults', 'type': '[DiagnoseResult]'}, + 'application_insights_results': {'key': 'applicationInsightsResults', 'type': '[DiagnoseResult]'}, + 'other_results': {'key': 'otherResults', 'type': '[DiagnoseResult]'}, + } + + def __init__( + self, + *, + user_defined_route_results: Optional[List["DiagnoseResult"]] = None, + network_security_rule_results: Optional[List["DiagnoseResult"]] = None, + resource_lock_results: Optional[List["DiagnoseResult"]] = None, + dns_resolution_results: Optional[List["DiagnoseResult"]] = None, + storage_account_results: Optional[List["DiagnoseResult"]] = None, + key_vault_results: Optional[List["DiagnoseResult"]] = None, + container_registry_results: Optional[List["DiagnoseResult"]] = None, + application_insights_results: Optional[List["DiagnoseResult"]] = None, + other_results: Optional[List["DiagnoseResult"]] = None, + **kwargs + ): + """ + :keyword user_defined_route_results: + :paramtype user_defined_route_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :keyword network_security_rule_results: + :paramtype network_security_rule_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :keyword resource_lock_results: + :paramtype resource_lock_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :keyword dns_resolution_results: + :paramtype dns_resolution_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :keyword storage_account_results: + :paramtype storage_account_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :keyword key_vault_results: + :paramtype key_vault_results: list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :keyword container_registry_results: + :paramtype container_registry_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :keyword application_insights_results: + :paramtype application_insights_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :keyword other_results: + :paramtype other_results: list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + """ + super(DiagnoseResponseResultValue, self).__init__(**kwargs) + self.user_defined_route_results = user_defined_route_results + self.network_security_rule_results = network_security_rule_results + self.resource_lock_results = resource_lock_results + self.dns_resolution_results = dns_resolution_results + self.storage_account_results = storage_account_results + self.key_vault_results = key_vault_results + self.container_registry_results = container_registry_results + self.application_insights_results = application_insights_results + self.other_results = other_results + + +class DiagnoseResult(msrest.serialization.Model): + """Result of Diagnose. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: Code for workspace setup error. + :vartype code: str + :ivar level: Level of workspace setup error. Possible values include: "Warning", "Error", + "Information". + :vartype level: str or ~azure.mgmt.machinelearningservices.models.DiagnoseResultLevel + :ivar message: Message of workspace setup error. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'level': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(DiagnoseResult, self).__init__(**kwargs) + self.code = None + self.level = None + self.message = None + + +class DiagnoseWorkspaceParameters(msrest.serialization.Model): + """Parameters to diagnose a workspace. + + :ivar value: Value of Parameters. + :vartype value: ~azure.mgmt.machinelearningservices.models.DiagnoseRequestProperties + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'DiagnoseRequestProperties'}, + } + + def __init__( + self, + *, + value: Optional["DiagnoseRequestProperties"] = None, + **kwargs + ): + """ + :keyword value: Value of Parameters. + :paramtype value: ~azure.mgmt.machinelearningservices.models.DiagnoseRequestProperties + """ + super(DiagnoseWorkspaceParameters, self).__init__(**kwargs) + self.value = value + + +class DistributionConfiguration(msrest.serialization.Model): + """Base definition for job distribution configuration. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Mpi, PyTorch, TensorFlow. + + All required parameters must be populated in order to send to Azure. + + :ivar distribution_type: Required. [Required] Specifies the type of distribution + framework.Constant filled by server. Possible values include: "PyTorch", "TensorFlow", "Mpi". + :vartype distribution_type: str or ~azure.mgmt.machinelearningservices.models.DistributionType + """ + + _validation = { + 'distribution_type': {'required': True}, + } + + _attribute_map = { + 'distribution_type': {'key': 'distributionType', 'type': 'str'}, + } + + _subtype_map = { + 'distribution_type': {'Mpi': 'Mpi', 'PyTorch': 'PyTorch', 'TensorFlow': 'TensorFlow'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(DistributionConfiguration, self).__init__(**kwargs) + self.distribution_type = None # type: Optional[str] + + +class EncryptionKeyVaultProperties(msrest.serialization.Model): + """EncryptionKeyVaultProperties. + + All required parameters must be populated in order to send to Azure. + + :ivar key_vault_arm_id: Required. The ArmId of the keyVault where the customer owned encryption + key is present. + :vartype key_vault_arm_id: str + :ivar key_identifier: Required. Key vault uri to access the encryption key. + :vartype key_identifier: str + :ivar identity_client_id: For future use - The client id of the identity which will be used to + access key vault. + :vartype identity_client_id: str + """ + + _validation = { + 'key_vault_arm_id': {'required': True}, + 'key_identifier': {'required': True}, + } + + _attribute_map = { + 'key_vault_arm_id': {'key': 'keyVaultArmId', 'type': 'str'}, + 'key_identifier': {'key': 'keyIdentifier', 'type': 'str'}, + 'identity_client_id': {'key': 'identityClientId', 'type': 'str'}, + } + + def __init__( + self, + *, + key_vault_arm_id: str, + key_identifier: str, + identity_client_id: Optional[str] = None, + **kwargs + ): + """ + :keyword key_vault_arm_id: Required. The ArmId of the keyVault where the customer owned + encryption key is present. + :paramtype key_vault_arm_id: str + :keyword key_identifier: Required. Key vault uri to access the encryption key. + :paramtype key_identifier: str + :keyword identity_client_id: For future use - The client id of the identity which will be used + to access key vault. + :paramtype identity_client_id: str + """ + super(EncryptionKeyVaultProperties, self).__init__(**kwargs) + self.key_vault_arm_id = key_vault_arm_id + self.key_identifier = key_identifier + self.identity_client_id = identity_client_id + + +class EncryptionProperty(msrest.serialization.Model): + """EncryptionProperty. + + All required parameters must be populated in order to send to Azure. + + :ivar status: Required. Indicates whether or not the encryption is enabled for the workspace. + Possible values include: "Enabled", "Disabled". + :vartype status: str or ~azure.mgmt.machinelearningservices.models.EncryptionStatus + :ivar identity: The identity that will be used to access the key vault for encryption at rest. + :vartype identity: ~azure.mgmt.machinelearningservices.models.IdentityForCmk + :ivar key_vault_properties: Required. Customer Key vault properties. + :vartype key_vault_properties: + ~azure.mgmt.machinelearningservices.models.EncryptionKeyVaultProperties + """ + + _validation = { + 'status': {'required': True}, + 'key_vault_properties': {'required': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'IdentityForCmk'}, + 'key_vault_properties': {'key': 'keyVaultProperties', 'type': 'EncryptionKeyVaultProperties'}, + } + + def __init__( + self, + *, + status: Union[str, "EncryptionStatus"], + key_vault_properties: "EncryptionKeyVaultProperties", + identity: Optional["IdentityForCmk"] = None, + **kwargs + ): + """ + :keyword status: Required. Indicates whether or not the encryption is enabled for the + workspace. Possible values include: "Enabled", "Disabled". + :paramtype status: str or ~azure.mgmt.machinelearningservices.models.EncryptionStatus + :keyword identity: The identity that will be used to access the key vault for encryption at + rest. + :paramtype identity: ~azure.mgmt.machinelearningservices.models.IdentityForCmk + :keyword key_vault_properties: Required. Customer Key vault properties. + :paramtype key_vault_properties: + ~azure.mgmt.machinelearningservices.models.EncryptionKeyVaultProperties + """ + super(EncryptionProperty, self).__init__(**kwargs) + self.status = status + self.identity = identity + self.key_vault_properties = key_vault_properties + + +class EndpointAuthKeys(msrest.serialization.Model): + """Keys for endpoint authentication. + + :ivar primary_key: The primary key. + :vartype primary_key: str + :ivar secondary_key: The secondary key. + :vartype secondary_key: str + """ + + _attribute_map = { + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + } + + def __init__( + self, + *, + primary_key: Optional[str] = None, + secondary_key: Optional[str] = None, + **kwargs + ): + """ + :keyword primary_key: The primary key. + :paramtype primary_key: str + :keyword secondary_key: The secondary key. + :paramtype secondary_key: str + """ + super(EndpointAuthKeys, self).__init__(**kwargs) + self.primary_key = primary_key + self.secondary_key = secondary_key + + +class EndpointAuthToken(msrest.serialization.Model): + """Service Token. + + :ivar access_token: Access token for endpoint authentication. + :vartype access_token: str + :ivar expiry_time_utc: Access token expiry time (UTC). + :vartype expiry_time_utc: long + :ivar refresh_after_time_utc: Refresh access token after time (UTC). + :vartype refresh_after_time_utc: long + :ivar token_type: Access token type. + :vartype token_type: str + """ + + _attribute_map = { + 'access_token': {'key': 'accessToken', 'type': 'str'}, + 'expiry_time_utc': {'key': 'expiryTimeUtc', 'type': 'long'}, + 'refresh_after_time_utc': {'key': 'refreshAfterTimeUtc', 'type': 'long'}, + 'token_type': {'key': 'tokenType', 'type': 'str'}, + } + + def __init__( + self, + *, + access_token: Optional[str] = None, + expiry_time_utc: Optional[int] = 0, + refresh_after_time_utc: Optional[int] = 0, + token_type: Optional[str] = None, + **kwargs + ): + """ + :keyword access_token: Access token for endpoint authentication. + :paramtype access_token: str + :keyword expiry_time_utc: Access token expiry time (UTC). + :paramtype expiry_time_utc: long + :keyword refresh_after_time_utc: Refresh access token after time (UTC). + :paramtype refresh_after_time_utc: long + :keyword token_type: Access token type. + :paramtype token_type: str + """ + super(EndpointAuthToken, self).__init__(**kwargs) + self.access_token = access_token + self.expiry_time_utc = expiry_time_utc + self.refresh_after_time_utc = refresh_after_time_utc + self.token_type = token_type + + +class EnvironmentContainerData(Resource): + """Azure Resource Manager resource envelope. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar properties: Required. [Required] Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.EnvironmentContainerDetails + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'EnvironmentContainerDetails'}, + } + + def __init__( + self, + *, + properties: "EnvironmentContainerDetails", + **kwargs + ): + """ + :keyword properties: Required. [Required] Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.EnvironmentContainerDetails + """ + super(EnvironmentContainerData, self).__init__(**kwargs) + self.properties = properties + + +class EnvironmentContainerDetails(AssetContainer): + """Container for environment specification versions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar latest_version: The latest version inside this container. + :vartype latest_version: str + :ivar next_version: The next auto incremental version. + :vartype next_version: str + """ + + _validation = { + 'latest_version': {'readonly': True}, + 'next_version': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'latest_version': {'key': 'latestVersion', 'type': 'str'}, + 'next_version': {'key': 'nextVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + properties: Optional[Dict[str, str]] = None, + tags: Optional[Dict[str, str]] = None, + is_archived: Optional[bool] = False, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + """ + super(EnvironmentContainerDetails, self).__init__(description=description, properties=properties, tags=tags, is_archived=is_archived, **kwargs) + + +class EnvironmentContainerResourceArmPaginatedResult(msrest.serialization.Model): + """A paginated list of EnvironmentContainer entities. + + :ivar next_link: The link to the next page of EnvironmentContainer objects. If null, there are + no additional pages. + :vartype next_link: str + :ivar value: An array of objects of type EnvironmentContainer. + :vartype value: list[~azure.mgmt.machinelearningservices.models.EnvironmentContainerData] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[EnvironmentContainerData]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["EnvironmentContainerData"]] = None, + **kwargs + ): + """ + :keyword next_link: The link to the next page of EnvironmentContainer objects. If null, there + are no additional pages. + :paramtype next_link: str + :keyword value: An array of objects of type EnvironmentContainer. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.EnvironmentContainerData] + """ + super(EnvironmentContainerResourceArmPaginatedResult, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class EnvironmentVersionData(Resource): + """Azure Resource Manager resource envelope. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar properties: Required. [Required] Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.EnvironmentVersionDetails + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'EnvironmentVersionDetails'}, + } + + def __init__( + self, + *, + properties: "EnvironmentVersionDetails", + **kwargs + ): + """ + :keyword properties: Required. [Required] Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.EnvironmentVersionDetails + """ + super(EnvironmentVersionData, self).__init__(**kwargs) + self.properties = properties + + +class EnvironmentVersionDetails(AssetBase): + """Environment version details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar is_anonymous: If the name version are system generated (anonymous registration). + :vartype is_anonymous: bool + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar build: Configuration settings for Docker build context. + :vartype build: ~azure.mgmt.machinelearningservices.models.BuildContext + :ivar conda_file: Standard configuration file used by Conda that lets you install any kind of + package, including Python, R, and C/C++ packages. + + + .. raw:: html + + <see + href="https://repo2docker.readthedocs.io/en/latest/config_files.html#environment-yml-install-a-conda-environment" + />. + :vartype conda_file: str + :ivar environment_type: Environment type is either user managed or curated by the Azure ML + service + + + .. raw:: html + + <see + href="https://learn.microsoft.com/azure/machine-learning/resource-curated-environments" + />. Possible values include: "Curated", "UserCreated". + :vartype environment_type: str or ~azure.mgmt.machinelearningservices.models.EnvironmentType + :ivar image: Name of the image that will be used for the environment. + + + .. raw:: html + + <seealso + href="https://learn.microsoft.com/azure/machine-learning/how-to-deploy-custom-docker-image#use-a-custom-base-image" + />. + :vartype image: str + :ivar inference_config: Defines configuration specific to inference. + :vartype inference_config: + ~azure.mgmt.machinelearningservices.models.InferenceContainerProperties + :ivar os_type: The OS type of the environment. Possible values include: "Linux", "Windows". + :vartype os_type: str or ~azure.mgmt.machinelearningservices.models.OperatingSystemType + """ + + _validation = { + 'environment_type': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'build': {'key': 'build', 'type': 'BuildContext'}, + 'conda_file': {'key': 'condaFile', 'type': 'str'}, + 'environment_type': {'key': 'environmentType', 'type': 'str'}, + 'image': {'key': 'image', 'type': 'str'}, + 'inference_config': {'key': 'inferenceConfig', 'type': 'InferenceContainerProperties'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + properties: Optional[Dict[str, str]] = None, + tags: Optional[Dict[str, str]] = None, + is_anonymous: Optional[bool] = False, + is_archived: Optional[bool] = False, + build: Optional["BuildContext"] = None, + conda_file: Optional[str] = None, + image: Optional[str] = None, + inference_config: Optional["InferenceContainerProperties"] = None, + os_type: Optional[Union[str, "OperatingSystemType"]] = None, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword is_anonymous: If the name version are system generated (anonymous registration). + :paramtype is_anonymous: bool + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + :keyword build: Configuration settings for Docker build context. + :paramtype build: ~azure.mgmt.machinelearningservices.models.BuildContext + :keyword conda_file: Standard configuration file used by Conda that lets you install any kind + of package, including Python, R, and C/C++ packages. + + + .. raw:: html + + <see + href="https://repo2docker.readthedocs.io/en/latest/config_files.html#environment-yml-install-a-conda-environment" + />. + :paramtype conda_file: str + :keyword image: Name of the image that will be used for the environment. + + + .. raw:: html + + <seealso + href="https://learn.microsoft.com/azure/machine-learning/how-to-deploy-custom-docker-image#use-a-custom-base-image" + />. + :paramtype image: str + :keyword inference_config: Defines configuration specific to inference. + :paramtype inference_config: + ~azure.mgmt.machinelearningservices.models.InferenceContainerProperties + :keyword os_type: The OS type of the environment. Possible values include: "Linux", "Windows". + :paramtype os_type: str or ~azure.mgmt.machinelearningservices.models.OperatingSystemType + """ + super(EnvironmentVersionDetails, self).__init__(description=description, properties=properties, tags=tags, is_anonymous=is_anonymous, is_archived=is_archived, **kwargs) + self.build = build + self.conda_file = conda_file + self.environment_type = None + self.image = image + self.inference_config = inference_config + self.os_type = os_type + + +class EnvironmentVersionResourceArmPaginatedResult(msrest.serialization.Model): + """A paginated list of EnvironmentVersion entities. + + :ivar next_link: The link to the next page of EnvironmentVersion objects. If null, there are no + additional pages. + :vartype next_link: str + :ivar value: An array of objects of type EnvironmentVersion. + :vartype value: list[~azure.mgmt.machinelearningservices.models.EnvironmentVersionData] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[EnvironmentVersionData]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["EnvironmentVersionData"]] = None, + **kwargs + ): + """ + :keyword next_link: The link to the next page of EnvironmentVersion objects. If null, there are + no additional pages. + :paramtype next_link: str + :keyword value: An array of objects of type EnvironmentVersion. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.EnvironmentVersionData] + """ + super(EnvironmentVersionResourceArmPaginatedResult, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class ErrorAdditionalInfo(msrest.serialization.Model): + """The resource management error additional info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: any + """ + + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None + + +class ErrorDetail(msrest.serialization.Model): + """The error detail. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~azure.mgmt.machinelearningservices.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: list[~azure.mgmt.machinelearningservices.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ErrorDetail, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class ErrorResponse(msrest.serialization.Model): + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). + + :ivar error: The error object. + :vartype error: ~azure.mgmt.machinelearningservices.models.ErrorDetail + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + *, + error: Optional["ErrorDetail"] = None, + **kwargs + ): + """ + :keyword error: The error object. + :paramtype error: ~azure.mgmt.machinelearningservices.models.ErrorDetail + """ + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class EstimatedVMPrice(msrest.serialization.Model): + """The estimated price info for using a VM of a particular OS type, tier, etc. + + All required parameters must be populated in order to send to Azure. + + :ivar retail_price: Required. The price charged for using the VM. + :vartype retail_price: float + :ivar os_type: Required. Operating system type used by the VM. Possible values include: + "Linux", "Windows". + :vartype os_type: str or ~azure.mgmt.machinelearningservices.models.VMPriceOSType + :ivar vm_tier: Required. The type of the VM. Possible values include: "Standard", + "LowPriority", "Spot". + :vartype vm_tier: str or ~azure.mgmt.machinelearningservices.models.VMTier + """ + + _validation = { + 'retail_price': {'required': True}, + 'os_type': {'required': True}, + 'vm_tier': {'required': True}, + } + + _attribute_map = { + 'retail_price': {'key': 'retailPrice', 'type': 'float'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'vm_tier': {'key': 'vmTier', 'type': 'str'}, + } + + def __init__( + self, + *, + retail_price: float, + os_type: Union[str, "VMPriceOSType"], + vm_tier: Union[str, "VMTier"], + **kwargs + ): + """ + :keyword retail_price: Required. The price charged for using the VM. + :paramtype retail_price: float + :keyword os_type: Required. Operating system type used by the VM. Possible values include: + "Linux", "Windows". + :paramtype os_type: str or ~azure.mgmt.machinelearningservices.models.VMPriceOSType + :keyword vm_tier: Required. The type of the VM. Possible values include: "Standard", + "LowPriority", "Spot". + :paramtype vm_tier: str or ~azure.mgmt.machinelearningservices.models.VMTier + """ + super(EstimatedVMPrice, self).__init__(**kwargs) + self.retail_price = retail_price + self.os_type = os_type + self.vm_tier = vm_tier + + +class EstimatedVMPrices(msrest.serialization.Model): + """The estimated price info for using a VM. + + All required parameters must be populated in order to send to Azure. + + :ivar billing_currency: Required. Three lettered code specifying the currency of the VM price. + Example: USD. Possible values include: "USD". + :vartype billing_currency: str or ~azure.mgmt.machinelearningservices.models.BillingCurrency + :ivar unit_of_measure: Required. The unit of time measurement for the specified VM price. + Example: OneHour. Possible values include: "OneHour". + :vartype unit_of_measure: str or ~azure.mgmt.machinelearningservices.models.UnitOfMeasure + :ivar values: Required. The list of estimated prices for using a VM of a particular OS type, + tier, etc. + :vartype values: list[~azure.mgmt.machinelearningservices.models.EstimatedVMPrice] + """ + + _validation = { + 'billing_currency': {'required': True}, + 'unit_of_measure': {'required': True}, + 'values': {'required': True}, + } + + _attribute_map = { + 'billing_currency': {'key': 'billingCurrency', 'type': 'str'}, + 'unit_of_measure': {'key': 'unitOfMeasure', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[EstimatedVMPrice]'}, + } + + def __init__( + self, + *, + billing_currency: Union[str, "BillingCurrency"], + unit_of_measure: Union[str, "UnitOfMeasure"], + values: List["EstimatedVMPrice"], + **kwargs + ): + """ + :keyword billing_currency: Required. Three lettered code specifying the currency of the VM + price. Example: USD. Possible values include: "USD". + :paramtype billing_currency: str or ~azure.mgmt.machinelearningservices.models.BillingCurrency + :keyword unit_of_measure: Required. The unit of time measurement for the specified VM price. + Example: OneHour. Possible values include: "OneHour". + :paramtype unit_of_measure: str or ~azure.mgmt.machinelearningservices.models.UnitOfMeasure + :keyword values: Required. The list of estimated prices for using a VM of a particular OS type, + tier, etc. + :paramtype values: list[~azure.mgmt.machinelearningservices.models.EstimatedVMPrice] + """ + super(EstimatedVMPrices, self).__init__(**kwargs) + self.billing_currency = billing_currency + self.unit_of_measure = unit_of_measure + self.values = values + + +class ExternalFQDNResponse(msrest.serialization.Model): + """ExternalFQDNResponse. + + :ivar value: + :vartype value: list[~azure.mgmt.machinelearningservices.models.FQDNEndpoints] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[FQDNEndpoints]'}, + } + + def __init__( + self, + *, + value: Optional[List["FQDNEndpoints"]] = None, + **kwargs + ): + """ + :keyword value: + :paramtype value: list[~azure.mgmt.machinelearningservices.models.FQDNEndpoints] + """ + super(ExternalFQDNResponse, self).__init__(**kwargs) + self.value = value + + +class FlavorData(msrest.serialization.Model): + """FlavorData. + + :ivar data: Model flavor-specific data. + :vartype data: dict[str, str] + """ + + _attribute_map = { + 'data': {'key': 'data', 'type': '{str}'}, + } + + def __init__( + self, + *, + data: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword data: Model flavor-specific data. + :paramtype data: dict[str, str] + """ + super(FlavorData, self).__init__(**kwargs) + self.data = data + + +class FQDNEndpoint(msrest.serialization.Model): + """FQDNEndpoint. + + :ivar domain_name: + :vartype domain_name: str + :ivar endpoint_details: + :vartype endpoint_details: list[~azure.mgmt.machinelearningservices.models.FQDNEndpointDetail] + """ + + _attribute_map = { + 'domain_name': {'key': 'domainName', 'type': 'str'}, + 'endpoint_details': {'key': 'endpointDetails', 'type': '[FQDNEndpointDetail]'}, + } + + def __init__( + self, + *, + domain_name: Optional[str] = None, + endpoint_details: Optional[List["FQDNEndpointDetail"]] = None, + **kwargs + ): + """ + :keyword domain_name: + :paramtype domain_name: str + :keyword endpoint_details: + :paramtype endpoint_details: + list[~azure.mgmt.machinelearningservices.models.FQDNEndpointDetail] + """ + super(FQDNEndpoint, self).__init__(**kwargs) + self.domain_name = domain_name + self.endpoint_details = endpoint_details + + +class FQDNEndpointDetail(msrest.serialization.Model): + """FQDNEndpointDetail. + + :ivar port: + :vartype port: int + """ + + _attribute_map = { + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__( + self, + *, + port: Optional[int] = None, + **kwargs + ): + """ + :keyword port: + :paramtype port: int + """ + super(FQDNEndpointDetail, self).__init__(**kwargs) + self.port = port + + +class FQDNEndpoints(msrest.serialization.Model): + """FQDNEndpoints. + + :ivar properties: + :vartype properties: ~azure.mgmt.machinelearningservices.models.FQDNEndpointsProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'FQDNEndpointsProperties'}, + } + + def __init__( + self, + *, + properties: Optional["FQDNEndpointsProperties"] = None, + **kwargs + ): + """ + :keyword properties: + :paramtype properties: ~azure.mgmt.machinelearningservices.models.FQDNEndpointsProperties + """ + super(FQDNEndpoints, self).__init__(**kwargs) + self.properties = properties + + +class FQDNEndpointsProperties(msrest.serialization.Model): + """FQDNEndpointsProperties. + + :ivar category: + :vartype category: str + :ivar endpoints: + :vartype endpoints: list[~azure.mgmt.machinelearningservices.models.FQDNEndpoint] + """ + + _attribute_map = { + 'category': {'key': 'category', 'type': 'str'}, + 'endpoints': {'key': 'endpoints', 'type': '[FQDNEndpoint]'}, + } + + def __init__( + self, + *, + category: Optional[str] = None, + endpoints: Optional[List["FQDNEndpoint"]] = None, + **kwargs + ): + """ + :keyword category: + :paramtype category: str + :keyword endpoints: + :paramtype endpoints: list[~azure.mgmt.machinelearningservices.models.FQDNEndpoint] + """ + super(FQDNEndpointsProperties, self).__init__(**kwargs) + self.category = category + self.endpoints = endpoints + + +class GridSamplingAlgorithm(SamplingAlgorithm): + """Defines a Sampling Algorithm that exhaustively generates every value combination in the space. + + All required parameters must be populated in order to send to Azure. + + :ivar sampling_algorithm_type: Required. [Required] The algorithm used for generating + hyperparameter values, along with configuration properties.Constant filled by server. Possible + values include: "Grid", "Random", "Bayesian". + :vartype sampling_algorithm_type: str or + ~azure.mgmt.machinelearningservices.models.SamplingAlgorithmType + """ + + _validation = { + 'sampling_algorithm_type': {'required': True}, + } + + _attribute_map = { + 'sampling_algorithm_type': {'key': 'samplingAlgorithmType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(GridSamplingAlgorithm, self).__init__(**kwargs) + self.sampling_algorithm_type = 'Grid' # type: str + + +class HDInsightSchema(msrest.serialization.Model): + """HDInsightSchema. + + :ivar properties: HDInsight compute properties. + :vartype properties: ~azure.mgmt.machinelearningservices.models.HDInsightProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'HDInsightProperties'}, + } + + def __init__( + self, + *, + properties: Optional["HDInsightProperties"] = None, + **kwargs + ): + """ + :keyword properties: HDInsight compute properties. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.HDInsightProperties + """ + super(HDInsightSchema, self).__init__(**kwargs) + self.properties = properties + + +class HDInsight(Compute, HDInsightSchema): + """A HDInsight compute. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar properties: HDInsight compute properties. + :vartype properties: ~azure.mgmt.machinelearningservices.models.HDInsightProperties + :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values + include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", + "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark". + :vartype compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType + :ivar compute_location: Location for the underlying compute. + :vartype compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values are Unknown, + Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating", + "Creating", "Deleting", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :ivar description: The description of the Machine Learning compute. + :vartype description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: ~datetime.datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: ~datetime.datetime + :ivar resource_id: ARM resource id of the underlying compute. + :vartype resource_id: str + :ivar provisioning_errors: Errors during provisioning. + :vartype provisioning_errors: list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought + from outside if true, or machine learning service provisioned it if false. + :vartype is_attached_compute: bool + :ivar disable_local_auth: Opt-out of local authentication and ensure customers can use only MSI + and AAD exclusively for authentication. + :vartype disable_local_auth: bool + """ + + _validation = { + 'compute_type': {'required': True}, + 'compute_location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'HDInsightProperties'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + } + + def __init__( + self, + *, + properties: Optional["HDInsightProperties"] = None, + description: Optional[str] = None, + resource_id: Optional[str] = None, + disable_local_auth: Optional[bool] = None, + **kwargs + ): + """ + :keyword properties: HDInsight compute properties. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.HDInsightProperties + :keyword description: The description of the Machine Learning compute. + :paramtype description: str + :keyword resource_id: ARM resource id of the underlying compute. + :paramtype resource_id: str + :keyword disable_local_auth: Opt-out of local authentication and ensure customers can use only + MSI and AAD exclusively for authentication. + :paramtype disable_local_auth: bool + """ + super(HDInsight, self).__init__(description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, properties=properties, **kwargs) + self.properties = properties + self.compute_type = 'HDInsight' # type: str + self.compute_type = 'HDInsight' # type: str + self.compute_location = None + self.provisioning_state = None + self.description = description + self.created_on = None + self.modified_on = None + self.resource_id = resource_id + self.provisioning_errors = None + self.is_attached_compute = None + self.disable_local_auth = disable_local_auth + + +class HDInsightProperties(msrest.serialization.Model): + """HDInsight compute properties. + + :ivar ssh_port: Port open for ssh connections on the master node of the cluster. + :vartype ssh_port: int + :ivar address: Public IP address of the master node of the cluster. + :vartype address: str + :ivar administrator_account: Admin credentials for master node of the cluster. + :vartype administrator_account: + ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials + """ + + _attribute_map = { + 'ssh_port': {'key': 'sshPort', 'type': 'int'}, + 'address': {'key': 'address', 'type': 'str'}, + 'administrator_account': {'key': 'administratorAccount', 'type': 'VirtualMachineSshCredentials'}, + } + + def __init__( + self, + *, + ssh_port: Optional[int] = None, + address: Optional[str] = None, + administrator_account: Optional["VirtualMachineSshCredentials"] = None, + **kwargs + ): + """ + :keyword ssh_port: Port open for ssh connections on the master node of the cluster. + :paramtype ssh_port: int + :keyword address: Public IP address of the master node of the cluster. + :paramtype address: str + :keyword administrator_account: Admin credentials for master node of the cluster. + :paramtype administrator_account: + ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials + """ + super(HDInsightProperties, self).__init__(**kwargs) + self.ssh_port = ssh_port + self.address = address + self.administrator_account = administrator_account + + +class IdAssetReference(AssetReferenceBase): + """Reference to an asset via its ARM resource ID. + + All required parameters must be populated in order to send to Azure. + + :ivar reference_type: Required. [Required] Specifies the type of asset reference.Constant + filled by server. Possible values include: "Id", "DataPath", "OutputPath". + :vartype reference_type: str or ~azure.mgmt.machinelearningservices.models.ReferenceType + :ivar asset_id: Required. [Required] ARM resource ID of the asset. + :vartype asset_id: str + """ + + _validation = { + 'reference_type': {'required': True}, + 'asset_id': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + } + + _attribute_map = { + 'reference_type': {'key': 'referenceType', 'type': 'str'}, + 'asset_id': {'key': 'assetId', 'type': 'str'}, + } + + def __init__( + self, + *, + asset_id: str, + **kwargs + ): + """ + :keyword asset_id: Required. [Required] ARM resource ID of the asset. + :paramtype asset_id: str + """ + super(IdAssetReference, self).__init__(**kwargs) + self.reference_type = 'Id' # type: str + self.asset_id = asset_id + + +class IdentityForCmk(msrest.serialization.Model): + """Identity that will be used to access key vault for encryption at rest. + + :ivar user_assigned_identity: The ArmId of the user assigned identity that will be used to + access the customer managed key vault. + :vartype user_assigned_identity: str + """ + + _attribute_map = { + 'user_assigned_identity': {'key': 'userAssignedIdentity', 'type': 'str'}, + } + + def __init__( + self, + *, + user_assigned_identity: Optional[str] = None, + **kwargs + ): + """ + :keyword user_assigned_identity: The ArmId of the user assigned identity that will be used to + access the customer managed key vault. + :paramtype user_assigned_identity: str + """ + super(IdentityForCmk, self).__init__(**kwargs) + self.user_assigned_identity = user_assigned_identity + + +class InferenceContainerProperties(msrest.serialization.Model): + """InferenceContainerProperties. + + :ivar liveness_route: The route to check the liveness of the inference server container. + :vartype liveness_route: ~azure.mgmt.machinelearningservices.models.Route + :ivar readiness_route: The route to check the readiness of the inference server container. + :vartype readiness_route: ~azure.mgmt.machinelearningservices.models.Route + :ivar scoring_route: The port to send the scoring requests to, within the inference server + container. + :vartype scoring_route: ~azure.mgmt.machinelearningservices.models.Route + """ + + _attribute_map = { + 'liveness_route': {'key': 'livenessRoute', 'type': 'Route'}, + 'readiness_route': {'key': 'readinessRoute', 'type': 'Route'}, + 'scoring_route': {'key': 'scoringRoute', 'type': 'Route'}, + } + + def __init__( + self, + *, + liveness_route: Optional["Route"] = None, + readiness_route: Optional["Route"] = None, + scoring_route: Optional["Route"] = None, + **kwargs + ): + """ + :keyword liveness_route: The route to check the liveness of the inference server container. + :paramtype liveness_route: ~azure.mgmt.machinelearningservices.models.Route + :keyword readiness_route: The route to check the readiness of the inference server container. + :paramtype readiness_route: ~azure.mgmt.machinelearningservices.models.Route + :keyword scoring_route: The port to send the scoring requests to, within the inference server + container. + :paramtype scoring_route: ~azure.mgmt.machinelearningservices.models.Route + """ + super(InferenceContainerProperties, self).__init__(**kwargs) + self.liveness_route = liveness_route + self.readiness_route = readiness_route + self.scoring_route = scoring_route + + +class InstanceTypeSchema(msrest.serialization.Model): + """Instance type schema. + + :ivar node_selector: Node Selector. + :vartype node_selector: dict[str, str] + :ivar resources: Resource requests/limits for this instance type. + :vartype resources: ~azure.mgmt.machinelearningservices.models.InstanceTypeSchemaResources + """ + + _attribute_map = { + 'node_selector': {'key': 'nodeSelector', 'type': '{str}'}, + 'resources': {'key': 'resources', 'type': 'InstanceTypeSchemaResources'}, + } + + def __init__( + self, + *, + node_selector: Optional[Dict[str, str]] = None, + resources: Optional["InstanceTypeSchemaResources"] = None, + **kwargs + ): + """ + :keyword node_selector: Node Selector. + :paramtype node_selector: dict[str, str] + :keyword resources: Resource requests/limits for this instance type. + :paramtype resources: ~azure.mgmt.machinelearningservices.models.InstanceTypeSchemaResources + """ + super(InstanceTypeSchema, self).__init__(**kwargs) + self.node_selector = node_selector + self.resources = resources + + +class InstanceTypeSchemaResources(msrest.serialization.Model): + """Resource requests/limits for this instance type. + + :ivar requests: Resource requests for this instance type. + :vartype requests: dict[str, str] + :ivar limits: Resource limits for this instance type. + :vartype limits: dict[str, str] + """ + + _attribute_map = { + 'requests': {'key': 'requests', 'type': '{str}'}, + 'limits': {'key': 'limits', 'type': '{str}'}, + } + + def __init__( + self, + *, + requests: Optional[Dict[str, str]] = None, + limits: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword requests: Resource requests for this instance type. + :paramtype requests: dict[str, str] + :keyword limits: Resource limits for this instance type. + :paramtype limits: dict[str, str] + """ + super(InstanceTypeSchemaResources, self).__init__(**kwargs) + self.requests = requests + self.limits = limits + + +class JobBaseData(Resource): + """Azure Resource Manager resource envelope. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar properties: Required. [Required] Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.JobBaseDetails + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'JobBaseDetails'}, + } + + def __init__( + self, + *, + properties: "JobBaseDetails", + **kwargs + ): + """ + :keyword properties: Required. [Required] Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.JobBaseDetails + """ + super(JobBaseData, self).__init__(**kwargs) + self.properties = properties + + +class JobBaseResourceArmPaginatedResult(msrest.serialization.Model): + """A paginated list of JobBase entities. + + :ivar next_link: The link to the next page of JobBase objects. If null, there are no additional + pages. + :vartype next_link: str + :ivar value: An array of objects of type JobBase. + :vartype value: list[~azure.mgmt.machinelearningservices.models.JobBaseData] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[JobBaseData]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["JobBaseData"]] = None, + **kwargs + ): + """ + :keyword next_link: The link to the next page of JobBase objects. If null, there are no + additional pages. + :paramtype next_link: str + :keyword value: An array of objects of type JobBase. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.JobBaseData] + """ + super(JobBaseResourceArmPaginatedResult, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class JobService(msrest.serialization.Model): + """Job endpoint definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar endpoint: Url for endpoint. + :vartype endpoint: str + :ivar error_message: Any error in the service. + :vartype error_message: str + :ivar job_service_type: Endpoint type. + :vartype job_service_type: str + :ivar port: Port for endpoint. + :vartype port: int + :ivar properties: Additional properties to set on the endpoint. + :vartype properties: dict[str, str] + :ivar status: Status of endpoint. + :vartype status: str + """ + + _validation = { + 'error_message': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'job_service_type': {'key': 'jobServiceType', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + endpoint: Optional[str] = None, + job_service_type: Optional[str] = None, + port: Optional[int] = None, + properties: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword endpoint: Url for endpoint. + :paramtype endpoint: str + :keyword job_service_type: Endpoint type. + :paramtype job_service_type: str + :keyword port: Port for endpoint. + :paramtype port: int + :keyword properties: Additional properties to set on the endpoint. + :paramtype properties: dict[str, str] + """ + super(JobService, self).__init__(**kwargs) + self.endpoint = endpoint + self.error_message = None + self.job_service_type = job_service_type + self.port = port + self.properties = properties + self.status = None + + +class KubernetesSchema(msrest.serialization.Model): + """Kubernetes Compute Schema. + + :ivar properties: Properties of Kubernetes. + :vartype properties: ~azure.mgmt.machinelearningservices.models.KubernetesProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'KubernetesProperties'}, + } + + def __init__( + self, + *, + properties: Optional["KubernetesProperties"] = None, + **kwargs + ): + """ + :keyword properties: Properties of Kubernetes. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.KubernetesProperties + """ + super(KubernetesSchema, self).__init__(**kwargs) + self.properties = properties + + +class Kubernetes(Compute, KubernetesSchema): + """A Machine Learning compute based on Kubernetes Compute. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar properties: Properties of Kubernetes. + :vartype properties: ~azure.mgmt.machinelearningservices.models.KubernetesProperties + :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values + include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", + "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark". + :vartype compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType + :ivar compute_location: Location for the underlying compute. + :vartype compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values are Unknown, + Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating", + "Creating", "Deleting", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :ivar description: The description of the Machine Learning compute. + :vartype description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: ~datetime.datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: ~datetime.datetime + :ivar resource_id: ARM resource id of the underlying compute. + :vartype resource_id: str + :ivar provisioning_errors: Errors during provisioning. + :vartype provisioning_errors: list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought + from outside if true, or machine learning service provisioned it if false. + :vartype is_attached_compute: bool + :ivar disable_local_auth: Opt-out of local authentication and ensure customers can use only MSI + and AAD exclusively for authentication. + :vartype disable_local_auth: bool + """ + + _validation = { + 'compute_type': {'required': True}, + 'compute_location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'KubernetesProperties'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + } + + def __init__( + self, + *, + properties: Optional["KubernetesProperties"] = None, + description: Optional[str] = None, + resource_id: Optional[str] = None, + disable_local_auth: Optional[bool] = None, + **kwargs + ): + """ + :keyword properties: Properties of Kubernetes. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.KubernetesProperties + :keyword description: The description of the Machine Learning compute. + :paramtype description: str + :keyword resource_id: ARM resource id of the underlying compute. + :paramtype resource_id: str + :keyword disable_local_auth: Opt-out of local authentication and ensure customers can use only + MSI and AAD exclusively for authentication. + :paramtype disable_local_auth: bool + """ + super(Kubernetes, self).__init__(description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, properties=properties, **kwargs) + self.properties = properties + self.compute_type = 'Kubernetes' # type: str + self.compute_type = 'Kubernetes' # type: str + self.compute_location = None + self.provisioning_state = None + self.description = description + self.created_on = None + self.modified_on = None + self.resource_id = resource_id + self.provisioning_errors = None + self.is_attached_compute = None + self.disable_local_auth = disable_local_auth + + +class OnlineDeploymentDetails(EndpointDeploymentPropertiesBase): + """OnlineDeploymentDetails. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: KubernetesOnlineDeployment, ManagedOnlineDeployment. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar code_configuration: Code configuration for the endpoint deployment. + :vartype code_configuration: ~azure.mgmt.machinelearningservices.models.CodeConfiguration + :ivar description: Description of the endpoint deployment. + :vartype description: str + :ivar environment_id: ARM resource ID of the environment specification for the endpoint + deployment. + :vartype environment_id: str + :ivar environment_variables: Environment variables configuration for the deployment. + :vartype environment_variables: dict[str, str] + :ivar properties: Property dictionary. Properties can be added, but not removed or altered. + :vartype properties: dict[str, str] + :ivar app_insights_enabled: If true, enables Application Insights logging. + :vartype app_insights_enabled: bool + :ivar endpoint_compute_type: Required. [Required] The compute type of the endpoint.Constant + filled by server. Possible values include: "Managed", "Kubernetes", "AzureMLCompute". + :vartype endpoint_compute_type: str or + ~azure.mgmt.machinelearningservices.models.EndpointComputeType + :ivar instance_type: Compute instance type. + :vartype instance_type: str + :ivar liveness_probe: Liveness probe monitors the health of the container regularly. + :vartype liveness_probe: ~azure.mgmt.machinelearningservices.models.ProbeSettings + :ivar model: The URI path to the model. + :vartype model: str + :ivar model_mount_path: The path to mount the model in custom container. + :vartype model_mount_path: str + :ivar provisioning_state: Provisioning state for the endpoint deployment. Possible values + include: "Creating", "Deleting", "Scaling", "Updating", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.DeploymentProvisioningState + :ivar readiness_probe: Readiness probe validates if the container is ready to serve traffic. + The properties and defaults are the same as liveness probe. + :vartype readiness_probe: ~azure.mgmt.machinelearningservices.models.ProbeSettings + :ivar request_settings: Request settings for the deployment. + :vartype request_settings: ~azure.mgmt.machinelearningservices.models.OnlineRequestSettings + :ivar scale_settings: Scale settings for the deployment. + If it is null or not provided, + it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment + and to DefaultScaleSettings for ManagedOnlineDeployment. + :vartype scale_settings: ~azure.mgmt.machinelearningservices.models.OnlineScaleSettings + """ + + _validation = { + 'endpoint_compute_type': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'code_configuration': {'key': 'codeConfiguration', 'type': 'CodeConfiguration'}, + 'description': {'key': 'description', 'type': 'str'}, + 'environment_id': {'key': 'environmentId', 'type': 'str'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'app_insights_enabled': {'key': 'appInsightsEnabled', 'type': 'bool'}, + 'endpoint_compute_type': {'key': 'endpointComputeType', 'type': 'str'}, + 'instance_type': {'key': 'instanceType', 'type': 'str'}, + 'liveness_probe': {'key': 'livenessProbe', 'type': 'ProbeSettings'}, + 'model': {'key': 'model', 'type': 'str'}, + 'model_mount_path': {'key': 'modelMountPath', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'readiness_probe': {'key': 'readinessProbe', 'type': 'ProbeSettings'}, + 'request_settings': {'key': 'requestSettings', 'type': 'OnlineRequestSettings'}, + 'scale_settings': {'key': 'scaleSettings', 'type': 'OnlineScaleSettings'}, + } + + _subtype_map = { + 'endpoint_compute_type': {'Kubernetes': 'KubernetesOnlineDeployment', 'Managed': 'ManagedOnlineDeployment'} + } + + def __init__( + self, + *, + code_configuration: Optional["CodeConfiguration"] = None, + description: Optional[str] = None, + environment_id: Optional[str] = None, + environment_variables: Optional[Dict[str, str]] = None, + properties: Optional[Dict[str, str]] = None, + app_insights_enabled: Optional[bool] = False, + instance_type: Optional[str] = None, + liveness_probe: Optional["ProbeSettings"] = None, + model: Optional[str] = None, + model_mount_path: Optional[str] = None, + readiness_probe: Optional["ProbeSettings"] = None, + request_settings: Optional["OnlineRequestSettings"] = None, + scale_settings: Optional["OnlineScaleSettings"] = None, + **kwargs + ): + """ + :keyword code_configuration: Code configuration for the endpoint deployment. + :paramtype code_configuration: ~azure.mgmt.machinelearningservices.models.CodeConfiguration + :keyword description: Description of the endpoint deployment. + :paramtype description: str + :keyword environment_id: ARM resource ID of the environment specification for the endpoint + deployment. + :paramtype environment_id: str + :keyword environment_variables: Environment variables configuration for the deployment. + :paramtype environment_variables: dict[str, str] + :keyword properties: Property dictionary. Properties can be added, but not removed or altered. + :paramtype properties: dict[str, str] + :keyword app_insights_enabled: If true, enables Application Insights logging. + :paramtype app_insights_enabled: bool + :keyword instance_type: Compute instance type. + :paramtype instance_type: str + :keyword liveness_probe: Liveness probe monitors the health of the container regularly. + :paramtype liveness_probe: ~azure.mgmt.machinelearningservices.models.ProbeSettings + :keyword model: The URI path to the model. + :paramtype model: str + :keyword model_mount_path: The path to mount the model in custom container. + :paramtype model_mount_path: str + :keyword readiness_probe: Readiness probe validates if the container is ready to serve traffic. + The properties and defaults are the same as liveness probe. + :paramtype readiness_probe: ~azure.mgmt.machinelearningservices.models.ProbeSettings + :keyword request_settings: Request settings for the deployment. + :paramtype request_settings: ~azure.mgmt.machinelearningservices.models.OnlineRequestSettings + :keyword scale_settings: Scale settings for the deployment. + If it is null or not provided, + it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment + and to DefaultScaleSettings for ManagedOnlineDeployment. + :paramtype scale_settings: ~azure.mgmt.machinelearningservices.models.OnlineScaleSettings + """ + super(OnlineDeploymentDetails, self).__init__(code_configuration=code_configuration, description=description, environment_id=environment_id, environment_variables=environment_variables, properties=properties, **kwargs) + self.app_insights_enabled = app_insights_enabled + self.endpoint_compute_type = 'OnlineDeploymentDetails' # type: str + self.instance_type = instance_type + self.liveness_probe = liveness_probe + self.model = model + self.model_mount_path = model_mount_path + self.provisioning_state = None + self.readiness_probe = readiness_probe + self.request_settings = request_settings + self.scale_settings = scale_settings + + +class KubernetesOnlineDeployment(OnlineDeploymentDetails): + """Properties specific to a KubernetesOnlineDeployment. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar code_configuration: Code configuration for the endpoint deployment. + :vartype code_configuration: ~azure.mgmt.machinelearningservices.models.CodeConfiguration + :ivar description: Description of the endpoint deployment. + :vartype description: str + :ivar environment_id: ARM resource ID of the environment specification for the endpoint + deployment. + :vartype environment_id: str + :ivar environment_variables: Environment variables configuration for the deployment. + :vartype environment_variables: dict[str, str] + :ivar properties: Property dictionary. Properties can be added, but not removed or altered. + :vartype properties: dict[str, str] + :ivar app_insights_enabled: If true, enables Application Insights logging. + :vartype app_insights_enabled: bool + :ivar endpoint_compute_type: Required. [Required] The compute type of the endpoint.Constant + filled by server. Possible values include: "Managed", "Kubernetes", "AzureMLCompute". + :vartype endpoint_compute_type: str or + ~azure.mgmt.machinelearningservices.models.EndpointComputeType + :ivar instance_type: Compute instance type. + :vartype instance_type: str + :ivar liveness_probe: Liveness probe monitors the health of the container regularly. + :vartype liveness_probe: ~azure.mgmt.machinelearningservices.models.ProbeSettings + :ivar model: The URI path to the model. + :vartype model: str + :ivar model_mount_path: The path to mount the model in custom container. + :vartype model_mount_path: str + :ivar provisioning_state: Provisioning state for the endpoint deployment. Possible values + include: "Creating", "Deleting", "Scaling", "Updating", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.DeploymentProvisioningState + :ivar readiness_probe: Readiness probe validates if the container is ready to serve traffic. + The properties and defaults are the same as liveness probe. + :vartype readiness_probe: ~azure.mgmt.machinelearningservices.models.ProbeSettings + :ivar request_settings: Request settings for the deployment. + :vartype request_settings: ~azure.mgmt.machinelearningservices.models.OnlineRequestSettings + :ivar scale_settings: Scale settings for the deployment. + If it is null or not provided, + it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment + and to DefaultScaleSettings for ManagedOnlineDeployment. + :vartype scale_settings: ~azure.mgmt.machinelearningservices.models.OnlineScaleSettings + :ivar container_resource_requirements: The resource requirements for the container (cpu and + memory). + :vartype container_resource_requirements: + ~azure.mgmt.machinelearningservices.models.ContainerResourceRequirements + """ + + _validation = { + 'endpoint_compute_type': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'code_configuration': {'key': 'codeConfiguration', 'type': 'CodeConfiguration'}, + 'description': {'key': 'description', 'type': 'str'}, + 'environment_id': {'key': 'environmentId', 'type': 'str'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'app_insights_enabled': {'key': 'appInsightsEnabled', 'type': 'bool'}, + 'endpoint_compute_type': {'key': 'endpointComputeType', 'type': 'str'}, + 'instance_type': {'key': 'instanceType', 'type': 'str'}, + 'liveness_probe': {'key': 'livenessProbe', 'type': 'ProbeSettings'}, + 'model': {'key': 'model', 'type': 'str'}, + 'model_mount_path': {'key': 'modelMountPath', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'readiness_probe': {'key': 'readinessProbe', 'type': 'ProbeSettings'}, + 'request_settings': {'key': 'requestSettings', 'type': 'OnlineRequestSettings'}, + 'scale_settings': {'key': 'scaleSettings', 'type': 'OnlineScaleSettings'}, + 'container_resource_requirements': {'key': 'containerResourceRequirements', 'type': 'ContainerResourceRequirements'}, + } + + def __init__( + self, + *, + code_configuration: Optional["CodeConfiguration"] = None, + description: Optional[str] = None, + environment_id: Optional[str] = None, + environment_variables: Optional[Dict[str, str]] = None, + properties: Optional[Dict[str, str]] = None, + app_insights_enabled: Optional[bool] = False, + instance_type: Optional[str] = None, + liveness_probe: Optional["ProbeSettings"] = None, + model: Optional[str] = None, + model_mount_path: Optional[str] = None, + readiness_probe: Optional["ProbeSettings"] = None, + request_settings: Optional["OnlineRequestSettings"] = None, + scale_settings: Optional["OnlineScaleSettings"] = None, + container_resource_requirements: Optional["ContainerResourceRequirements"] = None, + **kwargs + ): + """ + :keyword code_configuration: Code configuration for the endpoint deployment. + :paramtype code_configuration: ~azure.mgmt.machinelearningservices.models.CodeConfiguration + :keyword description: Description of the endpoint deployment. + :paramtype description: str + :keyword environment_id: ARM resource ID of the environment specification for the endpoint + deployment. + :paramtype environment_id: str + :keyword environment_variables: Environment variables configuration for the deployment. + :paramtype environment_variables: dict[str, str] + :keyword properties: Property dictionary. Properties can be added, but not removed or altered. + :paramtype properties: dict[str, str] + :keyword app_insights_enabled: If true, enables Application Insights logging. + :paramtype app_insights_enabled: bool + :keyword instance_type: Compute instance type. + :paramtype instance_type: str + :keyword liveness_probe: Liveness probe monitors the health of the container regularly. + :paramtype liveness_probe: ~azure.mgmt.machinelearningservices.models.ProbeSettings + :keyword model: The URI path to the model. + :paramtype model: str + :keyword model_mount_path: The path to mount the model in custom container. + :paramtype model_mount_path: str + :keyword readiness_probe: Readiness probe validates if the container is ready to serve traffic. + The properties and defaults are the same as liveness probe. + :paramtype readiness_probe: ~azure.mgmt.machinelearningservices.models.ProbeSettings + :keyword request_settings: Request settings for the deployment. + :paramtype request_settings: ~azure.mgmt.machinelearningservices.models.OnlineRequestSettings + :keyword scale_settings: Scale settings for the deployment. + If it is null or not provided, + it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment + and to DefaultScaleSettings for ManagedOnlineDeployment. + :paramtype scale_settings: ~azure.mgmt.machinelearningservices.models.OnlineScaleSettings + :keyword container_resource_requirements: The resource requirements for the container (cpu and + memory). + :paramtype container_resource_requirements: + ~azure.mgmt.machinelearningservices.models.ContainerResourceRequirements + """ + super(KubernetesOnlineDeployment, self).__init__(code_configuration=code_configuration, description=description, environment_id=environment_id, environment_variables=environment_variables, properties=properties, app_insights_enabled=app_insights_enabled, instance_type=instance_type, liveness_probe=liveness_probe, model=model, model_mount_path=model_mount_path, readiness_probe=readiness_probe, request_settings=request_settings, scale_settings=scale_settings, **kwargs) + self.endpoint_compute_type = 'Kubernetes' # type: str + self.container_resource_requirements = container_resource_requirements + + +class KubernetesProperties(msrest.serialization.Model): + """Kubernetes properties. + + :ivar relay_connection_string: Relay connection string. + :vartype relay_connection_string: str + :ivar service_bus_connection_string: ServiceBus connection string. + :vartype service_bus_connection_string: str + :ivar extension_principal_id: Extension principal-id. + :vartype extension_principal_id: str + :ivar extension_instance_release_train: Extension instance release train. + :vartype extension_instance_release_train: str + :ivar vc_name: VC name. + :vartype vc_name: str + :ivar namespace: Compute namespace. + :vartype namespace: str + :ivar default_instance_type: Default instance type. + :vartype default_instance_type: str + :ivar instance_types: Instance Type Schema. + :vartype instance_types: dict[str, + ~azure.mgmt.machinelearningservices.models.InstanceTypeSchema] + """ + + _attribute_map = { + 'relay_connection_string': {'key': 'relayConnectionString', 'type': 'str'}, + 'service_bus_connection_string': {'key': 'serviceBusConnectionString', 'type': 'str'}, + 'extension_principal_id': {'key': 'extensionPrincipalId', 'type': 'str'}, + 'extension_instance_release_train': {'key': 'extensionInstanceReleaseTrain', 'type': 'str'}, + 'vc_name': {'key': 'vcName', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'default_instance_type': {'key': 'defaultInstanceType', 'type': 'str'}, + 'instance_types': {'key': 'instanceTypes', 'type': '{InstanceTypeSchema}'}, + } + + def __init__( + self, + *, + relay_connection_string: Optional[str] = None, + service_bus_connection_string: Optional[str] = None, + extension_principal_id: Optional[str] = None, + extension_instance_release_train: Optional[str] = None, + vc_name: Optional[str] = None, + namespace: Optional[str] = "default", + default_instance_type: Optional[str] = None, + instance_types: Optional[Dict[str, "InstanceTypeSchema"]] = None, + **kwargs + ): + """ + :keyword relay_connection_string: Relay connection string. + :paramtype relay_connection_string: str + :keyword service_bus_connection_string: ServiceBus connection string. + :paramtype service_bus_connection_string: str + :keyword extension_principal_id: Extension principal-id. + :paramtype extension_principal_id: str + :keyword extension_instance_release_train: Extension instance release train. + :paramtype extension_instance_release_train: str + :keyword vc_name: VC name. + :paramtype vc_name: str + :keyword namespace: Compute namespace. + :paramtype namespace: str + :keyword default_instance_type: Default instance type. + :paramtype default_instance_type: str + :keyword instance_types: Instance Type Schema. + :paramtype instance_types: dict[str, + ~azure.mgmt.machinelearningservices.models.InstanceTypeSchema] + """ + super(KubernetesProperties, self).__init__(**kwargs) + self.relay_connection_string = relay_connection_string + self.service_bus_connection_string = service_bus_connection_string + self.extension_principal_id = extension_principal_id + self.extension_instance_release_train = extension_instance_release_train + self.vc_name = vc_name + self.namespace = namespace + self.default_instance_type = default_instance_type + self.instance_types = instance_types + + +class ListAmlUserFeatureResult(msrest.serialization.Model): + """The List Aml user feature operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of AML user facing features. + :vartype value: list[~azure.mgmt.machinelearningservices.models.AmlUserFeature] + :ivar next_link: The URI to fetch the next page of AML user features information. Call + ListNext() with this to fetch the next page of AML user features information. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AmlUserFeature]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ListAmlUserFeatureResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class ListNotebookKeysResult(msrest.serialization.Model): + """ListNotebookKeysResult. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar primary_access_key: + :vartype primary_access_key: str + :ivar secondary_access_key: + :vartype secondary_access_key: str + """ + + _validation = { + 'primary_access_key': {'readonly': True}, + 'secondary_access_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_access_key': {'key': 'primaryAccessKey', 'type': 'str'}, + 'secondary_access_key': {'key': 'secondaryAccessKey', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ListNotebookKeysResult, self).__init__(**kwargs) + self.primary_access_key = None + self.secondary_access_key = None + + +class ListStorageAccountKeysResult(msrest.serialization.Model): + """ListStorageAccountKeysResult. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar user_storage_key: + :vartype user_storage_key: str + """ + + _validation = { + 'user_storage_key': {'readonly': True}, + } + + _attribute_map = { + 'user_storage_key': {'key': 'userStorageKey', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ListStorageAccountKeysResult, self).__init__(**kwargs) + self.user_storage_key = None + + +class ListUsagesResult(msrest.serialization.Model): + """The List Usages operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of AML resource usages. + :vartype value: list[~azure.mgmt.machinelearningservices.models.Usage] + :ivar next_link: The URI to fetch the next page of AML resource usage information. Call + ListNext() with this to fetch the next page of AML resource usage information. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Usage]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ListUsagesResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class ListWorkspaceKeysResult(msrest.serialization.Model): + """ListWorkspaceKeysResult. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar user_storage_key: + :vartype user_storage_key: str + :ivar user_storage_resource_id: + :vartype user_storage_resource_id: str + :ivar app_insights_instrumentation_key: + :vartype app_insights_instrumentation_key: str + :ivar container_registry_credentials: + :vartype container_registry_credentials: + ~azure.mgmt.machinelearningservices.models.RegistryListCredentialsResult + :ivar notebook_access_keys: + :vartype notebook_access_keys: + ~azure.mgmt.machinelearningservices.models.ListNotebookKeysResult + """ + + _validation = { + 'user_storage_key': {'readonly': True}, + 'user_storage_resource_id': {'readonly': True}, + 'app_insights_instrumentation_key': {'readonly': True}, + 'container_registry_credentials': {'readonly': True}, + 'notebook_access_keys': {'readonly': True}, + } + + _attribute_map = { + 'user_storage_key': {'key': 'userStorageKey', 'type': 'str'}, + 'user_storage_resource_id': {'key': 'userStorageResourceId', 'type': 'str'}, + 'app_insights_instrumentation_key': {'key': 'appInsightsInstrumentationKey', 'type': 'str'}, + 'container_registry_credentials': {'key': 'containerRegistryCredentials', 'type': 'RegistryListCredentialsResult'}, + 'notebook_access_keys': {'key': 'notebookAccessKeys', 'type': 'ListNotebookKeysResult'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ListWorkspaceKeysResult, self).__init__(**kwargs) + self.user_storage_key = None + self.user_storage_resource_id = None + self.app_insights_instrumentation_key = None + self.container_registry_credentials = None + self.notebook_access_keys = None + + +class ListWorkspaceQuotas(msrest.serialization.Model): + """The List WorkspaceQuotasByVMFamily operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of Workspace Quotas by VM Family. + :vartype value: list[~azure.mgmt.machinelearningservices.models.ResourceQuota] + :ivar next_link: The URI to fetch the next page of workspace quota information by VM Family. + Call ListNext() with this to fetch the next page of Workspace Quota information. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ResourceQuota]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ListWorkspaceQuotas, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class LiteralJobInput(JobInput): + """Literal input type. + + All required parameters must be populated in order to send to Azure. + + :ivar description: Description for the input. + :vartype description: str + :ivar job_input_type: Required. [Required] Specifies the type of job.Constant filled by server. + Possible values include: "literal", "uri_file", "uri_folder", "mltable", "custom_model", + "mlflow_model", "triton_model". + :vartype job_input_type: str or ~azure.mgmt.machinelearningservices.models.JobInputType + :ivar value: Required. [Required] Literal value for the input. + :vartype value: str + """ + + _validation = { + 'job_input_type': {'required': True}, + 'value': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'job_input_type': {'key': 'jobInputType', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + *, + value: str, + description: Optional[str] = None, + **kwargs + ): + """ + :keyword description: Description for the input. + :paramtype description: str + :keyword value: Required. [Required] Literal value for the input. + :paramtype value: str + """ + super(LiteralJobInput, self).__init__(description=description, **kwargs) + self.job_input_type = 'literal' # type: str + self.value = value + + +class ManagedIdentity(IdentityConfiguration): + """Managed identity configuration. + + All required parameters must be populated in order to send to Azure. + + :ivar identity_type: Required. [Required] Specifies the type of identity framework.Constant + filled by server. Possible values include: "Managed", "AMLToken", "UserIdentity". + :vartype identity_type: str or + ~azure.mgmt.machinelearningservices.models.IdentityConfigurationType + :ivar client_id: Specifies a user-assigned identity by client ID. For system-assigned, do not + set this field. + :vartype client_id: str + :ivar object_id: Specifies a user-assigned identity by object ID. For system-assigned, do not + set this field. + :vartype object_id: str + :ivar resource_id: Specifies a user-assigned identity by ARM resource ID. For system-assigned, + do not set this field. + :vartype resource_id: str + """ + + _validation = { + 'identity_type': {'required': True}, + } + + _attribute_map = { + 'identity_type': {'key': 'identityType', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__( + self, + *, + client_id: Optional[str] = None, + object_id: Optional[str] = None, + resource_id: Optional[str] = None, + **kwargs + ): + """ + :keyword client_id: Specifies a user-assigned identity by client ID. For system-assigned, do + not set this field. + :paramtype client_id: str + :keyword object_id: Specifies a user-assigned identity by object ID. For system-assigned, do + not set this field. + :paramtype object_id: str + :keyword resource_id: Specifies a user-assigned identity by ARM resource ID. For + system-assigned, do not set this field. + :paramtype resource_id: str + """ + super(ManagedIdentity, self).__init__(**kwargs) + self.identity_type = 'Managed' # type: str + self.client_id = client_id + self.object_id = object_id + self.resource_id = resource_id + + +class WorkspaceConnectionPropertiesV2(msrest.serialization.Model): + """WorkspaceConnectionPropertiesV2. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ManagedIdentityAuthTypeWorkspaceConnectionProperties, NoneAuthTypeWorkspaceConnectionProperties, PATAuthTypeWorkspaceConnectionProperties, SASAuthTypeWorkspaceConnectionProperties, UsernamePasswordAuthTypeWorkspaceConnectionProperties. + + All required parameters must be populated in order to send to Azure. + + :ivar auth_type: Required. Authentication type of the connection target.Constant filled by + server. Possible values include: "PAT", "ManagedIdentity", "UsernamePassword", "None", "SAS". + :vartype auth_type: str or ~azure.mgmt.machinelearningservices.models.ConnectionAuthType + :ivar category: Category of the connection. Possible values include: "PythonFeed", + "ContainerRegistry", "Git". + :vartype category: str or ~azure.mgmt.machinelearningservices.models.ConnectionCategory + :ivar target: + :vartype target: str + :ivar value: Value details of the workspace connection. + :vartype value: str + :ivar value_format: format for the workspace connection value. Possible values include: "JSON". + :vartype value_format: str or ~azure.mgmt.machinelearningservices.models.ValueFormat + """ + + _validation = { + 'auth_type': {'required': True}, + } + + _attribute_map = { + 'auth_type': {'key': 'authType', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'value_format': {'key': 'valueFormat', 'type': 'str'}, + } + + _subtype_map = { + 'auth_type': {'ManagedIdentity': 'ManagedIdentityAuthTypeWorkspaceConnectionProperties', 'None': 'NoneAuthTypeWorkspaceConnectionProperties', 'PAT': 'PATAuthTypeWorkspaceConnectionProperties', 'SAS': 'SASAuthTypeWorkspaceConnectionProperties', 'UsernamePassword': 'UsernamePasswordAuthTypeWorkspaceConnectionProperties'} + } + + def __init__( + self, + *, + category: Optional[Union[str, "ConnectionCategory"]] = None, + target: Optional[str] = None, + value: Optional[str] = None, + value_format: Optional[Union[str, "ValueFormat"]] = None, + **kwargs + ): + """ + :keyword category: Category of the connection. Possible values include: "PythonFeed", + "ContainerRegistry", "Git". + :paramtype category: str or ~azure.mgmt.machinelearningservices.models.ConnectionCategory + :keyword target: + :paramtype target: str + :keyword value: Value details of the workspace connection. + :paramtype value: str + :keyword value_format: format for the workspace connection value. Possible values include: + "JSON". + :paramtype value_format: str or ~azure.mgmt.machinelearningservices.models.ValueFormat + """ + super(WorkspaceConnectionPropertiesV2, self).__init__(**kwargs) + self.auth_type = None # type: Optional[str] + self.category = category + self.target = target + self.value = value + self.value_format = value_format + + +class ManagedIdentityAuthTypeWorkspaceConnectionProperties(WorkspaceConnectionPropertiesV2): + """ManagedIdentityAuthTypeWorkspaceConnectionProperties. + + All required parameters must be populated in order to send to Azure. + + :ivar auth_type: Required. Authentication type of the connection target.Constant filled by + server. Possible values include: "PAT", "ManagedIdentity", "UsernamePassword", "None", "SAS". + :vartype auth_type: str or ~azure.mgmt.machinelearningservices.models.ConnectionAuthType + :ivar category: Category of the connection. Possible values include: "PythonFeed", + "ContainerRegistry", "Git". + :vartype category: str or ~azure.mgmt.machinelearningservices.models.ConnectionCategory + :ivar target: + :vartype target: str + :ivar value: Value details of the workspace connection. + :vartype value: str + :ivar value_format: format for the workspace connection value. Possible values include: "JSON". + :vartype value_format: str or ~azure.mgmt.machinelearningservices.models.ValueFormat + :ivar credentials: + :vartype credentials: + ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionManagedIdentity + """ + + _validation = { + 'auth_type': {'required': True}, + } + + _attribute_map = { + 'auth_type': {'key': 'authType', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'value_format': {'key': 'valueFormat', 'type': 'str'}, + 'credentials': {'key': 'credentials', 'type': 'WorkspaceConnectionManagedIdentity'}, + } + + def __init__( + self, + *, + category: Optional[Union[str, "ConnectionCategory"]] = None, + target: Optional[str] = None, + value: Optional[str] = None, + value_format: Optional[Union[str, "ValueFormat"]] = None, + credentials: Optional["WorkspaceConnectionManagedIdentity"] = None, + **kwargs + ): + """ + :keyword category: Category of the connection. Possible values include: "PythonFeed", + "ContainerRegistry", "Git". + :paramtype category: str or ~azure.mgmt.machinelearningservices.models.ConnectionCategory + :keyword target: + :paramtype target: str + :keyword value: Value details of the workspace connection. + :paramtype value: str + :keyword value_format: format for the workspace connection value. Possible values include: + "JSON". + :paramtype value_format: str or ~azure.mgmt.machinelearningservices.models.ValueFormat + :keyword credentials: + :paramtype credentials: + ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionManagedIdentity + """ + super(ManagedIdentityAuthTypeWorkspaceConnectionProperties, self).__init__(category=category, target=target, value=value, value_format=value_format, **kwargs) + self.auth_type = 'ManagedIdentity' # type: str + self.credentials = credentials + + +class ManagedOnlineDeployment(OnlineDeploymentDetails): + """Properties specific to a ManagedOnlineDeployment. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar code_configuration: Code configuration for the endpoint deployment. + :vartype code_configuration: ~azure.mgmt.machinelearningservices.models.CodeConfiguration + :ivar description: Description of the endpoint deployment. + :vartype description: str + :ivar environment_id: ARM resource ID of the environment specification for the endpoint + deployment. + :vartype environment_id: str + :ivar environment_variables: Environment variables configuration for the deployment. + :vartype environment_variables: dict[str, str] + :ivar properties: Property dictionary. Properties can be added, but not removed or altered. + :vartype properties: dict[str, str] + :ivar app_insights_enabled: If true, enables Application Insights logging. + :vartype app_insights_enabled: bool + :ivar endpoint_compute_type: Required. [Required] The compute type of the endpoint.Constant + filled by server. Possible values include: "Managed", "Kubernetes", "AzureMLCompute". + :vartype endpoint_compute_type: str or + ~azure.mgmt.machinelearningservices.models.EndpointComputeType + :ivar instance_type: Compute instance type. + :vartype instance_type: str + :ivar liveness_probe: Liveness probe monitors the health of the container regularly. + :vartype liveness_probe: ~azure.mgmt.machinelearningservices.models.ProbeSettings + :ivar model: The URI path to the model. + :vartype model: str + :ivar model_mount_path: The path to mount the model in custom container. + :vartype model_mount_path: str + :ivar provisioning_state: Provisioning state for the endpoint deployment. Possible values + include: "Creating", "Deleting", "Scaling", "Updating", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.DeploymentProvisioningState + :ivar readiness_probe: Readiness probe validates if the container is ready to serve traffic. + The properties and defaults are the same as liveness probe. + :vartype readiness_probe: ~azure.mgmt.machinelearningservices.models.ProbeSettings + :ivar request_settings: Request settings for the deployment. + :vartype request_settings: ~azure.mgmt.machinelearningservices.models.OnlineRequestSettings + :ivar scale_settings: Scale settings for the deployment. + If it is null or not provided, + it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment + and to DefaultScaleSettings for ManagedOnlineDeployment. + :vartype scale_settings: ~azure.mgmt.machinelearningservices.models.OnlineScaleSettings + """ + + _validation = { + 'endpoint_compute_type': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'code_configuration': {'key': 'codeConfiguration', 'type': 'CodeConfiguration'}, + 'description': {'key': 'description', 'type': 'str'}, + 'environment_id': {'key': 'environmentId', 'type': 'str'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'app_insights_enabled': {'key': 'appInsightsEnabled', 'type': 'bool'}, + 'endpoint_compute_type': {'key': 'endpointComputeType', 'type': 'str'}, + 'instance_type': {'key': 'instanceType', 'type': 'str'}, + 'liveness_probe': {'key': 'livenessProbe', 'type': 'ProbeSettings'}, + 'model': {'key': 'model', 'type': 'str'}, + 'model_mount_path': {'key': 'modelMountPath', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'readiness_probe': {'key': 'readinessProbe', 'type': 'ProbeSettings'}, + 'request_settings': {'key': 'requestSettings', 'type': 'OnlineRequestSettings'}, + 'scale_settings': {'key': 'scaleSettings', 'type': 'OnlineScaleSettings'}, + } + + def __init__( + self, + *, + code_configuration: Optional["CodeConfiguration"] = None, + description: Optional[str] = None, + environment_id: Optional[str] = None, + environment_variables: Optional[Dict[str, str]] = None, + properties: Optional[Dict[str, str]] = None, + app_insights_enabled: Optional[bool] = False, + instance_type: Optional[str] = None, + liveness_probe: Optional["ProbeSettings"] = None, + model: Optional[str] = None, + model_mount_path: Optional[str] = None, + readiness_probe: Optional["ProbeSettings"] = None, + request_settings: Optional["OnlineRequestSettings"] = None, + scale_settings: Optional["OnlineScaleSettings"] = None, + **kwargs + ): + """ + :keyword code_configuration: Code configuration for the endpoint deployment. + :paramtype code_configuration: ~azure.mgmt.machinelearningservices.models.CodeConfiguration + :keyword description: Description of the endpoint deployment. + :paramtype description: str + :keyword environment_id: ARM resource ID of the environment specification for the endpoint + deployment. + :paramtype environment_id: str + :keyword environment_variables: Environment variables configuration for the deployment. + :paramtype environment_variables: dict[str, str] + :keyword properties: Property dictionary. Properties can be added, but not removed or altered. + :paramtype properties: dict[str, str] + :keyword app_insights_enabled: If true, enables Application Insights logging. + :paramtype app_insights_enabled: bool + :keyword instance_type: Compute instance type. + :paramtype instance_type: str + :keyword liveness_probe: Liveness probe monitors the health of the container regularly. + :paramtype liveness_probe: ~azure.mgmt.machinelearningservices.models.ProbeSettings + :keyword model: The URI path to the model. + :paramtype model: str + :keyword model_mount_path: The path to mount the model in custom container. + :paramtype model_mount_path: str + :keyword readiness_probe: Readiness probe validates if the container is ready to serve traffic. + The properties and defaults are the same as liveness probe. + :paramtype readiness_probe: ~azure.mgmt.machinelearningservices.models.ProbeSettings + :keyword request_settings: Request settings for the deployment. + :paramtype request_settings: ~azure.mgmt.machinelearningservices.models.OnlineRequestSettings + :keyword scale_settings: Scale settings for the deployment. + If it is null or not provided, + it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment + and to DefaultScaleSettings for ManagedOnlineDeployment. + :paramtype scale_settings: ~azure.mgmt.machinelearningservices.models.OnlineScaleSettings + """ + super(ManagedOnlineDeployment, self).__init__(code_configuration=code_configuration, description=description, environment_id=environment_id, environment_variables=environment_variables, properties=properties, app_insights_enabled=app_insights_enabled, instance_type=instance_type, liveness_probe=liveness_probe, model=model, model_mount_path=model_mount_path, readiness_probe=readiness_probe, request_settings=request_settings, scale_settings=scale_settings, **kwargs) + self.endpoint_compute_type = 'Managed' # type: str + + +class ManagedServiceIdentity(msrest.serialization.Model): + """Managed service identity (system assigned and/or user assigned identities). + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar principal_id: The service principal ID of the system assigned identity. This property + will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of the system assigned identity. This property will only be + provided for a system assigned identity. + :vartype tenant_id: str + :ivar type: Required. Type of managed service identity (where both SystemAssigned and + UserAssigned types are allowed). Possible values include: "None", "SystemAssigned", + "UserAssigned", "SystemAssigned,UserAssigned". + :vartype type: str or ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentityType + :ivar user_assigned_identities: The set of user assigned identities associated with the + resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + The dictionary values can be empty objects ({}) in requests. + :vartype user_assigned_identities: dict[str, + ~azure.mgmt.machinelearningservices.models.UserAssignedIdentity] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentity}'}, + } + + def __init__( + self, + *, + type: Union[str, "ManagedServiceIdentityType"], + user_assigned_identities: Optional[Dict[str, "UserAssignedIdentity"]] = None, + **kwargs + ): + """ + :keyword type: Required. Type of managed service identity (where both SystemAssigned and + UserAssigned types are allowed). Possible values include: "None", "SystemAssigned", + "UserAssigned", "SystemAssigned,UserAssigned". + :paramtype type: str or ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentityType + :keyword user_assigned_identities: The set of user assigned identities associated with the + resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + The dictionary values can be empty objects ({}) in requests. + :paramtype user_assigned_identities: dict[str, + ~azure.mgmt.machinelearningservices.models.UserAssignedIdentity] + """ + super(ManagedServiceIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + self.user_assigned_identities = user_assigned_identities + + +class MedianStoppingPolicy(EarlyTerminationPolicy): + """Defines an early termination policy based on running averages of the primary metric of all runs. + + All required parameters must be populated in order to send to Azure. + + :ivar delay_evaluation: Number of intervals by which to delay the first evaluation. + :vartype delay_evaluation: int + :ivar evaluation_interval: Interval (number of runs) between policy evaluations. + :vartype evaluation_interval: int + :ivar policy_type: Required. [Required] Name of policy configuration.Constant filled by server. + Possible values include: "Bandit", "MedianStopping", "TruncationSelection". + :vartype policy_type: str or + ~azure.mgmt.machinelearningservices.models.EarlyTerminationPolicyType + """ + + _validation = { + 'policy_type': {'required': True}, + } + + _attribute_map = { + 'delay_evaluation': {'key': 'delayEvaluation', 'type': 'int'}, + 'evaluation_interval': {'key': 'evaluationInterval', 'type': 'int'}, + 'policy_type': {'key': 'policyType', 'type': 'str'}, + } + + def __init__( + self, + *, + delay_evaluation: Optional[int] = 0, + evaluation_interval: Optional[int] = 0, + **kwargs + ): + """ + :keyword delay_evaluation: Number of intervals by which to delay the first evaluation. + :paramtype delay_evaluation: int + :keyword evaluation_interval: Interval (number of runs) between policy evaluations. + :paramtype evaluation_interval: int + """ + super(MedianStoppingPolicy, self).__init__(delay_evaluation=delay_evaluation, evaluation_interval=evaluation_interval, **kwargs) + self.policy_type = 'MedianStopping' # type: str + + +class MLFlowModelJobInput(JobInput, AssetJobInput): + """MLFlowModelJobInput. + + All required parameters must be populated in order to send to Azure. + + :ivar mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", + "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". + :vartype mode: str or ~azure.mgmt.machinelearningservices.models.InputDeliveryMode + :ivar uri: Required. [Required] Input Asset URI. + :vartype uri: str + :ivar description: Description for the input. + :vartype description: str + :ivar job_input_type: Required. [Required] Specifies the type of job.Constant filled by server. + Possible values include: "literal", "uri_file", "uri_folder", "mltable", "custom_model", + "mlflow_model", "triton_model". + :vartype job_input_type: str or ~azure.mgmt.machinelearningservices.models.JobInputType + """ + + _validation = { + 'uri': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + 'job_input_type': {'required': True}, + } + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'job_input_type': {'key': 'jobInputType', 'type': 'str'}, + } + + def __init__( + self, + *, + uri: str, + mode: Optional[Union[str, "InputDeliveryMode"]] = None, + description: Optional[str] = None, + **kwargs + ): + """ + :keyword mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", + "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". + :paramtype mode: str or ~azure.mgmt.machinelearningservices.models.InputDeliveryMode + :keyword uri: Required. [Required] Input Asset URI. + :paramtype uri: str + :keyword description: Description for the input. + :paramtype description: str + """ + super(MLFlowModelJobInput, self).__init__(description=description, mode=mode, uri=uri, **kwargs) + self.mode = mode + self.uri = uri + self.job_input_type = 'mlflow_model' # type: str + self.description = description + self.job_input_type = 'mlflow_model' # type: str + + +class MLFlowModelJobOutput(JobOutput, AssetJobOutput): + """MLFlowModelJobOutput. + + All required parameters must be populated in order to send to Azure. + + :ivar mode: Output Asset Delivery Mode. Possible values include: "ReadWriteMount", "Upload". + :vartype mode: str or ~azure.mgmt.machinelearningservices.models.OutputDeliveryMode + :ivar uri: Output Asset URI. + :vartype uri: str + :ivar description: Description for the output. + :vartype description: str + :ivar job_output_type: Required. [Required] Specifies the type of job.Constant filled by + server. Possible values include: "uri_file", "uri_folder", "mltable", "custom_model", + "mlflow_model", "triton_model". + :vartype job_output_type: str or ~azure.mgmt.machinelearningservices.models.JobOutputType + """ + + _validation = { + 'job_output_type': {'required': True}, + } + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'job_output_type': {'key': 'jobOutputType', 'type': 'str'}, + } + + def __init__( + self, + *, + mode: Optional[Union[str, "OutputDeliveryMode"]] = None, + uri: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + """ + :keyword mode: Output Asset Delivery Mode. Possible values include: "ReadWriteMount", "Upload". + :paramtype mode: str or ~azure.mgmt.machinelearningservices.models.OutputDeliveryMode + :keyword uri: Output Asset URI. + :paramtype uri: str + :keyword description: Description for the output. + :paramtype description: str + """ + super(MLFlowModelJobOutput, self).__init__(description=description, mode=mode, uri=uri, **kwargs) + self.mode = mode + self.uri = uri + self.job_output_type = 'mlflow_model' # type: str + self.description = description + self.job_output_type = 'mlflow_model' # type: str + + +class MLTableData(DataVersionBaseDetails): + """MLTable data definition. + + All required parameters must be populated in order to send to Azure. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar is_anonymous: If the name version are system generated (anonymous registration). + :vartype is_anonymous: bool + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar data_type: Required. [Required] Specifies the type of data.Constant filled by server. + Possible values include: "uri_file", "uri_folder", "mltable". + :vartype data_type: str or ~azure.mgmt.machinelearningservices.models.DataType + :ivar data_uri: Required. [Required] Uri of the data. Usage/meaning depends on + Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220501.Assets.DataVersionBase.DataType. + :vartype data_uri: str + :ivar referenced_uris: Uris referenced in the MLTable definition (required for lineage). + :vartype referenced_uris: list[str] + """ + + _validation = { + 'data_type': {'required': True}, + 'data_uri': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + 'data_uri': {'key': 'dataUri', 'type': 'str'}, + 'referenced_uris': {'key': 'referencedUris', 'type': '[str]'}, + } + + def __init__( + self, + *, + data_uri: str, + description: Optional[str] = None, + properties: Optional[Dict[str, str]] = None, + tags: Optional[Dict[str, str]] = None, + is_anonymous: Optional[bool] = False, + is_archived: Optional[bool] = False, + referenced_uris: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword is_anonymous: If the name version are system generated (anonymous registration). + :paramtype is_anonymous: bool + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + :keyword data_uri: Required. [Required] Uri of the data. Usage/meaning depends on + Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220501.Assets.DataVersionBase.DataType. + :paramtype data_uri: str + :keyword referenced_uris: Uris referenced in the MLTable definition (required for lineage). + :paramtype referenced_uris: list[str] + """ + super(MLTableData, self).__init__(description=description, properties=properties, tags=tags, is_anonymous=is_anonymous, is_archived=is_archived, data_uri=data_uri, **kwargs) + self.data_type = 'mltable' # type: str + self.referenced_uris = referenced_uris + + +class MLTableJobInput(JobInput, AssetJobInput): + """MLTableJobInput. + + All required parameters must be populated in order to send to Azure. + + :ivar mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", + "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". + :vartype mode: str or ~azure.mgmt.machinelearningservices.models.InputDeliveryMode + :ivar uri: Required. [Required] Input Asset URI. + :vartype uri: str + :ivar description: Description for the input. + :vartype description: str + :ivar job_input_type: Required. [Required] Specifies the type of job.Constant filled by server. + Possible values include: "literal", "uri_file", "uri_folder", "mltable", "custom_model", + "mlflow_model", "triton_model". + :vartype job_input_type: str or ~azure.mgmt.machinelearningservices.models.JobInputType + """ + + _validation = { + 'uri': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + 'job_input_type': {'required': True}, + } + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'job_input_type': {'key': 'jobInputType', 'type': 'str'}, + } + + def __init__( + self, + *, + uri: str, + mode: Optional[Union[str, "InputDeliveryMode"]] = None, + description: Optional[str] = None, + **kwargs + ): + """ + :keyword mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", + "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". + :paramtype mode: str or ~azure.mgmt.machinelearningservices.models.InputDeliveryMode + :keyword uri: Required. [Required] Input Asset URI. + :paramtype uri: str + :keyword description: Description for the input. + :paramtype description: str + """ + super(MLTableJobInput, self).__init__(description=description, mode=mode, uri=uri, **kwargs) + self.mode = mode + self.uri = uri + self.job_input_type = 'mltable' # type: str + self.description = description + self.job_input_type = 'mltable' # type: str + + +class MLTableJobOutput(JobOutput, AssetJobOutput): + """MLTableJobOutput. + + All required parameters must be populated in order to send to Azure. + + :ivar mode: Output Asset Delivery Mode. Possible values include: "ReadWriteMount", "Upload". + :vartype mode: str or ~azure.mgmt.machinelearningservices.models.OutputDeliveryMode + :ivar uri: Output Asset URI. + :vartype uri: str + :ivar description: Description for the output. + :vartype description: str + :ivar job_output_type: Required. [Required] Specifies the type of job.Constant filled by + server. Possible values include: "uri_file", "uri_folder", "mltable", "custom_model", + "mlflow_model", "triton_model". + :vartype job_output_type: str or ~azure.mgmt.machinelearningservices.models.JobOutputType + """ + + _validation = { + 'job_output_type': {'required': True}, + } + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'job_output_type': {'key': 'jobOutputType', 'type': 'str'}, + } + + def __init__( + self, + *, + mode: Optional[Union[str, "OutputDeliveryMode"]] = None, + uri: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + """ + :keyword mode: Output Asset Delivery Mode. Possible values include: "ReadWriteMount", "Upload". + :paramtype mode: str or ~azure.mgmt.machinelearningservices.models.OutputDeliveryMode + :keyword uri: Output Asset URI. + :paramtype uri: str + :keyword description: Description for the output. + :paramtype description: str + """ + super(MLTableJobOutput, self).__init__(description=description, mode=mode, uri=uri, **kwargs) + self.mode = mode + self.uri = uri + self.job_output_type = 'mltable' # type: str + self.description = description + self.job_output_type = 'mltable' # type: str + + +class ModelContainerData(Resource): + """Azure Resource Manager resource envelope. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar properties: Required. [Required] Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.ModelContainerDetails + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'ModelContainerDetails'}, + } + + def __init__( + self, + *, + properties: "ModelContainerDetails", + **kwargs + ): + """ + :keyword properties: Required. [Required] Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.ModelContainerDetails + """ + super(ModelContainerData, self).__init__(**kwargs) + self.properties = properties + + +class ModelContainerDetails(AssetContainer): + """ModelContainerDetails. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar latest_version: The latest version inside this container. + :vartype latest_version: str + :ivar next_version: The next auto incremental version. + :vartype next_version: str + """ + + _validation = { + 'latest_version': {'readonly': True}, + 'next_version': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'latest_version': {'key': 'latestVersion', 'type': 'str'}, + 'next_version': {'key': 'nextVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + properties: Optional[Dict[str, str]] = None, + tags: Optional[Dict[str, str]] = None, + is_archived: Optional[bool] = False, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + """ + super(ModelContainerDetails, self).__init__(description=description, properties=properties, tags=tags, is_archived=is_archived, **kwargs) + + +class ModelContainerResourceArmPaginatedResult(msrest.serialization.Model): + """A paginated list of ModelContainer entities. + + :ivar next_link: The link to the next page of ModelContainer objects. If null, there are no + additional pages. + :vartype next_link: str + :ivar value: An array of objects of type ModelContainer. + :vartype value: list[~azure.mgmt.machinelearningservices.models.ModelContainerData] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ModelContainerData]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["ModelContainerData"]] = None, + **kwargs + ): + """ + :keyword next_link: The link to the next page of ModelContainer objects. If null, there are no + additional pages. + :paramtype next_link: str + :keyword value: An array of objects of type ModelContainer. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.ModelContainerData] + """ + super(ModelContainerResourceArmPaginatedResult, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class ModelVersionData(Resource): + """Azure Resource Manager resource envelope. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar properties: Required. [Required] Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.ModelVersionDetails + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'ModelVersionDetails'}, + } + + def __init__( + self, + *, + properties: "ModelVersionDetails", + **kwargs + ): + """ + :keyword properties: Required. [Required] Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.ModelVersionDetails + """ + super(ModelVersionData, self).__init__(**kwargs) + self.properties = properties + + +class ModelVersionDetails(AssetBase): + """Model asset version details. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar is_anonymous: If the name version are system generated (anonymous registration). + :vartype is_anonymous: bool + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar flavors: Mapping of model flavors to their properties. + :vartype flavors: dict[str, ~azure.mgmt.machinelearningservices.models.FlavorData] + :ivar job_name: Name of the training job which produced this model. + :vartype job_name: str + :ivar model_type: The storage format for this entity. Used for NCD. + :vartype model_type: str + :ivar model_uri: The URI path to the model contents. + :vartype model_uri: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'flavors': {'key': 'flavors', 'type': '{FlavorData}'}, + 'job_name': {'key': 'jobName', 'type': 'str'}, + 'model_type': {'key': 'modelType', 'type': 'str'}, + 'model_uri': {'key': 'modelUri', 'type': 'str'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + properties: Optional[Dict[str, str]] = None, + tags: Optional[Dict[str, str]] = None, + is_anonymous: Optional[bool] = False, + is_archived: Optional[bool] = False, + flavors: Optional[Dict[str, "FlavorData"]] = None, + job_name: Optional[str] = None, + model_type: Optional[str] = None, + model_uri: Optional[str] = None, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword is_anonymous: If the name version are system generated (anonymous registration). + :paramtype is_anonymous: bool + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + :keyword flavors: Mapping of model flavors to their properties. + :paramtype flavors: dict[str, ~azure.mgmt.machinelearningservices.models.FlavorData] + :keyword job_name: Name of the training job which produced this model. + :paramtype job_name: str + :keyword model_type: The storage format for this entity. Used for NCD. + :paramtype model_type: str + :keyword model_uri: The URI path to the model contents. + :paramtype model_uri: str + """ + super(ModelVersionDetails, self).__init__(description=description, properties=properties, tags=tags, is_anonymous=is_anonymous, is_archived=is_archived, **kwargs) + self.flavors = flavors + self.job_name = job_name + self.model_type = model_type + self.model_uri = model_uri + + +class ModelVersionResourceArmPaginatedResult(msrest.serialization.Model): + """A paginated list of ModelVersion entities. + + :ivar next_link: The link to the next page of ModelVersion objects. If null, there are no + additional pages. + :vartype next_link: str + :ivar value: An array of objects of type ModelVersion. + :vartype value: list[~azure.mgmt.machinelearningservices.models.ModelVersionData] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ModelVersionData]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["ModelVersionData"]] = None, + **kwargs + ): + """ + :keyword next_link: The link to the next page of ModelVersion objects. If null, there are no + additional pages. + :paramtype next_link: str + :keyword value: An array of objects of type ModelVersion. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.ModelVersionData] + """ + super(ModelVersionResourceArmPaginatedResult, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class Mpi(DistributionConfiguration): + """MPI distribution configuration. + + All required parameters must be populated in order to send to Azure. + + :ivar distribution_type: Required. [Required] Specifies the type of distribution + framework.Constant filled by server. Possible values include: "PyTorch", "TensorFlow", "Mpi". + :vartype distribution_type: str or ~azure.mgmt.machinelearningservices.models.DistributionType + :ivar process_count_per_instance: Number of processes per MPI node. + :vartype process_count_per_instance: int + """ + + _validation = { + 'distribution_type': {'required': True}, + } + + _attribute_map = { + 'distribution_type': {'key': 'distributionType', 'type': 'str'}, + 'process_count_per_instance': {'key': 'processCountPerInstance', 'type': 'int'}, + } + + def __init__( + self, + *, + process_count_per_instance: Optional[int] = None, + **kwargs + ): + """ + :keyword process_count_per_instance: Number of processes per MPI node. + :paramtype process_count_per_instance: int + """ + super(Mpi, self).__init__(**kwargs) + self.distribution_type = 'Mpi' # type: str + self.process_count_per_instance = process_count_per_instance + + +class NodeStateCounts(msrest.serialization.Model): + """Counts of various compute node states on the amlCompute. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar idle_node_count: Number of compute nodes in idle state. + :vartype idle_node_count: int + :ivar running_node_count: Number of compute nodes which are running jobs. + :vartype running_node_count: int + :ivar preparing_node_count: Number of compute nodes which are being prepared. + :vartype preparing_node_count: int + :ivar unusable_node_count: Number of compute nodes which are in unusable state. + :vartype unusable_node_count: int + :ivar leaving_node_count: Number of compute nodes which are leaving the amlCompute. + :vartype leaving_node_count: int + :ivar preempted_node_count: Number of compute nodes which are in preempted state. + :vartype preempted_node_count: int + """ + + _validation = { + 'idle_node_count': {'readonly': True}, + 'running_node_count': {'readonly': True}, + 'preparing_node_count': {'readonly': True}, + 'unusable_node_count': {'readonly': True}, + 'leaving_node_count': {'readonly': True}, + 'preempted_node_count': {'readonly': True}, + } + + _attribute_map = { + 'idle_node_count': {'key': 'idleNodeCount', 'type': 'int'}, + 'running_node_count': {'key': 'runningNodeCount', 'type': 'int'}, + 'preparing_node_count': {'key': 'preparingNodeCount', 'type': 'int'}, + 'unusable_node_count': {'key': 'unusableNodeCount', 'type': 'int'}, + 'leaving_node_count': {'key': 'leavingNodeCount', 'type': 'int'}, + 'preempted_node_count': {'key': 'preemptedNodeCount', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(NodeStateCounts, self).__init__(**kwargs) + self.idle_node_count = None + self.running_node_count = None + self.preparing_node_count = None + self.unusable_node_count = None + self.leaving_node_count = None + self.preempted_node_count = None + + +class NoneAuthTypeWorkspaceConnectionProperties(WorkspaceConnectionPropertiesV2): + """NoneAuthTypeWorkspaceConnectionProperties. + + All required parameters must be populated in order to send to Azure. + + :ivar auth_type: Required. Authentication type of the connection target.Constant filled by + server. Possible values include: "PAT", "ManagedIdentity", "UsernamePassword", "None", "SAS". + :vartype auth_type: str or ~azure.mgmt.machinelearningservices.models.ConnectionAuthType + :ivar category: Category of the connection. Possible values include: "PythonFeed", + "ContainerRegistry", "Git". + :vartype category: str or ~azure.mgmt.machinelearningservices.models.ConnectionCategory + :ivar target: + :vartype target: str + :ivar value: Value details of the workspace connection. + :vartype value: str + :ivar value_format: format for the workspace connection value. Possible values include: "JSON". + :vartype value_format: str or ~azure.mgmt.machinelearningservices.models.ValueFormat + """ + + _validation = { + 'auth_type': {'required': True}, + } + + _attribute_map = { + 'auth_type': {'key': 'authType', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'value_format': {'key': 'valueFormat', 'type': 'str'}, + } + + def __init__( + self, + *, + category: Optional[Union[str, "ConnectionCategory"]] = None, + target: Optional[str] = None, + value: Optional[str] = None, + value_format: Optional[Union[str, "ValueFormat"]] = None, + **kwargs + ): + """ + :keyword category: Category of the connection. Possible values include: "PythonFeed", + "ContainerRegistry", "Git". + :paramtype category: str or ~azure.mgmt.machinelearningservices.models.ConnectionCategory + :keyword target: + :paramtype target: str + :keyword value: Value details of the workspace connection. + :paramtype value: str + :keyword value_format: format for the workspace connection value. Possible values include: + "JSON". + :paramtype value_format: str or ~azure.mgmt.machinelearningservices.models.ValueFormat + """ + super(NoneAuthTypeWorkspaceConnectionProperties, self).__init__(category=category, target=target, value=value, value_format=value_format, **kwargs) + self.auth_type = 'None' # type: str + + +class NoneDatastoreCredentials(DatastoreCredentials): + """Empty/none datastore credentials. + + All required parameters must be populated in order to send to Azure. + + :ivar credentials_type: Required. [Required] Credential type used to authentication with + storage.Constant filled by server. Possible values include: "AccountKey", "Certificate", + "None", "Sas", "ServicePrincipal". + :vartype credentials_type: str or ~azure.mgmt.machinelearningservices.models.CredentialsType + """ + + _validation = { + 'credentials_type': {'required': True}, + } + + _attribute_map = { + 'credentials_type': {'key': 'credentialsType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(NoneDatastoreCredentials, self).__init__(**kwargs) + self.credentials_type = 'None' # type: str + + +class NotebookAccessTokenResult(msrest.serialization.Model): + """NotebookAccessTokenResult. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar notebook_resource_id: + :vartype notebook_resource_id: str + :ivar host_name: + :vartype host_name: str + :ivar public_dns: + :vartype public_dns: str + :ivar access_token: + :vartype access_token: str + :ivar token_type: + :vartype token_type: str + :ivar expires_in: + :vartype expires_in: int + :ivar refresh_token: + :vartype refresh_token: str + :ivar scope: + :vartype scope: str + """ + + _validation = { + 'notebook_resource_id': {'readonly': True}, + 'host_name': {'readonly': True}, + 'public_dns': {'readonly': True}, + 'access_token': {'readonly': True}, + 'token_type': {'readonly': True}, + 'expires_in': {'readonly': True}, + 'refresh_token': {'readonly': True}, + 'scope': {'readonly': True}, + } + + _attribute_map = { + 'notebook_resource_id': {'key': 'notebookResourceId', 'type': 'str'}, + 'host_name': {'key': 'hostName', 'type': 'str'}, + 'public_dns': {'key': 'publicDns', 'type': 'str'}, + 'access_token': {'key': 'accessToken', 'type': 'str'}, + 'token_type': {'key': 'tokenType', 'type': 'str'}, + 'expires_in': {'key': 'expiresIn', 'type': 'int'}, + 'refresh_token': {'key': 'refreshToken', 'type': 'str'}, + 'scope': {'key': 'scope', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(NotebookAccessTokenResult, self).__init__(**kwargs) + self.notebook_resource_id = None + self.host_name = None + self.public_dns = None + self.access_token = None + self.token_type = None + self.expires_in = None + self.refresh_token = None + self.scope = None + + +class NotebookPreparationError(msrest.serialization.Model): + """NotebookPreparationError. + + :ivar error_message: + :vartype error_message: str + :ivar status_code: + :vartype status_code: int + """ + + _attribute_map = { + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'status_code': {'key': 'statusCode', 'type': 'int'}, + } + + def __init__( + self, + *, + error_message: Optional[str] = None, + status_code: Optional[int] = None, + **kwargs + ): + """ + :keyword error_message: + :paramtype error_message: str + :keyword status_code: + :paramtype status_code: int + """ + super(NotebookPreparationError, self).__init__(**kwargs) + self.error_message = error_message + self.status_code = status_code + + +class NotebookResourceInfo(msrest.serialization.Model): + """NotebookResourceInfo. + + :ivar fqdn: + :vartype fqdn: str + :ivar resource_id: the data plane resourceId that used to initialize notebook component. + :vartype resource_id: str + :ivar notebook_preparation_error: The error that occurs when preparing notebook. + :vartype notebook_preparation_error: + ~azure.mgmt.machinelearningservices.models.NotebookPreparationError + """ + + _attribute_map = { + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'notebook_preparation_error': {'key': 'notebookPreparationError', 'type': 'NotebookPreparationError'}, + } + + def __init__( + self, + *, + fqdn: Optional[str] = None, + resource_id: Optional[str] = None, + notebook_preparation_error: Optional["NotebookPreparationError"] = None, + **kwargs + ): + """ + :keyword fqdn: + :paramtype fqdn: str + :keyword resource_id: the data plane resourceId that used to initialize notebook component. + :paramtype resource_id: str + :keyword notebook_preparation_error: The error that occurs when preparing notebook. + :paramtype notebook_preparation_error: + ~azure.mgmt.machinelearningservices.models.NotebookPreparationError + """ + super(NotebookResourceInfo, self).__init__(**kwargs) + self.fqdn = fqdn + self.resource_id = resource_id + self.notebook_preparation_error = notebook_preparation_error + + +class Objective(msrest.serialization.Model): + """Optimization objective. + + All required parameters must be populated in order to send to Azure. + + :ivar goal: Required. [Required] Defines supported metric goals for hyperparameter tuning. + Possible values include: "Minimize", "Maximize". + :vartype goal: str or ~azure.mgmt.machinelearningservices.models.Goal + :ivar primary_metric: Required. [Required] Name of the metric to optimize. + :vartype primary_metric: str + """ + + _validation = { + 'goal': {'required': True}, + 'primary_metric': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + } + + _attribute_map = { + 'goal': {'key': 'goal', 'type': 'str'}, + 'primary_metric': {'key': 'primaryMetric', 'type': 'str'}, + } + + def __init__( + self, + *, + goal: Union[str, "Goal"], + primary_metric: str, + **kwargs + ): + """ + :keyword goal: Required. [Required] Defines supported metric goals for hyperparameter tuning. + Possible values include: "Minimize", "Maximize". + :paramtype goal: str or ~azure.mgmt.machinelearningservices.models.Goal + :keyword primary_metric: Required. [Required] Name of the metric to optimize. + :paramtype primary_metric: str + """ + super(Objective, self).__init__(**kwargs) + self.goal = goal + self.primary_metric = primary_metric + + +class OnlineDeploymentData(TrackedResource): + """OnlineDeploymentData. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar location: Required. The geo-location where the resource lives. + :vartype location: str + :ivar identity: Managed service identity (system assigned and/or user assigned identities). + :vartype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :ivar kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type. + :vartype kind: str + :ivar properties: Required. [Required] Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.OnlineDeploymentDetails + :ivar sku: Sku details required for ARM contract for Autoscaling. + :vartype sku: ~azure.mgmt.machinelearningservices.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'location': {'required': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'OnlineDeploymentDetails'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__( + self, + *, + location: str, + properties: "OnlineDeploymentDetails", + tags: Optional[Dict[str, str]] = None, + identity: Optional["ManagedServiceIdentity"] = None, + kind: Optional[str] = None, + sku: Optional["Sku"] = None, + **kwargs + ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword location: Required. The geo-location where the resource lives. + :paramtype location: str + :keyword identity: Managed service identity (system assigned and/or user assigned identities). + :paramtype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :keyword kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type. + :paramtype kind: str + :keyword properties: Required. [Required] Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.OnlineDeploymentDetails + :keyword sku: Sku details required for ARM contract for Autoscaling. + :paramtype sku: ~azure.mgmt.machinelearningservices.models.Sku + """ + super(OnlineDeploymentData, self).__init__(tags=tags, location=location, **kwargs) + self.identity = identity + self.kind = kind + self.properties = properties + self.sku = sku + + +class OnlineDeploymentTrackedResourceArmPaginatedResult(msrest.serialization.Model): + """A paginated list of OnlineDeployment entities. + + :ivar next_link: The link to the next page of OnlineDeployment objects. If null, there are no + additional pages. + :vartype next_link: str + :ivar value: An array of objects of type OnlineDeployment. + :vartype value: list[~azure.mgmt.machinelearningservices.models.OnlineDeploymentData] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[OnlineDeploymentData]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["OnlineDeploymentData"]] = None, + **kwargs + ): + """ + :keyword next_link: The link to the next page of OnlineDeployment objects. If null, there are + no additional pages. + :paramtype next_link: str + :keyword value: An array of objects of type OnlineDeployment. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.OnlineDeploymentData] + """ + super(OnlineDeploymentTrackedResourceArmPaginatedResult, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class OnlineEndpointData(TrackedResource): + """OnlineEndpointData. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar location: Required. The geo-location where the resource lives. + :vartype location: str + :ivar identity: Managed service identity (system assigned and/or user assigned identities). + :vartype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :ivar kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type. + :vartype kind: str + :ivar properties: Required. [Required] Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.OnlineEndpointDetails + :ivar sku: Sku details required for ARM contract for Autoscaling. + :vartype sku: ~azure.mgmt.machinelearningservices.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'location': {'required': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'OnlineEndpointDetails'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__( + self, + *, + location: str, + properties: "OnlineEndpointDetails", + tags: Optional[Dict[str, str]] = None, + identity: Optional["ManagedServiceIdentity"] = None, + kind: Optional[str] = None, + sku: Optional["Sku"] = None, + **kwargs + ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword location: Required. The geo-location where the resource lives. + :paramtype location: str + :keyword identity: Managed service identity (system assigned and/or user assigned identities). + :paramtype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :keyword kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type. + :paramtype kind: str + :keyword properties: Required. [Required] Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.OnlineEndpointDetails + :keyword sku: Sku details required for ARM contract for Autoscaling. + :paramtype sku: ~azure.mgmt.machinelearningservices.models.Sku + """ + super(OnlineEndpointData, self).__init__(tags=tags, location=location, **kwargs) + self.identity = identity + self.kind = kind + self.properties = properties + self.sku = sku + + +class OnlineEndpointDetails(EndpointPropertiesBase): + """Online endpoint configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar auth_mode: Required. [Required] Use 'Key' for key based authentication and 'AMLToken' for + Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. + Possible values include: "AMLToken", "Key", "AADToken". + :vartype auth_mode: str or ~azure.mgmt.machinelearningservices.models.EndpointAuthMode + :ivar description: Description of the inference endpoint. + :vartype description: str + :ivar keys: EndpointAuthKeys to set initially on an Endpoint. + This property will always be returned as null. AuthKey values must be retrieved using the + ListKeys API. + :vartype keys: ~azure.mgmt.machinelearningservices.models.EndpointAuthKeys + :ivar properties: Property dictionary. Properties can be added, but not removed or altered. + :vartype properties: dict[str, str] + :ivar scoring_uri: Endpoint URI. + :vartype scoring_uri: str + :ivar swagger_uri: Endpoint Swagger URI. + :vartype swagger_uri: str + :ivar compute: ARM resource ID of the compute if it exists. + optional. + :vartype compute: str + :ivar provisioning_state: Provisioning state for the endpoint. Possible values include: + "Creating", "Deleting", "Succeeded", "Failed", "Updating", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.EndpointProvisioningState + :ivar traffic: Percentage of traffic from endpoint to divert to each deployment. Traffic values + need to sum to 100. + :vartype traffic: dict[str, int] + """ + + _validation = { + 'auth_mode': {'required': True}, + 'scoring_uri': {'readonly': True}, + 'swagger_uri': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'auth_mode': {'key': 'authMode', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'keys': {'key': 'keys', 'type': 'EndpointAuthKeys'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'scoring_uri': {'key': 'scoringUri', 'type': 'str'}, + 'swagger_uri': {'key': 'swaggerUri', 'type': 'str'}, + 'compute': {'key': 'compute', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'traffic': {'key': 'traffic', 'type': '{int}'}, + } + + def __init__( + self, + *, + auth_mode: Union[str, "EndpointAuthMode"], + description: Optional[str] = None, + keys: Optional["EndpointAuthKeys"] = None, + properties: Optional[Dict[str, str]] = None, + compute: Optional[str] = None, + traffic: Optional[Dict[str, int]] = None, + **kwargs + ): + """ + :keyword auth_mode: Required. [Required] Use 'Key' for key based authentication and 'AMLToken' + for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' + does. Possible values include: "AMLToken", "Key", "AADToken". + :paramtype auth_mode: str or ~azure.mgmt.machinelearningservices.models.EndpointAuthMode + :keyword description: Description of the inference endpoint. + :paramtype description: str + :keyword keys: EndpointAuthKeys to set initially on an Endpoint. + This property will always be returned as null. AuthKey values must be retrieved using the + ListKeys API. + :paramtype keys: ~azure.mgmt.machinelearningservices.models.EndpointAuthKeys + :keyword properties: Property dictionary. Properties can be added, but not removed or altered. + :paramtype properties: dict[str, str] + :keyword compute: ARM resource ID of the compute if it exists. + optional. + :paramtype compute: str + :keyword traffic: Percentage of traffic from endpoint to divert to each deployment. Traffic + values need to sum to 100. + :paramtype traffic: dict[str, int] + """ + super(OnlineEndpointDetails, self).__init__(auth_mode=auth_mode, description=description, keys=keys, properties=properties, **kwargs) + self.compute = compute + self.provisioning_state = None + self.traffic = traffic + + +class OnlineEndpointTrackedResourceArmPaginatedResult(msrest.serialization.Model): + """A paginated list of OnlineEndpoint entities. + + :ivar next_link: The link to the next page of OnlineEndpoint objects. If null, there are no + additional pages. + :vartype next_link: str + :ivar value: An array of objects of type OnlineEndpoint. + :vartype value: list[~azure.mgmt.machinelearningservices.models.OnlineEndpointData] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[OnlineEndpointData]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["OnlineEndpointData"]] = None, + **kwargs + ): + """ + :keyword next_link: The link to the next page of OnlineEndpoint objects. If null, there are no + additional pages. + :paramtype next_link: str + :keyword value: An array of objects of type OnlineEndpoint. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.OnlineEndpointData] + """ + super(OnlineEndpointTrackedResourceArmPaginatedResult, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class OnlineRequestSettings(msrest.serialization.Model): + """Online deployment scoring requests configuration. + + :ivar max_concurrent_requests_per_instance: The number of maximum concurrent requests per node + allowed per deployment. Defaults to 1. + :vartype max_concurrent_requests_per_instance: int + :ivar max_queue_wait: The maximum amount of time a request will stay in the queue in ISO 8601 + format. + Defaults to 500ms. + :vartype max_queue_wait: ~datetime.timedelta + :ivar request_timeout: The scoring timeout in ISO 8601 format. + Defaults to 5000ms. + :vartype request_timeout: ~datetime.timedelta + """ + + _attribute_map = { + 'max_concurrent_requests_per_instance': {'key': 'maxConcurrentRequestsPerInstance', 'type': 'int'}, + 'max_queue_wait': {'key': 'maxQueueWait', 'type': 'duration'}, + 'request_timeout': {'key': 'requestTimeout', 'type': 'duration'}, + } + + def __init__( + self, + *, + max_concurrent_requests_per_instance: Optional[int] = 1, + max_queue_wait: Optional[datetime.timedelta] = "PT0.5S", + request_timeout: Optional[datetime.timedelta] = "PT5S", + **kwargs + ): + """ + :keyword max_concurrent_requests_per_instance: The number of maximum concurrent requests per + node allowed per deployment. Defaults to 1. + :paramtype max_concurrent_requests_per_instance: int + :keyword max_queue_wait: The maximum amount of time a request will stay in the queue in ISO + 8601 format. + Defaults to 500ms. + :paramtype max_queue_wait: ~datetime.timedelta + :keyword request_timeout: The scoring timeout in ISO 8601 format. + Defaults to 5000ms. + :paramtype request_timeout: ~datetime.timedelta + """ + super(OnlineRequestSettings, self).__init__(**kwargs) + self.max_concurrent_requests_per_instance = max_concurrent_requests_per_instance + self.max_queue_wait = max_queue_wait + self.request_timeout = request_timeout + + +class OutputPathAssetReference(AssetReferenceBase): + """Reference to an asset via its path in a job output. + + All required parameters must be populated in order to send to Azure. + + :ivar reference_type: Required. [Required] Specifies the type of asset reference.Constant + filled by server. Possible values include: "Id", "DataPath", "OutputPath". + :vartype reference_type: str or ~azure.mgmt.machinelearningservices.models.ReferenceType + :ivar job_id: ARM resource ID of the job. + :vartype job_id: str + :ivar path: The path of the file/directory in the job output. + :vartype path: str + """ + + _validation = { + 'reference_type': {'required': True}, + } + + _attribute_map = { + 'reference_type': {'key': 'referenceType', 'type': 'str'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + } + + def __init__( + self, + *, + job_id: Optional[str] = None, + path: Optional[str] = None, + **kwargs + ): + """ + :keyword job_id: ARM resource ID of the job. + :paramtype job_id: str + :keyword path: The path of the file/directory in the job output. + :paramtype path: str + """ + super(OutputPathAssetReference, self).__init__(**kwargs) + self.reference_type = 'OutputPath' # type: str + self.job_id = job_id + self.path = path + + +class PaginatedComputeResourcesList(msrest.serialization.Model): + """Paginated list of Machine Learning compute objects wrapped in ARM resource envelope. + + :ivar value: An array of Machine Learning compute objects wrapped in ARM resource envelope. + :vartype value: list[~azure.mgmt.machinelearningservices.models.ComputeResource] + :ivar next_link: A continuation link (absolute URI) to the next page of results in the list. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ComputeResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ComputeResource"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: An array of Machine Learning compute objects wrapped in ARM resource envelope. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.ComputeResource] + :keyword next_link: A continuation link (absolute URI) to the next page of results in the list. + :paramtype next_link: str + """ + super(PaginatedComputeResourcesList, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class PartialAssetReferenceBase(msrest.serialization.Model): + """Base definition for asset references. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PartialDataPathAssetReference, PartialIdAssetReference, PartialOutputPathAssetReference. + + All required parameters must be populated in order to send to Azure. + + :ivar reference_type: Required. [Required] Specifies the type of asset reference.Constant + filled by server. Possible values include: "Id", "DataPath", "OutputPath". + :vartype reference_type: str or ~azure.mgmt.machinelearningservices.models.ReferenceType + """ + + _validation = { + 'reference_type': {'required': True}, + } + + _attribute_map = { + 'reference_type': {'key': 'referenceType', 'type': 'str'}, + } + + _subtype_map = { + 'reference_type': {'DataPath': 'PartialDataPathAssetReference', 'Id': 'PartialIdAssetReference', 'OutputPath': 'PartialOutputPathAssetReference'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(PartialAssetReferenceBase, self).__init__(**kwargs) + self.reference_type = None # type: Optional[str] + + +class PartialBatchDeployment(msrest.serialization.Model): + """Mutable batch inference settings per deployment. + + :ivar code_configuration: Code configuration for the endpoint deployment. + :vartype code_configuration: + ~azure.mgmt.machinelearningservices.models.PartialCodeConfiguration + :ivar compute: Compute binding definition. + :vartype compute: str + :ivar description: Description of the endpoint deployment. + :vartype description: str + :ivar environment_id: ARM resource ID of the environment specification for the endpoint + deployment. + :vartype environment_id: str + :ivar environment_variables: Environment variables configuration for the deployment. + :vartype environment_variables: dict[str, str] + :ivar error_threshold: Error threshold, if the error count for the entire input goes above this + value, + the batch inference will be aborted. Range is [-1, int.MaxValue]. + For FileDataset, this value is the count of file failures. + For TabularDataset, this value is the count of record failures. + If set to -1 (the lower bound), all failures during batch inference will be ignored. + :vartype error_threshold: int + :ivar logging_level: Logging level for batch inference operation. Possible values include: + "Info", "Warning", "Debug". + :vartype logging_level: str or ~azure.mgmt.machinelearningservices.models.BatchLoggingLevel + :ivar max_concurrency_per_instance: Indicates number of processes per instance. + :vartype max_concurrency_per_instance: int + :ivar mini_batch_size: Size of the mini-batch passed to each batch invocation. + For FileDataset, this is the number of files per mini-batch. + For TabularDataset, this is the size of the records in bytes, per mini-batch. + :vartype mini_batch_size: long + :ivar model: Reference to the model asset for the endpoint deployment. + :vartype model: ~azure.mgmt.machinelearningservices.models.PartialAssetReferenceBase + :ivar output_action: Indicates how the output will be organized. Possible values include: + "SummaryOnly", "AppendRow". + :vartype output_action: str or ~azure.mgmt.machinelearningservices.models.BatchOutputAction + :ivar output_file_name: Customized output file name for append_row output action. + :vartype output_file_name: str + :ivar properties: Property dictionary. Properties can be added, but not removed or altered. + :vartype properties: dict[str, str] + :ivar retry_settings: Retry Settings for the batch inference operation. + :vartype retry_settings: ~azure.mgmt.machinelearningservices.models.PartialBatchRetrySettings + """ + + _attribute_map = { + 'code_configuration': {'key': 'codeConfiguration', 'type': 'PartialCodeConfiguration'}, + 'compute': {'key': 'compute', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'environment_id': {'key': 'environmentId', 'type': 'str'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, + 'error_threshold': {'key': 'errorThreshold', 'type': 'int'}, + 'logging_level': {'key': 'loggingLevel', 'type': 'str'}, + 'max_concurrency_per_instance': {'key': 'maxConcurrencyPerInstance', 'type': 'int'}, + 'mini_batch_size': {'key': 'miniBatchSize', 'type': 'long'}, + 'model': {'key': 'model', 'type': 'PartialAssetReferenceBase'}, + 'output_action': {'key': 'outputAction', 'type': 'str'}, + 'output_file_name': {'key': 'outputFileName', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'retry_settings': {'key': 'retrySettings', 'type': 'PartialBatchRetrySettings'}, + } + + def __init__( + self, + *, + code_configuration: Optional["PartialCodeConfiguration"] = None, + compute: Optional[str] = None, + description: Optional[str] = None, + environment_id: Optional[str] = None, + environment_variables: Optional[Dict[str, str]] = None, + error_threshold: Optional[int] = None, + logging_level: Optional[Union[str, "BatchLoggingLevel"]] = None, + max_concurrency_per_instance: Optional[int] = None, + mini_batch_size: Optional[int] = None, + model: Optional["PartialAssetReferenceBase"] = None, + output_action: Optional[Union[str, "BatchOutputAction"]] = None, + output_file_name: Optional[str] = None, + properties: Optional[Dict[str, str]] = None, + retry_settings: Optional["PartialBatchRetrySettings"] = None, + **kwargs + ): + """ + :keyword code_configuration: Code configuration for the endpoint deployment. + :paramtype code_configuration: + ~azure.mgmt.machinelearningservices.models.PartialCodeConfiguration + :keyword compute: Compute binding definition. + :paramtype compute: str + :keyword description: Description of the endpoint deployment. + :paramtype description: str + :keyword environment_id: ARM resource ID of the environment specification for the endpoint + deployment. + :paramtype environment_id: str + :keyword environment_variables: Environment variables configuration for the deployment. + :paramtype environment_variables: dict[str, str] + :keyword error_threshold: Error threshold, if the error count for the entire input goes above + this value, + the batch inference will be aborted. Range is [-1, int.MaxValue]. + For FileDataset, this value is the count of file failures. + For TabularDataset, this value is the count of record failures. + If set to -1 (the lower bound), all failures during batch inference will be ignored. + :paramtype error_threshold: int + :keyword logging_level: Logging level for batch inference operation. Possible values include: + "Info", "Warning", "Debug". + :paramtype logging_level: str or ~azure.mgmt.machinelearningservices.models.BatchLoggingLevel + :keyword max_concurrency_per_instance: Indicates number of processes per instance. + :paramtype max_concurrency_per_instance: int + :keyword mini_batch_size: Size of the mini-batch passed to each batch invocation. + For FileDataset, this is the number of files per mini-batch. + For TabularDataset, this is the size of the records in bytes, per mini-batch. + :paramtype mini_batch_size: long + :keyword model: Reference to the model asset for the endpoint deployment. + :paramtype model: ~azure.mgmt.machinelearningservices.models.PartialAssetReferenceBase + :keyword output_action: Indicates how the output will be organized. Possible values include: + "SummaryOnly", "AppendRow". + :paramtype output_action: str or ~azure.mgmt.machinelearningservices.models.BatchOutputAction + :keyword output_file_name: Customized output file name for append_row output action. + :paramtype output_file_name: str + :keyword properties: Property dictionary. Properties can be added, but not removed or altered. + :paramtype properties: dict[str, str] + :keyword retry_settings: Retry Settings for the batch inference operation. + :paramtype retry_settings: ~azure.mgmt.machinelearningservices.models.PartialBatchRetrySettings + """ + super(PartialBatchDeployment, self).__init__(**kwargs) + self.code_configuration = code_configuration + self.compute = compute + self.description = description + self.environment_id = environment_id + self.environment_variables = environment_variables + self.error_threshold = error_threshold + self.logging_level = logging_level + self.max_concurrency_per_instance = max_concurrency_per_instance + self.mini_batch_size = mini_batch_size + self.model = model + self.output_action = output_action + self.output_file_name = output_file_name + self.properties = properties + self.retry_settings = retry_settings + + +class PartialBatchDeploymentPartialTrackedResource(msrest.serialization.Model): + """Strictly used in update requests. + + :ivar identity: Managed service identity (system assigned and/or user assigned identities). + :vartype identity: ~azure.mgmt.machinelearningservices.models.PartialManagedServiceIdentity + :ivar kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type. + :vartype kind: str + :ivar location: The geo-location where the resource lives. + :vartype location: str + :ivar properties: Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.PartialBatchDeployment + :ivar sku: Sku details required for ARM contract for Autoscaling. + :vartype sku: ~azure.mgmt.machinelearningservices.models.PartialSku + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + """ + + _attribute_map = { + 'identity': {'key': 'identity', 'type': 'PartialManagedServiceIdentity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'PartialBatchDeployment'}, + 'sku': {'key': 'sku', 'type': 'PartialSku'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + identity: Optional["PartialManagedServiceIdentity"] = None, + kind: Optional[str] = None, + location: Optional[str] = None, + properties: Optional["PartialBatchDeployment"] = None, + sku: Optional["PartialSku"] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword identity: Managed service identity (system assigned and/or user assigned identities). + :paramtype identity: ~azure.mgmt.machinelearningservices.models.PartialManagedServiceIdentity + :keyword kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type. + :paramtype kind: str + :keyword location: The geo-location where the resource lives. + :paramtype location: str + :keyword properties: Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.PartialBatchDeployment + :keyword sku: Sku details required for ARM contract for Autoscaling. + :paramtype sku: ~azure.mgmt.machinelearningservices.models.PartialSku + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + """ + super(PartialBatchDeploymentPartialTrackedResource, self).__init__(**kwargs) + self.identity = identity + self.kind = kind + self.location = location + self.properties = properties + self.sku = sku + self.tags = tags + + +class PartialBatchEndpoint(msrest.serialization.Model): + """Mutable Batch endpoint configuration. + + :ivar defaults: Default values for Batch Endpoint. + :vartype defaults: ~azure.mgmt.machinelearningservices.models.BatchEndpointDefaults + """ + + _attribute_map = { + 'defaults': {'key': 'defaults', 'type': 'BatchEndpointDefaults'}, + } + + def __init__( + self, + *, + defaults: Optional["BatchEndpointDefaults"] = None, + **kwargs + ): + """ + :keyword defaults: Default values for Batch Endpoint. + :paramtype defaults: ~azure.mgmt.machinelearningservices.models.BatchEndpointDefaults + """ + super(PartialBatchEndpoint, self).__init__(**kwargs) + self.defaults = defaults + + +class PartialBatchEndpointPartialTrackedResource(msrest.serialization.Model): + """Strictly used in update requests. + + :ivar identity: Managed service identity (system assigned and/or user assigned identities). + :vartype identity: ~azure.mgmt.machinelearningservices.models.PartialManagedServiceIdentity + :ivar kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type. + :vartype kind: str + :ivar location: The geo-location where the resource lives. + :vartype location: str + :ivar properties: Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.PartialBatchEndpoint + :ivar sku: Sku details required for ARM contract for Autoscaling. + :vartype sku: ~azure.mgmt.machinelearningservices.models.PartialSku + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + """ + + _attribute_map = { + 'identity': {'key': 'identity', 'type': 'PartialManagedServiceIdentity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'PartialBatchEndpoint'}, + 'sku': {'key': 'sku', 'type': 'PartialSku'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + identity: Optional["PartialManagedServiceIdentity"] = None, + kind: Optional[str] = None, + location: Optional[str] = None, + properties: Optional["PartialBatchEndpoint"] = None, + sku: Optional["PartialSku"] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword identity: Managed service identity (system assigned and/or user assigned identities). + :paramtype identity: ~azure.mgmt.machinelearningservices.models.PartialManagedServiceIdentity + :keyword kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type. + :paramtype kind: str + :keyword location: The geo-location where the resource lives. + :paramtype location: str + :keyword properties: Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.PartialBatchEndpoint + :keyword sku: Sku details required for ARM contract for Autoscaling. + :paramtype sku: ~azure.mgmt.machinelearningservices.models.PartialSku + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + """ + super(PartialBatchEndpointPartialTrackedResource, self).__init__(**kwargs) + self.identity = identity + self.kind = kind + self.location = location + self.properties = properties + self.sku = sku + self.tags = tags + + +class PartialBatchRetrySettings(msrest.serialization.Model): + """Retry settings for a batch inference operation. + + :ivar max_retries: Maximum retry count for a mini-batch. + :vartype max_retries: int + :ivar timeout: Invocation timeout for a mini-batch, in ISO 8601 format. + :vartype timeout: ~datetime.timedelta + """ + + _attribute_map = { + 'max_retries': {'key': 'maxRetries', 'type': 'int'}, + 'timeout': {'key': 'timeout', 'type': 'duration'}, + } + + def __init__( + self, + *, + max_retries: Optional[int] = None, + timeout: Optional[datetime.timedelta] = None, + **kwargs + ): + """ + :keyword max_retries: Maximum retry count for a mini-batch. + :paramtype max_retries: int + :keyword timeout: Invocation timeout for a mini-batch, in ISO 8601 format. + :paramtype timeout: ~datetime.timedelta + """ + super(PartialBatchRetrySettings, self).__init__(**kwargs) + self.max_retries = max_retries + self.timeout = timeout + + +class PartialCodeConfiguration(msrest.serialization.Model): + """Configuration for a scoring code asset. + + :ivar code_id: ARM resource ID of the code asset. + :vartype code_id: str + :ivar scoring_script: The script to execute on startup. eg. "score.py". + :vartype scoring_script: str + """ + + _validation = { + 'scoring_script': {'min_length': 1}, + } + + _attribute_map = { + 'code_id': {'key': 'codeId', 'type': 'str'}, + 'scoring_script': {'key': 'scoringScript', 'type': 'str'}, + } + + def __init__( + self, + *, + code_id: Optional[str] = None, + scoring_script: Optional[str] = None, + **kwargs + ): + """ + :keyword code_id: ARM resource ID of the code asset. + :paramtype code_id: str + :keyword scoring_script: The script to execute on startup. eg. "score.py". + :paramtype scoring_script: str + """ + super(PartialCodeConfiguration, self).__init__(**kwargs) + self.code_id = code_id + self.scoring_script = scoring_script + + +class PartialDataPathAssetReference(PartialAssetReferenceBase): + """Reference to an asset via its path in a datastore. + + All required parameters must be populated in order to send to Azure. + + :ivar reference_type: Required. [Required] Specifies the type of asset reference.Constant + filled by server. Possible values include: "Id", "DataPath", "OutputPath". + :vartype reference_type: str or ~azure.mgmt.machinelearningservices.models.ReferenceType + :ivar datastore_id: ARM resource ID of the datastore where the asset is located. + :vartype datastore_id: str + :ivar path: The path of the file/directory in the datastore. + :vartype path: str + """ + + _validation = { + 'reference_type': {'required': True}, + } + + _attribute_map = { + 'reference_type': {'key': 'referenceType', 'type': 'str'}, + 'datastore_id': {'key': 'datastoreId', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + } + + def __init__( + self, + *, + datastore_id: Optional[str] = None, + path: Optional[str] = None, + **kwargs + ): + """ + :keyword datastore_id: ARM resource ID of the datastore where the asset is located. + :paramtype datastore_id: str + :keyword path: The path of the file/directory in the datastore. + :paramtype path: str + """ + super(PartialDataPathAssetReference, self).__init__(**kwargs) + self.reference_type = 'DataPath' # type: str + self.datastore_id = datastore_id + self.path = path + + +class PartialIdAssetReference(PartialAssetReferenceBase): + """Reference to an asset via its ARM resource ID. + + All required parameters must be populated in order to send to Azure. + + :ivar reference_type: Required. [Required] Specifies the type of asset reference.Constant + filled by server. Possible values include: "Id", "DataPath", "OutputPath". + :vartype reference_type: str or ~azure.mgmt.machinelearningservices.models.ReferenceType + :ivar asset_id: ARM resource ID of the asset. + :vartype asset_id: str + """ + + _validation = { + 'reference_type': {'required': True}, + } + + _attribute_map = { + 'reference_type': {'key': 'referenceType', 'type': 'str'}, + 'asset_id': {'key': 'assetId', 'type': 'str'}, + } + + def __init__( + self, + *, + asset_id: Optional[str] = None, + **kwargs + ): + """ + :keyword asset_id: ARM resource ID of the asset. + :paramtype asset_id: str + """ + super(PartialIdAssetReference, self).__init__(**kwargs) + self.reference_type = 'Id' # type: str + self.asset_id = asset_id + + +class PartialOnlineDeployment(msrest.serialization.Model): + """Mutable online deployment configuration. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PartialKubernetesOnlineDeployment, PartialManagedOnlineDeployment. + + All required parameters must be populated in order to send to Azure. + + :ivar endpoint_compute_type: Required. [Required] The compute type of the endpoint.Constant + filled by server. Possible values include: "Managed", "Kubernetes", "AzureMLCompute". + :vartype endpoint_compute_type: str or + ~azure.mgmt.machinelearningservices.models.EndpointComputeType + """ + + _validation = { + 'endpoint_compute_type': {'required': True}, + } + + _attribute_map = { + 'endpoint_compute_type': {'key': 'endpointComputeType', 'type': 'str'}, + } + + _subtype_map = { + 'endpoint_compute_type': {'Kubernetes': 'PartialKubernetesOnlineDeployment', 'Managed': 'PartialManagedOnlineDeployment'} + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(PartialOnlineDeployment, self).__init__(**kwargs) + self.endpoint_compute_type = None # type: Optional[str] + + +class PartialKubernetesOnlineDeployment(PartialOnlineDeployment): + """Properties specific to a KubernetesOnlineDeployment. + + All required parameters must be populated in order to send to Azure. + + :ivar endpoint_compute_type: Required. [Required] The compute type of the endpoint.Constant + filled by server. Possible values include: "Managed", "Kubernetes", "AzureMLCompute". + :vartype endpoint_compute_type: str or + ~azure.mgmt.machinelearningservices.models.EndpointComputeType + """ + + _validation = { + 'endpoint_compute_type': {'required': True}, + } + + _attribute_map = { + 'endpoint_compute_type': {'key': 'endpointComputeType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(PartialKubernetesOnlineDeployment, self).__init__(**kwargs) + self.endpoint_compute_type = 'Kubernetes' # type: str + + +class PartialManagedOnlineDeployment(PartialOnlineDeployment): + """Properties specific to a ManagedOnlineDeployment. + + All required parameters must be populated in order to send to Azure. + + :ivar endpoint_compute_type: Required. [Required] The compute type of the endpoint.Constant + filled by server. Possible values include: "Managed", "Kubernetes", "AzureMLCompute". + :vartype endpoint_compute_type: str or + ~azure.mgmt.machinelearningservices.models.EndpointComputeType + """ + + _validation = { + 'endpoint_compute_type': {'required': True}, + } + + _attribute_map = { + 'endpoint_compute_type': {'key': 'endpointComputeType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(PartialManagedOnlineDeployment, self).__init__(**kwargs) + self.endpoint_compute_type = 'Managed' # type: str + + +class PartialManagedServiceIdentity(msrest.serialization.Model): + """Managed service identity (system assigned and/or user assigned identities). + + :ivar type: Managed service identity (system assigned and/or user assigned identities). + Possible values include: "None", "SystemAssigned", "UserAssigned", + "SystemAssigned,UserAssigned". + :vartype type: str or ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentityType + :ivar user_assigned_identities: The set of user assigned identities associated with the + resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + The dictionary values can be empty objects ({}) in requests. + :vartype user_assigned_identities: dict[str, any] + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{object}'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "ManagedServiceIdentityType"]] = None, + user_assigned_identities: Optional[Dict[str, Any]] = None, + **kwargs + ): + """ + :keyword type: Managed service identity (system assigned and/or user assigned identities). + Possible values include: "None", "SystemAssigned", "UserAssigned", + "SystemAssigned,UserAssigned". + :paramtype type: str or ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentityType + :keyword user_assigned_identities: The set of user assigned identities associated with the + resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + The dictionary values can be empty objects ({}) in requests. + :paramtype user_assigned_identities: dict[str, any] + """ + super(PartialManagedServiceIdentity, self).__init__(**kwargs) + self.type = type + self.user_assigned_identities = user_assigned_identities + + +class PartialOnlineDeploymentPartialTrackedResource(msrest.serialization.Model): + """Strictly used in update requests. + + :ivar identity: Managed service identity (system assigned and/or user assigned identities). + :vartype identity: ~azure.mgmt.machinelearningservices.models.PartialManagedServiceIdentity + :ivar kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type. + :vartype kind: str + :ivar location: The geo-location where the resource lives. + :vartype location: str + :ivar properties: Additional attributes of the entity. + :vartype properties: ~azure.mgmt.machinelearningservices.models.PartialOnlineDeployment + :ivar sku: Sku details required for ARM contract for Autoscaling. + :vartype sku: ~azure.mgmt.machinelearningservices.models.PartialSku + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + """ + + _attribute_map = { + 'identity': {'key': 'identity', 'type': 'PartialManagedServiceIdentity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'PartialOnlineDeployment'}, + 'sku': {'key': 'sku', 'type': 'PartialSku'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + identity: Optional["PartialManagedServiceIdentity"] = None, + kind: Optional[str] = None, + location: Optional[str] = None, + properties: Optional["PartialOnlineDeployment"] = None, + sku: Optional["PartialSku"] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword identity: Managed service identity (system assigned and/or user assigned identities). + :paramtype identity: ~azure.mgmt.machinelearningservices.models.PartialManagedServiceIdentity + :keyword kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type. + :paramtype kind: str + :keyword location: The geo-location where the resource lives. + :paramtype location: str + :keyword properties: Additional attributes of the entity. + :paramtype properties: ~azure.mgmt.machinelearningservices.models.PartialOnlineDeployment + :keyword sku: Sku details required for ARM contract for Autoscaling. + :paramtype sku: ~azure.mgmt.machinelearningservices.models.PartialSku + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + """ + super(PartialOnlineDeploymentPartialTrackedResource, self).__init__(**kwargs) + self.identity = identity + self.kind = kind + self.location = location + self.properties = properties + self.sku = sku + self.tags = tags + + +class PartialOnlineEndpointPartialTrackedResource(msrest.serialization.Model): + """Strictly used in update requests. + + :ivar identity: Managed service identity (system assigned and/or user assigned identities). + :vartype identity: ~azure.mgmt.machinelearningservices.models.PartialManagedServiceIdentity + :ivar kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type. + :vartype kind: str + :ivar location: The geo-location where the resource lives. + :vartype location: str + :ivar properties: Additional attributes of the entity. + :vartype properties: any + :ivar sku: Sku details required for ARM contract for Autoscaling. + :vartype sku: ~azure.mgmt.machinelearningservices.models.PartialSku + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + """ + + _attribute_map = { + 'identity': {'key': 'identity', 'type': 'PartialManagedServiceIdentity'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'sku': {'key': 'sku', 'type': 'PartialSku'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + identity: Optional["PartialManagedServiceIdentity"] = None, + kind: Optional[str] = None, + location: Optional[str] = None, + properties: Optional[Any] = None, + sku: Optional["PartialSku"] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword identity: Managed service identity (system assigned and/or user assigned identities). + :paramtype identity: ~azure.mgmt.machinelearningservices.models.PartialManagedServiceIdentity + :keyword kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type. + :paramtype kind: str + :keyword location: The geo-location where the resource lives. + :paramtype location: str + :keyword properties: Additional attributes of the entity. + :paramtype properties: any + :keyword sku: Sku details required for ARM contract for Autoscaling. + :paramtype sku: ~azure.mgmt.machinelearningservices.models.PartialSku + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + """ + super(PartialOnlineEndpointPartialTrackedResource, self).__init__(**kwargs) + self.identity = identity + self.kind = kind + self.location = location + self.properties = properties + self.sku = sku + self.tags = tags + + +class PartialOutputPathAssetReference(PartialAssetReferenceBase): + """Reference to an asset via its path in a job output. + + All required parameters must be populated in order to send to Azure. + + :ivar reference_type: Required. [Required] Specifies the type of asset reference.Constant + filled by server. Possible values include: "Id", "DataPath", "OutputPath". + :vartype reference_type: str or ~azure.mgmt.machinelearningservices.models.ReferenceType + :ivar job_id: ARM resource ID of the job. + :vartype job_id: str + :ivar path: The path of the file/directory in the job output. + :vartype path: str + """ + + _validation = { + 'reference_type': {'required': True}, + } + + _attribute_map = { + 'reference_type': {'key': 'referenceType', 'type': 'str'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + } + + def __init__( + self, + *, + job_id: Optional[str] = None, + path: Optional[str] = None, + **kwargs + ): + """ + :keyword job_id: ARM resource ID of the job. + :paramtype job_id: str + :keyword path: The path of the file/directory in the job output. + :paramtype path: str + """ + super(PartialOutputPathAssetReference, self).__init__(**kwargs) + self.reference_type = 'OutputPath' # type: str + self.job_id = job_id + self.path = path + + +class PartialSku(msrest.serialization.Model): + """Common SKU definition. + + :ivar capacity: If the SKU supports scale out/in then the capacity integer should be included. + If scale out/in is not possible for the resource this may be omitted. + :vartype capacity: int + :ivar family: If the service has different generations of hardware, for the same SKU, then that + can be captured here. + :vartype family: str + :ivar name: The name of the SKU. Ex - P3. It is typically a letter+number code. + :vartype name: str + :ivar size: The SKU size. When the name field is the combination of tier and some other value, + this would be the standalone code. + :vartype size: str + :ivar tier: This field is required to be implemented by the Resource Provider if the service + has more than one tier, but is not required on a PUT. Possible values include: "Free", "Basic", + "Standard", "Premium". + :vartype tier: str or ~azure.mgmt.machinelearningservices.models.SkuTier + """ + + _attribute_map = { + 'capacity': {'key': 'capacity', 'type': 'int'}, + 'family': {'key': 'family', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + *, + capacity: Optional[int] = None, + family: Optional[str] = None, + name: Optional[str] = None, + size: Optional[str] = None, + tier: Optional[Union[str, "SkuTier"]] = None, + **kwargs + ): + """ + :keyword capacity: If the SKU supports scale out/in then the capacity integer should be + included. If scale out/in is not possible for the resource this may be omitted. + :paramtype capacity: int + :keyword family: If the service has different generations of hardware, for the same SKU, then + that can be captured here. + :paramtype family: str + :keyword name: The name of the SKU. Ex - P3. It is typically a letter+number code. + :paramtype name: str + :keyword size: The SKU size. When the name field is the combination of tier and some other + value, this would be the standalone code. + :paramtype size: str + :keyword tier: This field is required to be implemented by the Resource Provider if the service + has more than one tier, but is not required on a PUT. Possible values include: "Free", "Basic", + "Standard", "Premium". + :paramtype tier: str or ~azure.mgmt.machinelearningservices.models.SkuTier + """ + super(PartialSku, self).__init__(**kwargs) + self.capacity = capacity + self.family = family + self.name = name + self.size = size + self.tier = tier + + +class Password(msrest.serialization.Model): + """Password. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: + :vartype name: str + :ivar value: + :vartype value: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(Password, self).__init__(**kwargs) + self.name = None + self.value = None + + +class PATAuthTypeWorkspaceConnectionProperties(WorkspaceConnectionPropertiesV2): + """PATAuthTypeWorkspaceConnectionProperties. + + All required parameters must be populated in order to send to Azure. + + :ivar auth_type: Required. Authentication type of the connection target.Constant filled by + server. Possible values include: "PAT", "ManagedIdentity", "UsernamePassword", "None", "SAS". + :vartype auth_type: str or ~azure.mgmt.machinelearningservices.models.ConnectionAuthType + :ivar category: Category of the connection. Possible values include: "PythonFeed", + "ContainerRegistry", "Git". + :vartype category: str or ~azure.mgmt.machinelearningservices.models.ConnectionCategory + :ivar target: + :vartype target: str + :ivar value: Value details of the workspace connection. + :vartype value: str + :ivar value_format: format for the workspace connection value. Possible values include: "JSON". + :vartype value_format: str or ~azure.mgmt.machinelearningservices.models.ValueFormat + :ivar credentials: + :vartype credentials: + ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionPersonalAccessToken + """ + + _validation = { + 'auth_type': {'required': True}, + } + + _attribute_map = { + 'auth_type': {'key': 'authType', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'value_format': {'key': 'valueFormat', 'type': 'str'}, + 'credentials': {'key': 'credentials', 'type': 'WorkspaceConnectionPersonalAccessToken'}, + } + + def __init__( + self, + *, + category: Optional[Union[str, "ConnectionCategory"]] = None, + target: Optional[str] = None, + value: Optional[str] = None, + value_format: Optional[Union[str, "ValueFormat"]] = None, + credentials: Optional["WorkspaceConnectionPersonalAccessToken"] = None, + **kwargs + ): + """ + :keyword category: Category of the connection. Possible values include: "PythonFeed", + "ContainerRegistry", "Git". + :paramtype category: str or ~azure.mgmt.machinelearningservices.models.ConnectionCategory + :keyword target: + :paramtype target: str + :keyword value: Value details of the workspace connection. + :paramtype value: str + :keyword value_format: format for the workspace connection value. Possible values include: + "JSON". + :paramtype value_format: str or ~azure.mgmt.machinelearningservices.models.ValueFormat + :keyword credentials: + :paramtype credentials: + ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionPersonalAccessToken + """ + super(PATAuthTypeWorkspaceConnectionProperties, self).__init__(category=category, target=target, value=value, value_format=value_format, **kwargs) + self.auth_type = 'PAT' # type: str + self.credentials = credentials + + +class PersonalComputeInstanceSettings(msrest.serialization.Model): + """Settings for a personal compute instance. + + :ivar assigned_user: A user explicitly assigned to a personal compute instance. + :vartype assigned_user: ~azure.mgmt.machinelearningservices.models.AssignedUser + """ + + _attribute_map = { + 'assigned_user': {'key': 'assignedUser', 'type': 'AssignedUser'}, + } + + def __init__( + self, + *, + assigned_user: Optional["AssignedUser"] = None, + **kwargs + ): + """ + :keyword assigned_user: A user explicitly assigned to a personal compute instance. + :paramtype assigned_user: ~azure.mgmt.machinelearningservices.models.AssignedUser + """ + super(PersonalComputeInstanceSettings, self).__init__(**kwargs) + self.assigned_user = assigned_user + + +class PipelineJob(JobBaseDetails): + """Pipeline Job definition: defines generic to MFE attributes. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar compute_id: ARM resource ID of the compute resource. + :vartype compute_id: str + :ivar display_name: Display name of job. + :vartype display_name: str + :ivar experiment_name: The name of the experiment the job belongs to. If not set, the job is + placed in the "Default" experiment. + :vartype experiment_name: str + :ivar identity: Identity configuration. If set, this should be one of AmlToken, + ManagedIdentity, UserIdentity or null. + Defaults to AmlToken if null. + :vartype identity: ~azure.mgmt.machinelearningservices.models.IdentityConfiguration + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar job_type: Required. [Required] Specifies the type of job.Constant filled by server. + Possible values include: "Command", "Sweep", "Pipeline". + :vartype job_type: str or ~azure.mgmt.machinelearningservices.models.JobType + :ivar services: List of JobEndpoints. + For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + :vartype services: dict[str, ~azure.mgmt.machinelearningservices.models.JobService] + :ivar status: Status of the job. Possible values include: "NotStarted", "Starting", + "Provisioning", "Preparing", "Queued", "Running", "Finalizing", "CancelRequested", "Completed", + "Failed", "Canceled", "NotResponding", "Paused", "Unknown". + :vartype status: str or ~azure.mgmt.machinelearningservices.models.JobStatus + :ivar inputs: Inputs for the pipeline job. + :vartype inputs: dict[str, ~azure.mgmt.machinelearningservices.models.JobInput] + :ivar jobs: Jobs construct the Pipeline Job. + :vartype jobs: dict[str, any] + :ivar outputs: Outputs for the pipeline job. + :vartype outputs: dict[str, ~azure.mgmt.machinelearningservices.models.JobOutput] + :ivar settings: Pipeline settings, for things like ContinueRunOnStepFailure etc. + :vartype settings: any + """ + + _validation = { + 'job_type': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'compute_id': {'key': 'computeId', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'experiment_name': {'key': 'experimentName', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'IdentityConfiguration'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'services': {'key': 'services', 'type': '{JobService}'}, + 'status': {'key': 'status', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '{JobInput}'}, + 'jobs': {'key': 'jobs', 'type': '{object}'}, + 'outputs': {'key': 'outputs', 'type': '{JobOutput}'}, + 'settings': {'key': 'settings', 'type': 'object'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + properties: Optional[Dict[str, str]] = None, + tags: Optional[Dict[str, str]] = None, + compute_id: Optional[str] = None, + display_name: Optional[str] = None, + experiment_name: Optional[str] = "Default", + identity: Optional["IdentityConfiguration"] = None, + is_archived: Optional[bool] = False, + services: Optional[Dict[str, "JobService"]] = None, + inputs: Optional[Dict[str, "JobInput"]] = None, + jobs: Optional[Dict[str, Any]] = None, + outputs: Optional[Dict[str, "JobOutput"]] = None, + settings: Optional[Any] = None, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword compute_id: ARM resource ID of the compute resource. + :paramtype compute_id: str + :keyword display_name: Display name of job. + :paramtype display_name: str + :keyword experiment_name: The name of the experiment the job belongs to. If not set, the job is + placed in the "Default" experiment. + :paramtype experiment_name: str + :keyword identity: Identity configuration. If set, this should be one of AmlToken, + ManagedIdentity, UserIdentity or null. + Defaults to AmlToken if null. + :paramtype identity: ~azure.mgmt.machinelearningservices.models.IdentityConfiguration + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + :keyword services: List of JobEndpoints. + For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + :paramtype services: dict[str, ~azure.mgmt.machinelearningservices.models.JobService] + :keyword inputs: Inputs for the pipeline job. + :paramtype inputs: dict[str, ~azure.mgmt.machinelearningservices.models.JobInput] + :keyword jobs: Jobs construct the Pipeline Job. + :paramtype jobs: dict[str, any] + :keyword outputs: Outputs for the pipeline job. + :paramtype outputs: dict[str, ~azure.mgmt.machinelearningservices.models.JobOutput] + :keyword settings: Pipeline settings, for things like ContinueRunOnStepFailure etc. + :paramtype settings: any + """ + super(PipelineJob, self).__init__(description=description, properties=properties, tags=tags, compute_id=compute_id, display_name=display_name, experiment_name=experiment_name, identity=identity, is_archived=is_archived, services=services, **kwargs) + self.job_type = 'Pipeline' # type: str + self.inputs = inputs + self.jobs = jobs + self.outputs = outputs + self.settings = settings + + +class PrivateEndpoint(msrest.serialization.Model): + """The Private Endpoint resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The ARM identifier for Private Endpoint. + :vartype id: str + :ivar subnet_arm_id: The ARM identifier for Subnet resource that private endpoint links to. + :vartype subnet_arm_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'subnet_arm_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'subnet_arm_id': {'key': 'subnetArmId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = None + self.subnet_arm_id = None + + +class PrivateEndpointConnection(Resource): + """The Private Endpoint Connection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar identity: The identity of the resource. + :vartype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :ivar location: Specifies the location of the resource. + :vartype location: str + :ivar tags: A set of tags. Contains resource tags defined as key/value pairs. + :vartype tags: dict[str, str] + :ivar sku: The sku of the workspace. + :vartype sku: ~azure.mgmt.machinelearningservices.models.Sku + :ivar private_endpoint: The resource of private end point. + :vartype private_endpoint: ~azure.mgmt.machinelearningservices.models.PrivateEndpoint + :ivar private_link_service_connection_state: A collection of information about the state of the + connection between service consumer and provider. + :vartype private_link_service_connection_state: + ~azure.mgmt.machinelearningservices.models.PrivateLinkServiceConnectionState + :ivar provisioning_state: The provisioning state of the private endpoint connection resource. + Possible values include: "Succeeded", "Creating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.PrivateEndpointConnectionProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + identity: Optional["ManagedServiceIdentity"] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + sku: Optional["Sku"] = None, + private_endpoint: Optional["PrivateEndpoint"] = None, + private_link_service_connection_state: Optional["PrivateLinkServiceConnectionState"] = None, + **kwargs + ): + """ + :keyword identity: The identity of the resource. + :paramtype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :keyword location: Specifies the location of the resource. + :paramtype location: str + :keyword tags: A set of tags. Contains resource tags defined as key/value pairs. + :paramtype tags: dict[str, str] + :keyword sku: The sku of the workspace. + :paramtype sku: ~azure.mgmt.machinelearningservices.models.Sku + :keyword private_endpoint: The resource of private end point. + :paramtype private_endpoint: ~azure.mgmt.machinelearningservices.models.PrivateEndpoint + :keyword private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. + :paramtype private_link_service_connection_state: + ~azure.mgmt.machinelearningservices.models.PrivateLinkServiceConnectionState + """ + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.identity = identity + self.location = location + self.tags = tags + self.sku = sku + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + self.provisioning_state = None + + +class PrivateEndpointConnectionListResult(msrest.serialization.Model): + """List of private endpoint connection associated with the specified workspace. + + :ivar value: Array of private endpoint connections. + :vartype value: list[~azure.mgmt.machinelearningservices.models.PrivateEndpointConnection] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + } + + def __init__( + self, + *, + value: Optional[List["PrivateEndpointConnection"]] = None, + **kwargs + ): + """ + :keyword value: Array of private endpoint connections. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.PrivateEndpointConnection] + """ + super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) + self.value = value + + +class PrivateLinkResource(Resource): + """A private link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar identity: The identity of the resource. + :vartype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :ivar location: Specifies the location of the resource. + :vartype location: str + :ivar tags: A set of tags. Contains resource tags defined as key/value pairs. + :vartype tags: dict[str, str] + :ivar sku: The sku of the workspace. + :vartype sku: ~azure.mgmt.machinelearningservices.models.Sku + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + :ivar required_zone_names: The private link resource Private link DNS zone name. + :vartype required_zone_names: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + } + + def __init__( + self, + *, + identity: Optional["ManagedServiceIdentity"] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + sku: Optional["Sku"] = None, + required_zone_names: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword identity: The identity of the resource. + :paramtype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :keyword location: Specifies the location of the resource. + :paramtype location: str + :keyword tags: A set of tags. Contains resource tags defined as key/value pairs. + :paramtype tags: dict[str, str] + :keyword sku: The sku of the workspace. + :paramtype sku: ~azure.mgmt.machinelearningservices.models.Sku + :keyword required_zone_names: The private link resource Private link DNS zone name. + :paramtype required_zone_names: list[str] + """ + super(PrivateLinkResource, self).__init__(**kwargs) + self.identity = identity + self.location = location + self.tags = tags + self.sku = sku + self.group_id = None + self.required_members = None + self.required_zone_names = required_zone_names + + +class PrivateLinkResourceListResult(msrest.serialization.Model): + """A list of private link resources. + + :ivar value: Array of private link resources. + :vartype value: list[~azure.mgmt.machinelearningservices.models.PrivateLinkResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + } + + def __init__( + self, + *, + value: Optional[List["PrivateLinkResource"]] = None, + **kwargs + ): + """ + :keyword value: Array of private link resources. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.PrivateLinkResource] + """ + super(PrivateLinkResourceListResult, self).__init__(**kwargs) + self.value = value + + +class PrivateLinkServiceConnectionState(msrest.serialization.Model): + """A collection of information about the state of the connection between service consumer and provider. + + :ivar status: Indicates whether the connection has been Approved/Rejected/Removed by the owner + of the service. Possible values include: "Pending", "Approved", "Rejected", "Disconnected", + "Timeout". + :vartype status: str or + ~azure.mgmt.machinelearningservices.models.PrivateEndpointServiceConnectionStatus + :ivar description: The reason for approval/rejection of the connection. + :vartype description: str + :ivar actions_required: A message indicating if changes on the service provider require any + updates on the consumer. + :vartype actions_required: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Optional[Union[str, "PrivateEndpointServiceConnectionStatus"]] = None, + description: Optional[str] = None, + actions_required: Optional[str] = None, + **kwargs + ): + """ + :keyword status: Indicates whether the connection has been Approved/Rejected/Removed by the + owner of the service. Possible values include: "Pending", "Approved", "Rejected", + "Disconnected", "Timeout". + :paramtype status: str or + ~azure.mgmt.machinelearningservices.models.PrivateEndpointServiceConnectionStatus + :keyword description: The reason for approval/rejection of the connection. + :paramtype description: str + :keyword actions_required: A message indicating if changes on the service provider require any + updates on the consumer. + :paramtype actions_required: str + """ + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = status + self.description = description + self.actions_required = actions_required + + +class ProbeSettings(msrest.serialization.Model): + """Deployment container liveness/readiness probe configuration. + + :ivar failure_threshold: The number of failures to allow before returning an unhealthy status. + :vartype failure_threshold: int + :ivar initial_delay: The delay before the first probe in ISO 8601 format. + :vartype initial_delay: ~datetime.timedelta + :ivar period: The length of time between probes in ISO 8601 format. + :vartype period: ~datetime.timedelta + :ivar success_threshold: The number of successful probes before returning a healthy status. + :vartype success_threshold: int + :ivar timeout: The probe timeout in ISO 8601 format. + :vartype timeout: ~datetime.timedelta + """ + + _attribute_map = { + 'failure_threshold': {'key': 'failureThreshold', 'type': 'int'}, + 'initial_delay': {'key': 'initialDelay', 'type': 'duration'}, + 'period': {'key': 'period', 'type': 'duration'}, + 'success_threshold': {'key': 'successThreshold', 'type': 'int'}, + 'timeout': {'key': 'timeout', 'type': 'duration'}, + } + + def __init__( + self, + *, + failure_threshold: Optional[int] = 30, + initial_delay: Optional[datetime.timedelta] = None, + period: Optional[datetime.timedelta] = "PT10S", + success_threshold: Optional[int] = 1, + timeout: Optional[datetime.timedelta] = "PT2S", + **kwargs + ): + """ + :keyword failure_threshold: The number of failures to allow before returning an unhealthy + status. + :paramtype failure_threshold: int + :keyword initial_delay: The delay before the first probe in ISO 8601 format. + :paramtype initial_delay: ~datetime.timedelta + :keyword period: The length of time between probes in ISO 8601 format. + :paramtype period: ~datetime.timedelta + :keyword success_threshold: The number of successful probes before returning a healthy status. + :paramtype success_threshold: int + :keyword timeout: The probe timeout in ISO 8601 format. + :paramtype timeout: ~datetime.timedelta + """ + super(ProbeSettings, self).__init__(**kwargs) + self.failure_threshold = failure_threshold + self.initial_delay = initial_delay + self.period = period + self.success_threshold = success_threshold + self.timeout = timeout + + +class PyTorch(DistributionConfiguration): + """PyTorch distribution configuration. + + All required parameters must be populated in order to send to Azure. + + :ivar distribution_type: Required. [Required] Specifies the type of distribution + framework.Constant filled by server. Possible values include: "PyTorch", "TensorFlow", "Mpi". + :vartype distribution_type: str or ~azure.mgmt.machinelearningservices.models.DistributionType + :ivar process_count_per_instance: Number of processes per node. + :vartype process_count_per_instance: int + """ + + _validation = { + 'distribution_type': {'required': True}, + } + + _attribute_map = { + 'distribution_type': {'key': 'distributionType', 'type': 'str'}, + 'process_count_per_instance': {'key': 'processCountPerInstance', 'type': 'int'}, + } + + def __init__( + self, + *, + process_count_per_instance: Optional[int] = None, + **kwargs + ): + """ + :keyword process_count_per_instance: Number of processes per node. + :paramtype process_count_per_instance: int + """ + super(PyTorch, self).__init__(**kwargs) + self.distribution_type = 'PyTorch' # type: str + self.process_count_per_instance = process_count_per_instance + + +class QuotaBaseProperties(msrest.serialization.Model): + """The properties for Quota update or retrieval. + + :ivar id: Specifies the resource ID. + :vartype id: str + :ivar type: Specifies the resource type. + :vartype type: str + :ivar limit: The maximum permitted quota of the resource. + :vartype limit: long + :ivar unit: An enum describing the unit of quota measurement. Possible values include: "Count". + :vartype unit: str or ~azure.mgmt.machinelearningservices.models.QuotaUnit + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + type: Optional[str] = None, + limit: Optional[int] = None, + unit: Optional[Union[str, "QuotaUnit"]] = None, + **kwargs + ): + """ + :keyword id: Specifies the resource ID. + :paramtype id: str + :keyword type: Specifies the resource type. + :paramtype type: str + :keyword limit: The maximum permitted quota of the resource. + :paramtype limit: long + :keyword unit: An enum describing the unit of quota measurement. Possible values include: + "Count". + :paramtype unit: str or ~azure.mgmt.machinelearningservices.models.QuotaUnit + """ + super(QuotaBaseProperties, self).__init__(**kwargs) + self.id = id + self.type = type + self.limit = limit + self.unit = unit + + +class QuotaUpdateParameters(msrest.serialization.Model): + """Quota update parameters. + + :ivar value: The list for update quota. + :vartype value: list[~azure.mgmt.machinelearningservices.models.QuotaBaseProperties] + :ivar location: Region of workspace quota to be updated. + :vartype location: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[QuotaBaseProperties]'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["QuotaBaseProperties"]] = None, + location: Optional[str] = None, + **kwargs + ): + """ + :keyword value: The list for update quota. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.QuotaBaseProperties] + :keyword location: Region of workspace quota to be updated. + :paramtype location: str + """ + super(QuotaUpdateParameters, self).__init__(**kwargs) + self.value = value + self.location = location + + +class RandomSamplingAlgorithm(SamplingAlgorithm): + """Defines a Sampling Algorithm that generates values randomly. + + All required parameters must be populated in order to send to Azure. + + :ivar sampling_algorithm_type: Required. [Required] The algorithm used for generating + hyperparameter values, along with configuration properties.Constant filled by server. Possible + values include: "Grid", "Random", "Bayesian". + :vartype sampling_algorithm_type: str or + ~azure.mgmt.machinelearningservices.models.SamplingAlgorithmType + :ivar rule: The specific type of random algorithm. Possible values include: "Random", "Sobol". + :vartype rule: str or ~azure.mgmt.machinelearningservices.models.RandomSamplingAlgorithmRule + :ivar seed: An optional integer to use as the seed for random number generation. + :vartype seed: int + """ + + _validation = { + 'sampling_algorithm_type': {'required': True}, + } + + _attribute_map = { + 'sampling_algorithm_type': {'key': 'samplingAlgorithmType', 'type': 'str'}, + 'rule': {'key': 'rule', 'type': 'str'}, + 'seed': {'key': 'seed', 'type': 'int'}, + } + + def __init__( + self, + *, + rule: Optional[Union[str, "RandomSamplingAlgorithmRule"]] = None, + seed: Optional[int] = None, + **kwargs + ): + """ + :keyword rule: The specific type of random algorithm. Possible values include: "Random", + "Sobol". + :paramtype rule: str or ~azure.mgmt.machinelearningservices.models.RandomSamplingAlgorithmRule + :keyword seed: An optional integer to use as the seed for random number generation. + :paramtype seed: int + """ + super(RandomSamplingAlgorithm, self).__init__(**kwargs) + self.sampling_algorithm_type = 'Random' # type: str + self.rule = rule + self.seed = seed + + +class RecurrencePattern(msrest.serialization.Model): + """Recurrence schedule pattern definition. + + All required parameters must be populated in order to send to Azure. + + :ivar hours: Required. [Required] List of hours for recurrence schedule pattern. + :vartype hours: list[int] + :ivar minutes: Required. [Required] List of minutes for recurrence schedule pattern. + :vartype minutes: list[int] + :ivar weekdays: List of weekdays for recurrence schedule pattern. + :vartype weekdays: list[str or ~azure.mgmt.machinelearningservices.models.Weekday] + """ + + _validation = { + 'hours': {'required': True}, + 'minutes': {'required': True}, + } + + _attribute_map = { + 'hours': {'key': 'hours', 'type': '[int]'}, + 'minutes': {'key': 'minutes', 'type': '[int]'}, + 'weekdays': {'key': 'weekdays', 'type': '[str]'}, + } + + def __init__( + self, + *, + hours: List[int], + minutes: List[int], + weekdays: Optional[List[Union[str, "Weekday"]]] = None, + **kwargs + ): + """ + :keyword hours: Required. [Required] List of hours for recurrence schedule pattern. + :paramtype hours: list[int] + :keyword minutes: Required. [Required] List of minutes for recurrence schedule pattern. + :paramtype minutes: list[int] + :keyword weekdays: List of weekdays for recurrence schedule pattern. + :paramtype weekdays: list[str or ~azure.mgmt.machinelearningservices.models.Weekday] + """ + super(RecurrencePattern, self).__init__(**kwargs) + self.hours = hours + self.minutes = minutes + self.weekdays = weekdays + + +class RecurrenceSchedule(ScheduleBase): + """Recurrence schedule definition. + + All required parameters must be populated in order to send to Azure. + + :ivar end_time: Specifies end time of schedule in ISO 8601 format. + If not present, the schedule will run indefinitely. + :vartype end_time: ~datetime.datetime + :ivar schedule_status: Specifies the schedule's status. Possible values include: "Enabled", + "Disabled". + :vartype schedule_status: str or ~azure.mgmt.machinelearningservices.models.ScheduleStatus + :ivar schedule_type: Required. [Required] Specifies the schedule type.Constant filled by + server. Possible values include: "Cron", "Recurrence". + :vartype schedule_type: str or ~azure.mgmt.machinelearningservices.models.ScheduleType + :ivar start_time: Specifies start time of schedule in ISO 8601 format. + :vartype start_time: ~datetime.datetime + :ivar time_zone: Specifies time zone in which the schedule runs. + TimeZone should follow Windows time zone format. + :vartype time_zone: str + :ivar frequency: Required. [Required] Specifies frequency with with which to trigger schedule. + Possible values include: "Minute", "Hour", "Day", "Week", "Month". + :vartype frequency: str or ~azure.mgmt.machinelearningservices.models.RecurrenceFrequency + :ivar interval: Required. [Required] Specifies schedule interval in conjunction with frequency. + :vartype interval: int + :ivar pattern: Specifies the recurrence schedule pattern. + :vartype pattern: ~azure.mgmt.machinelearningservices.models.RecurrencePattern + """ + + _validation = { + 'schedule_type': {'required': True}, + 'frequency': {'required': True}, + 'interval': {'required': True}, + } + + _attribute_map = { + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'schedule_status': {'key': 'scheduleStatus', 'type': 'str'}, + 'schedule_type': {'key': 'scheduleType', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'frequency': {'key': 'frequency', 'type': 'str'}, + 'interval': {'key': 'interval', 'type': 'int'}, + 'pattern': {'key': 'pattern', 'type': 'RecurrencePattern'}, + } + + def __init__( + self, + *, + frequency: Union[str, "RecurrenceFrequency"], + interval: int, + end_time: Optional[datetime.datetime] = None, + schedule_status: Optional[Union[str, "ScheduleStatus"]] = None, + start_time: Optional[datetime.datetime] = None, + time_zone: Optional[str] = "UTC", + pattern: Optional["RecurrencePattern"] = None, + **kwargs + ): + """ + :keyword end_time: Specifies end time of schedule in ISO 8601 format. + If not present, the schedule will run indefinitely. + :paramtype end_time: ~datetime.datetime + :keyword schedule_status: Specifies the schedule's status. Possible values include: "Enabled", + "Disabled". + :paramtype schedule_status: str or ~azure.mgmt.machinelearningservices.models.ScheduleStatus + :keyword start_time: Specifies start time of schedule in ISO 8601 format. + :paramtype start_time: ~datetime.datetime + :keyword time_zone: Specifies time zone in which the schedule runs. + TimeZone should follow Windows time zone format. + :paramtype time_zone: str + :keyword frequency: Required. [Required] Specifies frequency with with which to trigger + schedule. Possible values include: "Minute", "Hour", "Day", "Week", "Month". + :paramtype frequency: str or ~azure.mgmt.machinelearningservices.models.RecurrenceFrequency + :keyword interval: Required. [Required] Specifies schedule interval in conjunction with + frequency. + :paramtype interval: int + :keyword pattern: Specifies the recurrence schedule pattern. + :paramtype pattern: ~azure.mgmt.machinelearningservices.models.RecurrencePattern + """ + super(RecurrenceSchedule, self).__init__(end_time=end_time, schedule_status=schedule_status, start_time=start_time, time_zone=time_zone, **kwargs) + self.schedule_type = 'Recurrence' # type: str + self.frequency = frequency + self.interval = interval + self.pattern = pattern + + +class RegenerateEndpointKeysRequest(msrest.serialization.Model): + """RegenerateEndpointKeysRequest. + + All required parameters must be populated in order to send to Azure. + + :ivar key_type: Required. [Required] Specification for which type of key to generate. Primary + or Secondary. Possible values include: "Primary", "Secondary". + :vartype key_type: str or ~azure.mgmt.machinelearningservices.models.KeyType + :ivar key_value: The value the key is set to. + :vartype key_value: str + """ + + _validation = { + 'key_type': {'required': True}, + } + + _attribute_map = { + 'key_type': {'key': 'keyType', 'type': 'str'}, + 'key_value': {'key': 'keyValue', 'type': 'str'}, + } + + def __init__( + self, + *, + key_type: Union[str, "KeyType"], + key_value: Optional[str] = None, + **kwargs + ): + """ + :keyword key_type: Required. [Required] Specification for which type of key to generate. + Primary or Secondary. Possible values include: "Primary", "Secondary". + :paramtype key_type: str or ~azure.mgmt.machinelearningservices.models.KeyType + :keyword key_value: The value the key is set to. + :paramtype key_value: str + """ + super(RegenerateEndpointKeysRequest, self).__init__(**kwargs) + self.key_type = key_type + self.key_value = key_value + + +class RegistryListCredentialsResult(msrest.serialization.Model): + """RegistryListCredentialsResult. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar location: + :vartype location: str + :ivar username: + :vartype username: str + :ivar passwords: + :vartype passwords: list[~azure.mgmt.machinelearningservices.models.Password] + """ + + _validation = { + 'location': {'readonly': True}, + 'username': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'passwords': {'key': 'passwords', 'type': '[Password]'}, + } + + def __init__( + self, + *, + passwords: Optional[List["Password"]] = None, + **kwargs + ): + """ + :keyword passwords: + :paramtype passwords: list[~azure.mgmt.machinelearningservices.models.Password] + """ + super(RegistryListCredentialsResult, self).__init__(**kwargs) + self.location = None + self.username = None + self.passwords = passwords + + +class ResourceConfiguration(msrest.serialization.Model): + """ResourceConfiguration. + + :ivar instance_count: Optional number of instances or nodes used by the compute target. + :vartype instance_count: int + :ivar instance_type: Optional type of VM used as supported by the compute target. + :vartype instance_type: str + :ivar properties: Additional properties bag. + :vartype properties: dict[str, any] + """ + + _attribute_map = { + 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + 'instance_type': {'key': 'instanceType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{object}'}, + } + + def __init__( + self, + *, + instance_count: Optional[int] = 1, + instance_type: Optional[str] = None, + properties: Optional[Dict[str, Any]] = None, + **kwargs + ): + """ + :keyword instance_count: Optional number of instances or nodes used by the compute target. + :paramtype instance_count: int + :keyword instance_type: Optional type of VM used as supported by the compute target. + :paramtype instance_type: str + :keyword properties: Additional properties bag. + :paramtype properties: dict[str, any] + """ + super(ResourceConfiguration, self).__init__(**kwargs) + self.instance_count = instance_count + self.instance_type = instance_type + self.properties = properties + + +class ResourceId(msrest.serialization.Model): + """Represents a resource ID. For example, for a subnet, it is the resource URL for the subnet. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Required. The ID of the resource. + :vartype id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: str, + **kwargs + ): + """ + :keyword id: Required. The ID of the resource. + :paramtype id: str + """ + super(ResourceId, self).__init__(**kwargs) + self.id = id + + +class ResourceName(msrest.serialization.Model): + """The Resource Name. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The name of the resource. + :vartype value: str + :ivar localized_value: The localized name of the resource. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ResourceName, self).__init__(**kwargs) + self.value = None + self.localized_value = None + + +class ResourceQuota(msrest.serialization.Model): + """The quota assigned to a resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Specifies the resource ID. + :vartype id: str + :ivar aml_workspace_location: Region of the AML workspace in the id. + :vartype aml_workspace_location: str + :ivar type: Specifies the resource type. + :vartype type: str + :ivar name: Name of the resource. + :vartype name: ~azure.mgmt.machinelearningservices.models.ResourceName + :ivar limit: The maximum permitted quota of the resource. + :vartype limit: long + :ivar unit: An enum describing the unit of quota measurement. Possible values include: "Count". + :vartype unit: str or ~azure.mgmt.machinelearningservices.models.QuotaUnit + """ + + _validation = { + 'id': {'readonly': True}, + 'aml_workspace_location': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'aml_workspace_location': {'key': 'amlWorkspaceLocation', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'ResourceName'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ResourceQuota, self).__init__(**kwargs) + self.id = None + self.aml_workspace_location = None + self.type = None + self.name = None + self.limit = None + self.unit = None + + +class Route(msrest.serialization.Model): + """Route. + + All required parameters must be populated in order to send to Azure. + + :ivar path: Required. [Required] The path for the route. + :vartype path: str + :ivar port: Required. [Required] The port for the route. + :vartype port: int + """ + + _validation = { + 'path': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + 'port': {'required': True}, + } + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__( + self, + *, + path: str, + port: int, + **kwargs + ): + """ + :keyword path: Required. [Required] The path for the route. + :paramtype path: str + :keyword port: Required. [Required] The port for the route. + :paramtype port: int + """ + super(Route, self).__init__(**kwargs) + self.path = path + self.port = port + + +class SASAuthTypeWorkspaceConnectionProperties(WorkspaceConnectionPropertiesV2): + """SASAuthTypeWorkspaceConnectionProperties. + + All required parameters must be populated in order to send to Azure. + + :ivar auth_type: Required. Authentication type of the connection target.Constant filled by + server. Possible values include: "PAT", "ManagedIdentity", "UsernamePassword", "None", "SAS". + :vartype auth_type: str or ~azure.mgmt.machinelearningservices.models.ConnectionAuthType + :ivar category: Category of the connection. Possible values include: "PythonFeed", + "ContainerRegistry", "Git". + :vartype category: str or ~azure.mgmt.machinelearningservices.models.ConnectionCategory + :ivar target: + :vartype target: str + :ivar value: Value details of the workspace connection. + :vartype value: str + :ivar value_format: format for the workspace connection value. Possible values include: "JSON". + :vartype value_format: str or ~azure.mgmt.machinelearningservices.models.ValueFormat + :ivar credentials: + :vartype credentials: + ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionSharedAccessSignature + """ + + _validation = { + 'auth_type': {'required': True}, + } + + _attribute_map = { + 'auth_type': {'key': 'authType', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'value_format': {'key': 'valueFormat', 'type': 'str'}, + 'credentials': {'key': 'credentials', 'type': 'WorkspaceConnectionSharedAccessSignature'}, + } + + def __init__( + self, + *, + category: Optional[Union[str, "ConnectionCategory"]] = None, + target: Optional[str] = None, + value: Optional[str] = None, + value_format: Optional[Union[str, "ValueFormat"]] = None, + credentials: Optional["WorkspaceConnectionSharedAccessSignature"] = None, + **kwargs + ): + """ + :keyword category: Category of the connection. Possible values include: "PythonFeed", + "ContainerRegistry", "Git". + :paramtype category: str or ~azure.mgmt.machinelearningservices.models.ConnectionCategory + :keyword target: + :paramtype target: str + :keyword value: Value details of the workspace connection. + :paramtype value: str + :keyword value_format: format for the workspace connection value. Possible values include: + "JSON". + :paramtype value_format: str or ~azure.mgmt.machinelearningservices.models.ValueFormat + :keyword credentials: + :paramtype credentials: + ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionSharedAccessSignature + """ + super(SASAuthTypeWorkspaceConnectionProperties, self).__init__(category=category, target=target, value=value, value_format=value_format, **kwargs) + self.auth_type = 'SAS' # type: str + self.credentials = credentials + + +class SasDatastoreCredentials(DatastoreCredentials): + """SAS datastore credentials configuration. + + All required parameters must be populated in order to send to Azure. + + :ivar credentials_type: Required. [Required] Credential type used to authentication with + storage.Constant filled by server. Possible values include: "AccountKey", "Certificate", + "None", "Sas", "ServicePrincipal". + :vartype credentials_type: str or ~azure.mgmt.machinelearningservices.models.CredentialsType + :ivar secrets: Required. [Required] Storage container secrets. + :vartype secrets: ~azure.mgmt.machinelearningservices.models.SasDatastoreSecrets + """ + + _validation = { + 'credentials_type': {'required': True}, + 'secrets': {'required': True}, + } + + _attribute_map = { + 'credentials_type': {'key': 'credentialsType', 'type': 'str'}, + 'secrets': {'key': 'secrets', 'type': 'SasDatastoreSecrets'}, + } + + def __init__( + self, + *, + secrets: "SasDatastoreSecrets", + **kwargs + ): + """ + :keyword secrets: Required. [Required] Storage container secrets. + :paramtype secrets: ~azure.mgmt.machinelearningservices.models.SasDatastoreSecrets + """ + super(SasDatastoreCredentials, self).__init__(**kwargs) + self.credentials_type = 'Sas' # type: str + self.secrets = secrets + + +class SasDatastoreSecrets(DatastoreSecrets): + """Datastore SAS secrets. + + All required parameters must be populated in order to send to Azure. + + :ivar secrets_type: Required. [Required] Credential type used to authentication with + storage.Constant filled by server. Possible values include: "AccountKey", "Certificate", "Sas", + "ServicePrincipal". + :vartype secrets_type: str or ~azure.mgmt.machinelearningservices.models.SecretsType + :ivar sas_token: Storage container SAS token. + :vartype sas_token: str + """ + + _validation = { + 'secrets_type': {'required': True}, + } + + _attribute_map = { + 'secrets_type': {'key': 'secretsType', 'type': 'str'}, + 'sas_token': {'key': 'sasToken', 'type': 'str'}, + } + + def __init__( + self, + *, + sas_token: Optional[str] = None, + **kwargs + ): + """ + :keyword sas_token: Storage container SAS token. + :paramtype sas_token: str + """ + super(SasDatastoreSecrets, self).__init__(**kwargs) + self.secrets_type = 'Sas' # type: str + self.sas_token = sas_token + + +class ScaleSettings(msrest.serialization.Model): + """scale settings for AML Compute. + + All required parameters must be populated in order to send to Azure. + + :ivar max_node_count: Required. Max number of nodes to use. + :vartype max_node_count: int + :ivar min_node_count: Min number of nodes to use. + :vartype min_node_count: int + :ivar node_idle_time_before_scale_down: Node Idle Time before scaling down amlCompute. This + string needs to be in the RFC Format. + :vartype node_idle_time_before_scale_down: ~datetime.timedelta + """ + + _validation = { + 'max_node_count': {'required': True}, + } + + _attribute_map = { + 'max_node_count': {'key': 'maxNodeCount', 'type': 'int'}, + 'min_node_count': {'key': 'minNodeCount', 'type': 'int'}, + 'node_idle_time_before_scale_down': {'key': 'nodeIdleTimeBeforeScaleDown', 'type': 'duration'}, + } + + def __init__( + self, + *, + max_node_count: int, + min_node_count: Optional[int] = 0, + node_idle_time_before_scale_down: Optional[datetime.timedelta] = None, + **kwargs + ): + """ + :keyword max_node_count: Required. Max number of nodes to use. + :paramtype max_node_count: int + :keyword min_node_count: Min number of nodes to use. + :paramtype min_node_count: int + :keyword node_idle_time_before_scale_down: Node Idle Time before scaling down amlCompute. This + string needs to be in the RFC Format. + :paramtype node_idle_time_before_scale_down: ~datetime.timedelta + """ + super(ScaleSettings, self).__init__(**kwargs) + self.max_node_count = max_node_count + self.min_node_count = min_node_count + self.node_idle_time_before_scale_down = node_idle_time_before_scale_down + + +class ScaleSettingsInformation(msrest.serialization.Model): + """Desired scale settings for the amlCompute. + + :ivar scale_settings: scale settings for AML Compute. + :vartype scale_settings: ~azure.mgmt.machinelearningservices.models.ScaleSettings + """ + + _attribute_map = { + 'scale_settings': {'key': 'scaleSettings', 'type': 'ScaleSettings'}, + } + + def __init__( + self, + *, + scale_settings: Optional["ScaleSettings"] = None, + **kwargs + ): + """ + :keyword scale_settings: scale settings for AML Compute. + :paramtype scale_settings: ~azure.mgmt.machinelearningservices.models.ScaleSettings + """ + super(ScaleSettingsInformation, self).__init__(**kwargs) + self.scale_settings = scale_settings + + +class ScriptReference(msrest.serialization.Model): + """Script reference. + + :ivar script_source: The storage source of the script: inline, workspace. + :vartype script_source: str + :ivar script_data: The location of scripts in the mounted volume. + :vartype script_data: str + :ivar script_arguments: Optional command line arguments passed to the script to run. + :vartype script_arguments: str + :ivar timeout: Optional time period passed to timeout command. + :vartype timeout: str + """ + + _attribute_map = { + 'script_source': {'key': 'scriptSource', 'type': 'str'}, + 'script_data': {'key': 'scriptData', 'type': 'str'}, + 'script_arguments': {'key': 'scriptArguments', 'type': 'str'}, + 'timeout': {'key': 'timeout', 'type': 'str'}, + } + + def __init__( + self, + *, + script_source: Optional[str] = None, + script_data: Optional[str] = None, + script_arguments: Optional[str] = None, + timeout: Optional[str] = None, + **kwargs + ): + """ + :keyword script_source: The storage source of the script: inline, workspace. + :paramtype script_source: str + :keyword script_data: The location of scripts in the mounted volume. + :paramtype script_data: str + :keyword script_arguments: Optional command line arguments passed to the script to run. + :paramtype script_arguments: str + :keyword timeout: Optional time period passed to timeout command. + :paramtype timeout: str + """ + super(ScriptReference, self).__init__(**kwargs) + self.script_source = script_source + self.script_data = script_data + self.script_arguments = script_arguments + self.timeout = timeout + + +class ScriptsToExecute(msrest.serialization.Model): + """Customized setup scripts. + + :ivar startup_script: Script that's run every time the machine starts. + :vartype startup_script: ~azure.mgmt.machinelearningservices.models.ScriptReference + :ivar creation_script: Script that's run only once during provision of the compute. + :vartype creation_script: ~azure.mgmt.machinelearningservices.models.ScriptReference + """ + + _attribute_map = { + 'startup_script': {'key': 'startupScript', 'type': 'ScriptReference'}, + 'creation_script': {'key': 'creationScript', 'type': 'ScriptReference'}, + } + + def __init__( + self, + *, + startup_script: Optional["ScriptReference"] = None, + creation_script: Optional["ScriptReference"] = None, + **kwargs + ): + """ + :keyword startup_script: Script that's run every time the machine starts. + :paramtype startup_script: ~azure.mgmt.machinelearningservices.models.ScriptReference + :keyword creation_script: Script that's run only once during provision of the compute. + :paramtype creation_script: ~azure.mgmt.machinelearningservices.models.ScriptReference + """ + super(ScriptsToExecute, self).__init__(**kwargs) + self.startup_script = startup_script + self.creation_script = creation_script + + +class ServiceManagedResourcesSettings(msrest.serialization.Model): + """ServiceManagedResourcesSettings. + + :ivar cosmos_db: The settings for the service managed cosmosdb account. + :vartype cosmos_db: ~azure.mgmt.machinelearningservices.models.CosmosDbSettings + """ + + _attribute_map = { + 'cosmos_db': {'key': 'cosmosDb', 'type': 'CosmosDbSettings'}, + } + + def __init__( + self, + *, + cosmos_db: Optional["CosmosDbSettings"] = None, + **kwargs + ): + """ + :keyword cosmos_db: The settings for the service managed cosmosdb account. + :paramtype cosmos_db: ~azure.mgmt.machinelearningservices.models.CosmosDbSettings + """ + super(ServiceManagedResourcesSettings, self).__init__(**kwargs) + self.cosmos_db = cosmos_db + + +class ServicePrincipalDatastoreCredentials(DatastoreCredentials): + """Service Principal datastore credentials configuration. + + All required parameters must be populated in order to send to Azure. + + :ivar credentials_type: Required. [Required] Credential type used to authentication with + storage.Constant filled by server. Possible values include: "AccountKey", "Certificate", + "None", "Sas", "ServicePrincipal". + :vartype credentials_type: str or ~azure.mgmt.machinelearningservices.models.CredentialsType + :ivar authority_url: Authority URL used for authentication. + :vartype authority_url: str + :ivar client_id: Required. [Required] Service principal client ID. + :vartype client_id: str + :ivar resource_url: Resource the service principal has access to. + :vartype resource_url: str + :ivar secrets: Required. [Required] Service principal secrets. + :vartype secrets: ~azure.mgmt.machinelearningservices.models.ServicePrincipalDatastoreSecrets + :ivar tenant_id: Required. [Required] ID of the tenant to which the service principal belongs. + :vartype tenant_id: str + """ + + _validation = { + 'credentials_type': {'required': True}, + 'client_id': {'required': True}, + 'secrets': {'required': True}, + 'tenant_id': {'required': True}, + } + + _attribute_map = { + 'credentials_type': {'key': 'credentialsType', 'type': 'str'}, + 'authority_url': {'key': 'authorityUrl', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'resource_url': {'key': 'resourceUrl', 'type': 'str'}, + 'secrets': {'key': 'secrets', 'type': 'ServicePrincipalDatastoreSecrets'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__( + self, + *, + client_id: str, + secrets: "ServicePrincipalDatastoreSecrets", + tenant_id: str, + authority_url: Optional[str] = None, + resource_url: Optional[str] = None, + **kwargs + ): + """ + :keyword authority_url: Authority URL used for authentication. + :paramtype authority_url: str + :keyword client_id: Required. [Required] Service principal client ID. + :paramtype client_id: str + :keyword resource_url: Resource the service principal has access to. + :paramtype resource_url: str + :keyword secrets: Required. [Required] Service principal secrets. + :paramtype secrets: ~azure.mgmt.machinelearningservices.models.ServicePrincipalDatastoreSecrets + :keyword tenant_id: Required. [Required] ID of the tenant to which the service principal + belongs. + :paramtype tenant_id: str + """ + super(ServicePrincipalDatastoreCredentials, self).__init__(**kwargs) + self.credentials_type = 'ServicePrincipal' # type: str + self.authority_url = authority_url + self.client_id = client_id + self.resource_url = resource_url + self.secrets = secrets + self.tenant_id = tenant_id + + +class ServicePrincipalDatastoreSecrets(DatastoreSecrets): + """Datastore Service Principal secrets. + + All required parameters must be populated in order to send to Azure. + + :ivar secrets_type: Required. [Required] Credential type used to authentication with + storage.Constant filled by server. Possible values include: "AccountKey", "Certificate", "Sas", + "ServicePrincipal". + :vartype secrets_type: str or ~azure.mgmt.machinelearningservices.models.SecretsType + :ivar client_secret: Service principal secret. + :vartype client_secret: str + """ + + _validation = { + 'secrets_type': {'required': True}, + } + + _attribute_map = { + 'secrets_type': {'key': 'secretsType', 'type': 'str'}, + 'client_secret': {'key': 'clientSecret', 'type': 'str'}, + } + + def __init__( + self, + *, + client_secret: Optional[str] = None, + **kwargs + ): + """ + :keyword client_secret: Service principal secret. + :paramtype client_secret: str + """ + super(ServicePrincipalDatastoreSecrets, self).__init__(**kwargs) + self.secrets_type = 'ServicePrincipal' # type: str + self.client_secret = client_secret + + +class SetupScripts(msrest.serialization.Model): + """Details of customized scripts to execute for setting up the cluster. + + :ivar scripts: Customized setup scripts. + :vartype scripts: ~azure.mgmt.machinelearningservices.models.ScriptsToExecute + """ + + _attribute_map = { + 'scripts': {'key': 'scripts', 'type': 'ScriptsToExecute'}, + } + + def __init__( + self, + *, + scripts: Optional["ScriptsToExecute"] = None, + **kwargs + ): + """ + :keyword scripts: Customized setup scripts. + :paramtype scripts: ~azure.mgmt.machinelearningservices.models.ScriptsToExecute + """ + super(SetupScripts, self).__init__(**kwargs) + self.scripts = scripts + + +class SharedPrivateLinkResource(msrest.serialization.Model): + """SharedPrivateLinkResource. + + :ivar name: Unique name of the private link. + :vartype name: str + :ivar private_link_resource_id: The resource id that private link links to. + :vartype private_link_resource_id: str + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar request_message: Request message. + :vartype request_message: str + :ivar status: Indicates whether the connection has been Approved/Rejected/Removed by the owner + of the service. Possible values include: "Pending", "Approved", "Rejected", "Disconnected", + "Timeout". + :vartype status: str or + ~azure.mgmt.machinelearningservices.models.PrivateEndpointServiceConnectionStatus + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'private_link_resource_id': {'key': 'properties.privateLinkResourceId', 'type': 'str'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'request_message': {'key': 'properties.requestMessage', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + private_link_resource_id: Optional[str] = None, + group_id: Optional[str] = None, + request_message: Optional[str] = None, + status: Optional[Union[str, "PrivateEndpointServiceConnectionStatus"]] = None, + **kwargs + ): + """ + :keyword name: Unique name of the private link. + :paramtype name: str + :keyword private_link_resource_id: The resource id that private link links to. + :paramtype private_link_resource_id: str + :keyword group_id: The private link resource group id. + :paramtype group_id: str + :keyword request_message: Request message. + :paramtype request_message: str + :keyword status: Indicates whether the connection has been Approved/Rejected/Removed by the + owner of the service. Possible values include: "Pending", "Approved", "Rejected", + "Disconnected", "Timeout". + :paramtype status: str or + ~azure.mgmt.machinelearningservices.models.PrivateEndpointServiceConnectionStatus + """ + super(SharedPrivateLinkResource, self).__init__(**kwargs) + self.name = name + self.private_link_resource_id = private_link_resource_id + self.group_id = group_id + self.request_message = request_message + self.status = status + + +class Sku(msrest.serialization.Model): + """The resource model definition representing SKU. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The name of the SKU. Ex - P3. It is typically a letter+number code. + :vartype name: str + :ivar tier: This field is required to be implemented by the Resource Provider if the service + has more than one tier, but is not required on a PUT. Possible values include: "Free", "Basic", + "Standard", "Premium". + :vartype tier: str or ~azure.mgmt.machinelearningservices.models.SkuTier + :ivar size: The SKU size. When the name field is the combination of tier and some other value, + this would be the standalone code. + :vartype size: str + :ivar family: If the service has different generations of hardware, for the same SKU, then that + can be captured here. + :vartype family: str + :ivar capacity: If the SKU supports scale out/in then the capacity integer should be included. + If scale out/in is not possible for the resource this may be omitted. + :vartype capacity: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__( + self, + *, + name: str, + tier: Optional[Union[str, "SkuTier"]] = None, + size: Optional[str] = None, + family: Optional[str] = None, + capacity: Optional[int] = None, + **kwargs + ): + """ + :keyword name: Required. The name of the SKU. Ex - P3. It is typically a letter+number code. + :paramtype name: str + :keyword tier: This field is required to be implemented by the Resource Provider if the service + has more than one tier, but is not required on a PUT. Possible values include: "Free", "Basic", + "Standard", "Premium". + :paramtype tier: str or ~azure.mgmt.machinelearningservices.models.SkuTier + :keyword size: The SKU size. When the name field is the combination of tier and some other + value, this would be the standalone code. + :paramtype size: str + :keyword family: If the service has different generations of hardware, for the same SKU, then + that can be captured here. + :paramtype family: str + :keyword capacity: If the SKU supports scale out/in then the capacity integer should be + included. If scale out/in is not possible for the resource this may be omitted. + :paramtype capacity: int + """ + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.size = size + self.family = family + self.capacity = capacity + + +class SkuCapacity(msrest.serialization.Model): + """SKU capacity information. + + :ivar default: Gets or sets the default capacity. + :vartype default: int + :ivar maximum: Gets or sets the maximum. + :vartype maximum: int + :ivar minimum: Gets or sets the minimum. + :vartype minimum: int + :ivar scale_type: Gets or sets the type of the scale. Possible values include: "Automatic", + "Manual", "None". + :vartype scale_type: str or ~azure.mgmt.machinelearningservices.models.SkuScaleType + """ + + _attribute_map = { + 'default': {'key': 'default', 'type': 'int'}, + 'maximum': {'key': 'maximum', 'type': 'int'}, + 'minimum': {'key': 'minimum', 'type': 'int'}, + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + } + + def __init__( + self, + *, + default: Optional[int] = 0, + maximum: Optional[int] = 0, + minimum: Optional[int] = 0, + scale_type: Optional[Union[str, "SkuScaleType"]] = None, + **kwargs + ): + """ + :keyword default: Gets or sets the default capacity. + :paramtype default: int + :keyword maximum: Gets or sets the maximum. + :paramtype maximum: int + :keyword minimum: Gets or sets the minimum. + :paramtype minimum: int + :keyword scale_type: Gets or sets the type of the scale. Possible values include: "Automatic", + "Manual", "None". + :paramtype scale_type: str or ~azure.mgmt.machinelearningservices.models.SkuScaleType + """ + super(SkuCapacity, self).__init__(**kwargs) + self.default = default + self.maximum = maximum + self.minimum = minimum + self.scale_type = scale_type + + +class SkuResource(msrest.serialization.Model): + """Fulfills ARM Contract requirement to list all available SKUS for a resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar capacity: Gets or sets the Sku Capacity. + :vartype capacity: ~azure.mgmt.machinelearningservices.models.SkuCapacity + :ivar resource_type: The resource type name. + :vartype resource_type: str + :ivar sku: Gets or sets the Sku. + :vartype sku: ~azure.mgmt.machinelearningservices.models.SkuSetting + """ + + _validation = { + 'resource_type': {'readonly': True}, + } + + _attribute_map = { + 'capacity': {'key': 'capacity', 'type': 'SkuCapacity'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'SkuSetting'}, + } + + def __init__( + self, + *, + capacity: Optional["SkuCapacity"] = None, + sku: Optional["SkuSetting"] = None, + **kwargs + ): + """ + :keyword capacity: Gets or sets the Sku Capacity. + :paramtype capacity: ~azure.mgmt.machinelearningservices.models.SkuCapacity + :keyword sku: Gets or sets the Sku. + :paramtype sku: ~azure.mgmt.machinelearningservices.models.SkuSetting + """ + super(SkuResource, self).__init__(**kwargs) + self.capacity = capacity + self.resource_type = None + self.sku = sku + + +class SkuResourceArmPaginatedResult(msrest.serialization.Model): + """A paginated list of SkuResource entities. + + :ivar next_link: The link to the next page of SkuResource objects. If null, there are no + additional pages. + :vartype next_link: str + :ivar value: An array of objects of type SkuResource. + :vartype value: list[~azure.mgmt.machinelearningservices.models.SkuResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[SkuResource]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["SkuResource"]] = None, + **kwargs + ): + """ + :keyword next_link: The link to the next page of SkuResource objects. If null, there are no + additional pages. + :paramtype next_link: str + :keyword value: An array of objects of type SkuResource. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.SkuResource] + """ + super(SkuResourceArmPaginatedResult, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class SkuSetting(msrest.serialization.Model): + """SkuSetting fulfills the need for stripped down SKU info in ARM contract. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. [Required] The name of the SKU. Ex - P3. It is typically a letter+number + code. + :vartype name: str + :ivar tier: This field is required to be implemented by the Resource Provider if the service + has more than one tier, but is not required on a PUT. Possible values include: "Free", "Basic", + "Standard", "Premium". + :vartype tier: str or ~azure.mgmt.machinelearningservices.models.SkuTier + """ + + _validation = { + 'name': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + tier: Optional[Union[str, "SkuTier"]] = None, + **kwargs + ): + """ + :keyword name: Required. [Required] The name of the SKU. Ex - P3. It is typically a + letter+number code. + :paramtype name: str + :keyword tier: This field is required to be implemented by the Resource Provider if the service + has more than one tier, but is not required on a PUT. Possible values include: "Free", "Basic", + "Standard", "Premium". + :paramtype tier: str or ~azure.mgmt.machinelearningservices.models.SkuTier + """ + super(SkuSetting, self).__init__(**kwargs) + self.name = name + self.tier = tier + + +class SslConfiguration(msrest.serialization.Model): + """The ssl configuration for scoring. + + :ivar status: Enable or disable ssl for scoring. Possible values include: "Disabled", + "Enabled", "Auto". + :vartype status: str or ~azure.mgmt.machinelearningservices.models.SslConfigurationStatus + :ivar cert: Cert data. + :vartype cert: str + :ivar key: Key data. + :vartype key: str + :ivar cname: CNAME of the cert. + :vartype cname: str + :ivar leaf_domain_label: Leaf domain label of public endpoint. + :vartype leaf_domain_label: str + :ivar overwrite_existing_domain: Indicates whether to overwrite existing domain label. + :vartype overwrite_existing_domain: bool + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'cert': {'key': 'cert', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'str'}, + 'cname': {'key': 'cname', 'type': 'str'}, + 'leaf_domain_label': {'key': 'leafDomainLabel', 'type': 'str'}, + 'overwrite_existing_domain': {'key': 'overwriteExistingDomain', 'type': 'bool'}, + } + + def __init__( + self, + *, + status: Optional[Union[str, "SslConfigurationStatus"]] = None, + cert: Optional[str] = None, + key: Optional[str] = None, + cname: Optional[str] = None, + leaf_domain_label: Optional[str] = None, + overwrite_existing_domain: Optional[bool] = None, + **kwargs + ): + """ + :keyword status: Enable or disable ssl for scoring. Possible values include: "Disabled", + "Enabled", "Auto". + :paramtype status: str or ~azure.mgmt.machinelearningservices.models.SslConfigurationStatus + :keyword cert: Cert data. + :paramtype cert: str + :keyword key: Key data. + :paramtype key: str + :keyword cname: CNAME of the cert. + :paramtype cname: str + :keyword leaf_domain_label: Leaf domain label of public endpoint. + :paramtype leaf_domain_label: str + :keyword overwrite_existing_domain: Indicates whether to overwrite existing domain label. + :paramtype overwrite_existing_domain: bool + """ + super(SslConfiguration, self).__init__(**kwargs) + self.status = status + self.cert = cert + self.key = key + self.cname = cname + self.leaf_domain_label = leaf_domain_label + self.overwrite_existing_domain = overwrite_existing_domain + + +class SweepJob(JobBaseDetails): + """Sweep job definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar compute_id: ARM resource ID of the compute resource. + :vartype compute_id: str + :ivar display_name: Display name of job. + :vartype display_name: str + :ivar experiment_name: The name of the experiment the job belongs to. If not set, the job is + placed in the "Default" experiment. + :vartype experiment_name: str + :ivar identity: Identity configuration. If set, this should be one of AmlToken, + ManagedIdentity, UserIdentity or null. + Defaults to AmlToken if null. + :vartype identity: ~azure.mgmt.machinelearningservices.models.IdentityConfiguration + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar job_type: Required. [Required] Specifies the type of job.Constant filled by server. + Possible values include: "Command", "Sweep", "Pipeline". + :vartype job_type: str or ~azure.mgmt.machinelearningservices.models.JobType + :ivar services: List of JobEndpoints. + For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + :vartype services: dict[str, ~azure.mgmt.machinelearningservices.models.JobService] + :ivar status: Status of the job. Possible values include: "NotStarted", "Starting", + "Provisioning", "Preparing", "Queued", "Running", "Finalizing", "CancelRequested", "Completed", + "Failed", "Canceled", "NotResponding", "Paused", "Unknown". + :vartype status: str or ~azure.mgmt.machinelearningservices.models.JobStatus + :ivar early_termination: Early termination policies enable canceling poor-performing runs + before they complete. + :vartype early_termination: ~azure.mgmt.machinelearningservices.models.EarlyTerminationPolicy + :ivar inputs: Mapping of input data bindings used in the job. + :vartype inputs: dict[str, ~azure.mgmt.machinelearningservices.models.JobInput] + :ivar limits: Sweep Job limit. + :vartype limits: ~azure.mgmt.machinelearningservices.models.SweepJobLimits + :ivar objective: Required. [Required] Optimization objective. + :vartype objective: ~azure.mgmt.machinelearningservices.models.Objective + :ivar outputs: Mapping of output data bindings used in the job. + :vartype outputs: dict[str, ~azure.mgmt.machinelearningservices.models.JobOutput] + :ivar sampling_algorithm: Required. [Required] The hyperparameter sampling algorithm. + :vartype sampling_algorithm: ~azure.mgmt.machinelearningservices.models.SamplingAlgorithm + :ivar search_space: Required. [Required] A dictionary containing each parameter and its + distribution. The dictionary key is the name of the parameter. + :vartype search_space: any + :ivar trial: Required. [Required] Trial component definition. + :vartype trial: ~azure.mgmt.machinelearningservices.models.TrialComponent + """ + + _validation = { + 'job_type': {'required': True}, + 'status': {'readonly': True}, + 'objective': {'required': True}, + 'sampling_algorithm': {'required': True}, + 'search_space': {'required': True}, + 'trial': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'compute_id': {'key': 'computeId', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'experiment_name': {'key': 'experimentName', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'IdentityConfiguration'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'job_type': {'key': 'jobType', 'type': 'str'}, + 'services': {'key': 'services', 'type': '{JobService}'}, + 'status': {'key': 'status', 'type': 'str'}, + 'early_termination': {'key': 'earlyTermination', 'type': 'EarlyTerminationPolicy'}, + 'inputs': {'key': 'inputs', 'type': '{JobInput}'}, + 'limits': {'key': 'limits', 'type': 'SweepJobLimits'}, + 'objective': {'key': 'objective', 'type': 'Objective'}, + 'outputs': {'key': 'outputs', 'type': '{JobOutput}'}, + 'sampling_algorithm': {'key': 'samplingAlgorithm', 'type': 'SamplingAlgorithm'}, + 'search_space': {'key': 'searchSpace', 'type': 'object'}, + 'trial': {'key': 'trial', 'type': 'TrialComponent'}, + } + + def __init__( + self, + *, + objective: "Objective", + sampling_algorithm: "SamplingAlgorithm", + search_space: Any, + trial: "TrialComponent", + description: Optional[str] = None, + properties: Optional[Dict[str, str]] = None, + tags: Optional[Dict[str, str]] = None, + compute_id: Optional[str] = None, + display_name: Optional[str] = None, + experiment_name: Optional[str] = "Default", + identity: Optional["IdentityConfiguration"] = None, + is_archived: Optional[bool] = False, + services: Optional[Dict[str, "JobService"]] = None, + early_termination: Optional["EarlyTerminationPolicy"] = None, + inputs: Optional[Dict[str, "JobInput"]] = None, + limits: Optional["SweepJobLimits"] = None, + outputs: Optional[Dict[str, "JobOutput"]] = None, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword compute_id: ARM resource ID of the compute resource. + :paramtype compute_id: str + :keyword display_name: Display name of job. + :paramtype display_name: str + :keyword experiment_name: The name of the experiment the job belongs to. If not set, the job is + placed in the "Default" experiment. + :paramtype experiment_name: str + :keyword identity: Identity configuration. If set, this should be one of AmlToken, + ManagedIdentity, UserIdentity or null. + Defaults to AmlToken if null. + :paramtype identity: ~azure.mgmt.machinelearningservices.models.IdentityConfiguration + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + :keyword services: List of JobEndpoints. + For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + :paramtype services: dict[str, ~azure.mgmt.machinelearningservices.models.JobService] + :keyword early_termination: Early termination policies enable canceling poor-performing runs + before they complete. + :paramtype early_termination: ~azure.mgmt.machinelearningservices.models.EarlyTerminationPolicy + :keyword inputs: Mapping of input data bindings used in the job. + :paramtype inputs: dict[str, ~azure.mgmt.machinelearningservices.models.JobInput] + :keyword limits: Sweep Job limit. + :paramtype limits: ~azure.mgmt.machinelearningservices.models.SweepJobLimits + :keyword objective: Required. [Required] Optimization objective. + :paramtype objective: ~azure.mgmt.machinelearningservices.models.Objective + :keyword outputs: Mapping of output data bindings used in the job. + :paramtype outputs: dict[str, ~azure.mgmt.machinelearningservices.models.JobOutput] + :keyword sampling_algorithm: Required. [Required] The hyperparameter sampling algorithm. + :paramtype sampling_algorithm: ~azure.mgmt.machinelearningservices.models.SamplingAlgorithm + :keyword search_space: Required. [Required] A dictionary containing each parameter and its + distribution. The dictionary key is the name of the parameter. + :paramtype search_space: any + :keyword trial: Required. [Required] Trial component definition. + :paramtype trial: ~azure.mgmt.machinelearningservices.models.TrialComponent + """ + super(SweepJob, self).__init__(description=description, properties=properties, tags=tags, compute_id=compute_id, display_name=display_name, experiment_name=experiment_name, identity=identity, is_archived=is_archived, services=services, **kwargs) + self.job_type = 'Sweep' # type: str + self.early_termination = early_termination + self.inputs = inputs + self.limits = limits + self.objective = objective + self.outputs = outputs + self.sampling_algorithm = sampling_algorithm + self.search_space = search_space + self.trial = trial + + +class SweepJobLimits(JobLimits): + """Sweep Job limit class. + + All required parameters must be populated in order to send to Azure. + + :ivar job_limits_type: Required. [Required] JobLimit type.Constant filled by server. Possible + values include: "Command", "Sweep". + :vartype job_limits_type: str or ~azure.mgmt.machinelearningservices.models.JobLimitsType + :ivar timeout: The max run duration in ISO 8601 format, after which the job will be cancelled. + Only supports duration with precision as low as Seconds. + :vartype timeout: ~datetime.timedelta + :ivar max_concurrent_trials: Sweep Job max concurrent trials. + :vartype max_concurrent_trials: int + :ivar max_total_trials: Sweep Job max total trials. + :vartype max_total_trials: int + :ivar trial_timeout: Sweep Job Trial timeout value. + :vartype trial_timeout: ~datetime.timedelta + """ + + _validation = { + 'job_limits_type': {'required': True}, + } + + _attribute_map = { + 'job_limits_type': {'key': 'jobLimitsType', 'type': 'str'}, + 'timeout': {'key': 'timeout', 'type': 'duration'}, + 'max_concurrent_trials': {'key': 'maxConcurrentTrials', 'type': 'int'}, + 'max_total_trials': {'key': 'maxTotalTrials', 'type': 'int'}, + 'trial_timeout': {'key': 'trialTimeout', 'type': 'duration'}, + } + + def __init__( + self, + *, + timeout: Optional[datetime.timedelta] = None, + max_concurrent_trials: Optional[int] = None, + max_total_trials: Optional[int] = None, + trial_timeout: Optional[datetime.timedelta] = None, + **kwargs + ): + """ + :keyword timeout: The max run duration in ISO 8601 format, after which the job will be + cancelled. Only supports duration with precision as low as Seconds. + :paramtype timeout: ~datetime.timedelta + :keyword max_concurrent_trials: Sweep Job max concurrent trials. + :paramtype max_concurrent_trials: int + :keyword max_total_trials: Sweep Job max total trials. + :paramtype max_total_trials: int + :keyword trial_timeout: Sweep Job Trial timeout value. + :paramtype trial_timeout: ~datetime.timedelta + """ + super(SweepJobLimits, self).__init__(timeout=timeout, **kwargs) + self.job_limits_type = 'Sweep' # type: str + self.max_concurrent_trials = max_concurrent_trials + self.max_total_trials = max_total_trials + self.trial_timeout = trial_timeout + + +class SynapseSpark(Compute): + """A SynapseSpark compute. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values + include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", + "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark". + :vartype compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType + :ivar compute_location: Location for the underlying compute. + :vartype compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values are Unknown, + Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating", + "Creating", "Deleting", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :ivar description: The description of the Machine Learning compute. + :vartype description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: ~datetime.datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: ~datetime.datetime + :ivar resource_id: ARM resource id of the underlying compute. + :vartype resource_id: str + :ivar provisioning_errors: Errors during provisioning. + :vartype provisioning_errors: list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought + from outside if true, or machine learning service provisioned it if false. + :vartype is_attached_compute: bool + :ivar disable_local_auth: Opt-out of local authentication and ensure customers can use only MSI + and AAD exclusively for authentication. + :vartype disable_local_auth: bool + :ivar properties: + :vartype properties: ~azure.mgmt.machinelearningservices.models.SynapseSparkProperties + """ + + _validation = { + 'compute_type': {'required': True}, + 'compute_location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'readonly': True}, + } + + _attribute_map = { + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + 'properties': {'key': 'properties', 'type': 'SynapseSparkProperties'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + resource_id: Optional[str] = None, + disable_local_auth: Optional[bool] = None, + properties: Optional["SynapseSparkProperties"] = None, + **kwargs + ): + """ + :keyword description: The description of the Machine Learning compute. + :paramtype description: str + :keyword resource_id: ARM resource id of the underlying compute. + :paramtype resource_id: str + :keyword disable_local_auth: Opt-out of local authentication and ensure customers can use only + MSI and AAD exclusively for authentication. + :paramtype disable_local_auth: bool + :keyword properties: + :paramtype properties: ~azure.mgmt.machinelearningservices.models.SynapseSparkProperties + """ + super(SynapseSpark, self).__init__(description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, **kwargs) + self.compute_type = 'SynapseSpark' # type: str + self.properties = properties + + +class SynapseSparkProperties(msrest.serialization.Model): + """SynapseSparkProperties. + + :ivar auto_scale_properties: Auto scale properties. + :vartype auto_scale_properties: ~azure.mgmt.machinelearningservices.models.AutoScaleProperties + :ivar auto_pause_properties: Auto pause properties. + :vartype auto_pause_properties: ~azure.mgmt.machinelearningservices.models.AutoPauseProperties + :ivar spark_version: Spark version. + :vartype spark_version: str + :ivar node_count: The number of compute nodes currently assigned to the compute. + :vartype node_count: int + :ivar node_size: Node size. + :vartype node_size: str + :ivar node_size_family: Node size family. + :vartype node_size_family: str + :ivar subscription_id: Azure subscription identifier. + :vartype subscription_id: str + :ivar resource_group: Name of the resource group in which workspace is located. + :vartype resource_group: str + :ivar workspace_name: Name of Azure Machine Learning workspace. + :vartype workspace_name: str + :ivar pool_name: Pool name. + :vartype pool_name: str + """ + + _attribute_map = { + 'auto_scale_properties': {'key': 'autoScaleProperties', 'type': 'AutoScaleProperties'}, + 'auto_pause_properties': {'key': 'autoPauseProperties', 'type': 'AutoPauseProperties'}, + 'spark_version': {'key': 'sparkVersion', 'type': 'str'}, + 'node_count': {'key': 'nodeCount', 'type': 'int'}, + 'node_size': {'key': 'nodeSize', 'type': 'str'}, + 'node_size_family': {'key': 'nodeSizeFamily', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'workspace_name': {'key': 'workspaceName', 'type': 'str'}, + 'pool_name': {'key': 'poolName', 'type': 'str'}, + } + + def __init__( + self, + *, + auto_scale_properties: Optional["AutoScaleProperties"] = None, + auto_pause_properties: Optional["AutoPauseProperties"] = None, + spark_version: Optional[str] = None, + node_count: Optional[int] = None, + node_size: Optional[str] = None, + node_size_family: Optional[str] = None, + subscription_id: Optional[str] = None, + resource_group: Optional[str] = None, + workspace_name: Optional[str] = None, + pool_name: Optional[str] = None, + **kwargs + ): + """ + :keyword auto_scale_properties: Auto scale properties. + :paramtype auto_scale_properties: + ~azure.mgmt.machinelearningservices.models.AutoScaleProperties + :keyword auto_pause_properties: Auto pause properties. + :paramtype auto_pause_properties: + ~azure.mgmt.machinelearningservices.models.AutoPauseProperties + :keyword spark_version: Spark version. + :paramtype spark_version: str + :keyword node_count: The number of compute nodes currently assigned to the compute. + :paramtype node_count: int + :keyword node_size: Node size. + :paramtype node_size: str + :keyword node_size_family: Node size family. + :paramtype node_size_family: str + :keyword subscription_id: Azure subscription identifier. + :paramtype subscription_id: str + :keyword resource_group: Name of the resource group in which workspace is located. + :paramtype resource_group: str + :keyword workspace_name: Name of Azure Machine Learning workspace. + :paramtype workspace_name: str + :keyword pool_name: Pool name. + :paramtype pool_name: str + """ + super(SynapseSparkProperties, self).__init__(**kwargs) + self.auto_scale_properties = auto_scale_properties + self.auto_pause_properties = auto_pause_properties + self.spark_version = spark_version + self.node_count = node_count + self.node_size = node_size + self.node_size_family = node_size_family + self.subscription_id = subscription_id + self.resource_group = resource_group + self.workspace_name = workspace_name + self.pool_name = pool_name + + +class SystemData(msrest.serialization.Model): + """Metadata pertaining to creation and last modification of the resource. + + :ivar created_by: The identity that created the resource. + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource. Possible values include: + "User", "Application", "ManagedIdentity", "Key". + :vartype created_by_type: str or ~azure.mgmt.machinelearningservices.models.CreatedByType + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: ~datetime.datetime + :ivar last_modified_by: The identity that last modified the resource. + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :vartype last_modified_by_type: str or ~azure.mgmt.machinelearningservices.models.CreatedByType + :ivar last_modified_at: The timestamp of resource last modification (UTC). + :vartype last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + """ + :keyword created_by: The identity that created the resource. + :paramtype created_by: str + :keyword created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :paramtype created_by_type: str or ~azure.mgmt.machinelearningservices.models.CreatedByType + :keyword created_at: The timestamp of resource creation (UTC). + :paramtype created_at: ~datetime.datetime + :keyword last_modified_by: The identity that last modified the resource. + :paramtype last_modified_by: str + :keyword last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :paramtype last_modified_by_type: str or + ~azure.mgmt.machinelearningservices.models.CreatedByType + :keyword last_modified_at: The timestamp of resource last modification (UTC). + :paramtype last_modified_at: ~datetime.datetime + """ + super(SystemData, self).__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at + + +class SystemService(msrest.serialization.Model): + """A system service running on a compute. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar system_service_type: The type of this system service. + :vartype system_service_type: str + :ivar public_ip_address: Public IP address. + :vartype public_ip_address: str + :ivar version: The version for this type. + :vartype version: str + """ + + _validation = { + 'system_service_type': {'readonly': True}, + 'public_ip_address': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'system_service_type': {'key': 'systemServiceType', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(SystemService, self).__init__(**kwargs) + self.system_service_type = None + self.public_ip_address = None + self.version = None + + +class TargetUtilizationScaleSettings(OnlineScaleSettings): + """TargetUtilizationScaleSettings. + + All required parameters must be populated in order to send to Azure. + + :ivar scale_type: Required. [Required] Type of deployment scaling algorithm.Constant filled by + server. Possible values include: "Default", "TargetUtilization". + :vartype scale_type: str or ~azure.mgmt.machinelearningservices.models.ScaleType + :ivar max_instances: The maximum number of instances that the deployment can scale to. The + quota will be reserved for max_instances. + :vartype max_instances: int + :ivar min_instances: The minimum number of instances to always be present. + :vartype min_instances: int + :ivar polling_interval: The polling interval in ISO 8691 format. Only supports duration with + precision as low as Seconds. + :vartype polling_interval: ~datetime.timedelta + :ivar target_utilization_percentage: Target CPU usage for the autoscaler. + :vartype target_utilization_percentage: int + """ + + _validation = { + 'scale_type': {'required': True}, + } + + _attribute_map = { + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + 'max_instances': {'key': 'maxInstances', 'type': 'int'}, + 'min_instances': {'key': 'minInstances', 'type': 'int'}, + 'polling_interval': {'key': 'pollingInterval', 'type': 'duration'}, + 'target_utilization_percentage': {'key': 'targetUtilizationPercentage', 'type': 'int'}, + } + + def __init__( + self, + *, + max_instances: Optional[int] = 1, + min_instances: Optional[int] = 1, + polling_interval: Optional[datetime.timedelta] = "PT1S", + target_utilization_percentage: Optional[int] = 70, + **kwargs + ): + """ + :keyword max_instances: The maximum number of instances that the deployment can scale to. The + quota will be reserved for max_instances. + :paramtype max_instances: int + :keyword min_instances: The minimum number of instances to always be present. + :paramtype min_instances: int + :keyword polling_interval: The polling interval in ISO 8691 format. Only supports duration with + precision as low as Seconds. + :paramtype polling_interval: ~datetime.timedelta + :keyword target_utilization_percentage: Target CPU usage for the autoscaler. + :paramtype target_utilization_percentage: int + """ + super(TargetUtilizationScaleSettings, self).__init__(**kwargs) + self.scale_type = 'TargetUtilization' # type: str + self.max_instances = max_instances + self.min_instances = min_instances + self.polling_interval = polling_interval + self.target_utilization_percentage = target_utilization_percentage + + +class TensorFlow(DistributionConfiguration): + """TensorFlow distribution configuration. + + All required parameters must be populated in order to send to Azure. + + :ivar distribution_type: Required. [Required] Specifies the type of distribution + framework.Constant filled by server. Possible values include: "PyTorch", "TensorFlow", "Mpi". + :vartype distribution_type: str or ~azure.mgmt.machinelearningservices.models.DistributionType + :ivar parameter_server_count: Number of parameter server tasks. + :vartype parameter_server_count: int + :ivar worker_count: Number of workers. If not specified, will default to the instance count. + :vartype worker_count: int + """ + + _validation = { + 'distribution_type': {'required': True}, + } + + _attribute_map = { + 'distribution_type': {'key': 'distributionType', 'type': 'str'}, + 'parameter_server_count': {'key': 'parameterServerCount', 'type': 'int'}, + 'worker_count': {'key': 'workerCount', 'type': 'int'}, + } + + def __init__( + self, + *, + parameter_server_count: Optional[int] = 0, + worker_count: Optional[int] = None, + **kwargs + ): + """ + :keyword parameter_server_count: Number of parameter server tasks. + :paramtype parameter_server_count: int + :keyword worker_count: Number of workers. If not specified, will default to the instance count. + :paramtype worker_count: int + """ + super(TensorFlow, self).__init__(**kwargs) + self.distribution_type = 'TensorFlow' # type: str + self.parameter_server_count = parameter_server_count + self.worker_count = worker_count + + +class TrialComponent(msrest.serialization.Model): + """Trial component definition. + + All required parameters must be populated in order to send to Azure. + + :ivar code_id: ARM resource ID of the code asset. + :vartype code_id: str + :ivar command: Required. [Required] The command to execute on startup of the job. eg. "python + train.py". + :vartype command: str + :ivar distribution: Distribution configuration of the job. If set, this should be one of Mpi, + Tensorflow, PyTorch, or null. + :vartype distribution: ~azure.mgmt.machinelearningservices.models.DistributionConfiguration + :ivar environment_id: Required. [Required] The ARM resource ID of the Environment specification + for the job. + :vartype environment_id: str + :ivar environment_variables: Environment variables included in the job. + :vartype environment_variables: dict[str, str] + :ivar resources: Compute Resource configuration for the job. + :vartype resources: ~azure.mgmt.machinelearningservices.models.ResourceConfiguration + """ + + _validation = { + 'command': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + 'environment_id': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + } + + _attribute_map = { + 'code_id': {'key': 'codeId', 'type': 'str'}, + 'command': {'key': 'command', 'type': 'str'}, + 'distribution': {'key': 'distribution', 'type': 'DistributionConfiguration'}, + 'environment_id': {'key': 'environmentId', 'type': 'str'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, + 'resources': {'key': 'resources', 'type': 'ResourceConfiguration'}, + } + + def __init__( + self, + *, + command: str, + environment_id: str, + code_id: Optional[str] = None, + distribution: Optional["DistributionConfiguration"] = None, + environment_variables: Optional[Dict[str, str]] = None, + resources: Optional["ResourceConfiguration"] = None, + **kwargs + ): + """ + :keyword code_id: ARM resource ID of the code asset. + :paramtype code_id: str + :keyword command: Required. [Required] The command to execute on startup of the job. eg. + "python train.py". + :paramtype command: str + :keyword distribution: Distribution configuration of the job. If set, this should be one of + Mpi, Tensorflow, PyTorch, or null. + :paramtype distribution: ~azure.mgmt.machinelearningservices.models.DistributionConfiguration + :keyword environment_id: Required. [Required] The ARM resource ID of the Environment + specification for the job. + :paramtype environment_id: str + :keyword environment_variables: Environment variables included in the job. + :paramtype environment_variables: dict[str, str] + :keyword resources: Compute Resource configuration for the job. + :paramtype resources: ~azure.mgmt.machinelearningservices.models.ResourceConfiguration + """ + super(TrialComponent, self).__init__(**kwargs) + self.code_id = code_id + self.command = command + self.distribution = distribution + self.environment_id = environment_id + self.environment_variables = environment_variables + self.resources = resources + + +class TritonModelJobInput(JobInput, AssetJobInput): + """TritonModelJobInput. + + All required parameters must be populated in order to send to Azure. + + :ivar mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", + "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". + :vartype mode: str or ~azure.mgmt.machinelearningservices.models.InputDeliveryMode + :ivar uri: Required. [Required] Input Asset URI. + :vartype uri: str + :ivar description: Description for the input. + :vartype description: str + :ivar job_input_type: Required. [Required] Specifies the type of job.Constant filled by server. + Possible values include: "literal", "uri_file", "uri_folder", "mltable", "custom_model", + "mlflow_model", "triton_model". + :vartype job_input_type: str or ~azure.mgmt.machinelearningservices.models.JobInputType + """ + + _validation = { + 'uri': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + 'job_input_type': {'required': True}, + } + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'job_input_type': {'key': 'jobInputType', 'type': 'str'}, + } + + def __init__( + self, + *, + uri: str, + mode: Optional[Union[str, "InputDeliveryMode"]] = None, + description: Optional[str] = None, + **kwargs + ): + """ + :keyword mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", + "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". + :paramtype mode: str or ~azure.mgmt.machinelearningservices.models.InputDeliveryMode + :keyword uri: Required. [Required] Input Asset URI. + :paramtype uri: str + :keyword description: Description for the input. + :paramtype description: str + """ + super(TritonModelJobInput, self).__init__(description=description, mode=mode, uri=uri, **kwargs) + self.mode = mode + self.uri = uri + self.job_input_type = 'triton_model' # type: str + self.description = description + self.job_input_type = 'triton_model' # type: str + + +class TritonModelJobOutput(JobOutput, AssetJobOutput): + """TritonModelJobOutput. + + All required parameters must be populated in order to send to Azure. + + :ivar mode: Output Asset Delivery Mode. Possible values include: "ReadWriteMount", "Upload". + :vartype mode: str or ~azure.mgmt.machinelearningservices.models.OutputDeliveryMode + :ivar uri: Output Asset URI. + :vartype uri: str + :ivar description: Description for the output. + :vartype description: str + :ivar job_output_type: Required. [Required] Specifies the type of job.Constant filled by + server. Possible values include: "uri_file", "uri_folder", "mltable", "custom_model", + "mlflow_model", "triton_model". + :vartype job_output_type: str or ~azure.mgmt.machinelearningservices.models.JobOutputType + """ + + _validation = { + 'job_output_type': {'required': True}, + } + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'job_output_type': {'key': 'jobOutputType', 'type': 'str'}, + } + + def __init__( + self, + *, + mode: Optional[Union[str, "OutputDeliveryMode"]] = None, + uri: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + """ + :keyword mode: Output Asset Delivery Mode. Possible values include: "ReadWriteMount", "Upload". + :paramtype mode: str or ~azure.mgmt.machinelearningservices.models.OutputDeliveryMode + :keyword uri: Output Asset URI. + :paramtype uri: str + :keyword description: Description for the output. + :paramtype description: str + """ + super(TritonModelJobOutput, self).__init__(description=description, mode=mode, uri=uri, **kwargs) + self.mode = mode + self.uri = uri + self.job_output_type = 'triton_model' # type: str + self.description = description + self.job_output_type = 'triton_model' # type: str + + +class TruncationSelectionPolicy(EarlyTerminationPolicy): + """Defines an early termination policy that cancels a given percentage of runs at each evaluation interval. + + All required parameters must be populated in order to send to Azure. + + :ivar delay_evaluation: Number of intervals by which to delay the first evaluation. + :vartype delay_evaluation: int + :ivar evaluation_interval: Interval (number of runs) between policy evaluations. + :vartype evaluation_interval: int + :ivar policy_type: Required. [Required] Name of policy configuration.Constant filled by server. + Possible values include: "Bandit", "MedianStopping", "TruncationSelection". + :vartype policy_type: str or + ~azure.mgmt.machinelearningservices.models.EarlyTerminationPolicyType + :ivar truncation_percentage: The percentage of runs to cancel at each evaluation interval. + :vartype truncation_percentage: int + """ + + _validation = { + 'policy_type': {'required': True}, + } + + _attribute_map = { + 'delay_evaluation': {'key': 'delayEvaluation', 'type': 'int'}, + 'evaluation_interval': {'key': 'evaluationInterval', 'type': 'int'}, + 'policy_type': {'key': 'policyType', 'type': 'str'}, + 'truncation_percentage': {'key': 'truncationPercentage', 'type': 'int'}, + } + + def __init__( + self, + *, + delay_evaluation: Optional[int] = 0, + evaluation_interval: Optional[int] = 0, + truncation_percentage: Optional[int] = 0, + **kwargs + ): + """ + :keyword delay_evaluation: Number of intervals by which to delay the first evaluation. + :paramtype delay_evaluation: int + :keyword evaluation_interval: Interval (number of runs) between policy evaluations. + :paramtype evaluation_interval: int + :keyword truncation_percentage: The percentage of runs to cancel at each evaluation interval. + :paramtype truncation_percentage: int + """ + super(TruncationSelectionPolicy, self).__init__(delay_evaluation=delay_evaluation, evaluation_interval=evaluation_interval, **kwargs) + self.policy_type = 'TruncationSelection' # type: str + self.truncation_percentage = truncation_percentage + + +class UpdateWorkspaceQuotas(msrest.serialization.Model): + """The properties for update Quota response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Specifies the resource ID. + :vartype id: str + :ivar type: Specifies the resource type. + :vartype type: str + :ivar limit: The maximum permitted quota of the resource. + :vartype limit: long + :ivar unit: An enum describing the unit of quota measurement. Possible values include: "Count". + :vartype unit: str or ~azure.mgmt.machinelearningservices.models.QuotaUnit + :ivar status: Status of update workspace quota. Possible values include: "Undefined", + "Success", "Failure", "InvalidQuotaBelowClusterMinimum", + "InvalidQuotaExceedsSubscriptionLimit", "InvalidVMFamilyName", "OperationNotSupportedForSku", + "OperationNotEnabledForRegion". + :vartype status: str or ~azure.mgmt.machinelearningservices.models.Status + """ + + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + limit: Optional[int] = None, + status: Optional[Union[str, "Status"]] = None, + **kwargs + ): + """ + :keyword limit: The maximum permitted quota of the resource. + :paramtype limit: long + :keyword status: Status of update workspace quota. Possible values include: "Undefined", + "Success", "Failure", "InvalidQuotaBelowClusterMinimum", + "InvalidQuotaExceedsSubscriptionLimit", "InvalidVMFamilyName", "OperationNotSupportedForSku", + "OperationNotEnabledForRegion". + :paramtype status: str or ~azure.mgmt.machinelearningservices.models.Status + """ + super(UpdateWorkspaceQuotas, self).__init__(**kwargs) + self.id = None + self.type = None + self.limit = limit + self.unit = None + self.status = status + + +class UpdateWorkspaceQuotasResult(msrest.serialization.Model): + """The result of update workspace quota. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of workspace quota update result. + :vartype value: list[~azure.mgmt.machinelearningservices.models.UpdateWorkspaceQuotas] + :ivar next_link: The URI to fetch the next page of workspace quota update result. Call + ListNext() with this to fetch the next page of Workspace Quota update result. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[UpdateWorkspaceQuotas]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(UpdateWorkspaceQuotasResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class UriFileDataVersion(DataVersionBaseDetails): + """uri-file data version entity. + + All required parameters must be populated in order to send to Azure. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar is_anonymous: If the name version are system generated (anonymous registration). + :vartype is_anonymous: bool + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar data_type: Required. [Required] Specifies the type of data.Constant filled by server. + Possible values include: "uri_file", "uri_folder", "mltable". + :vartype data_type: str or ~azure.mgmt.machinelearningservices.models.DataType + :ivar data_uri: Required. [Required] Uri of the data. Usage/meaning depends on + Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220501.Assets.DataVersionBase.DataType. + :vartype data_uri: str + """ + + _validation = { + 'data_type': {'required': True}, + 'data_uri': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + 'data_uri': {'key': 'dataUri', 'type': 'str'}, + } + + def __init__( + self, + *, + data_uri: str, + description: Optional[str] = None, + properties: Optional[Dict[str, str]] = None, + tags: Optional[Dict[str, str]] = None, + is_anonymous: Optional[bool] = False, + is_archived: Optional[bool] = False, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword is_anonymous: If the name version are system generated (anonymous registration). + :paramtype is_anonymous: bool + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + :keyword data_uri: Required. [Required] Uri of the data. Usage/meaning depends on + Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220501.Assets.DataVersionBase.DataType. + :paramtype data_uri: str + """ + super(UriFileDataVersion, self).__init__(description=description, properties=properties, tags=tags, is_anonymous=is_anonymous, is_archived=is_archived, data_uri=data_uri, **kwargs) + self.data_type = 'uri_file' # type: str + + +class UriFileJobInput(JobInput, AssetJobInput): + """UriFileJobInput. + + All required parameters must be populated in order to send to Azure. + + :ivar mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", + "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". + :vartype mode: str or ~azure.mgmt.machinelearningservices.models.InputDeliveryMode + :ivar uri: Required. [Required] Input Asset URI. + :vartype uri: str + :ivar description: Description for the input. + :vartype description: str + :ivar job_input_type: Required. [Required] Specifies the type of job.Constant filled by server. + Possible values include: "literal", "uri_file", "uri_folder", "mltable", "custom_model", + "mlflow_model", "triton_model". + :vartype job_input_type: str or ~azure.mgmt.machinelearningservices.models.JobInputType + """ + + _validation = { + 'uri': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + 'job_input_type': {'required': True}, + } + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'job_input_type': {'key': 'jobInputType', 'type': 'str'}, + } + + def __init__( + self, + *, + uri: str, + mode: Optional[Union[str, "InputDeliveryMode"]] = None, + description: Optional[str] = None, + **kwargs + ): + """ + :keyword mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", + "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". + :paramtype mode: str or ~azure.mgmt.machinelearningservices.models.InputDeliveryMode + :keyword uri: Required. [Required] Input Asset URI. + :paramtype uri: str + :keyword description: Description for the input. + :paramtype description: str + """ + super(UriFileJobInput, self).__init__(description=description, mode=mode, uri=uri, **kwargs) + self.mode = mode + self.uri = uri + self.job_input_type = 'uri_file' # type: str + self.description = description + self.job_input_type = 'uri_file' # type: str + + +class UriFileJobOutput(JobOutput, AssetJobOutput): + """UriFileJobOutput. + + All required parameters must be populated in order to send to Azure. + + :ivar mode: Output Asset Delivery Mode. Possible values include: "ReadWriteMount", "Upload". + :vartype mode: str or ~azure.mgmt.machinelearningservices.models.OutputDeliveryMode + :ivar uri: Output Asset URI. + :vartype uri: str + :ivar description: Description for the output. + :vartype description: str + :ivar job_output_type: Required. [Required] Specifies the type of job.Constant filled by + server. Possible values include: "uri_file", "uri_folder", "mltable", "custom_model", + "mlflow_model", "triton_model". + :vartype job_output_type: str or ~azure.mgmt.machinelearningservices.models.JobOutputType + """ + + _validation = { + 'job_output_type': {'required': True}, + } + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'job_output_type': {'key': 'jobOutputType', 'type': 'str'}, + } + + def __init__( + self, + *, + mode: Optional[Union[str, "OutputDeliveryMode"]] = None, + uri: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + """ + :keyword mode: Output Asset Delivery Mode. Possible values include: "ReadWriteMount", "Upload". + :paramtype mode: str or ~azure.mgmt.machinelearningservices.models.OutputDeliveryMode + :keyword uri: Output Asset URI. + :paramtype uri: str + :keyword description: Description for the output. + :paramtype description: str + """ + super(UriFileJobOutput, self).__init__(description=description, mode=mode, uri=uri, **kwargs) + self.mode = mode + self.uri = uri + self.job_output_type = 'uri_file' # type: str + self.description = description + self.job_output_type = 'uri_file' # type: str + + +class UriFolderDataVersion(DataVersionBaseDetails): + """uri-folder data version entity. + + All required parameters must be populated in order to send to Azure. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar is_anonymous: If the name version are system generated (anonymous registration). + :vartype is_anonymous: bool + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar data_type: Required. [Required] Specifies the type of data.Constant filled by server. + Possible values include: "uri_file", "uri_folder", "mltable". + :vartype data_type: str or ~azure.mgmt.machinelearningservices.models.DataType + :ivar data_uri: Required. [Required] Uri of the data. Usage/meaning depends on + Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220501.Assets.DataVersionBase.DataType. + :vartype data_uri: str + """ + + _validation = { + 'data_type': {'required': True}, + 'data_uri': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, + 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + 'data_type': {'key': 'dataType', 'type': 'str'}, + 'data_uri': {'key': 'dataUri', 'type': 'str'}, + } + + def __init__( + self, + *, + data_uri: str, + description: Optional[str] = None, + properties: Optional[Dict[str, str]] = None, + tags: Optional[Dict[str, str]] = None, + is_anonymous: Optional[bool] = False, + is_archived: Optional[bool] = False, + **kwargs + ): + """ + :keyword description: The asset description text. + :paramtype description: str + :keyword properties: The asset property dictionary. + :paramtype properties: dict[str, str] + :keyword tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :paramtype tags: dict[str, str] + :keyword is_anonymous: If the name version are system generated (anonymous registration). + :paramtype is_anonymous: bool + :keyword is_archived: Is the asset archived?. + :paramtype is_archived: bool + :keyword data_uri: Required. [Required] Uri of the data. Usage/meaning depends on + Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220501.Assets.DataVersionBase.DataType. + :paramtype data_uri: str + """ + super(UriFolderDataVersion, self).__init__(description=description, properties=properties, tags=tags, is_anonymous=is_anonymous, is_archived=is_archived, data_uri=data_uri, **kwargs) + self.data_type = 'uri_folder' # type: str + + +class UriFolderJobInput(JobInput, AssetJobInput): + """UriFolderJobInput. + + All required parameters must be populated in order to send to Azure. + + :ivar mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", + "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". + :vartype mode: str or ~azure.mgmt.machinelearningservices.models.InputDeliveryMode + :ivar uri: Required. [Required] Input Asset URI. + :vartype uri: str + :ivar description: Description for the input. + :vartype description: str + :ivar job_input_type: Required. [Required] Specifies the type of job.Constant filled by server. + Possible values include: "literal", "uri_file", "uri_folder", "mltable", "custom_model", + "mlflow_model", "triton_model". + :vartype job_input_type: str or ~azure.mgmt.machinelearningservices.models.JobInputType + """ + + _validation = { + 'uri': {'required': True, 'pattern': r'[a-zA-Z0-9_]'}, + 'job_input_type': {'required': True}, + } + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'job_input_type': {'key': 'jobInputType', 'type': 'str'}, + } + + def __init__( + self, + *, + uri: str, + mode: Optional[Union[str, "InputDeliveryMode"]] = None, + description: Optional[str] = None, + **kwargs + ): + """ + :keyword mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", + "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". + :paramtype mode: str or ~azure.mgmt.machinelearningservices.models.InputDeliveryMode + :keyword uri: Required. [Required] Input Asset URI. + :paramtype uri: str + :keyword description: Description for the input. + :paramtype description: str + """ + super(UriFolderJobInput, self).__init__(description=description, mode=mode, uri=uri, **kwargs) + self.mode = mode + self.uri = uri + self.job_input_type = 'uri_folder' # type: str + self.description = description + self.job_input_type = 'uri_folder' # type: str + + +class UriFolderJobOutput(JobOutput, AssetJobOutput): + """UriFolderJobOutput. + + All required parameters must be populated in order to send to Azure. + + :ivar mode: Output Asset Delivery Mode. Possible values include: "ReadWriteMount", "Upload". + :vartype mode: str or ~azure.mgmt.machinelearningservices.models.OutputDeliveryMode + :ivar uri: Output Asset URI. + :vartype uri: str + :ivar description: Description for the output. + :vartype description: str + :ivar job_output_type: Required. [Required] Specifies the type of job.Constant filled by + server. Possible values include: "uri_file", "uri_folder", "mltable", "custom_model", + "mlflow_model", "triton_model". + :vartype job_output_type: str or ~azure.mgmt.machinelearningservices.models.JobOutputType + """ + + _validation = { + 'job_output_type': {'required': True}, + } + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'job_output_type': {'key': 'jobOutputType', 'type': 'str'}, + } + + def __init__( + self, + *, + mode: Optional[Union[str, "OutputDeliveryMode"]] = None, + uri: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + """ + :keyword mode: Output Asset Delivery Mode. Possible values include: "ReadWriteMount", "Upload". + :paramtype mode: str or ~azure.mgmt.machinelearningservices.models.OutputDeliveryMode + :keyword uri: Output Asset URI. + :paramtype uri: str + :keyword description: Description for the output. + :paramtype description: str + """ + super(UriFolderJobOutput, self).__init__(description=description, mode=mode, uri=uri, **kwargs) + self.mode = mode + self.uri = uri + self.job_output_type = 'uri_folder' # type: str + self.description = description + self.job_output_type = 'uri_folder' # type: str + + +class Usage(msrest.serialization.Model): + """Describes AML Resource Usage. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Specifies the resource ID. + :vartype id: str + :ivar aml_workspace_location: Region of the AML workspace in the id. + :vartype aml_workspace_location: str + :ivar type: Specifies the resource type. + :vartype type: str + :ivar unit: An enum describing the unit of usage measurement. Possible values include: "Count". + :vartype unit: str or ~azure.mgmt.machinelearningservices.models.UsageUnit + :ivar current_value: The current usage of the resource. + :vartype current_value: long + :ivar limit: The maximum permitted usage of the resource. + :vartype limit: long + :ivar name: The name of the type of usage. + :vartype name: ~azure.mgmt.machinelearningservices.models.UsageName + """ + + _validation = { + 'id': {'readonly': True}, + 'aml_workspace_location': {'readonly': True}, + 'type': {'readonly': True}, + 'unit': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'aml_workspace_location': {'key': 'amlWorkspaceLocation', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(Usage, self).__init__(**kwargs) + self.id = None + self.aml_workspace_location = None + self.type = None + self.unit = None + self.current_value = None + self.limit = None + self.name = None + + +class UsageName(msrest.serialization.Model): + """The Usage Names. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The name of the resource. + :vartype value: str + :ivar localized_value: The localized name of the resource. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(UsageName, self).__init__(**kwargs) + self.value = None + self.localized_value = None + + +class UserAccountCredentials(msrest.serialization.Model): + """Settings for user account that gets created on each on the nodes of a compute. + + All required parameters must be populated in order to send to Azure. + + :ivar admin_user_name: Required. Name of the administrator user account which can be used to + SSH to nodes. + :vartype admin_user_name: str + :ivar admin_user_ssh_public_key: SSH public key of the administrator user account. + :vartype admin_user_ssh_public_key: str + :ivar admin_user_password: Password of the administrator user account. + :vartype admin_user_password: str + """ + + _validation = { + 'admin_user_name': {'required': True}, + } + + _attribute_map = { + 'admin_user_name': {'key': 'adminUserName', 'type': 'str'}, + 'admin_user_ssh_public_key': {'key': 'adminUserSshPublicKey', 'type': 'str'}, + 'admin_user_password': {'key': 'adminUserPassword', 'type': 'str'}, + } + + def __init__( + self, + *, + admin_user_name: str, + admin_user_ssh_public_key: Optional[str] = None, + admin_user_password: Optional[str] = None, + **kwargs + ): + """ + :keyword admin_user_name: Required. Name of the administrator user account which can be used to + SSH to nodes. + :paramtype admin_user_name: str + :keyword admin_user_ssh_public_key: SSH public key of the administrator user account. + :paramtype admin_user_ssh_public_key: str + :keyword admin_user_password: Password of the administrator user account. + :paramtype admin_user_password: str + """ + super(UserAccountCredentials, self).__init__(**kwargs) + self.admin_user_name = admin_user_name + self.admin_user_ssh_public_key = admin_user_ssh_public_key + self.admin_user_password = admin_user_password + + +class UserAssignedIdentity(msrest.serialization.Model): + """User assigned identity properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal ID of the assigned identity. + :vartype principal_id: str + :ivar client_id: The client ID of the assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(UserAssignedIdentity, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class UserIdentity(IdentityConfiguration): + """User identity configuration. + + All required parameters must be populated in order to send to Azure. + + :ivar identity_type: Required. [Required] Specifies the type of identity framework.Constant + filled by server. Possible values include: "Managed", "AMLToken", "UserIdentity". + :vartype identity_type: str or + ~azure.mgmt.machinelearningservices.models.IdentityConfigurationType + """ + + _validation = { + 'identity_type': {'required': True}, + } + + _attribute_map = { + 'identity_type': {'key': 'identityType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(UserIdentity, self).__init__(**kwargs) + self.identity_type = 'UserIdentity' # type: str + + +class UsernamePasswordAuthTypeWorkspaceConnectionProperties(WorkspaceConnectionPropertiesV2): + """UsernamePasswordAuthTypeWorkspaceConnectionProperties. + + All required parameters must be populated in order to send to Azure. + + :ivar auth_type: Required. Authentication type of the connection target.Constant filled by + server. Possible values include: "PAT", "ManagedIdentity", "UsernamePassword", "None", "SAS". + :vartype auth_type: str or ~azure.mgmt.machinelearningservices.models.ConnectionAuthType + :ivar category: Category of the connection. Possible values include: "PythonFeed", + "ContainerRegistry", "Git". + :vartype category: str or ~azure.mgmt.machinelearningservices.models.ConnectionCategory + :ivar target: + :vartype target: str + :ivar value: Value details of the workspace connection. + :vartype value: str + :ivar value_format: format for the workspace connection value. Possible values include: "JSON". + :vartype value_format: str or ~azure.mgmt.machinelearningservices.models.ValueFormat + :ivar credentials: + :vartype credentials: + ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionUsernamePassword + """ + + _validation = { + 'auth_type': {'required': True}, + } + + _attribute_map = { + 'auth_type': {'key': 'authType', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'value_format': {'key': 'valueFormat', 'type': 'str'}, + 'credentials': {'key': 'credentials', 'type': 'WorkspaceConnectionUsernamePassword'}, + } + + def __init__( + self, + *, + category: Optional[Union[str, "ConnectionCategory"]] = None, + target: Optional[str] = None, + value: Optional[str] = None, + value_format: Optional[Union[str, "ValueFormat"]] = None, + credentials: Optional["WorkspaceConnectionUsernamePassword"] = None, + **kwargs + ): + """ + :keyword category: Category of the connection. Possible values include: "PythonFeed", + "ContainerRegistry", "Git". + :paramtype category: str or ~azure.mgmt.machinelearningservices.models.ConnectionCategory + :keyword target: + :paramtype target: str + :keyword value: Value details of the workspace connection. + :paramtype value: str + :keyword value_format: format for the workspace connection value. Possible values include: + "JSON". + :paramtype value_format: str or ~azure.mgmt.machinelearningservices.models.ValueFormat + :keyword credentials: + :paramtype credentials: + ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionUsernamePassword + """ + super(UsernamePasswordAuthTypeWorkspaceConnectionProperties, self).__init__(category=category, target=target, value=value, value_format=value_format, **kwargs) + self.auth_type = 'UsernamePassword' # type: str + self.credentials = credentials + + +class VirtualMachineSchema(msrest.serialization.Model): + """VirtualMachineSchema. + + :ivar properties: + :vartype properties: ~azure.mgmt.machinelearningservices.models.VirtualMachineSchemaProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'VirtualMachineSchemaProperties'}, + } + + def __init__( + self, + *, + properties: Optional["VirtualMachineSchemaProperties"] = None, + **kwargs + ): + """ + :keyword properties: + :paramtype properties: + ~azure.mgmt.machinelearningservices.models.VirtualMachineSchemaProperties + """ + super(VirtualMachineSchema, self).__init__(**kwargs) + self.properties = properties + + +class VirtualMachine(Compute, VirtualMachineSchema): + """A Machine Learning compute based on Azure Virtual Machines. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar properties: + :vartype properties: ~azure.mgmt.machinelearningservices.models.VirtualMachineSchemaProperties + :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values + include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", + "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark". + :vartype compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType + :ivar compute_location: Location for the underlying compute. + :vartype compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values are Unknown, + Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating", + "Creating", "Deleting", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :ivar description: The description of the Machine Learning compute. + :vartype description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: ~datetime.datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: ~datetime.datetime + :ivar resource_id: ARM resource id of the underlying compute. + :vartype resource_id: str + :ivar provisioning_errors: Errors during provisioning. + :vartype provisioning_errors: list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought + from outside if true, or machine learning service provisioned it if false. + :vartype is_attached_compute: bool + :ivar disable_local_auth: Opt-out of local authentication and ensure customers can use only MSI + and AAD exclusively for authentication. + :vartype disable_local_auth: bool + """ + + _validation = { + 'compute_type': {'required': True}, + 'compute_location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'VirtualMachineSchemaProperties'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + } + + def __init__( + self, + *, + properties: Optional["VirtualMachineSchemaProperties"] = None, + description: Optional[str] = None, + resource_id: Optional[str] = None, + disable_local_auth: Optional[bool] = None, + **kwargs + ): + """ + :keyword properties: + :paramtype properties: + ~azure.mgmt.machinelearningservices.models.VirtualMachineSchemaProperties + :keyword description: The description of the Machine Learning compute. + :paramtype description: str + :keyword resource_id: ARM resource id of the underlying compute. + :paramtype resource_id: str + :keyword disable_local_auth: Opt-out of local authentication and ensure customers can use only + MSI and AAD exclusively for authentication. + :paramtype disable_local_auth: bool + """ + super(VirtualMachine, self).__init__(description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, properties=properties, **kwargs) + self.properties = properties + self.compute_type = 'VirtualMachine' # type: str + self.compute_type = 'VirtualMachine' # type: str + self.compute_location = None + self.provisioning_state = None + self.description = description + self.created_on = None + self.modified_on = None + self.resource_id = resource_id + self.provisioning_errors = None + self.is_attached_compute = None + self.disable_local_auth = disable_local_auth + + +class VirtualMachineImage(msrest.serialization.Model): + """Virtual Machine image for Windows AML Compute. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Required. Virtual Machine image path. + :vartype id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: str, + **kwargs + ): + """ + :keyword id: Required. Virtual Machine image path. + :paramtype id: str + """ + super(VirtualMachineImage, self).__init__(**kwargs) + self.id = id + + +class VirtualMachineSchemaProperties(msrest.serialization.Model): + """VirtualMachineSchemaProperties. + + :ivar virtual_machine_size: Virtual Machine size. + :vartype virtual_machine_size: str + :ivar ssh_port: Port open for ssh connections. + :vartype ssh_port: int + :ivar notebook_server_port: Notebook server port open for ssh connections. + :vartype notebook_server_port: int + :ivar address: Public IP address of the virtual machine. + :vartype address: str + :ivar administrator_account: Admin credentials for virtual machine. + :vartype administrator_account: + ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials + :ivar is_notebook_instance_compute: Indicates whether this compute will be used for running + notebooks. + :vartype is_notebook_instance_compute: bool + """ + + _attribute_map = { + 'virtual_machine_size': {'key': 'virtualMachineSize', 'type': 'str'}, + 'ssh_port': {'key': 'sshPort', 'type': 'int'}, + 'notebook_server_port': {'key': 'notebookServerPort', 'type': 'int'}, + 'address': {'key': 'address', 'type': 'str'}, + 'administrator_account': {'key': 'administratorAccount', 'type': 'VirtualMachineSshCredentials'}, + 'is_notebook_instance_compute': {'key': 'isNotebookInstanceCompute', 'type': 'bool'}, + } + + def __init__( + self, + *, + virtual_machine_size: Optional[str] = None, + ssh_port: Optional[int] = None, + notebook_server_port: Optional[int] = None, + address: Optional[str] = None, + administrator_account: Optional["VirtualMachineSshCredentials"] = None, + is_notebook_instance_compute: Optional[bool] = None, + **kwargs + ): + """ + :keyword virtual_machine_size: Virtual Machine size. + :paramtype virtual_machine_size: str + :keyword ssh_port: Port open for ssh connections. + :paramtype ssh_port: int + :keyword notebook_server_port: Notebook server port open for ssh connections. + :paramtype notebook_server_port: int + :keyword address: Public IP address of the virtual machine. + :paramtype address: str + :keyword administrator_account: Admin credentials for virtual machine. + :paramtype administrator_account: + ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials + :keyword is_notebook_instance_compute: Indicates whether this compute will be used for running + notebooks. + :paramtype is_notebook_instance_compute: bool + """ + super(VirtualMachineSchemaProperties, self).__init__(**kwargs) + self.virtual_machine_size = virtual_machine_size + self.ssh_port = ssh_port + self.notebook_server_port = notebook_server_port + self.address = address + self.administrator_account = administrator_account + self.is_notebook_instance_compute = is_notebook_instance_compute + + +class VirtualMachineSecretsSchema(msrest.serialization.Model): + """VirtualMachineSecretsSchema. + + :ivar administrator_account: Admin credentials for virtual machine. + :vartype administrator_account: + ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials + """ + + _attribute_map = { + 'administrator_account': {'key': 'administratorAccount', 'type': 'VirtualMachineSshCredentials'}, + } + + def __init__( + self, + *, + administrator_account: Optional["VirtualMachineSshCredentials"] = None, + **kwargs + ): + """ + :keyword administrator_account: Admin credentials for virtual machine. + :paramtype administrator_account: + ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials + """ + super(VirtualMachineSecretsSchema, self).__init__(**kwargs) + self.administrator_account = administrator_account + + +class VirtualMachineSecrets(ComputeSecrets, VirtualMachineSecretsSchema): + """Secrets related to a Machine Learning compute based on AKS. + + All required parameters must be populated in order to send to Azure. + + :ivar administrator_account: Admin credentials for virtual machine. + :vartype administrator_account: + ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials + :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values + include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", + "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark". + :vartype compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType + """ + + _validation = { + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'administrator_account': {'key': 'administratorAccount', 'type': 'VirtualMachineSshCredentials'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + } + + def __init__( + self, + *, + administrator_account: Optional["VirtualMachineSshCredentials"] = None, + **kwargs + ): + """ + :keyword administrator_account: Admin credentials for virtual machine. + :paramtype administrator_account: + ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials + """ + super(VirtualMachineSecrets, self).__init__(administrator_account=administrator_account, **kwargs) + self.administrator_account = administrator_account + self.compute_type = 'VirtualMachine' # type: str + self.compute_type = 'VirtualMachine' # type: str + + +class VirtualMachineSize(msrest.serialization.Model): + """Describes the properties of a VM size. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the virtual machine size. + :vartype name: str + :ivar family: The family name of the virtual machine size. + :vartype family: str + :ivar v_cp_us: The number of vCPUs supported by the virtual machine size. + :vartype v_cp_us: int + :ivar gpus: The number of gPUs supported by the virtual machine size. + :vartype gpus: int + :ivar os_vhd_size_mb: The OS VHD disk size, in MB, allowed by the virtual machine size. + :vartype os_vhd_size_mb: int + :ivar max_resource_volume_mb: The resource volume size, in MB, allowed by the virtual machine + size. + :vartype max_resource_volume_mb: int + :ivar memory_gb: The amount of memory, in GB, supported by the virtual machine size. + :vartype memory_gb: float + :ivar low_priority_capable: Specifies if the virtual machine size supports low priority VMs. + :vartype low_priority_capable: bool + :ivar premium_io: Specifies if the virtual machine size supports premium IO. + :vartype premium_io: bool + :ivar estimated_vm_prices: The estimated price information for using a VM. + :vartype estimated_vm_prices: ~azure.mgmt.machinelearningservices.models.EstimatedVMPrices + :ivar supported_compute_types: Specifies the compute types supported by the virtual machine + size. + :vartype supported_compute_types: list[str] + """ + + _validation = { + 'name': {'readonly': True}, + 'family': {'readonly': True}, + 'v_cp_us': {'readonly': True}, + 'gpus': {'readonly': True}, + 'os_vhd_size_mb': {'readonly': True}, + 'max_resource_volume_mb': {'readonly': True}, + 'memory_gb': {'readonly': True}, + 'low_priority_capable': {'readonly': True}, + 'premium_io': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'v_cp_us': {'key': 'vCPUs', 'type': 'int'}, + 'gpus': {'key': 'gpus', 'type': 'int'}, + 'os_vhd_size_mb': {'key': 'osVhdSizeMB', 'type': 'int'}, + 'max_resource_volume_mb': {'key': 'maxResourceVolumeMB', 'type': 'int'}, + 'memory_gb': {'key': 'memoryGB', 'type': 'float'}, + 'low_priority_capable': {'key': 'lowPriorityCapable', 'type': 'bool'}, + 'premium_io': {'key': 'premiumIO', 'type': 'bool'}, + 'estimated_vm_prices': {'key': 'estimatedVMPrices', 'type': 'EstimatedVMPrices'}, + 'supported_compute_types': {'key': 'supportedComputeTypes', 'type': '[str]'}, + } + + def __init__( + self, + *, + estimated_vm_prices: Optional["EstimatedVMPrices"] = None, + supported_compute_types: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword estimated_vm_prices: The estimated price information for using a VM. + :paramtype estimated_vm_prices: ~azure.mgmt.machinelearningservices.models.EstimatedVMPrices + :keyword supported_compute_types: Specifies the compute types supported by the virtual machine + size. + :paramtype supported_compute_types: list[str] + """ + super(VirtualMachineSize, self).__init__(**kwargs) + self.name = None + self.family = None + self.v_cp_us = None + self.gpus = None + self.os_vhd_size_mb = None + self.max_resource_volume_mb = None + self.memory_gb = None + self.low_priority_capable = None + self.premium_io = None + self.estimated_vm_prices = estimated_vm_prices + self.supported_compute_types = supported_compute_types + + +class VirtualMachineSizeListResult(msrest.serialization.Model): + """The List Virtual Machine size operation response. + + :ivar value: The list of virtual machine sizes supported by AmlCompute. + :vartype value: list[~azure.mgmt.machinelearningservices.models.VirtualMachineSize] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualMachineSize]'}, + } + + def __init__( + self, + *, + value: Optional[List["VirtualMachineSize"]] = None, + **kwargs + ): + """ + :keyword value: The list of virtual machine sizes supported by AmlCompute. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.VirtualMachineSize] + """ + super(VirtualMachineSizeListResult, self).__init__(**kwargs) + self.value = value + + +class VirtualMachineSshCredentials(msrest.serialization.Model): + """Admin credentials for virtual machine. + + :ivar username: Username of admin account. + :vartype username: str + :ivar password: Password of admin account. + :vartype password: str + :ivar public_key_data: Public key data. + :vartype public_key_data: str + :ivar private_key_data: Private key data. + :vartype private_key_data: str + """ + + _attribute_map = { + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'public_key_data': {'key': 'publicKeyData', 'type': 'str'}, + 'private_key_data': {'key': 'privateKeyData', 'type': 'str'}, + } + + def __init__( + self, + *, + username: Optional[str] = None, + password: Optional[str] = None, + public_key_data: Optional[str] = None, + private_key_data: Optional[str] = None, + **kwargs + ): + """ + :keyword username: Username of admin account. + :paramtype username: str + :keyword password: Password of admin account. + :paramtype password: str + :keyword public_key_data: Public key data. + :paramtype public_key_data: str + :keyword private_key_data: Private key data. + :paramtype private_key_data: str + """ + super(VirtualMachineSshCredentials, self).__init__(**kwargs) + self.username = username + self.password = password + self.public_key_data = public_key_data + self.private_key_data = private_key_data + + +class Workspace(Resource): + """An object that represents a machine learning workspace. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar identity: The identity of the resource. + :vartype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :ivar location: Specifies the location of the resource. + :vartype location: str + :ivar tags: A set of tags. Contains resource tags defined as key/value pairs. + :vartype tags: dict[str, str] + :ivar sku: The sku of the workspace. + :vartype sku: ~azure.mgmt.machinelearningservices.models.Sku + :ivar workspace_id: The immutable id associated with this workspace. + :vartype workspace_id: str + :ivar description: The description of this workspace. + :vartype description: str + :ivar friendly_name: The friendly name for this workspace. This name in mutable. + :vartype friendly_name: str + :ivar key_vault: ARM id of the key vault associated with this workspace. This cannot be changed + once the workspace has been created. + :vartype key_vault: str + :ivar application_insights: ARM id of the application insights associated with this workspace. + :vartype application_insights: str + :ivar container_registry: ARM id of the container registry associated with this workspace. + :vartype container_registry: str + :ivar storage_account: ARM id of the storage account associated with this workspace. This + cannot be changed once the workspace has been created. + :vartype storage_account: str + :ivar discovery_url: Url for the discovery service to identify regional endpoints for machine + learning experimentation services. + :vartype discovery_url: str + :ivar provisioning_state: The current deployment state of workspace resource. The + provisioningState is to indicate states for resource provisioning. Possible values include: + "Unknown", "Updating", "Creating", "Deleting", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :ivar encryption: The encryption settings of Azure ML workspace. + :vartype encryption: ~azure.mgmt.machinelearningservices.models.EncryptionProperty + :ivar hbi_workspace: The flag to signal HBI data in the workspace and reduce diagnostic data + collected by the service. + :vartype hbi_workspace: bool + :ivar service_provisioned_resource_group: The name of the managed resource group created by + workspace RP in customer subscription if the workspace is CMK workspace. + :vartype service_provisioned_resource_group: str + :ivar private_link_count: Count of private connections in the workspace. + :vartype private_link_count: int + :ivar image_build_compute: The compute name for image build. + :vartype image_build_compute: str + :ivar allow_public_access_when_behind_vnet: The flag to indicate whether to allow public access + when behind VNet. + :vartype allow_public_access_when_behind_vnet: bool + :ivar public_network_access: Whether requests from Public Network are allowed. Possible values + include: "Enabled", "Disabled". + :vartype public_network_access: str or + ~azure.mgmt.machinelearningservices.models.PublicNetworkAccess + :ivar private_endpoint_connections: The list of private endpoint connections in the workspace. + :vartype private_endpoint_connections: + list[~azure.mgmt.machinelearningservices.models.PrivateEndpointConnection] + :ivar shared_private_link_resources: The list of shared private link resources in this + workspace. + :vartype shared_private_link_resources: + list[~azure.mgmt.machinelearningservices.models.SharedPrivateLinkResource] + :ivar notebook_info: The notebook info of Azure ML workspace. + :vartype notebook_info: ~azure.mgmt.machinelearningservices.models.NotebookResourceInfo + :ivar service_managed_resources_settings: The service managed resource settings. + :vartype service_managed_resources_settings: + ~azure.mgmt.machinelearningservices.models.ServiceManagedResourcesSettings + :ivar primary_user_assigned_identity: The user assigned identity resource id that represents + the workspace identity. + :vartype primary_user_assigned_identity: str + :ivar tenant_id: The tenant id associated with this workspace. + :vartype tenant_id: str + :ivar storage_hns_enabled: If the storage associated with the workspace has hierarchical + namespace(HNS) enabled. + :vartype storage_hns_enabled: bool + :ivar ml_flow_tracking_uri: The URI associated with this workspace that machine learning flow + must point at to set up tracking. + :vartype ml_flow_tracking_uri: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'workspace_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'service_provisioned_resource_group': {'readonly': True}, + 'private_link_count': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'notebook_info': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'storage_hns_enabled': {'readonly': True}, + 'ml_flow_tracking_uri': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'key_vault': {'key': 'properties.keyVault', 'type': 'str'}, + 'application_insights': {'key': 'properties.applicationInsights', 'type': 'str'}, + 'container_registry': {'key': 'properties.containerRegistry', 'type': 'str'}, + 'storage_account': {'key': 'properties.storageAccount', 'type': 'str'}, + 'discovery_url': {'key': 'properties.discoveryUrl', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperty'}, + 'hbi_workspace': {'key': 'properties.hbiWorkspace', 'type': 'bool'}, + 'service_provisioned_resource_group': {'key': 'properties.serviceProvisionedResourceGroup', 'type': 'str'}, + 'private_link_count': {'key': 'properties.privateLinkCount', 'type': 'int'}, + 'image_build_compute': {'key': 'properties.imageBuildCompute', 'type': 'str'}, + 'allow_public_access_when_behind_vnet': {'key': 'properties.allowPublicAccessWhenBehindVnet', 'type': 'bool'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'shared_private_link_resources': {'key': 'properties.sharedPrivateLinkResources', 'type': '[SharedPrivateLinkResource]'}, + 'notebook_info': {'key': 'properties.notebookInfo', 'type': 'NotebookResourceInfo'}, + 'service_managed_resources_settings': {'key': 'properties.serviceManagedResourcesSettings', 'type': 'ServiceManagedResourcesSettings'}, + 'primary_user_assigned_identity': {'key': 'properties.primaryUserAssignedIdentity', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'storage_hns_enabled': {'key': 'properties.storageHnsEnabled', 'type': 'bool'}, + 'ml_flow_tracking_uri': {'key': 'properties.mlFlowTrackingUri', 'type': 'str'}, + } + + def __init__( + self, + *, + identity: Optional["ManagedServiceIdentity"] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + sku: Optional["Sku"] = None, + description: Optional[str] = None, + friendly_name: Optional[str] = None, + key_vault: Optional[str] = None, + application_insights: Optional[str] = None, + container_registry: Optional[str] = None, + storage_account: Optional[str] = None, + discovery_url: Optional[str] = None, + encryption: Optional["EncryptionProperty"] = None, + hbi_workspace: Optional[bool] = False, + image_build_compute: Optional[str] = None, + allow_public_access_when_behind_vnet: Optional[bool] = False, + public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, + shared_private_link_resources: Optional[List["SharedPrivateLinkResource"]] = None, + service_managed_resources_settings: Optional["ServiceManagedResourcesSettings"] = None, + primary_user_assigned_identity: Optional[str] = None, + **kwargs + ): + """ + :keyword identity: The identity of the resource. + :paramtype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :keyword location: Specifies the location of the resource. + :paramtype location: str + :keyword tags: A set of tags. Contains resource tags defined as key/value pairs. + :paramtype tags: dict[str, str] + :keyword sku: The sku of the workspace. + :paramtype sku: ~azure.mgmt.machinelearningservices.models.Sku + :keyword description: The description of this workspace. + :paramtype description: str + :keyword friendly_name: The friendly name for this workspace. This name in mutable. + :paramtype friendly_name: str + :keyword key_vault: ARM id of the key vault associated with this workspace. This cannot be + changed once the workspace has been created. + :paramtype key_vault: str + :keyword application_insights: ARM id of the application insights associated with this + workspace. + :paramtype application_insights: str + :keyword container_registry: ARM id of the container registry associated with this workspace. + :paramtype container_registry: str + :keyword storage_account: ARM id of the storage account associated with this workspace. This + cannot be changed once the workspace has been created. + :paramtype storage_account: str + :keyword discovery_url: Url for the discovery service to identify regional endpoints for + machine learning experimentation services. + :paramtype discovery_url: str + :keyword encryption: The encryption settings of Azure ML workspace. + :paramtype encryption: ~azure.mgmt.machinelearningservices.models.EncryptionProperty + :keyword hbi_workspace: The flag to signal HBI data in the workspace and reduce diagnostic data + collected by the service. + :paramtype hbi_workspace: bool + :keyword image_build_compute: The compute name for image build. + :paramtype image_build_compute: str + :keyword allow_public_access_when_behind_vnet: The flag to indicate whether to allow public + access when behind VNet. + :paramtype allow_public_access_when_behind_vnet: bool + :keyword public_network_access: Whether requests from Public Network are allowed. Possible + values include: "Enabled", "Disabled". + :paramtype public_network_access: str or + ~azure.mgmt.machinelearningservices.models.PublicNetworkAccess + :keyword shared_private_link_resources: The list of shared private link resources in this + workspace. + :paramtype shared_private_link_resources: + list[~azure.mgmt.machinelearningservices.models.SharedPrivateLinkResource] + :keyword service_managed_resources_settings: The service managed resource settings. + :paramtype service_managed_resources_settings: + ~azure.mgmt.machinelearningservices.models.ServiceManagedResourcesSettings + :keyword primary_user_assigned_identity: The user assigned identity resource id that represents + the workspace identity. + :paramtype primary_user_assigned_identity: str + """ + super(Workspace, self).__init__(**kwargs) + self.identity = identity + self.location = location + self.tags = tags + self.sku = sku + self.workspace_id = None + self.description = description + self.friendly_name = friendly_name + self.key_vault = key_vault + self.application_insights = application_insights + self.container_registry = container_registry + self.storage_account = storage_account + self.discovery_url = discovery_url + self.provisioning_state = None + self.encryption = encryption + self.hbi_workspace = hbi_workspace + self.service_provisioned_resource_group = None + self.private_link_count = None + self.image_build_compute = image_build_compute + self.allow_public_access_when_behind_vnet = allow_public_access_when_behind_vnet + self.public_network_access = public_network_access + self.private_endpoint_connections = None + self.shared_private_link_resources = shared_private_link_resources + self.notebook_info = None + self.service_managed_resources_settings = service_managed_resources_settings + self.primary_user_assigned_identity = primary_user_assigned_identity + self.tenant_id = None + self.storage_hns_enabled = None + self.ml_flow_tracking_uri = None + + +class WorkspaceConnectionManagedIdentity(msrest.serialization.Model): + """WorkspaceConnectionManagedIdentity. + + :ivar resource_id: + :vartype resource_id: str + :ivar client_id: + :vartype client_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + client_id: Optional[str] = None, + **kwargs + ): + """ + :keyword resource_id: + :paramtype resource_id: str + :keyword client_id: + :paramtype client_id: str + """ + super(WorkspaceConnectionManagedIdentity, self).__init__(**kwargs) + self.resource_id = resource_id + self.client_id = client_id + + +class WorkspaceConnectionPersonalAccessToken(msrest.serialization.Model): + """WorkspaceConnectionPersonalAccessToken. + + :ivar pat: + :vartype pat: str + """ + + _attribute_map = { + 'pat': {'key': 'pat', 'type': 'str'}, + } + + def __init__( + self, + *, + pat: Optional[str] = None, + **kwargs + ): + """ + :keyword pat: + :paramtype pat: str + """ + super(WorkspaceConnectionPersonalAccessToken, self).__init__(**kwargs) + self.pat = pat + + +class WorkspaceConnectionPropertiesV2BasicResource(Resource): + """WorkspaceConnectionPropertiesV2BasicResource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.machinelearningservices.models.SystemData + :ivar properties: Required. + :vartype properties: ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionPropertiesV2 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'WorkspaceConnectionPropertiesV2'}, + } + + def __init__( + self, + *, + properties: "WorkspaceConnectionPropertiesV2", + **kwargs + ): + """ + :keyword properties: Required. + :paramtype properties: + ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionPropertiesV2 + """ + super(WorkspaceConnectionPropertiesV2BasicResource, self).__init__(**kwargs) + self.properties = properties + + +class WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult(msrest.serialization.Model): + """WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: + :vartype value: + list[~azure.mgmt.machinelearningservices.models.WorkspaceConnectionPropertiesV2BasicResource] + :ivar next_link: + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[WorkspaceConnectionPropertiesV2BasicResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["WorkspaceConnectionPropertiesV2BasicResource"]] = None, + **kwargs + ): + """ + :keyword value: + :paramtype value: + list[~azure.mgmt.machinelearningservices.models.WorkspaceConnectionPropertiesV2BasicResource] + """ + super(WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class WorkspaceConnectionSharedAccessSignature(msrest.serialization.Model): + """WorkspaceConnectionSharedAccessSignature. + + :ivar sas: + :vartype sas: str + """ + + _attribute_map = { + 'sas': {'key': 'sas', 'type': 'str'}, + } + + def __init__( + self, + *, + sas: Optional[str] = None, + **kwargs + ): + """ + :keyword sas: + :paramtype sas: str + """ + super(WorkspaceConnectionSharedAccessSignature, self).__init__(**kwargs) + self.sas = sas + + +class WorkspaceConnectionUsernamePassword(msrest.serialization.Model): + """WorkspaceConnectionUsernamePassword. + + :ivar username: + :vartype username: str + :ivar password: + :vartype password: str + """ + + _attribute_map = { + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__( + self, + *, + username: Optional[str] = None, + password: Optional[str] = None, + **kwargs + ): + """ + :keyword username: + :paramtype username: str + :keyword password: + :paramtype password: str + """ + super(WorkspaceConnectionUsernamePassword, self).__init__(**kwargs) + self.username = username + self.password = password + + +class WorkspaceListResult(msrest.serialization.Model): + """The result of a request to list machine learning workspaces. + + :ivar value: The list of machine learning workspaces. Since this list may be incomplete, the + nextLink field should be used to request the next list of machine learning workspaces. + :vartype value: list[~azure.mgmt.machinelearningservices.models.Workspace] + :ivar next_link: The URI that can be used to request the next list of machine learning + workspaces. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Workspace]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Workspace"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: The list of machine learning workspaces. Since this list may be incomplete, the + nextLink field should be used to request the next list of machine learning workspaces. + :paramtype value: list[~azure.mgmt.machinelearningservices.models.Workspace] + :keyword next_link: The URI that can be used to request the next list of machine learning + workspaces. + :paramtype next_link: str + """ + super(WorkspaceListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class WorkspaceUpdateParameters(msrest.serialization.Model): + """The parameters for updating a machine learning workspace. + + :ivar tags: A set of tags. The resource tags for the machine learning workspace. + :vartype tags: dict[str, str] + :ivar sku: The sku of the workspace. + :vartype sku: ~azure.mgmt.machinelearningservices.models.Sku + :ivar identity: The identity of the resource. + :vartype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :ivar description: The description of this workspace. + :vartype description: str + :ivar friendly_name: The friendly name for this workspace. + :vartype friendly_name: str + :ivar image_build_compute: The compute name for image build. + :vartype image_build_compute: str + :ivar service_managed_resources_settings: The service managed resource settings. + :vartype service_managed_resources_settings: + ~azure.mgmt.machinelearningservices.models.ServiceManagedResourcesSettings + :ivar primary_user_assigned_identity: The user assigned identity resource id that represents + the workspace identity. + :vartype primary_user_assigned_identity: str + :ivar public_network_access: Whether requests from Public Network are allowed. Possible values + include: "Enabled", "Disabled". + :vartype public_network_access: str or + ~azure.mgmt.machinelearningservices.models.PublicNetworkAccess + :ivar application_insights: ARM id of the application insights associated with this workspace. + :vartype application_insights: str + :ivar container_registry: ARM id of the container registry associated with this workspace. + :vartype container_registry: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'image_build_compute': {'key': 'properties.imageBuildCompute', 'type': 'str'}, + 'service_managed_resources_settings': {'key': 'properties.serviceManagedResourcesSettings', 'type': 'ServiceManagedResourcesSettings'}, + 'primary_user_assigned_identity': {'key': 'properties.primaryUserAssignedIdentity', 'type': 'str'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'application_insights': {'key': 'properties.applicationInsights', 'type': 'str'}, + 'container_registry': {'key': 'properties.containerRegistry', 'type': 'str'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + sku: Optional["Sku"] = None, + identity: Optional["ManagedServiceIdentity"] = None, + description: Optional[str] = None, + friendly_name: Optional[str] = None, + image_build_compute: Optional[str] = None, + service_managed_resources_settings: Optional["ServiceManagedResourcesSettings"] = None, + primary_user_assigned_identity: Optional[str] = None, + public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, + application_insights: Optional[str] = None, + container_registry: Optional[str] = None, + **kwargs + ): + """ + :keyword tags: A set of tags. The resource tags for the machine learning workspace. + :paramtype tags: dict[str, str] + :keyword sku: The sku of the workspace. + :paramtype sku: ~azure.mgmt.machinelearningservices.models.Sku + :keyword identity: The identity of the resource. + :paramtype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity + :keyword description: The description of this workspace. + :paramtype description: str + :keyword friendly_name: The friendly name for this workspace. + :paramtype friendly_name: str + :keyword image_build_compute: The compute name for image build. + :paramtype image_build_compute: str + :keyword service_managed_resources_settings: The service managed resource settings. + :paramtype service_managed_resources_settings: + ~azure.mgmt.machinelearningservices.models.ServiceManagedResourcesSettings + :keyword primary_user_assigned_identity: The user assigned identity resource id that represents + the workspace identity. + :paramtype primary_user_assigned_identity: str + :keyword public_network_access: Whether requests from Public Network are allowed. Possible + values include: "Enabled", "Disabled". + :paramtype public_network_access: str or + ~azure.mgmt.machinelearningservices.models.PublicNetworkAccess + :keyword application_insights: ARM id of the application insights associated with this + workspace. + :paramtype application_insights: str + :keyword container_registry: ARM id of the container registry associated with this workspace. + :paramtype container_registry: str + """ + super(WorkspaceUpdateParameters, self).__init__(**kwargs) + self.tags = tags + self.sku = sku + self.identity = identity + self.description = description + self.friendly_name = friendly_name + self.image_build_compute = image_build_compute + self.service_managed_resources_settings = service_managed_resources_settings + self.primary_user_assigned_identity = primary_user_assigned_identity + self.public_network_access = public_network_access + self.application_insights = application_insights + self.container_registry = container_registry diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/__init__.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/__init__.py new file mode 100644 index 00000000..40c788dd --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/__init__.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._batch_endpoints_operations import BatchEndpointsOperations +from ._batch_deployments_operations import BatchDeploymentsOperations +from ._code_containers_operations import CodeContainersOperations +from ._code_versions_operations import CodeVersionsOperations +from ._component_containers_operations import ComponentContainersOperations +from ._component_versions_operations import ComponentVersionsOperations +from ._data_containers_operations import DataContainersOperations +from ._data_versions_operations import DataVersionsOperations +from ._datastores_operations import DatastoresOperations +from ._environment_containers_operations import EnvironmentContainersOperations +from ._environment_versions_operations import EnvironmentVersionsOperations +from ._jobs_operations import JobsOperations +from ._model_containers_operations import ModelContainersOperations +from ._model_versions_operations import ModelVersionsOperations +from ._online_endpoints_operations import OnlineEndpointsOperations +from ._online_deployments_operations import OnlineDeploymentsOperations +from ._operations import Operations +from ._workspaces_operations import WorkspacesOperations +from ._usages_operations import UsagesOperations +from ._virtual_machine_sizes_operations import VirtualMachineSizesOperations +from ._quotas_operations import QuotasOperations +from ._compute_operations import ComputeOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations +from ._workspace_connections_operations import WorkspaceConnectionsOperations +from ._workspace_features_operations import WorkspaceFeaturesOperations + +__all__ = [ + 'BatchEndpointsOperations', + 'BatchDeploymentsOperations', + 'CodeContainersOperations', + 'CodeVersionsOperations', + 'ComponentContainersOperations', + 'ComponentVersionsOperations', + 'DataContainersOperations', + 'DataVersionsOperations', + 'DatastoresOperations', + 'EnvironmentContainersOperations', + 'EnvironmentVersionsOperations', + 'JobsOperations', + 'ModelContainersOperations', + 'ModelVersionsOperations', + 'OnlineEndpointsOperations', + 'OnlineDeploymentsOperations', + 'Operations', + 'WorkspacesOperations', + 'UsagesOperations', + 'VirtualMachineSizesOperations', + 'QuotasOperations', + 'ComputeOperations', + 'PrivateEndpointConnectionsOperations', + 'PrivateLinkResourcesOperations', + 'WorkspaceConnectionsOperations', + 'WorkspaceFeaturesOperations', +] diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_batch_deployments_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_batch_deployments_operations.py new file mode 100644 index 00000000..52e4dc1f --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_batch_deployments_operations.py @@ -0,0 +1,837 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + order_by = kwargs.pop('order_by', None) # type: Optional[str] + top = kwargs.pop('top', None) # type: Optional[int] + skip = kwargs.pop('skip', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if order_by is not None: + query_parameters['$orderBy'] = _SERIALIZER.query("order_by", order_by, 'str') + if top is not None: + query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') + if skip is not None: + query_parameters['$skip'] = _SERIALIZER.query("skip", skip, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_delete_request_initial( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + deployment_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, 'str'), + "deploymentName": _SERIALIZER.url("deployment_name", deployment_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + deployment_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, 'str'), + "deploymentName": _SERIALIZER.url("deployment_name", deployment_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_update_request_initial( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + deployment_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, 'str', pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,254}$'), + "deploymentName": _SERIALIZER.url("deployment_name", deployment_name, 'str', pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,254}$'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_create_or_update_request_initial( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + deployment_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, 'str', pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,254}$'), + "deploymentName": _SERIALIZER.url("deployment_name", deployment_name, 'str', pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,254}$'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class BatchDeploymentsOperations(object): + """BatchDeploymentsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + order_by=None, # type: Optional[str] + top=None, # type: Optional[int] + skip=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.BatchDeploymentTrackedResourceArmPaginatedResult"] + """Lists Batch inference deployments in the workspace. + + Lists Batch inference deployments in the workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Endpoint name. + :type endpoint_name: str + :param order_by: Ordering of list. + :type order_by: str + :param top: Top of list. + :type top: int + :param skip: Continuation token for pagination. + :type skip: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BatchDeploymentTrackedResourceArmPaginatedResult + or the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.BatchDeploymentTrackedResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BatchDeploymentTrackedResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + order_by=order_by, + top=top, + skip=skip, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + order_by=order_by, + top=top, + skip=skip, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("BatchDeploymentTrackedResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + deployment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + deployment_name=deployment_name, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers['x-ms-async-operation-timeout']=self._deserialize('duration', response.headers.get('x-ms-async-operation-timeout')) + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}'} # type: ignore + + + @distributed_trace + def begin_delete( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + deployment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Delete Batch Inference deployment (asynchronous). + + Delete Batch Inference deployment (asynchronous). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Endpoint name. + :type endpoint_name: str + :param deployment_name: Inference deployment identifier. + :type deployment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + deployment_name=deployment_name, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}'} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + deployment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.BatchDeploymentData" + """Gets a batch inference deployment by id. + + Gets a batch inference deployment by id. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Endpoint name. + :type endpoint_name: str + :param deployment_name: The identifier for the Batch deployments. + :type deployment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BatchDeploymentData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.BatchDeploymentData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BatchDeploymentData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + deployment_name=deployment_name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BatchDeploymentData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}'} # type: ignore + + + def _update_initial( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + deployment_name, # type: str + body, # type: "_models.PartialBatchDeploymentPartialTrackedResource" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.BatchDeploymentData"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BatchDeploymentData"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'PartialBatchDeploymentPartialTrackedResource') + + request = build_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + deployment_name=deployment_name, + content_type=content_type, + json=_json, + template_url=self._update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize('BatchDeploymentData', pipeline_response) + + if response.status_code == 202: + response_headers['x-ms-async-operation-timeout']=self._deserialize('duration', response.headers.get('x-ms-async-operation-timeout')) + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}'} # type: ignore + + + @distributed_trace + def begin_update( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + deployment_name, # type: str + body, # type: "_models.PartialBatchDeploymentPartialTrackedResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.BatchDeploymentData"] + """Update a batch inference deployment (asynchronous). + + Update a batch inference deployment (asynchronous). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Inference endpoint name. + :type endpoint_name: str + :param deployment_name: The identifier for the Batch inference deployment. + :type deployment_name: str + :param body: Batch inference deployment definition object. + :type body: + ~azure.mgmt.machinelearningservices.models.PartialBatchDeploymentPartialTrackedResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either BatchDeploymentData or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.machinelearningservices.models.BatchDeploymentData] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BatchDeploymentData"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + deployment_name=deployment_name, + body=body, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('BatchDeploymentData', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + deployment_name, # type: str + body, # type: "_models.BatchDeploymentData" + **kwargs # type: Any + ): + # type: (...) -> "_models.BatchDeploymentData" + cls = kwargs.pop('cls', None) # type: ClsType["_models.BatchDeploymentData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'BatchDeploymentData') + + request = build_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + deployment_name=deployment_name, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize('BatchDeploymentData', pipeline_response) + + if response.status_code == 201: + response_headers['x-ms-async-operation-timeout']=self._deserialize('duration', response.headers.get('x-ms-async-operation-timeout')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + + deserialized = self._deserialize('BatchDeploymentData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}'} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + deployment_name, # type: str + body, # type: "_models.BatchDeploymentData" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.BatchDeploymentData"] + """Creates/updates a batch inference deployment (asynchronous). + + Creates/updates a batch inference deployment (asynchronous). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Inference endpoint name. + :type endpoint_name: str + :param deployment_name: The identifier for the Batch inference deployment. + :type deployment_name: str + :param body: Batch inference deployment definition object. + :type body: ~azure.mgmt.machinelearningservices.models.BatchDeploymentData + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either BatchDeploymentData or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.machinelearningservices.models.BatchDeploymentData] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BatchDeploymentData"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + deployment_name=deployment_name, + body=body, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('BatchDeploymentData', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}'} # type: ignore diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_batch_endpoints_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_batch_endpoints_operations.py new file mode 100644 index 00000000..dc1c0888 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_batch_endpoints_operations.py @@ -0,0 +1,889 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + count = kwargs.pop('count', None) # type: Optional[int] + skip = kwargs.pop('skip', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if count is not None: + query_parameters['count'] = _SERIALIZER.query("count", count, 'int') + if skip is not None: + query_parameters['$skip'] = _SERIALIZER.query("skip", skip, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_delete_request_initial( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_update_request_initial( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, 'str', pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,254}$'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_create_or_update_request_initial( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, 'str', pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,254}$'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_list_keys_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/listkeys') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class BatchEndpointsOperations(object): + """BatchEndpointsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name, # type: str + workspace_name, # type: str + count=None, # type: Optional[int] + skip=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.BatchEndpointTrackedResourceArmPaginatedResult"] + """Lists Batch inference endpoint in the workspace. + + Lists Batch inference endpoint in the workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param count: Number of endpoints to be retrieved in a page of results. + :type count: int + :param skip: Continuation token for pagination. + :type skip: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BatchEndpointTrackedResourceArmPaginatedResult or + the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.BatchEndpointTrackedResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BatchEndpointTrackedResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + count=count, + skip=skip, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + count=count, + skip=skip, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("BatchEndpointTrackedResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers['x-ms-async-operation-timeout']=self._deserialize('duration', response.headers.get('x-ms-async-operation-timeout')) + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}'} # type: ignore + + + @distributed_trace + def begin_delete( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Delete Batch Inference Endpoint (asynchronous). + + Delete Batch Inference Endpoint (asynchronous). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Inference Endpoint name. + :type endpoint_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}'} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.BatchEndpointData" + """Gets a batch inference endpoint by name. + + Gets a batch inference endpoint by name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Name for the Batch Endpoint. + :type endpoint_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BatchEndpointData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.BatchEndpointData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BatchEndpointData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BatchEndpointData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}'} # type: ignore + + + def _update_initial( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + body, # type: "_models.PartialBatchEndpointPartialTrackedResource" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.BatchEndpointData"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BatchEndpointData"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'PartialBatchEndpointPartialTrackedResource') + + request = build_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + content_type=content_type, + json=_json, + template_url=self._update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize('BatchEndpointData', pipeline_response) + + if response.status_code == 202: + response_headers['x-ms-async-operation-timeout']=self._deserialize('duration', response.headers.get('x-ms-async-operation-timeout')) + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}'} # type: ignore + + + @distributed_trace + def begin_update( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + body, # type: "_models.PartialBatchEndpointPartialTrackedResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.BatchEndpointData"] + """Update a batch inference endpoint (asynchronous). + + Update a batch inference endpoint (asynchronous). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Name for the Batch inference endpoint. + :type endpoint_name: str + :param body: Mutable batch inference endpoint definition object. + :type body: + ~azure.mgmt.machinelearningservices.models.PartialBatchEndpointPartialTrackedResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either BatchEndpointData or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.machinelearningservices.models.BatchEndpointData] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BatchEndpointData"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + body=body, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('BatchEndpointData', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + body, # type: "_models.BatchEndpointData" + **kwargs # type: Any + ): + # type: (...) -> "_models.BatchEndpointData" + cls = kwargs.pop('cls', None) # type: ClsType["_models.BatchEndpointData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'BatchEndpointData') + + request = build_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize('BatchEndpointData', pipeline_response) + + if response.status_code == 201: + response_headers['x-ms-async-operation-timeout']=self._deserialize('duration', response.headers.get('x-ms-async-operation-timeout')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + + deserialized = self._deserialize('BatchEndpointData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}'} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + body, # type: "_models.BatchEndpointData" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.BatchEndpointData"] + """Creates a batch inference endpoint (asynchronous). + + Creates a batch inference endpoint (asynchronous). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Name for the Batch inference endpoint. + :type endpoint_name: str + :param body: Batch inference endpoint definition object. + :type body: ~azure.mgmt.machinelearningservices.models.BatchEndpointData + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either BatchEndpointData or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.machinelearningservices.models.BatchEndpointData] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BatchEndpointData"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + body=body, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('BatchEndpointData', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}'} # type: ignore + + @distributed_trace + def list_keys( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.EndpointAuthKeys" + """Lists batch Inference Endpoint keys. + + Lists batch Inference Endpoint keys. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Inference Endpoint name. + :type endpoint_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EndpointAuthKeys, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.EndpointAuthKeys + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EndpointAuthKeys"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_list_keys_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + template_url=self.list_keys.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('EndpointAuthKeys', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/listkeys'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_code_containers_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_code_containers_operations.py new file mode 100644 index 00000000..2685804b --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_code_containers_operations.py @@ -0,0 +1,481 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + skip = kwargs.pop('skip', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if skip is not None: + query_parameters['$skip'] = _SERIALIZER.query("skip", skip, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_delete_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_create_or_update_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str', pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,254}$'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class CodeContainersOperations(object): + """CodeContainersOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name, # type: str + workspace_name, # type: str + skip=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.CodeContainerResourceArmPaginatedResult"] + """List containers. + + List containers. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param skip: Continuation token for pagination. + :type skip: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CodeContainerResourceArmPaginatedResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.CodeContainerResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CodeContainerResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + skip=skip, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + skip=skip, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("CodeContainerResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes'} # type: ignore + + @distributed_trace + def delete( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete container. + + Delete container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}'} # type: ignore + + + @distributed_trace + def get( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.CodeContainerData" + """Get container. + + Get container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CodeContainerData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.CodeContainerData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CodeContainerData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CodeContainerData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}'} # type: ignore + + + @distributed_trace + def create_or_update( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + body, # type: "_models.CodeContainerData" + **kwargs # type: Any + ): + # type: (...) -> "_models.CodeContainerData" + """Create or update container. + + Create or update container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :param body: Container entity to create or update. + :type body: ~azure.mgmt.machinelearningservices.models.CodeContainerData + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CodeContainerData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.CodeContainerData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CodeContainerData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'CodeContainerData') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('CodeContainerData', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('CodeContainerData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_code_versions_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_code_versions_operations.py new file mode 100644 index 00000000..ba1a8521 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_code_versions_operations.py @@ -0,0 +1,522 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + order_by = kwargs.pop('order_by', None) # type: Optional[str] + top = kwargs.pop('top', None) # type: Optional[int] + skip = kwargs.pop('skip', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if order_by is not None: + query_parameters['$orderBy'] = _SERIALIZER.query("order_by", order_by, 'str') + if top is not None: + query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') + if skip is not None: + query_parameters['$skip'] = _SERIALIZER.query("skip", skip, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_delete_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + version, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str'), + "version": _SERIALIZER.url("version", version, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + version, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str'), + "version": _SERIALIZER.url("version", version, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_create_or_update_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + version, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str', pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,254}$'), + "version": _SERIALIZER.url("version", version, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class CodeVersionsOperations(object): + """CodeVersionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + order_by=None, # type: Optional[str] + top=None, # type: Optional[int] + skip=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.CodeVersionResourceArmPaginatedResult"] + """List versions. + + List versions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :param order_by: Ordering of list. + :type order_by: str + :param top: Maximum number of records to return. + :type top: int + :param skip: Continuation token for pagination. + :type skip: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CodeVersionResourceArmPaginatedResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.CodeVersionResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CodeVersionResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + order_by=order_by, + top=top, + skip=skip, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + order_by=order_by, + top=top, + skip=skip, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("CodeVersionResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions'} # type: ignore + + @distributed_trace + def delete( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + version, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete version. + + Delete version. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :param version: Version identifier. This is case-sensitive. + :type version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + version=version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}'} # type: ignore + + + @distributed_trace + def get( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + version, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.CodeVersionData" + """Get version. + + Get version. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :param version: Version identifier. This is case-sensitive. + :type version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CodeVersionData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.CodeVersionData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CodeVersionData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + version=version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CodeVersionData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}'} # type: ignore + + + @distributed_trace + def create_or_update( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + version, # type: str + body, # type: "_models.CodeVersionData" + **kwargs # type: Any + ): + # type: (...) -> "_models.CodeVersionData" + """Create or update version. + + Create or update version. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :param version: Version identifier. This is case-sensitive. + :type version: str + :param body: Version entity to create or update. + :type body: ~azure.mgmt.machinelearningservices.models.CodeVersionData + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CodeVersionData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.CodeVersionData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CodeVersionData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'CodeVersionData') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + version=version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('CodeVersionData', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('CodeVersionData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_component_containers_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_component_containers_operations.py new file mode 100644 index 00000000..163029dc --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_component_containers_operations.py @@ -0,0 +1,489 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + skip = kwargs.pop('skip', None) # type: Optional[str] + list_view_type = kwargs.pop('list_view_type', None) # type: Optional[Union[str, "_models.ListViewType"]] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if skip is not None: + query_parameters['$skip'] = _SERIALIZER.query("skip", skip, 'str') + if list_view_type is not None: + query_parameters['listViewType'] = _SERIALIZER.query("list_view_type", list_view_type, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_delete_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_create_or_update_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str', pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,254}$'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class ComponentContainersOperations(object): + """ComponentContainersOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name, # type: str + workspace_name, # type: str + skip=None, # type: Optional[str] + list_view_type=None, # type: Optional[Union[str, "_models.ListViewType"]] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ComponentContainerResourceArmPaginatedResult"] + """List component containers. + + List component containers. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param skip: Continuation token for pagination. + :type skip: str + :param list_view_type: View type for including/excluding (for example) archived entities. + :type list_view_type: str or ~azure.mgmt.machinelearningservices.models.ListViewType + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ComponentContainerResourceArmPaginatedResult or + the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.ComponentContainerResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ComponentContainerResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + skip=skip, + list_view_type=list_view_type, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + skip=skip, + list_view_type=list_view_type, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ComponentContainerResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components'} # type: ignore + + @distributed_trace + def delete( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete container. + + Delete container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}'} # type: ignore + + + @distributed_trace + def get( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ComponentContainerData" + """Get container. + + Get container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ComponentContainerData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ComponentContainerData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ComponentContainerData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ComponentContainerData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}'} # type: ignore + + + @distributed_trace + def create_or_update( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + body, # type: "_models.ComponentContainerData" + **kwargs # type: Any + ): + # type: (...) -> "_models.ComponentContainerData" + """Create or update container. + + Create or update container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. + :type name: str + :param body: Container entity to create or update. + :type body: ~azure.mgmt.machinelearningservices.models.ComponentContainerData + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ComponentContainerData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ComponentContainerData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ComponentContainerData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'ComponentContainerData') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ComponentContainerData', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ComponentContainerData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_component_versions_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_component_versions_operations.py new file mode 100644 index 00000000..c3e7b7aa --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_component_versions_operations.py @@ -0,0 +1,530 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + order_by = kwargs.pop('order_by', None) # type: Optional[str] + top = kwargs.pop('top', None) # type: Optional[int] + skip = kwargs.pop('skip', None) # type: Optional[str] + list_view_type = kwargs.pop('list_view_type', None) # type: Optional[Union[str, "_models.ListViewType"]] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if order_by is not None: + query_parameters['$orderBy'] = _SERIALIZER.query("order_by", order_by, 'str') + if top is not None: + query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') + if skip is not None: + query_parameters['$skip'] = _SERIALIZER.query("skip", skip, 'str') + if list_view_type is not None: + query_parameters['listViewType'] = _SERIALIZER.query("list_view_type", list_view_type, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_delete_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + version, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str'), + "version": _SERIALIZER.url("version", version, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + version, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str'), + "version": _SERIALIZER.url("version", version, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_create_or_update_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + version, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str', pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,254}$'), + "version": _SERIALIZER.url("version", version, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class ComponentVersionsOperations(object): + """ComponentVersionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + order_by=None, # type: Optional[str] + top=None, # type: Optional[int] + skip=None, # type: Optional[str] + list_view_type=None, # type: Optional[Union[str, "_models.ListViewType"]] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ComponentVersionResourceArmPaginatedResult"] + """List component versions. + + List component versions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Component name. + :type name: str + :param order_by: Ordering of list. + :type order_by: str + :param top: Maximum number of records to return. + :type top: int + :param skip: Continuation token for pagination. + :type skip: str + :param list_view_type: View type for including/excluding (for example) archived entities. + :type list_view_type: str or ~azure.mgmt.machinelearningservices.models.ListViewType + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ComponentVersionResourceArmPaginatedResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.ComponentVersionResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ComponentVersionResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + order_by=order_by, + top=top, + skip=skip, + list_view_type=list_view_type, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + order_by=order_by, + top=top, + skip=skip, + list_view_type=list_view_type, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ComponentVersionResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions'} # type: ignore + + @distributed_trace + def delete( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + version, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete version. + + Delete version. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. + :type name: str + :param version: Version identifier. + :type version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + version=version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}'} # type: ignore + + + @distributed_trace + def get( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + version, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ComponentVersionData" + """Get version. + + Get version. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. + :type name: str + :param version: Version identifier. + :type version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ComponentVersionData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ComponentVersionData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ComponentVersionData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + version=version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ComponentVersionData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}'} # type: ignore + + + @distributed_trace + def create_or_update( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + version, # type: str + body, # type: "_models.ComponentVersionData" + **kwargs # type: Any + ): + # type: (...) -> "_models.ComponentVersionData" + """Create or update version. + + Create or update version. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. + :type name: str + :param version: Version identifier. + :type version: str + :param body: Version entity to create or update. + :type body: ~azure.mgmt.machinelearningservices.models.ComponentVersionData + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ComponentVersionData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ComponentVersionData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ComponentVersionData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'ComponentVersionData') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + version=version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ComponentVersionData', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ComponentVersionData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_compute_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_compute_operations.py new file mode 100644 index 00000000..36e1c1cb --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_compute_operations.py @@ -0,0 +1,1418 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + skip = kwargs.pop('skip', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if skip is not None: + query_parameters['$skip'] = _SERIALIZER.query("skip", skip, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + compute_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "computeName": _SERIALIZER.url("compute_name", compute_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_create_or_update_request_initial( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + compute_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "computeName": _SERIALIZER.url("compute_name", compute_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_update_request_initial( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + compute_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "computeName": _SERIALIZER.url("compute_name", compute_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_delete_request_initial( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + compute_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + underlying_resource_action = kwargs.pop('underlying_resource_action') # type: Union[str, "_models.UnderlyingResourceAction"] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "computeName": _SERIALIZER.url("compute_name", compute_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters['underlyingResourceAction'] = _SERIALIZER.query("underlying_resource_action", underlying_resource_action, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_list_nodes_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + compute_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listNodes') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "computeName": _SERIALIZER.url("compute_name", compute_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_list_keys_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + compute_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listKeys') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "computeName": _SERIALIZER.url("compute_name", compute_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_start_request_initial( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + compute_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/start') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "computeName": _SERIALIZER.url("compute_name", compute_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_stop_request_initial( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + compute_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/stop') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "computeName": _SERIALIZER.url("compute_name", compute_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_restart_request_initial( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + compute_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/restart') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "computeName": _SERIALIZER.url("compute_name", compute_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class ComputeOperations(object): + """ComputeOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name, # type: str + workspace_name, # type: str + skip=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PaginatedComputeResourcesList"] + """Gets computes in specified workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param skip: Continuation token for pagination. + :type skip: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PaginatedComputeResourcesList or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.PaginatedComputeResourcesList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PaginatedComputeResourcesList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + skip=skip, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + skip=skip, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("PaginatedComputeResourcesList", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes'} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name, # type: str + workspace_name, # type: str + compute_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ComputeResource" + """Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are + not returned - use 'keys' nested resource to get them. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param compute_name: Name of the Azure Machine Learning compute. + :type compute_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ComputeResource, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ComputeResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ComputeResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ComputeResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name, # type: str + workspace_name, # type: str + compute_name, # type: str + parameters, # type: "_models.ComputeResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.ComputeResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ComputeResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ComputeResource') + + request = build_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize('ComputeResource', pipeline_response) + + if response.status_code == 201: + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + + deserialized = self._deserialize('ComputeResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name, # type: str + workspace_name, # type: str + compute_name, # type: str + parameters, # type: "_models.ComputeResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ComputeResource"] + """Creates or updates compute. This call will overwrite a compute if it exists. This is a + nonrecoverable operation. If your intent is to create a new compute, do a GET first to verify + that it does not exist yet. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param compute_name: Name of the Azure Machine Learning compute. + :type compute_name: str + :param parameters: Payload with Machine Learning compute definition. + :type parameters: ~azure.mgmt.machinelearningservices.models.ComputeResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ComputeResource or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.machinelearningservices.models.ComputeResource] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ComputeResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + parameters=parameters, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ComputeResource', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore + + def _update_initial( + self, + resource_group_name, # type: str + workspace_name, # type: str + compute_name, # type: str + parameters, # type: "_models.ClusterUpdateParameters" + **kwargs # type: Any + ): + # type: (...) -> "_models.ComputeResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ComputeResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ClusterUpdateParameters') + + request = build_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + content_type=content_type, + json=_json, + template_url=self._update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ComputeResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore + + + @distributed_trace + def begin_update( + self, + resource_group_name, # type: str + workspace_name, # type: str + compute_name, # type: str + parameters, # type: "_models.ClusterUpdateParameters" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ComputeResource"] + """Updates properties of a compute. This call will overwrite a compute if it exists. This is a + nonrecoverable operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param compute_name: Name of the Azure Machine Learning compute. + :type compute_name: str + :param parameters: Additional parameters for cluster update. + :type parameters: ~azure.mgmt.machinelearningservices.models.ClusterUpdateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ComputeResource or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.machinelearningservices.models.ComputeResource] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ComputeResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + parameters=parameters, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ComputeResource', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + workspace_name, # type: str + compute_name, # type: str + underlying_resource_action, # type: Union[str, "_models.UnderlyingResourceAction"] + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + underlying_resource_action=underlying_resource_action, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore + + + @distributed_trace + def begin_delete( + self, + resource_group_name, # type: str + workspace_name, # type: str + compute_name, # type: str + underlying_resource_action, # type: Union[str, "_models.UnderlyingResourceAction"] + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes specified Machine Learning compute. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param compute_name: Name of the Azure Machine Learning compute. + :type compute_name: str + :param underlying_resource_action: Delete the underlying compute if 'Delete', or detach the + underlying compute from workspace if 'Detach'. + :type underlying_resource_action: str or + ~azure.mgmt.machinelearningservices.models.UnderlyingResourceAction + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + underlying_resource_action=underlying_resource_action, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore + + @distributed_trace + def list_nodes( + self, + resource_group_name, # type: str + workspace_name, # type: str + compute_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AmlComputeNodesInformation"] + """Get the details (e.g IP address, port etc) of all the compute nodes in the compute. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param compute_name: Name of the Azure Machine Learning compute. + :type compute_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AmlComputeNodesInformation or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.AmlComputeNodesInformation] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AmlComputeNodesInformation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_nodes_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + template_url=self.list_nodes.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_nodes_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("AmlComputeNodesInformation", pipeline_response) + list_of_elem = deserialized.nodes + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_nodes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listNodes'} # type: ignore + + @distributed_trace + def list_keys( + self, + resource_group_name, # type: str + workspace_name, # type: str + compute_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ComputeSecrets" + """Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param compute_name: Name of the Azure Machine Learning compute. + :type compute_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ComputeSecrets, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ComputeSecrets + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ComputeSecrets"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_list_keys_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + template_url=self.list_keys.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ComputeSecrets', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listKeys'} # type: ignore + + + def _start_initial( + self, + resource_group_name, # type: str + workspace_name, # type: str + compute_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_start_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + template_url=self._start_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _start_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/start'} # type: ignore + + + @distributed_trace + def begin_start( + self, + resource_group_name, # type: str + workspace_name, # type: str + compute_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Posts a start action to a compute instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param compute_name: Name of the Azure Machine Learning compute. + :type compute_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._start_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/start'} # type: ignore + + def _stop_initial( + self, + resource_group_name, # type: str + workspace_name, # type: str + compute_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_stop_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + template_url=self._stop_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _stop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/stop'} # type: ignore + + + @distributed_trace + def begin_stop( + self, + resource_group_name, # type: str + workspace_name, # type: str + compute_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Posts a stop action to a compute instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param compute_name: Name of the Azure Machine Learning compute. + :type compute_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._stop_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/stop'} # type: ignore + + def _restart_initial( + self, + resource_group_name, # type: str + workspace_name, # type: str + compute_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_restart_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + template_url=self._restart_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _restart_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/restart'} # type: ignore + + + @distributed_trace + def begin_restart( + self, + resource_group_name, # type: str + workspace_name, # type: str + compute_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Posts a restart action to a compute instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param compute_name: Name of the Azure Machine Learning compute. + :type compute_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/restart'} # type: ignore diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_data_containers_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_data_containers_operations.py new file mode 100644 index 00000000..5d245191 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_data_containers_operations.py @@ -0,0 +1,489 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + skip = kwargs.pop('skip', None) # type: Optional[str] + list_view_type = kwargs.pop('list_view_type', None) # type: Optional[Union[str, "_models.ListViewType"]] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if skip is not None: + query_parameters['$skip'] = _SERIALIZER.query("skip", skip, 'str') + if list_view_type is not None: + query_parameters['listViewType'] = _SERIALIZER.query("list_view_type", list_view_type, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_delete_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_create_or_update_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str', pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,254}$'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class DataContainersOperations(object): + """DataContainersOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name, # type: str + workspace_name, # type: str + skip=None, # type: Optional[str] + list_view_type=None, # type: Optional[Union[str, "_models.ListViewType"]] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DataContainerResourceArmPaginatedResult"] + """List data containers. + + List data containers. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param skip: Continuation token for pagination. + :type skip: str + :param list_view_type: View type for including/excluding (for example) archived entities. + :type list_view_type: str or ~azure.mgmt.machinelearningservices.models.ListViewType + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DataContainerResourceArmPaginatedResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.DataContainerResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataContainerResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + skip=skip, + list_view_type=list_view_type, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + skip=skip, + list_view_type=list_view_type, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("DataContainerResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data'} # type: ignore + + @distributed_trace + def delete( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete container. + + Delete container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}'} # type: ignore + + + @distributed_trace + def get( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.DataContainerData" + """Get container. + + Get container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataContainerData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.DataContainerData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataContainerData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DataContainerData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}'} # type: ignore + + + @distributed_trace + def create_or_update( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + body, # type: "_models.DataContainerData" + **kwargs # type: Any + ): + # type: (...) -> "_models.DataContainerData" + """Create or update container. + + Create or update container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. + :type name: str + :param body: Container entity to create or update. + :type body: ~azure.mgmt.machinelearningservices.models.DataContainerData + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataContainerData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.DataContainerData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataContainerData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'DataContainerData') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DataContainerData', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DataContainerData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_data_versions_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_data_versions_operations.py new file mode 100644 index 00000000..622e6a9c --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_data_versions_operations.py @@ -0,0 +1,542 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + order_by = kwargs.pop('order_by', None) # type: Optional[str] + top = kwargs.pop('top', None) # type: Optional[int] + skip = kwargs.pop('skip', None) # type: Optional[str] + tags = kwargs.pop('tags', None) # type: Optional[str] + list_view_type = kwargs.pop('list_view_type', None) # type: Optional[Union[str, "_models.ListViewType"]] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if order_by is not None: + query_parameters['$orderBy'] = _SERIALIZER.query("order_by", order_by, 'str') + if top is not None: + query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') + if skip is not None: + query_parameters['$skip'] = _SERIALIZER.query("skip", skip, 'str') + if tags is not None: + query_parameters['$tags'] = _SERIALIZER.query("tags", tags, 'str') + if list_view_type is not None: + query_parameters['listViewType'] = _SERIALIZER.query("list_view_type", list_view_type, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_delete_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + version, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str'), + "version": _SERIALIZER.url("version", version, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + version, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str'), + "version": _SERIALIZER.url("version", version, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_create_or_update_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + version, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str', pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,254}$'), + "version": _SERIALIZER.url("version", version, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class DataVersionsOperations(object): + """DataVersionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + order_by=None, # type: Optional[str] + top=None, # type: Optional[int] + skip=None, # type: Optional[str] + tags=None, # type: Optional[str] + list_view_type=None, # type: Optional[Union[str, "_models.ListViewType"]] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DataVersionBaseResourceArmPaginatedResult"] + """List data versions in the data container. + + List data versions in the data container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Data container's name. + :type name: str + :param order_by: Please choose OrderBy value from ['createdtime', 'modifiedtime']. + :type order_by: str + :param top: Top count of results, top count cannot be greater than the page size. + If topCount > page size, results with be default page size count + will be returned. + :type top: int + :param skip: Continuation token for pagination. + :type skip: str + :param tags: Comma-separated list of tag names (and optionally values). Example: + tag1,tag2=value2. + :type tags: str + :param list_view_type: [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, + ListViewType.All]View type for including/excluding (for example) archived entities. + :type list_view_type: str or ~azure.mgmt.machinelearningservices.models.ListViewType + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DataVersionBaseResourceArmPaginatedResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.DataVersionBaseResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataVersionBaseResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + order_by=order_by, + top=top, + skip=skip, + tags=tags, + list_view_type=list_view_type, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + order_by=order_by, + top=top, + skip=skip, + tags=tags, + list_view_type=list_view_type, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("DataVersionBaseResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions'} # type: ignore + + @distributed_trace + def delete( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + version, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete version. + + Delete version. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. + :type name: str + :param version: Version identifier. + :type version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + version=version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}'} # type: ignore + + + @distributed_trace + def get( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + version, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.DataVersionBaseData" + """Get version. + + Get version. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. + :type name: str + :param version: Version identifier. + :type version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataVersionBaseData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.DataVersionBaseData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataVersionBaseData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + version=version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DataVersionBaseData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}'} # type: ignore + + + @distributed_trace + def create_or_update( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + version, # type: str + body, # type: "_models.DataVersionBaseData" + **kwargs # type: Any + ): + # type: (...) -> "_models.DataVersionBaseData" + """Create or update version. + + Create or update version. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. + :type name: str + :param version: Version identifier. + :type version: str + :param body: Version entity to create or update. + :type body: ~azure.mgmt.machinelearningservices.models.DataVersionBaseData + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataVersionBaseData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.DataVersionBaseData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataVersionBaseData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'DataVersionBaseData') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + version=version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DataVersionBaseData', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DataVersionBaseData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_datastores_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_datastores_operations.py new file mode 100644 index 00000000..ba3ca82b --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_datastores_operations.py @@ -0,0 +1,633 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + skip = kwargs.pop('skip', None) # type: Optional[str] + count = kwargs.pop('count', 30) # type: Optional[int] + is_default = kwargs.pop('is_default', None) # type: Optional[bool] + names = kwargs.pop('names', None) # type: Optional[List[str]] + search_text = kwargs.pop('search_text', None) # type: Optional[str] + order_by = kwargs.pop('order_by', None) # type: Optional[str] + order_by_asc = kwargs.pop('order_by_asc', False) # type: Optional[bool] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if skip is not None: + query_parameters['$skip'] = _SERIALIZER.query("skip", skip, 'str') + if count is not None: + query_parameters['count'] = _SERIALIZER.query("count", count, 'int') + if is_default is not None: + query_parameters['isDefault'] = _SERIALIZER.query("is_default", is_default, 'bool') + if names is not None: + query_parameters['names'] = _SERIALIZER.query("names", names, '[str]', div=',') + if search_text is not None: + query_parameters['searchText'] = _SERIALIZER.query("search_text", search_text, 'str') + if order_by is not None: + query_parameters['orderBy'] = _SERIALIZER.query("order_by", order_by, 'str') + if order_by_asc is not None: + query_parameters['orderByAsc'] = _SERIALIZER.query("order_by_asc", order_by_asc, 'bool') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_delete_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_create_or_update_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + skip_validation = kwargs.pop('skip_validation', False) # type: Optional[bool] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str', pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,254}$'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if skip_validation is not None: + query_parameters['skipValidation'] = _SERIALIZER.query("skip_validation", skip_validation, 'bool') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_list_secrets_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}/listSecrets') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class DatastoresOperations(object): + """DatastoresOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name, # type: str + workspace_name, # type: str + skip=None, # type: Optional[str] + count=30, # type: Optional[int] + is_default=None, # type: Optional[bool] + names=None, # type: Optional[List[str]] + search_text=None, # type: Optional[str] + order_by=None, # type: Optional[str] + order_by_asc=False, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DatastoreResourceArmPaginatedResult"] + """List datastores. + + List datastores. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param skip: Continuation token for pagination. + :type skip: str + :param count: Maximum number of results to return. + :type count: int + :param is_default: Filter down to the workspace default datastore. + :type is_default: bool + :param names: Names of datastores to return. + :type names: list[str] + :param search_text: Text to search for in the datastore names. + :type search_text: str + :param order_by: Order by property (createdtime | modifiedtime | name). + :type order_by: str + :param order_by_asc: Order by property in ascending order. + :type order_by_asc: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DatastoreResourceArmPaginatedResult or the result + of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.DatastoreResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DatastoreResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + skip=skip, + count=count, + is_default=is_default, + names=names, + search_text=search_text, + order_by=order_by, + order_by_asc=order_by_asc, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + skip=skip, + count=count, + is_default=is_default, + names=names, + search_text=search_text, + order_by=order_by, + order_by_asc=order_by_asc, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("DatastoreResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores'} # type: ignore + + @distributed_trace + def delete( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete datastore. + + Delete datastore. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Datastore name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}'} # type: ignore + + + @distributed_trace + def get( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.DatastoreData" + """Get datastore. + + Get datastore. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Datastore name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DatastoreData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.DatastoreData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DatastoreData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DatastoreData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}'} # type: ignore + + + @distributed_trace + def create_or_update( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + body, # type: "_models.DatastoreData" + skip_validation=False, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> "_models.DatastoreData" + """Create or update datastore. + + Create or update datastore. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Datastore name. + :type name: str + :param body: Datastore entity to create or update. + :type body: ~azure.mgmt.machinelearningservices.models.DatastoreData + :param skip_validation: Flag to skip validation. + :type skip_validation: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DatastoreData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.DatastoreData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DatastoreData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'DatastoreData') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + content_type=content_type, + json=_json, + skip_validation=skip_validation, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DatastoreData', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DatastoreData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}'} # type: ignore + + + @distributed_trace + def list_secrets( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.DatastoreSecrets" + """Get datastore secrets. + + Get datastore secrets. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Datastore name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DatastoreSecrets, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.DatastoreSecrets + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DatastoreSecrets"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_list_secrets_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + template_url=self.list_secrets.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DatastoreSecrets', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}/listSecrets'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_environment_containers_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_environment_containers_operations.py new file mode 100644 index 00000000..204bce80 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_environment_containers_operations.py @@ -0,0 +1,489 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + skip = kwargs.pop('skip', None) # type: Optional[str] + list_view_type = kwargs.pop('list_view_type', None) # type: Optional[Union[str, "_models.ListViewType"]] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if skip is not None: + query_parameters['$skip'] = _SERIALIZER.query("skip", skip, 'str') + if list_view_type is not None: + query_parameters['listViewType'] = _SERIALIZER.query("list_view_type", list_view_type, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_delete_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_create_or_update_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str', pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,254}$'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class EnvironmentContainersOperations(object): + """EnvironmentContainersOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name, # type: str + workspace_name, # type: str + skip=None, # type: Optional[str] + list_view_type=None, # type: Optional[Union[str, "_models.ListViewType"]] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.EnvironmentContainerResourceArmPaginatedResult"] + """List environment containers. + + List environment containers. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param skip: Continuation token for pagination. + :type skip: str + :param list_view_type: View type for including/excluding (for example) archived entities. + :type list_view_type: str or ~azure.mgmt.machinelearningservices.models.ListViewType + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either EnvironmentContainerResourceArmPaginatedResult or + the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.EnvironmentContainerResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EnvironmentContainerResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + skip=skip, + list_view_type=list_view_type, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + skip=skip, + list_view_type=list_view_type, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("EnvironmentContainerResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments'} # type: ignore + + @distributed_trace + def delete( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete container. + + Delete container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}'} # type: ignore + + + @distributed_trace + def get( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.EnvironmentContainerData" + """Get container. + + Get container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EnvironmentContainerData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.EnvironmentContainerData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EnvironmentContainerData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('EnvironmentContainerData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}'} # type: ignore + + + @distributed_trace + def create_or_update( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + body, # type: "_models.EnvironmentContainerData" + **kwargs # type: Any + ): + # type: (...) -> "_models.EnvironmentContainerData" + """Create or update container. + + Create or update container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :param body: Container entity to create or update. + :type body: ~azure.mgmt.machinelearningservices.models.EnvironmentContainerData + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EnvironmentContainerData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.EnvironmentContainerData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EnvironmentContainerData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'EnvironmentContainerData') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('EnvironmentContainerData', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('EnvironmentContainerData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_environment_versions_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_environment_versions_operations.py new file mode 100644 index 00000000..35e87613 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_environment_versions_operations.py @@ -0,0 +1,530 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + order_by = kwargs.pop('order_by', None) # type: Optional[str] + top = kwargs.pop('top', None) # type: Optional[int] + skip = kwargs.pop('skip', None) # type: Optional[str] + list_view_type = kwargs.pop('list_view_type', None) # type: Optional[Union[str, "_models.ListViewType"]] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if order_by is not None: + query_parameters['$orderBy'] = _SERIALIZER.query("order_by", order_by, 'str') + if top is not None: + query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') + if skip is not None: + query_parameters['$skip'] = _SERIALIZER.query("skip", skip, 'str') + if list_view_type is not None: + query_parameters['listViewType'] = _SERIALIZER.query("list_view_type", list_view_type, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_delete_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + version, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str'), + "version": _SERIALIZER.url("version", version, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + version, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str'), + "version": _SERIALIZER.url("version", version, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_create_or_update_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + version, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str', pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,254}$'), + "version": _SERIALIZER.url("version", version, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class EnvironmentVersionsOperations(object): + """EnvironmentVersionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + order_by=None, # type: Optional[str] + top=None, # type: Optional[int] + skip=None, # type: Optional[str] + list_view_type=None, # type: Optional[Union[str, "_models.ListViewType"]] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.EnvironmentVersionResourceArmPaginatedResult"] + """List versions. + + List versions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :param order_by: Ordering of list. + :type order_by: str + :param top: Maximum number of records to return. + :type top: int + :param skip: Continuation token for pagination. + :type skip: str + :param list_view_type: View type for including/excluding (for example) archived entities. + :type list_view_type: str or ~azure.mgmt.machinelearningservices.models.ListViewType + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either EnvironmentVersionResourceArmPaginatedResult or + the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.EnvironmentVersionResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EnvironmentVersionResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + order_by=order_by, + top=top, + skip=skip, + list_view_type=list_view_type, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + order_by=order_by, + top=top, + skip=skip, + list_view_type=list_view_type, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("EnvironmentVersionResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions'} # type: ignore + + @distributed_trace + def delete( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + version, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete version. + + Delete version. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :param version: Version identifier. This is case-sensitive. + :type version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + version=version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}'} # type: ignore + + + @distributed_trace + def get( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + version, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.EnvironmentVersionData" + """Get version. + + Get version. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :param version: Version identifier. This is case-sensitive. + :type version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EnvironmentVersionData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.EnvironmentVersionData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EnvironmentVersionData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + version=version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('EnvironmentVersionData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}'} # type: ignore + + + @distributed_trace + def create_or_update( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + version, # type: str + body, # type: "_models.EnvironmentVersionData" + **kwargs # type: Any + ): + # type: (...) -> "_models.EnvironmentVersionData" + """Creates or updates an EnvironmentVersion. + + Creates or updates an EnvironmentVersion. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Name of EnvironmentVersion. This is case-sensitive. + :type name: str + :param version: Version of EnvironmentVersion. + :type version: str + :param body: Definition of EnvironmentVersion. + :type body: ~azure.mgmt.machinelearningservices.models.EnvironmentVersionData + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EnvironmentVersionData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.EnvironmentVersionData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EnvironmentVersionData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'EnvironmentVersionData') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + version=version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('EnvironmentVersionData', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('EnvironmentVersionData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_jobs_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_jobs_operations.py new file mode 100644 index 00000000..510b15ac --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_jobs_operations.py @@ -0,0 +1,715 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + skip = kwargs.pop('skip', None) # type: Optional[str] + job_type = kwargs.pop('job_type', None) # type: Optional[str] + tag = kwargs.pop('tag', None) # type: Optional[str] + list_view_type = kwargs.pop('list_view_type', None) # type: Optional[Union[str, "_models.ListViewType"]] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if skip is not None: + query_parameters['$skip'] = _SERIALIZER.query("skip", skip, 'str') + if job_type is not None: + query_parameters['jobType'] = _SERIALIZER.query("job_type", job_type, 'str') + if tag is not None: + query_parameters['tag'] = _SERIALIZER.query("tag", tag, 'str') + if list_view_type is not None: + query_parameters['listViewType'] = _SERIALIZER.query("list_view_type", list_view_type, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_delete_request_initial( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "id": _SERIALIZER.url("id", id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "id": _SERIALIZER.url("id", id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_create_or_update_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "id": _SERIALIZER.url("id", id, 'str', pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,254}$'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_cancel_request_initial( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}/cancel') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "id": _SERIALIZER.url("id", id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class JobsOperations(object): + """JobsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name, # type: str + workspace_name, # type: str + skip=None, # type: Optional[str] + job_type=None, # type: Optional[str] + tag=None, # type: Optional[str] + list_view_type=None, # type: Optional[Union[str, "_models.ListViewType"]] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.JobBaseResourceArmPaginatedResult"] + """Lists Jobs in the workspace. + + Lists Jobs in the workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param skip: Continuation token for pagination. + :type skip: str + :param job_type: Type of job to be returned. + :type job_type: str + :param tag: Jobs returned will have this tag key. + :type tag: str + :param list_view_type: View type for including/excluding (for example) archived entities. + :type list_view_type: str or ~azure.mgmt.machinelearningservices.models.ListViewType + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either JobBaseResourceArmPaginatedResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.JobBaseResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobBaseResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + skip=skip, + job_type=job_type, + tag=tag, + list_view_type=list_view_type, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + skip=skip, + job_type=job_type, + tag=tag, + list_view_type=list_view_type, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("JobBaseResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + workspace_name, # type: str + id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + id=id, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers['x-ms-async-operation-timeout']=self._deserialize('duration', response.headers.get('x-ms-async-operation-timeout')) + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}'} # type: ignore + + + @distributed_trace + def begin_delete( + self, + resource_group_name, # type: str + workspace_name, # type: str + id, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a Job (asynchronous). + + Deletes a Job (asynchronous). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param id: The name and identifier for the Job. This is case-sensitive. + :type id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + id=id, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}'} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name, # type: str + workspace_name, # type: str + id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.JobBaseData" + """Gets a Job by name/id. + + Gets a Job by name/id. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param id: The name and identifier for the Job. This is case-sensitive. + :type id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: JobBaseData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.JobBaseData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobBaseData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + id=id, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('JobBaseData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}'} # type: ignore + + + @distributed_trace + def create_or_update( + self, + resource_group_name, # type: str + workspace_name, # type: str + id, # type: str + body, # type: "_models.JobBaseData" + **kwargs # type: Any + ): + # type: (...) -> "_models.JobBaseData" + """Creates and executes a Job. + + Creates and executes a Job. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param id: The name and identifier for the Job. This is case-sensitive. + :type id: str + :param body: Job definition object. + :type body: ~azure.mgmt.machinelearningservices.models.JobBaseData + :keyword callable cls: A custom type or function that will be passed the direct response + :return: JobBaseData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.JobBaseData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JobBaseData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'JobBaseData') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + id=id, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('JobBaseData', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('JobBaseData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}'} # type: ignore + + + def _cancel_initial( + self, + resource_group_name, # type: str + workspace_name, # type: str + id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_cancel_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + id=id, + template_url=self._cancel_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + + if cls: + return cls(pipeline_response, None, response_headers) + + _cancel_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}/cancel'} # type: ignore + + + @distributed_trace + def begin_cancel( + self, + resource_group_name, # type: str + workspace_name, # type: str + id, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Cancels a Job (asynchronous). + + Cancels a Job (asynchronous). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param id: The name and identifier for the Job. This is case-sensitive. + :type id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._cancel_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + id=id, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}/cancel'} # type: ignore diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_model_containers_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_model_containers_operations.py new file mode 100644 index 00000000..4252fd72 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_model_containers_operations.py @@ -0,0 +1,497 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + skip = kwargs.pop('skip', None) # type: Optional[str] + count = kwargs.pop('count', None) # type: Optional[int] + list_view_type = kwargs.pop('list_view_type', None) # type: Optional[Union[str, "_models.ListViewType"]] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if skip is not None: + query_parameters['$skip'] = _SERIALIZER.query("skip", skip, 'str') + if count is not None: + query_parameters['count'] = _SERIALIZER.query("count", count, 'int') + if list_view_type is not None: + query_parameters['listViewType'] = _SERIALIZER.query("list_view_type", list_view_type, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_delete_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_create_or_update_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str', pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,254}$'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class ModelContainersOperations(object): + """ModelContainersOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name, # type: str + workspace_name, # type: str + skip=None, # type: Optional[str] + count=None, # type: Optional[int] + list_view_type=None, # type: Optional[Union[str, "_models.ListViewType"]] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ModelContainerResourceArmPaginatedResult"] + """List model containers. + + List model containers. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param skip: Continuation token for pagination. + :type skip: str + :param count: Maximum number of results to return. + :type count: int + :param list_view_type: View type for including/excluding (for example) archived entities. + :type list_view_type: str or ~azure.mgmt.machinelearningservices.models.ListViewType + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ModelContainerResourceArmPaginatedResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.ModelContainerResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ModelContainerResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + skip=skip, + count=count, + list_view_type=list_view_type, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + skip=skip, + count=count, + list_view_type=list_view_type, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ModelContainerResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models'} # type: ignore + + @distributed_trace + def delete( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete container. + + Delete container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}'} # type: ignore + + + @distributed_trace + def get( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ModelContainerData" + """Get container. + + Get container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ModelContainerData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ModelContainerData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ModelContainerData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ModelContainerData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}'} # type: ignore + + + @distributed_trace + def create_or_update( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + body, # type: "_models.ModelContainerData" + **kwargs # type: Any + ): + # type: (...) -> "_models.ModelContainerData" + """Create or update container. + + Create or update container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :param body: Container entity to create or update. + :type body: ~azure.mgmt.machinelearningservices.models.ModelContainerData + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ModelContainerData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ModelContainerData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ModelContainerData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'ModelContainerData') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ModelContainerData', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ModelContainerData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_model_versions_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_model_versions_operations.py new file mode 100644 index 00000000..9047e2c1 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_model_versions_operations.py @@ -0,0 +1,580 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + skip = kwargs.pop('skip', None) # type: Optional[str] + order_by = kwargs.pop('order_by', None) # type: Optional[str] + top = kwargs.pop('top', None) # type: Optional[int] + version = kwargs.pop('version', None) # type: Optional[str] + description = kwargs.pop('description', None) # type: Optional[str] + offset = kwargs.pop('offset', None) # type: Optional[int] + tags = kwargs.pop('tags', None) # type: Optional[str] + properties = kwargs.pop('properties', None) # type: Optional[str] + feed = kwargs.pop('feed', None) # type: Optional[str] + list_view_type = kwargs.pop('list_view_type', None) # type: Optional[Union[str, "_models.ListViewType"]] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if skip is not None: + query_parameters['$skip'] = _SERIALIZER.query("skip", skip, 'str') + if order_by is not None: + query_parameters['$orderBy'] = _SERIALIZER.query("order_by", order_by, 'str') + if top is not None: + query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') + if version is not None: + query_parameters['version'] = _SERIALIZER.query("version", version, 'str') + if description is not None: + query_parameters['description'] = _SERIALIZER.query("description", description, 'str') + if offset is not None: + query_parameters['offset'] = _SERIALIZER.query("offset", offset, 'int') + if tags is not None: + query_parameters['tags'] = _SERIALIZER.query("tags", tags, 'str') + if properties is not None: + query_parameters['properties'] = _SERIALIZER.query("properties", properties, 'str') + if feed is not None: + query_parameters['feed'] = _SERIALIZER.query("feed", feed, 'str') + if list_view_type is not None: + query_parameters['listViewType'] = _SERIALIZER.query("list_view_type", list_view_type, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_delete_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + version, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str'), + "version": _SERIALIZER.url("version", version, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + version, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str'), + "version": _SERIALIZER.url("version", version, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_create_or_update_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + version, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "name": _SERIALIZER.url("name", name, 'str', pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,254}$'), + "version": _SERIALIZER.url("version", version, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class ModelVersionsOperations(object): + """ModelVersionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + skip=None, # type: Optional[str] + order_by=None, # type: Optional[str] + top=None, # type: Optional[int] + version=None, # type: Optional[str] + description=None, # type: Optional[str] + offset=None, # type: Optional[int] + tags=None, # type: Optional[str] + properties=None, # type: Optional[str] + feed=None, # type: Optional[str] + list_view_type=None, # type: Optional[Union[str, "_models.ListViewType"]] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ModelVersionResourceArmPaginatedResult"] + """List model versions. + + List model versions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Model name. This is case-sensitive. + :type name: str + :param skip: Continuation token for pagination. + :type skip: str + :param order_by: Ordering of list. + :type order_by: str + :param top: Maximum number of records to return. + :type top: int + :param version: Model version. + :type version: str + :param description: Model description. + :type description: str + :param offset: Number of initial results to skip. + :type offset: int + :param tags: Comma-separated list of tag names (and optionally values). Example: + tag1,tag2=value2. + :type tags: str + :param properties: Comma-separated list of property names (and optionally values). Example: + prop1,prop2=value2. + :type properties: str + :param feed: Name of the feed. + :type feed: str + :param list_view_type: View type for including/excluding (for example) archived entities. + :type list_view_type: str or ~azure.mgmt.machinelearningservices.models.ListViewType + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ModelVersionResourceArmPaginatedResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.ModelVersionResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ModelVersionResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + skip=skip, + order_by=order_by, + top=top, + version=version, + description=description, + offset=offset, + tags=tags, + properties=properties, + feed=feed, + list_view_type=list_view_type, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + skip=skip, + order_by=order_by, + top=top, + version=version, + description=description, + offset=offset, + tags=tags, + properties=properties, + feed=feed, + list_view_type=list_view_type, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ModelVersionResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions'} # type: ignore + + @distributed_trace + def delete( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + version, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete version. + + Delete version. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :param version: Version identifier. This is case-sensitive. + :type version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + version=version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}'} # type: ignore + + + @distributed_trace + def get( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + version, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ModelVersionData" + """Get version. + + Get version. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :param version: Version identifier. This is case-sensitive. + :type version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ModelVersionData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ModelVersionData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ModelVersionData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + version=version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ModelVersionData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}'} # type: ignore + + + @distributed_trace + def create_or_update( + self, + resource_group_name, # type: str + workspace_name, # type: str + name, # type: str + version, # type: str + body, # type: "_models.ModelVersionData" + **kwargs # type: Any + ): + # type: (...) -> "_models.ModelVersionData" + """Create or update version. + + Create or update version. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Container name. This is case-sensitive. + :type name: str + :param version: Version identifier. This is case-sensitive. + :type version: str + :param body: Version entity to create or update. + :type body: ~azure.mgmt.machinelearningservices.models.ModelVersionData + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ModelVersionData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ModelVersionData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ModelVersionData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'ModelVersionData') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + version=version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ModelVersionData', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ModelVersionData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_online_deployments_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_online_deployments_operations.py new file mode 100644 index 00000000..8398212d --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_online_deployments_operations.py @@ -0,0 +1,1098 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + order_by = kwargs.pop('order_by', None) # type: Optional[str] + top = kwargs.pop('top', None) # type: Optional[int] + skip = kwargs.pop('skip', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if order_by is not None: + query_parameters['$orderBy'] = _SERIALIZER.query("order_by", order_by, 'str') + if top is not None: + query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') + if skip is not None: + query_parameters['$skip'] = _SERIALIZER.query("skip", skip, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_delete_request_initial( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + deployment_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, 'str'), + "deploymentName": _SERIALIZER.url("deployment_name", deployment_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + deployment_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, 'str'), + "deploymentName": _SERIALIZER.url("deployment_name", deployment_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_update_request_initial( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + deployment_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, 'str', pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,254}$'), + "deploymentName": _SERIALIZER.url("deployment_name", deployment_name, 'str', pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,254}$'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_create_or_update_request_initial( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + deployment_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, 'str', pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,254}$'), + "deploymentName": _SERIALIZER.url("deployment_name", deployment_name, 'str', pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,254}$'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_get_logs_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + deployment_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}/getLogs') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, 'str'), + "deploymentName": _SERIALIZER.url("deployment_name", deployment_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_list_skus_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + deployment_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + count = kwargs.pop('count', None) # type: Optional[int] + skip = kwargs.pop('skip', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}/skus') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, 'str'), + "deploymentName": _SERIALIZER.url("deployment_name", deployment_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if count is not None: + query_parameters['count'] = _SERIALIZER.query("count", count, 'int') + if skip is not None: + query_parameters['$skip'] = _SERIALIZER.query("skip", skip, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class OnlineDeploymentsOperations(object): + """OnlineDeploymentsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + order_by=None, # type: Optional[str] + top=None, # type: Optional[int] + skip=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.OnlineDeploymentTrackedResourceArmPaginatedResult"] + """List Inference Endpoint Deployments. + + List Inference Endpoint Deployments. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Inference endpoint name. + :type endpoint_name: str + :param order_by: Ordering of list. + :type order_by: str + :param top: Top of list. + :type top: int + :param skip: Continuation token for pagination. + :type skip: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OnlineDeploymentTrackedResourceArmPaginatedResult + or the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.OnlineDeploymentTrackedResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OnlineDeploymentTrackedResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + order_by=order_by, + top=top, + skip=skip, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + order_by=order_by, + top=top, + skip=skip, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("OnlineDeploymentTrackedResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + deployment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + deployment_name=deployment_name, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers['x-ms-async-operation-timeout']=self._deserialize('duration', response.headers.get('x-ms-async-operation-timeout')) + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}'} # type: ignore + + + @distributed_trace + def begin_delete( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + deployment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Delete Inference Endpoint Deployment (asynchronous). + + Delete Inference Endpoint Deployment (asynchronous). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Inference endpoint name. + :type endpoint_name: str + :param deployment_name: Inference Endpoint Deployment name. + :type deployment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + deployment_name=deployment_name, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}'} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + deployment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.OnlineDeploymentData" + """Get Inference Deployment Deployment. + + Get Inference Deployment Deployment. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Inference endpoint name. + :type endpoint_name: str + :param deployment_name: Inference Endpoint Deployment name. + :type deployment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OnlineDeploymentData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.OnlineDeploymentData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OnlineDeploymentData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + deployment_name=deployment_name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('OnlineDeploymentData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}'} # type: ignore + + + def _update_initial( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + deployment_name, # type: str + body, # type: "_models.PartialOnlineDeploymentPartialTrackedResource" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.OnlineDeploymentData"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.OnlineDeploymentData"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'PartialOnlineDeploymentPartialTrackedResource') + + request = build_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + deployment_name=deployment_name, + content_type=content_type, + json=_json, + template_url=self._update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize('OnlineDeploymentData', pipeline_response) + + if response.status_code == 202: + response_headers['x-ms-async-operation-timeout']=self._deserialize('duration', response.headers.get('x-ms-async-operation-timeout')) + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}'} # type: ignore + + + @distributed_trace + def begin_update( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + deployment_name, # type: str + body, # type: "_models.PartialOnlineDeploymentPartialTrackedResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.OnlineDeploymentData"] + """Update Online Deployment (asynchronous). + + Update Online Deployment (asynchronous). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Online Endpoint name. + :type endpoint_name: str + :param deployment_name: Inference Endpoint Deployment name. + :type deployment_name: str + :param body: Online Endpoint entity to apply during operation. + :type body: + ~azure.mgmt.machinelearningservices.models.PartialOnlineDeploymentPartialTrackedResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either OnlineDeploymentData or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.machinelearningservices.models.OnlineDeploymentData] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OnlineDeploymentData"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + deployment_name=deployment_name, + body=body, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('OnlineDeploymentData', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + deployment_name, # type: str + body, # type: "_models.OnlineDeploymentData" + **kwargs # type: Any + ): + # type: (...) -> "_models.OnlineDeploymentData" + cls = kwargs.pop('cls', None) # type: ClsType["_models.OnlineDeploymentData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'OnlineDeploymentData') + + request = build_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + deployment_name=deployment_name, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize('OnlineDeploymentData', pipeline_response) + + if response.status_code == 201: + response_headers['x-ms-async-operation-timeout']=self._deserialize('duration', response.headers.get('x-ms-async-operation-timeout')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + + deserialized = self._deserialize('OnlineDeploymentData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}'} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + deployment_name, # type: str + body, # type: "_models.OnlineDeploymentData" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.OnlineDeploymentData"] + """Create or update Inference Endpoint Deployment (asynchronous). + + Create or update Inference Endpoint Deployment (asynchronous). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Inference endpoint name. + :type endpoint_name: str + :param deployment_name: Inference Endpoint Deployment name. + :type deployment_name: str + :param body: Inference Endpoint entity to apply during operation. + :type body: ~azure.mgmt.machinelearningservices.models.OnlineDeploymentData + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either OnlineDeploymentData or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.machinelearningservices.models.OnlineDeploymentData] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OnlineDeploymentData"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + deployment_name=deployment_name, + body=body, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('OnlineDeploymentData', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}'} # type: ignore + + @distributed_trace + def get_logs( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + deployment_name, # type: str + body, # type: "_models.DeploymentLogsRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.DeploymentLogs" + """Polls an Endpoint operation. + + Polls an Endpoint operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Inference endpoint name. + :type endpoint_name: str + :param deployment_name: The name and identifier for the endpoint. + :type deployment_name: str + :param body: The request containing parameters for retrieving logs. + :type body: ~azure.mgmt.machinelearningservices.models.DeploymentLogsRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeploymentLogs, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.DeploymentLogs + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentLogs"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'DeploymentLogsRequest') + + request = build_get_logs_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + deployment_name=deployment_name, + content_type=content_type, + json=_json, + template_url=self.get_logs.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DeploymentLogs', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}/getLogs'} # type: ignore + + + @distributed_trace + def list_skus( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + deployment_name, # type: str + count=None, # type: Optional[int] + skip=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.SkuResourceArmPaginatedResult"] + """List Inference Endpoint Deployment Skus. + + List Inference Endpoint Deployment Skus. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Inference endpoint name. + :type endpoint_name: str + :param deployment_name: Inference Endpoint Deployment name. + :type deployment_name: str + :param count: Number of Skus to be retrieved in a page of results. + :type count: int + :param skip: Continuation token for pagination. + :type skip: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SkuResourceArmPaginatedResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.SkuResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_skus_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + deployment_name=deployment_name, + count=count, + skip=skip, + template_url=self.list_skus.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_skus_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + deployment_name=deployment_name, + count=count, + skip=skip, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("SkuResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}/skus'} # type: ignore diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_online_endpoints_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_online_endpoints_operations.py new file mode 100644 index 00000000..d13b2793 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_online_endpoints_operations.py @@ -0,0 +1,1195 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + name = kwargs.pop('name', None) # type: Optional[str] + count = kwargs.pop('count', None) # type: Optional[int] + compute_type = kwargs.pop('compute_type', None) # type: Optional[Union[str, "_models.EndpointComputeType"]] + skip = kwargs.pop('skip', None) # type: Optional[str] + tags = kwargs.pop('tags', None) # type: Optional[str] + properties = kwargs.pop('properties', None) # type: Optional[str] + order_by = kwargs.pop('order_by', None) # type: Optional[Union[str, "_models.OrderString"]] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if name is not None: + query_parameters['name'] = _SERIALIZER.query("name", name, 'str') + if count is not None: + query_parameters['count'] = _SERIALIZER.query("count", count, 'int') + if compute_type is not None: + query_parameters['computeType'] = _SERIALIZER.query("compute_type", compute_type, 'str') + if skip is not None: + query_parameters['$skip'] = _SERIALIZER.query("skip", skip, 'str') + if tags is not None: + query_parameters['tags'] = _SERIALIZER.query("tags", tags, 'str') + if properties is not None: + query_parameters['properties'] = _SERIALIZER.query("properties", properties, 'str') + if order_by is not None: + query_parameters['orderBy'] = _SERIALIZER.query("order_by", order_by, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_delete_request_initial( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_update_request_initial( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_create_or_update_request_initial( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, 'str', pattern=r'^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,254}$'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_list_keys_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/listKeys') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_regenerate_keys_request_initial( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/regenerateKeys') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_get_token_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/token') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "endpointName": _SERIALIZER.url("endpoint_name", endpoint_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class OnlineEndpointsOperations(object): + """OnlineEndpointsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name, # type: str + workspace_name, # type: str + name=None, # type: Optional[str] + count=None, # type: Optional[int] + compute_type=None, # type: Optional[Union[str, "_models.EndpointComputeType"]] + skip=None, # type: Optional[str] + tags=None, # type: Optional[str] + properties=None, # type: Optional[str] + order_by=None, # type: Optional[Union[str, "_models.OrderString"]] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.OnlineEndpointTrackedResourceArmPaginatedResult"] + """List Online Endpoints. + + List Online Endpoints. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param name: Name of the endpoint. + :type name: str + :param count: Number of endpoints to be retrieved in a page of results. + :type count: int + :param compute_type: EndpointComputeType to be filtered by. + :type compute_type: str or ~azure.mgmt.machinelearningservices.models.EndpointComputeType + :param skip: Continuation token for pagination. + :type skip: str + :param tags: A set of tags with which to filter the returned models. It is a comma separated + string of tags key or tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + :type tags: str + :param properties: A set of properties with which to filter the returned models. It is a comma + separated string of properties key and/or properties key=value Example: + propKey1,propKey2,propKey3=value3 . + :type properties: str + :param order_by: The option to order the response. + :type order_by: str or ~azure.mgmt.machinelearningservices.models.OrderString + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OnlineEndpointTrackedResourceArmPaginatedResult or + the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.OnlineEndpointTrackedResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OnlineEndpointTrackedResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + count=count, + compute_type=compute_type, + skip=skip, + tags=tags, + properties=properties, + order_by=order_by, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + name=name, + count=count, + compute_type=compute_type, + skip=skip, + tags=tags, + properties=properties, + order_by=order_by, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("OnlineEndpointTrackedResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers['x-ms-async-operation-timeout']=self._deserialize('duration', response.headers.get('x-ms-async-operation-timeout')) + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}'} # type: ignore + + + @distributed_trace + def begin_delete( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Delete Online Endpoint (asynchronous). + + Delete Online Endpoint (asynchronous). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Online Endpoint name. + :type endpoint_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}'} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.OnlineEndpointData" + """Get Online Endpoint. + + Get Online Endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Online Endpoint name. + :type endpoint_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OnlineEndpointData, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.OnlineEndpointData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OnlineEndpointData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('OnlineEndpointData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}'} # type: ignore + + + def _update_initial( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + body, # type: "_models.PartialOnlineEndpointPartialTrackedResource" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.OnlineEndpointData"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.OnlineEndpointData"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'PartialOnlineEndpointPartialTrackedResource') + + request = build_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + content_type=content_type, + json=_json, + template_url=self._update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize('OnlineEndpointData', pipeline_response) + + if response.status_code == 202: + response_headers['x-ms-async-operation-timeout']=self._deserialize('duration', response.headers.get('x-ms-async-operation-timeout')) + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}'} # type: ignore + + + @distributed_trace + def begin_update( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + body, # type: "_models.PartialOnlineEndpointPartialTrackedResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.OnlineEndpointData"] + """Update Online Endpoint (asynchronous). + + Update Online Endpoint (asynchronous). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Online Endpoint name. + :type endpoint_name: str + :param body: Online Endpoint entity to apply during operation. + :type body: + ~azure.mgmt.machinelearningservices.models.PartialOnlineEndpointPartialTrackedResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either OnlineEndpointData or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.machinelearningservices.models.OnlineEndpointData] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OnlineEndpointData"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + body=body, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('OnlineEndpointData', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + body, # type: "_models.OnlineEndpointData" + **kwargs # type: Any + ): + # type: (...) -> "_models.OnlineEndpointData" + cls = kwargs.pop('cls', None) # type: ClsType["_models.OnlineEndpointData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'OnlineEndpointData') + + request = build_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize('OnlineEndpointData', pipeline_response) + + if response.status_code == 201: + response_headers['x-ms-async-operation-timeout']=self._deserialize('duration', response.headers.get('x-ms-async-operation-timeout')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + + deserialized = self._deserialize('OnlineEndpointData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}'} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + body, # type: "_models.OnlineEndpointData" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.OnlineEndpointData"] + """Create or update Online Endpoint (asynchronous). + + Create or update Online Endpoint (asynchronous). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Online Endpoint name. + :type endpoint_name: str + :param body: Online Endpoint entity to apply during operation. + :type body: ~azure.mgmt.machinelearningservices.models.OnlineEndpointData + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either OnlineEndpointData or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.machinelearningservices.models.OnlineEndpointData] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OnlineEndpointData"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + body=body, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('OnlineEndpointData', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}'} # type: ignore + + @distributed_trace + def list_keys( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.EndpointAuthKeys" + """List EndpointAuthKeys for an Endpoint using Key-based authentication. + + List EndpointAuthKeys for an Endpoint using Key-based authentication. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Online Endpoint name. + :type endpoint_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EndpointAuthKeys, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.EndpointAuthKeys + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EndpointAuthKeys"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_list_keys_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + template_url=self.list_keys.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('EndpointAuthKeys', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/listKeys'} # type: ignore + + + def _regenerate_keys_initial( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + body, # type: "_models.RegenerateEndpointKeysRequest" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(body, 'RegenerateEndpointKeysRequest') + + request = build_regenerate_keys_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + content_type=content_type, + json=_json, + template_url=self._regenerate_keys_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + + if cls: + return cls(pipeline_response, None, response_headers) + + _regenerate_keys_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/regenerateKeys'} # type: ignore + + + @distributed_trace + def begin_regenerate_keys( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + body, # type: "_models.RegenerateEndpointKeysRequest" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + + Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Online Endpoint name. + :type endpoint_name: str + :param body: RegenerateKeys request . + :type body: ~azure.mgmt.machinelearningservices.models.RegenerateEndpointKeysRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._regenerate_keys_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + body=body, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_regenerate_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/regenerateKeys'} # type: ignore + + @distributed_trace + def get_token( + self, + resource_group_name, # type: str + workspace_name, # type: str + endpoint_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.EndpointAuthToken" + """Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. + + Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param endpoint_name: Online Endpoint name. + :type endpoint_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EndpointAuthToken, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.EndpointAuthToken + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EndpointAuthToken"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_token_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + endpoint_name=endpoint_name, + template_url=self.get_token.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('EndpointAuthToken', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/token'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_operations.py new file mode 100644 index 00000000..a4b5add6 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_operations.py @@ -0,0 +1,145 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/providers/Microsoft.MachineLearningServices/operations') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class Operations(object): + """Operations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AmlOperationListResult"] + """Lists all of the available Azure Machine Learning Workspaces REST API operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AmlOperationListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.AmlOperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AmlOperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("AmlOperationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.MachineLearningServices/operations'} # type: ignore diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_private_endpoint_connections_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_private_endpoint_connections_operations.py new file mode 100644 index 00000000..5d3c9c58 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,463 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + resource_group_name, # type: str + workspace_name, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections') + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "privateEndpointConnectionName": _SERIALIZER.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_create_or_update_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "privateEndpointConnectionName": _SERIALIZER.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_delete_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "privateEndpointConnectionName": _SERIALIZER.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class PrivateEndpointConnectionsOperations(object): + """PrivateEndpointConnectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PrivateEndpointConnectionListResult"] + """List all the private endpoint connections associated with the workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result + of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.PrivateEndpointConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + subscription_id=self._config.subscription_id, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + subscription_id=self._config.subscription_id, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("PrivateEndpointConnectionListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections'} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name, # type: str + workspace_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnection" + """Gets the specified private endpoint connection associated with the workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection associated + with the workspace. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + private_endpoint_connection_name=private_endpoint_connection_name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + + @distributed_trace + def create_or_update( + self, + resource_group_name, # type: str + workspace_name, # type: str + private_endpoint_connection_name, # type: str + properties, # type: "_models.PrivateEndpointConnection" + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnection" + """Update the state of specified private endpoint connection associated with the workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection associated + with the workspace. + :type private_endpoint_connection_name: str + :param properties: The private endpoint connection properties. + :type properties: ~azure.mgmt.machinelearningservices.models.PrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(properties, 'PrivateEndpointConnection') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + private_endpoint_connection_name=private_endpoint_connection_name, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + + @distributed_trace + def delete( + self, + resource_group_name, # type: str + workspace_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes the specified private endpoint connection associated with the workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection associated + with the workspace. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + private_endpoint_connection_name=private_endpoint_connection_name, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_private_link_resources_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_private_link_resources_operations.py new file mode 100644 index 00000000..df526a63 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_private_link_resources_operations.py @@ -0,0 +1,142 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateLinkResources') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class PrivateLinkResourcesOperations(object): + """PrivateLinkResourcesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateLinkResourceListResult" + """Gets the private link resources that need to be created for a workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResourceListResult, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.PrivateLinkResourceListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResourceListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateLinkResources'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_quotas_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_quotas_operations.py new file mode 100644 index 00000000..91e87974 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_quotas_operations.py @@ -0,0 +1,254 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_update_request( + location, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/updateQuotas') + path_format_arguments = { + "location": _SERIALIZER.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_list_request( + subscription_id, # type: str + location, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/quotas') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "location": _SERIALIZER.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class QuotasOperations(object): + """QuotasOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def update( + self, + location, # type: str + parameters, # type: "_models.QuotaUpdateParameters" + **kwargs # type: Any + ): + # type: (...) -> "_models.UpdateWorkspaceQuotasResult" + """Update quota for each VM family in workspace. + + :param location: The location for update quota is queried. + :type location: str + :param parameters: Quota update parameters. + :type parameters: ~azure.mgmt.machinelearningservices.models.QuotaUpdateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: UpdateWorkspaceQuotasResult, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.UpdateWorkspaceQuotasResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UpdateWorkspaceQuotasResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'QuotaUpdateParameters') + + request = build_update_request( + location=location, + subscription_id=self._config.subscription_id, + content_type=content_type, + json=_json, + template_url=self.update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('UpdateWorkspaceQuotasResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/updateQuotas'} # type: ignore + + + @distributed_trace + def list( + self, + location, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ListWorkspaceQuotas"] + """Gets the currently assigned Workspace Quotas based on VMFamily. + + :param location: The location for which resource usage is queried. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListWorkspaceQuotas or the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.ListWorkspaceQuotas] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListWorkspaceQuotas"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + location=location, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + location=location, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ListWorkspaceQuotas", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/quotas'} # type: ignore diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_usages_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_usages_operations.py new file mode 100644 index 00000000..dabfb605 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_usages_operations.py @@ -0,0 +1,160 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + subscription_id, # type: str + location, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/usages') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "location": _SERIALIZER.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class UsagesOperations(object): + """UsagesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + location, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ListUsagesResult"] + """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. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListUsagesResult or the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.ListUsagesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListUsagesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + location=location, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + location=location, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ListUsagesResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/usages'} # type: ignore diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_virtual_machine_sizes_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_virtual_machine_sizes_operations.py new file mode 100644 index 00000000..6f9d8d29 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_virtual_machine_sizes_operations.py @@ -0,0 +1,136 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + location, # type: str + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/vmSizes') + path_format_arguments = { + "location": _SERIALIZER.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class VirtualMachineSizesOperations(object): + """VirtualMachineSizesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + location, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.VirtualMachineSizeListResult" + """Returns supported VM Sizes in a location. + + :param location: The location upon which virtual-machine-sizes is queried. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualMachineSizeListResult, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.VirtualMachineSizeListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineSizeListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_list_request( + location=location, + subscription_id=self._config.subscription_id, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualMachineSizeListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/vmSizes'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_workspace_connections_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_workspace_connections_operations.py new file mode 100644 index 00000000..6fe40a2d --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_workspace_connections_operations.py @@ -0,0 +1,478 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_create_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + connection_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "connectionName": _SERIALIZER.url("connection_name", connection_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + connection_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "connectionName": _SERIALIZER.url("connection_name", connection_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_delete_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + connection_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "connectionName": _SERIALIZER.url("connection_name", connection_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_list_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + target = kwargs.pop('target', None) # type: Optional[str] + category = kwargs.pop('category', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if target is not None: + query_parameters['target'] = _SERIALIZER.query("target", target, 'str') + if category is not None: + query_parameters['category'] = _SERIALIZER.query("category", category, 'str') + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class WorkspaceConnectionsOperations(object): + """WorkspaceConnectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def create( + self, + resource_group_name, # type: str + workspace_name, # type: str + connection_name, # type: str + parameters, # type: "_models.WorkspaceConnectionPropertiesV2BasicResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.WorkspaceConnectionPropertiesV2BasicResource" + """create. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param connection_name: Friendly name of the workspace connection. + :type connection_name: str + :param parameters: The object for creating or updating a new workspace connection. + :type parameters: + ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionPropertiesV2BasicResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkspaceConnectionPropertiesV2BasicResource, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionPropertiesV2BasicResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkspaceConnectionPropertiesV2BasicResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'WorkspaceConnectionPropertiesV2BasicResource') + + request = build_create_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + connection_name=connection_name, + content_type=content_type, + json=_json, + template_url=self.create.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkspaceConnectionPropertiesV2BasicResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}'} # type: ignore + + + @distributed_trace + def get( + self, + resource_group_name, # type: str + workspace_name, # type: str + connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.WorkspaceConnectionPropertiesV2BasicResource" + """get. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param connection_name: Friendly name of the workspace connection. + :type connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkspaceConnectionPropertiesV2BasicResource, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionPropertiesV2BasicResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkspaceConnectionPropertiesV2BasicResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + connection_name=connection_name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkspaceConnectionPropertiesV2BasicResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}'} # type: ignore + + + @distributed_trace + def delete( + self, + resource_group_name, # type: str + workspace_name, # type: str + connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """delete. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param connection_name: Friendly name of the workspace connection. + :type connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + connection_name=connection_name, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}'} # type: ignore + + + @distributed_trace + def list( + self, + resource_group_name, # type: str + workspace_name, # type: str + target=None, # type: Optional[str] + category=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult"] + """list. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param target: Target of the workspace connection. + :type target: str + :param category: Category of the workspace connection. + :type category: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either + WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult or the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + target=target, + category=category, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + target=target, + category=category, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections'} # type: ignore diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_workspace_features_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_workspace_features_operations.py new file mode 100644 index 00000000..662d4838 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_workspace_features_operations.py @@ -0,0 +1,167 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_list_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/features') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class WorkspaceFeaturesOperations(object): + """WorkspaceFeaturesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ListAmlUserFeatureResult"] + """Lists all enabled features for a workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListAmlUserFeatureResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.ListAmlUserFeatureResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListAmlUserFeatureResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ListAmlUserFeatureResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/features'} # type: ignore diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_workspaces_operations.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_workspaces_operations.py new file mode 100644 index 00000000..7033e6a9 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/operations/_workspaces_operations.py @@ -0,0 +1,1720 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_create_or_update_request_initial( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_delete_request_initial( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_update_request_initial( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_list_by_resource_group_request( + subscription_id, # type: str + resource_group_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + skip = kwargs.pop('skip', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if skip is not None: + query_parameters['$skip'] = _SERIALIZER.query("skip", skip, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_diagnose_request_initial( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/diagnose') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_list_keys_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listKeys') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_resync_keys_request_initial( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_list_by_subscription_request( + subscription_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + skip = kwargs.pop('skip', None) # type: Optional[str] + + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if skip is not None: + query_parameters['$skip'] = _SERIALIZER.query("skip", skip, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_list_notebook_access_token_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookAccessToken') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_prepare_notebook_request_initial( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_list_storage_account_keys_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listStorageAccountKeys') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_list_notebook_keys_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookKeys') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_list_outbound_network_dependencies_endpoints_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2022-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class WorkspacesOperations(object): + """WorkspacesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.machinelearningservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def get( + self, + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.Workspace" + """Gets the properties of the specified machine learning workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Workspace, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.Workspace + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Workspace"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Workspace', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name, # type: str + workspace_name, # type: str + parameters, # type: "_models.Workspace" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.Workspace"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Workspace"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'Workspace') + + request = build_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Workspace', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name, # type: str + workspace_name, # type: str + parameters, # type: "_models.Workspace" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.Workspace"] + """Creates or updates a workspace with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param parameters: The parameters for creating or updating a machine learning workspace. + :type parameters: ~azure.mgmt.machinelearningservices.models.Workspace + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either Workspace or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.machinelearningservices.models.Workspace] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Workspace"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + parameters=parameters, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('Workspace', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} # type: ignore + + + @distributed_trace + def begin_delete( + self, + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a machine learning workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} # type: ignore + + def _update_initial( + self, + resource_group_name, # type: str + workspace_name, # type: str + parameters, # type: "_models.WorkspaceUpdateParameters" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.Workspace"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Workspace"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'WorkspaceUpdateParameters') + + request = build_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + content_type=content_type, + json=_json, + template_url=self._update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Workspace', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} # type: ignore + + + @distributed_trace + def begin_update( + self, + resource_group_name, # type: str + workspace_name, # type: str + parameters, # type: "_models.WorkspaceUpdateParameters" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.Workspace"] + """Updates a machine learning workspace with the specified parameters. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param parameters: The parameters for updating a machine learning workspace. + :type parameters: ~azure.mgmt.machinelearningservices.models.WorkspaceUpdateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either Workspace or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.machinelearningservices.models.Workspace] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Workspace"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + parameters=parameters, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('Workspace', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name, # type: str + skip=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.WorkspaceListResult"] + """Lists all the available machine learning workspaces under the specified resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param skip: Continuation token for pagination. + :type skip: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkspaceListResult or the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.WorkspaceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkspaceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + skip=skip, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + skip=skip, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("WorkspaceListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces'} # type: ignore + + def _diagnose_initial( + self, + resource_group_name, # type: str + workspace_name, # type: str + parameters=None, # type: Optional["_models.DiagnoseWorkspaceParameters"] + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.DiagnoseResponseResult"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.DiagnoseResponseResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if parameters is not None: + _json = self._serialize.body(parameters, 'DiagnoseWorkspaceParameters') + else: + _json = None + + request = build_diagnose_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + content_type=content_type, + json=_json, + template_url=self._diagnose_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize('DiagnoseResponseResult', pipeline_response) + + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + + _diagnose_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/diagnose'} # type: ignore + + + @distributed_trace + def begin_diagnose( + self, + resource_group_name, # type: str + workspace_name, # type: str + parameters=None, # type: Optional["_models.DiagnoseWorkspaceParameters"] + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.DiagnoseResponseResult"] + """Diagnose workspace setup issue. + + Diagnose workspace setup issue. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param parameters: The parameter of diagnosing workspace health. + :type parameters: ~azure.mgmt.machinelearningservices.models.DiagnoseWorkspaceParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either DiagnoseResponseResult or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.machinelearningservices.models.DiagnoseResponseResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnoseResponseResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._diagnose_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + parameters=parameters, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('DiagnoseResponseResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_diagnose.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/diagnose'} # type: ignore + + @distributed_trace + def list_keys( + self, + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ListWorkspaceKeysResult" + """Lists all the keys associated with this workspace. This includes keys for the storage account, + app insights and password for container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ListWorkspaceKeysResult, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ListWorkspaceKeysResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListWorkspaceKeysResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_list_keys_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + template_url=self.list_keys.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ListWorkspaceKeysResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listKeys'} # type: ignore + + + def _resync_keys_initial( + self, + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_resync_keys_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + template_url=self._resync_keys_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _resync_keys_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys'} # type: ignore + + + @distributed_trace + def begin_resync_keys( + self, + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Resync all the keys associated with this workspace. This includes keys for the storage account, + app insights and password for container registry. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._resync_keys_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_resync_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys'} # type: ignore + + @distributed_trace + def list_by_subscription( + self, + skip=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.WorkspaceListResult"] + """Lists all the available machine learning workspaces under the specified subscription. + + :param skip: Continuation token for pagination. + :type skip: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkspaceListResult or the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.WorkspaceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkspaceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_subscription_request( + subscription_id=self._config.subscription_id, + skip=skip, + template_url=self.list_by_subscription.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_by_subscription_request( + subscription_id=self._config.subscription_id, + skip=skip, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("WorkspaceListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces'} # type: ignore + + @distributed_trace + def list_notebook_access_token( + self, + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.NotebookAccessTokenResult" + """return notebook access token and refresh token. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NotebookAccessTokenResult, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.NotebookAccessTokenResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NotebookAccessTokenResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_list_notebook_access_token_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + template_url=self.list_notebook_access_token.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NotebookAccessTokenResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_notebook_access_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookAccessToken'} # type: ignore + + + def _prepare_notebook_initial( + self, + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.NotebookResourceInfo"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.NotebookResourceInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_prepare_notebook_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + template_url=self._prepare_notebook_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('NotebookResourceInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _prepare_notebook_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook'} # type: ignore + + + @distributed_trace + def begin_prepare_notebook( + self, + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.NotebookResourceInfo"] + """Prepare a notebook. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either NotebookResourceInfo or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.machinelearningservices.models.NotebookResourceInfo] + :raises: ~azure.core.exceptions.HttpResponseError + """ + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NotebookResourceInfo"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._prepare_notebook_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('NotebookResourceInfo', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_prepare_notebook.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook'} # type: ignore + + @distributed_trace + def list_storage_account_keys( + self, + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ListStorageAccountKeysResult" + """List storage account keys of a workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ListStorageAccountKeysResult, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ListStorageAccountKeysResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListStorageAccountKeysResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_list_storage_account_keys_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + template_url=self.list_storage_account_keys.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ListStorageAccountKeysResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_storage_account_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listStorageAccountKeys'} # type: ignore + + + @distributed_trace + def list_notebook_keys( + self, + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ListNotebookKeysResult" + """List keys of a notebook. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ListNotebookKeysResult, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ListNotebookKeysResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListNotebookKeysResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_list_notebook_keys_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + template_url=self.list_notebook_keys.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ListNotebookKeysResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_notebook_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookKeys'} # type: ignore + + + @distributed_trace + def list_outbound_network_dependencies_endpoints( + self, + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ExternalFQDNResponse" + """Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) + programmatically. + + Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) + programmatically. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExternalFQDNResponse, or the result of cls(response) + :rtype: ~azure.mgmt.machinelearningservices.models.ExternalFQDNResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExternalFQDNResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_list_outbound_network_dependencies_endpoints_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + template_url=self.list_outbound_network_dependencies_endpoints.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExternalFQDNResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints'} # type: ignore + diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/py.typed b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/py.typed new file mode 100644 index 00000000..e5aff4f8 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_restclient/v2022_05_01/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file |
