diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/CHANGELOG.md b/sdk/machinelearning/azure-mgmt-machinelearningcompute/CHANGELOG.md
new file mode 100644
index 000000000000..578ed6acf479
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Release History
+
+## 0.1.0 (1970-01-01)
+
+* Initial Release
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/MANIFEST.in b/sdk/machinelearning/azure-mgmt-machinelearningcompute/MANIFEST.in
new file mode 100644
index 000000000000..3a9b6517412b
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/MANIFEST.in
@@ -0,0 +1,6 @@
+include _meta.json
+recursive-include tests *.py *.yaml
+include *.md
+include azure/__init__.py
+include azure/mgmt/__init__.py
+
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/README.md b/sdk/machinelearning/azure-mgmt-machinelearningcompute/README.md
new file mode 100644
index 000000000000..9526886f62eb
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/README.md
@@ -0,0 +1,27 @@
+# Microsoft Azure SDK for Python
+
+This is the Microsoft Azure MyService Management Client Library.
+This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8.
+For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
+
+
+# Usage
+
+
+To learn how to use this package, see the [quickstart guide](https://aka.ms/azsdk/python/mgmt)
+
+
+
+For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure/)
+Code samples for this package can be found at [MyService Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com.
+Additional code samples for different Azure services are available at [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)
+
+
+# Provide Feedback
+
+If you encounter any bugs or have suggestions, please file an issue in the
+[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
+section of the project.
+
+
+![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-machinelearningcompute%2FREADME.png)
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/_meta.json b/sdk/machinelearning/azure-mgmt-machinelearningcompute/_meta.json
new file mode 100644
index 000000000000..f095077255d3
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/_meta.json
@@ -0,0 +1,8 @@
+{
+ "autorest": "3.4.2",
+ "use": "@autorest/python@5.6.6",
+ "commit": "3f1d9a2fd7d79c0e10cca4a4750a00e725ddc541",
+ "repository_url": "https://github.com/Azure/azure-rest-api-specs",
+ "autorest_command": "autorest specification/machinelearningcompute/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.6.6 --version=3.4.2",
+ "readme": "specification/machinelearningcompute/resource-manager/readme.md"
+}
\ No newline at end of file
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/__init__.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/__init__.py
new file mode 100644
index 000000000000..0260537a02bb
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/__init__.py
@@ -0,0 +1 @@
+__path__ = __import__('pkgutil').extend_path(__path__, __name__)
\ No newline at end of file
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/__init__.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/__init__.py
new file mode 100644
index 000000000000..0260537a02bb
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/__init__.py
@@ -0,0 +1 @@
+__path__ = __import__('pkgutil').extend_path(__path__, __name__)
\ No newline at end of file
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/__init__.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/__init__.py
new file mode 100644
index 000000000000..bec3f4cbfb1a
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/__init__.py
@@ -0,0 +1,19 @@
+# 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 ._machine_learning_compute_management_client import MachineLearningComputeManagementClient
+from ._version import VERSION
+
+__version__ = VERSION
+__all__ = ['MachineLearningComputeManagementClient']
+
+try:
+ from ._patch import patch_sdk # type: ignore
+ patch_sdk()
+except ImportError:
+ pass
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/_configuration.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/_configuration.py
new file mode 100644
index 000000000000..36b0434fd671
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/_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 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 MachineLearningComputeManagementClientConfiguration(Configuration):
+ """Configuration for MachineLearningComputeManagementClient.
+
+ 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 Azure subscription ID.
+ :type subscription_id: str
+ """
+
+ def __init__(
+ self,
+ credential, # type: "TokenCredential"
+ subscription_id, # type: str
+ **kwargs # type: Any
+ ):
+ # type: (...) -> None
+ 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.")
+ super(MachineLearningComputeManagementClientConfiguration, self).__init__(**kwargs)
+
+ self.credential = credential
+ self.subscription_id = subscription_id
+ self.api_version = "2017-08-01-preview"
+ self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
+ kwargs.setdefault('sdk_moniker', 'mgmt-machinelearningcompute/{}'.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 = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/_machine_learning_compute_management_client.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/_machine_learning_compute_management_client.py
new file mode 100644
index 000000000000..26ce93371533
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/_machine_learning_compute_management_client.py
@@ -0,0 +1,94 @@
+# 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.mgmt.core import ARMPipelineClient
+from msrest import Deserializer, Serializer
+
+if TYPE_CHECKING:
+ # pylint: disable=unused-import,ungrouped-imports
+ from typing import Any, Optional
+
+ from azure.core.credentials import TokenCredential
+ from azure.core.pipeline.transport import HttpRequest, HttpResponse
+
+from ._configuration import MachineLearningComputeManagementClientConfiguration
+from .operations import OperationalizationClustersOperations
+from .operations import MachineLearningComputeOperations
+from . import models
+
+
+class MachineLearningComputeManagementClient(object):
+ """These APIs allow end users to operate on Azure Machine Learning Compute resources. They support the following operations::code:`
- Create or update a cluster
- Get a cluster
- Patch a cluster
- Delete a cluster
- Get keys for a cluster
- Check if updates are available for system services in a cluster
- Update system services in a cluster
- Get all clusters in a resource group
- Get all clusters in a subscription
`.
+
+ :ivar operationalization_clusters: OperationalizationClustersOperations operations
+ :vartype operationalization_clusters: azure.mgmt.machinelearningcompute.operations.OperationalizationClustersOperations
+ :ivar machine_learning_compute: MachineLearningComputeOperations operations
+ :vartype machine_learning_compute: azure.mgmt.machinelearningcompute.operations.MachineLearningComputeOperations
+ :param credential: Credential needed for the client to connect to Azure.
+ :type credential: ~azure.core.credentials.TokenCredential
+ :param subscription_id: The Azure subscription ID.
+ :type subscription_id: str
+ :param str base_url: Service URL
+ :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=None, # type: Optional[str]
+ **kwargs # type: Any
+ ):
+ # type: (...) -> None
+ if not base_url:
+ base_url = 'https://management.azure.com'
+ self._config = MachineLearningComputeManagementClientConfiguration(credential, 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._serialize.client_side_validation = False
+ self._deserialize = Deserializer(client_models)
+
+ self.operationalization_clusters = OperationalizationClustersOperations(
+ self._client, self._config, self._serialize, self._deserialize)
+ self.machine_learning_compute = MachineLearningComputeOperations(
+ self._client, self._config, self._serialize, self._deserialize)
+
+ def _send_request(self, http_request, **kwargs):
+ # type: (HttpRequest, Any) -> HttpResponse
+ """Runs the network request through the client's chained policies.
+
+ :param http_request: The network request you want to make. Required.
+ :type http_request: ~azure.core.pipeline.transport.HttpRequest
+ :keyword bool stream: Whether the response payload will be streamed. Defaults to True.
+ :return: The response of your network call. Does not do error handling on your response.
+ :rtype: ~azure.core.pipeline.transport.HttpResponse
+ """
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ }
+ http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
+ stream = kwargs.pop("stream", True)
+ pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
+ return pipeline_response.http_response
+
+ def close(self):
+ # type: () -> None
+ self._client.close()
+
+ def __enter__(self):
+ # type: () -> MachineLearningComputeManagementClient
+ self._client.__enter__()
+ return self
+
+ def __exit__(self, *exc_details):
+ # type: (Any) -> None
+ self._client.__exit__(*exc_details)
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/_metadata.json b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/_metadata.json
new file mode 100644
index 000000000000..a3f3617969cd
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/_metadata.json
@@ -0,0 +1,104 @@
+{
+ "chosen_version": "2017-08-01-preview",
+ "total_api_version_list": ["2017-08-01-preview"],
+ "client": {
+ "name": "MachineLearningComputeManagementClient",
+ "filename": "_machine_learning_compute_management_client",
+ "description": "These APIs allow end users to operate on Azure Machine Learning Compute resources. They support the following operations::code:`\u003cul\u003e\u003cli\u003eCreate or update a cluster\u003c/li\u003e\u003cli\u003eGet a cluster\u003c/li\u003e\u003cli\u003ePatch a cluster\u003c/li\u003e\u003cli\u003eDelete a cluster\u003c/li\u003e\u003cli\u003eGet keys for a cluster\u003c/li\u003e\u003cli\u003eCheck if updates are available for system services in a cluster\u003c/li\u003e\u003cli\u003eUpdate system services in a cluster\u003c/li\u003e\u003cli\u003eGet all clusters in a resource group\u003c/li\u003e\u003cli\u003eGet all clusters in a subscription\u003c/li\u003e\u003c/ul\u003e`.",
+ "base_url": "\u0027https://management.azure.com\u0027",
+ "custom_base_url": null,
+ "azure_arm": true,
+ "has_lro_operations": true,
+ "client_side_validation": false,
+ "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MachineLearningComputeManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}",
+ "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MachineLearningComputeManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
+ },
+ "global_parameters": {
+ "sync": {
+ "credential": {
+ "signature": "credential, # type: \"TokenCredential\"",
+ "description": "Credential needed for the client to connect to Azure.",
+ "docstring_type": "~azure.core.credentials.TokenCredential",
+ "required": true
+ },
+ "subscription_id": {
+ "signature": "subscription_id, # type: str",
+ "description": "The Azure subscription ID.",
+ "docstring_type": "str",
+ "required": true
+ }
+ },
+ "async": {
+ "credential": {
+ "signature": "credential: \"AsyncTokenCredential\",",
+ "description": "Credential needed for the client to connect to Azure.",
+ "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
+ "required": true
+ },
+ "subscription_id": {
+ "signature": "subscription_id: str,",
+ "description": "The Azure subscription ID.",
+ "docstring_type": "str",
+ "required": true
+ }
+ },
+ "constant": {
+ },
+ "call": "credential, subscription_id",
+ "service_client_specific": {
+ "sync": {
+ "api_version": {
+ "signature": "api_version=None, # type: Optional[str]",
+ "description": "API version to use if no profile is provided, or if missing in profile.",
+ "docstring_type": "str",
+ "required": false
+ },
+ "base_url": {
+ "signature": "base_url=None, # type: Optional[str]",
+ "description": "Service URL",
+ "docstring_type": "str",
+ "required": false
+ },
+ "profile": {
+ "signature": "profile=KnownProfiles.default, # type: KnownProfiles",
+ "description": "A profile definition, from KnownProfiles to dict.",
+ "docstring_type": "azure.profiles.KnownProfiles",
+ "required": false
+ }
+ },
+ "async": {
+ "api_version": {
+ "signature": "api_version: Optional[str] = None,",
+ "description": "API version to use if no profile is provided, or if missing in profile.",
+ "docstring_type": "str",
+ "required": false
+ },
+ "base_url": {
+ "signature": "base_url: Optional[str] = None,",
+ "description": "Service URL",
+ "docstring_type": "str",
+ "required": false
+ },
+ "profile": {
+ "signature": "profile: KnownProfiles = KnownProfiles.default,",
+ "description": "A profile definition, from KnownProfiles to dict.",
+ "docstring_type": "azure.profiles.KnownProfiles",
+ "required": false
+ }
+ }
+ }
+ },
+ "config": {
+ "credential": true,
+ "credential_scopes": ["https://management.azure.com/.default"],
+ "credential_default_policy_type": "BearerTokenCredentialPolicy",
+ "credential_default_policy_type_has_async_version": true,
+ "credential_key_header_name": null,
+ "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}",
+ "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
+ },
+ "operation_groups": {
+ "operationalization_clusters": "OperationalizationClustersOperations",
+ "machine_learning_compute": "MachineLearningComputeOperations"
+ }
+}
\ No newline at end of file
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/_version.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/_version.py
new file mode 100644
index 000000000000..e5754a47ce68
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/_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 = "1.0.0b1"
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/__init__.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/__init__.py
new file mode 100644
index 000000000000..88188e3f0f13
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/__init__.py
@@ -0,0 +1,10 @@
+# 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 ._machine_learning_compute_management_client import MachineLearningComputeManagementClient
+__all__ = ['MachineLearningComputeManagementClient']
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/_configuration.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/_configuration.py
new file mode 100644
index 000000000000..daa78697b7e1
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/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
+
+from .._version import VERSION
+
+if TYPE_CHECKING:
+ # pylint: disable=unused-import,ungrouped-imports
+ from azure.core.credentials_async import AsyncTokenCredential
+
+
+class MachineLearningComputeManagementClientConfiguration(Configuration):
+ """Configuration for MachineLearningComputeManagementClient.
+
+ 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 Azure subscription ID.
+ :type subscription_id: str
+ """
+
+ def __init__(
+ self,
+ credential: "AsyncTokenCredential",
+ subscription_id: str,
+ **kwargs: Any
+ ) -> None:
+ 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.")
+ super(MachineLearningComputeManagementClientConfiguration, self).__init__(**kwargs)
+
+ self.credential = credential
+ self.subscription_id = subscription_id
+ self.api_version = "2017-08-01-preview"
+ self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
+ kwargs.setdefault('sdk_moniker', 'mgmt-machinelearningcompute/{}'.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 = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/_machine_learning_compute_management_client.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/_machine_learning_compute_management_client.py
new file mode 100644
index 000000000000..23afab1904de
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/_machine_learning_compute_management_client.py
@@ -0,0 +1,87 @@
+# 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, Optional, TYPE_CHECKING
+
+from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
+from azure.mgmt.core import AsyncARMPipelineClient
+from msrest import Deserializer, Serializer
+
+if TYPE_CHECKING:
+ # pylint: disable=unused-import,ungrouped-imports
+ from azure.core.credentials_async import AsyncTokenCredential
+
+from ._configuration import MachineLearningComputeManagementClientConfiguration
+from .operations import OperationalizationClustersOperations
+from .operations import MachineLearningComputeOperations
+from .. import models
+
+
+class MachineLearningComputeManagementClient(object):
+ """These APIs allow end users to operate on Azure Machine Learning Compute resources. They support the following operations::code:`- Create or update a cluster
- Get a cluster
- Patch a cluster
- Delete a cluster
- Get keys for a cluster
- Check if updates are available for system services in a cluster
- Update system services in a cluster
- Get all clusters in a resource group
- Get all clusters in a subscription
`.
+
+ :ivar operationalization_clusters: OperationalizationClustersOperations operations
+ :vartype operationalization_clusters: azure.mgmt.machinelearningcompute.aio.operations.OperationalizationClustersOperations
+ :ivar machine_learning_compute: MachineLearningComputeOperations operations
+ :vartype machine_learning_compute: azure.mgmt.machinelearningcompute.aio.operations.MachineLearningComputeOperations
+ :param credential: Credential needed for the client to connect to Azure.
+ :type credential: ~azure.core.credentials_async.AsyncTokenCredential
+ :param subscription_id: The Azure subscription ID.
+ :type subscription_id: str
+ :param str base_url: Service URL
+ :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: Optional[str] = None,
+ **kwargs: Any
+ ) -> None:
+ if not base_url:
+ base_url = 'https://management.azure.com'
+ self._config = MachineLearningComputeManagementClientConfiguration(credential, 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._serialize.client_side_validation = False
+ self._deserialize = Deserializer(client_models)
+
+ self.operationalization_clusters = OperationalizationClustersOperations(
+ self._client, self._config, self._serialize, self._deserialize)
+ self.machine_learning_compute = MachineLearningComputeOperations(
+ self._client, self._config, self._serialize, self._deserialize)
+
+ async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:
+ """Runs the network request through the client's chained policies.
+
+ :param http_request: The network request you want to make. Required.
+ :type http_request: ~azure.core.pipeline.transport.HttpRequest
+ :keyword bool stream: Whether the response payload will be streamed. Defaults to True.
+ :return: The response of your network call. Does not do error handling on your response.
+ :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse
+ """
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ }
+ http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
+ stream = kwargs.pop("stream", True)
+ pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs)
+ return pipeline_response.http_response
+
+ async def close(self) -> None:
+ await self._client.close()
+
+ async def __aenter__(self) -> "MachineLearningComputeManagementClient":
+ await self._client.__aenter__()
+ return self
+
+ async def __aexit__(self, *exc_details) -> None:
+ await self._client.__aexit__(*exc_details)
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/operations/__init__.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/operations/__init__.py
new file mode 100644
index 000000000000..2dbc2ddbdd04
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/operations/__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 ._operationalization_clusters_operations import OperationalizationClustersOperations
+from ._machine_learning_compute_operations import MachineLearningComputeOperations
+
+__all__ = [
+ 'OperationalizationClustersOperations',
+ 'MachineLearningComputeOperations',
+]
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/operations/_machine_learning_compute_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/operations/_machine_learning_compute_operations.py
new file mode 100644
index 000000000000..370db471f993
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/operations/_machine_learning_compute_operations.py
@@ -0,0 +1,87 @@
+# 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, 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, HttpRequest
+from azure.mgmt.core.exceptions import ARMErrorFormat
+
+from ... import models as _models
+
+T = TypeVar('T')
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+class MachineLearningComputeOperations:
+ """MachineLearningComputeOperations 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.machinelearningcompute.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
+
+ async def list_available_operations(
+ self,
+ **kwargs
+ ) -> "_models.AvailableOperations":
+ """Gets all available operations.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: AvailableOperations, or the result of cls(response)
+ :rtype: ~azure.mgmt.machinelearningcompute.models.AvailableOperations
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableOperations"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2017-08-01-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.list_available_operations.metadata['url'] # type: ignore
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ 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('AvailableOperations', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ list_available_operations.metadata = {'url': '/providers/Microsoft.MachineLearningCompute/operations'} # type: ignore
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/operations/_operationalization_clusters_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/operations/_operationalization_clusters_operations.py
new file mode 100644
index 000000000000..da70526f4970
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/operations/_operationalization_clusters_operations.py
@@ -0,0 +1,804 @@
+# 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, 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, HttpRequest
+from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod
+from azure.mgmt.core.exceptions import ARMErrorFormat
+from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling
+
+from ... import models as _models
+
+T = TypeVar('T')
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+class OperationalizationClustersOperations:
+ """OperationalizationClustersOperations 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.machinelearningcompute.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
+
+ async def _create_or_update_initial(
+ self,
+ resource_group_name: str,
+ cluster_name: str,
+ parameters: "_models.OperationalizationCluster",
+ **kwargs
+ ) -> "_models.OperationalizationCluster":
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationalizationCluster"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2017-08-01-preview"
+ content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
+
+ # Construct URL
+ url = self._create_or_update_initial.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z][-\w\._\(\)]+[a-zA-Z0-9]$'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ body_content_kwargs = {} # type: Dict[str, Any]
+ body_content = self._serialize.body(parameters, 'OperationalizationCluster')
+ body_content_kwargs['content'] = body_content
+ request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
+ 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.ErrorResponseWrapper, response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ if response.status_code == 200:
+ deserialized = self._deserialize('OperationalizationCluster', pipeline_response)
+
+ if response.status_code == 201:
+ deserialized = self._deserialize('OperationalizationCluster', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}'} # type: ignore
+
+ async def begin_create_or_update(
+ self,
+ resource_group_name: str,
+ cluster_name: str,
+ parameters: "_models.OperationalizationCluster",
+ **kwargs
+ ) -> AsyncLROPoller["_models.OperationalizationCluster"]:
+ """Create or update an operationalization cluster.
+
+ :param resource_group_name: Name of the resource group in which the cluster is located.
+ :type resource_group_name: str
+ :param cluster_name: The name of the cluster.
+ :type cluster_name: str
+ :param parameters: Parameters supplied to create or update an Operationalization cluster.
+ :type parameters: ~azure.mgmt.machinelearningcompute.models.OperationalizationCluster
+ :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: Pass in True if you'd like the AsyncARMPolling polling method,
+ False for no polling, or 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 OperationalizationCluster or the result of cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.machinelearningcompute.models.OperationalizationCluster]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationalizationCluster"]
+ 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,
+ cluster_name=cluster_name,
+ parameters=parameters,
+ cls=lambda x,y,z: x,
+ **kwargs
+ )
+
+ kwargs.pop('error_map', None)
+ kwargs.pop('content_type', None)
+
+ def get_long_running_output(pipeline_response):
+ deserialized = self._deserialize('OperationalizationCluster', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+ return deserialized
+
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z][-\w\._\(\)]+[a-zA-Z0-9]$'),
+ }
+
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **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.MachineLearningCompute/operationalizationClusters/{clusterName}'} # type: ignore
+
+ async def get(
+ self,
+ resource_group_name: str,
+ cluster_name: str,
+ **kwargs
+ ) -> "_models.OperationalizationCluster":
+ """Gets the operationalization cluster resource view. Note that the credentials are not returned
+ by this call. Call ListKeys to get them.
+
+ :param resource_group_name: Name of the resource group in which the cluster is located.
+ :type resource_group_name: str
+ :param cluster_name: The name of the cluster.
+ :type cluster_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: OperationalizationCluster, or the result of cls(response)
+ :rtype: ~azure.mgmt.machinelearningcompute.models.OperationalizationCluster
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationalizationCluster"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2017-08-01-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.get.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z][-\w\._\(\)]+[a-zA-Z0-9]$'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ 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.ErrorResponseWrapper, response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('OperationalizationCluster', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}'} # type: ignore
+
+ async def update(
+ self,
+ resource_group_name: str,
+ cluster_name: str,
+ parameters: "_models.OperationalizationClusterUpdateParameters",
+ **kwargs
+ ) -> "_models.OperationalizationCluster":
+ """The PATCH operation can be used to update only the tags for a cluster. Use PUT operation to
+ update other properties.
+
+ :param resource_group_name: Name of the resource group in which the cluster is located.
+ :type resource_group_name: str
+ :param cluster_name: The name of the cluster.
+ :type cluster_name: str
+ :param parameters: The parameters supplied to patch the cluster.
+ :type parameters: ~azure.mgmt.machinelearningcompute.models.OperationalizationClusterUpdateParameters
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: OperationalizationCluster, or the result of cls(response)
+ :rtype: ~azure.mgmt.machinelearningcompute.models.OperationalizationCluster
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationalizationCluster"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2017-08-01-preview"
+ content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
+
+ # Construct URL
+ url = self.update.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z][-\w\._\(\)]+[a-zA-Z0-9]$'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ body_content_kwargs = {} # type: Dict[str, Any]
+ body_content = self._serialize.body(parameters, 'OperationalizationClusterUpdateParameters')
+ body_content_kwargs['content'] = body_content
+ request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
+ 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.ErrorResponseWrapper, response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('OperationalizationCluster', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}'} # type: ignore
+
+ async def _delete_initial(
+ self,
+ resource_group_name: str,
+ cluster_name: str,
+ delete_all: Optional[bool] = None,
+ **kwargs
+ ) -> None:
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2017-08-01-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self._delete_initial.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z][-\w\._\(\)]+[a-zA-Z0-9]$'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+ if delete_all is not None:
+ query_parameters['deleteAll'] = self._serialize.query("delete_all", delete_all, 'bool')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.delete(url, query_parameters, header_parameters)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [202, 204]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponseWrapper, response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 202:
+ 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.MachineLearningCompute/operationalizationClusters/{clusterName}'} # type: ignore
+
+ async def begin_delete(
+ self,
+ resource_group_name: str,
+ cluster_name: str,
+ delete_all: Optional[bool] = None,
+ **kwargs
+ ) -> AsyncLROPoller[None]:
+ """Deletes the specified cluster.
+
+ :param resource_group_name: Name of the resource group in which the cluster is located.
+ :type resource_group_name: str
+ :param cluster_name: The name of the cluster.
+ :type cluster_name: str
+ :param delete_all: If true, deletes all resources associated with this cluster.
+ :type delete_all: bool
+ :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: Pass in True if you'd like the AsyncARMPolling polling method,
+ False for no polling, or 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, 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,
+ cluster_name=cluster_name,
+ delete_all=delete_all,
+ cls=lambda x,y,z: x,
+ **kwargs
+ )
+
+ kwargs.pop('error_map', None)
+ kwargs.pop('content_type', None)
+
+ def get_long_running_output(pipeline_response):
+ if cls:
+ return cls(pipeline_response, None, {})
+
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z][-\w\._\(\)]+[a-zA-Z0-9]$'),
+ }
+
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **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.MachineLearningCompute/operationalizationClusters/{clusterName}'} # type: ignore
+
+ async def list_keys(
+ self,
+ resource_group_name: str,
+ cluster_name: str,
+ **kwargs
+ ) -> "_models.OperationalizationClusterCredentials":
+ """Gets the credentials for the specified cluster such as Storage, ACR and ACS credentials. This
+ is a long running operation because it fetches keys from dependencies.
+
+ :param resource_group_name: Name of the resource group in which the cluster is located.
+ :type resource_group_name: str
+ :param cluster_name: The name of the cluster.
+ :type cluster_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: OperationalizationClusterCredentials, or the result of cls(response)
+ :rtype: ~azure.mgmt.machinelearningcompute.models.OperationalizationClusterCredentials
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationalizationClusterCredentials"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2017-08-01-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.list_keys.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z][-\w\._\(\)]+[a-zA-Z0-9]$'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.post(url, query_parameters, header_parameters)
+ 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('OperationalizationClusterCredentials', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}/listKeys'} # type: ignore
+
+ async def check_system_services_updates_available(
+ self,
+ resource_group_name: str,
+ cluster_name: str,
+ **kwargs
+ ) -> "_models.CheckSystemServicesUpdatesAvailableResponse":
+ """Checks if updates are available for system services in the cluster.
+
+ :param resource_group_name: Name of the resource group in which the cluster is located.
+ :type resource_group_name: str
+ :param cluster_name: The name of the cluster.
+ :type cluster_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: CheckSystemServicesUpdatesAvailableResponse, or the result of cls(response)
+ :rtype: ~azure.mgmt.machinelearningcompute.models.CheckSystemServicesUpdatesAvailableResponse
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckSystemServicesUpdatesAvailableResponse"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2017-08-01-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.check_system_services_updates_available.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z][-\w\._\(\)]+[a-zA-Z0-9]$'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.post(url, query_parameters, header_parameters)
+ 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('CheckSystemServicesUpdatesAvailableResponse', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ check_system_services_updates_available.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}/checkSystemServicesUpdatesAvailable'} # type: ignore
+
+ async def _update_system_services_initial(
+ self,
+ resource_group_name: str,
+ cluster_name: str,
+ **kwargs
+ ) -> Optional["_models.UpdateSystemServicesResponse"]:
+ cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.UpdateSystemServicesResponse"]]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2017-08-01-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self._update_system_services_initial.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z][-\w\._\(\)]+[a-zA-Z0-9]$'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.post(url, query_parameters, header_parameters)
+ 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 = {}
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('UpdateSystemServicesResponse', pipeline_response)
+
+ if response.status_code == 202:
+ response_headers['Location']=self._deserialize('str', response.headers.get('Location'))
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers)
+
+ return deserialized
+ _update_system_services_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}/updateSystemServices'} # type: ignore
+
+ async def begin_update_system_services(
+ self,
+ resource_group_name: str,
+ cluster_name: str,
+ **kwargs
+ ) -> AsyncLROPoller["_models.UpdateSystemServicesResponse"]:
+ """Updates system services in a cluster.
+
+ :param resource_group_name: Name of the resource group in which the cluster is located.
+ :type resource_group_name: str
+ :param cluster_name: The name of the cluster.
+ :type cluster_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: Pass in True if you'd like the AsyncARMPolling polling method,
+ False for no polling, or 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 UpdateSystemServicesResponse or the result of cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.machinelearningcompute.models.UpdateSystemServicesResponse]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.UpdateSystemServicesResponse"]
+ 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_system_services_initial(
+ resource_group_name=resource_group_name,
+ cluster_name=cluster_name,
+ cls=lambda x,y,z: x,
+ **kwargs
+ )
+
+ kwargs.pop('error_map', None)
+ kwargs.pop('content_type', None)
+
+ def get_long_running_output(pipeline_response):
+ deserialized = self._deserialize('UpdateSystemServicesResponse', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+ return deserialized
+
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z][-\w\._\(\)]+[a-zA-Z0-9]$'),
+ }
+
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **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_system_services.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}/updateSystemServices'} # type: ignore
+
+ def list_by_resource_group(
+ self,
+ resource_group_name: str,
+ skiptoken: Optional[str] = None,
+ **kwargs
+ ) -> AsyncIterable["_models.PaginatedOperationalizationClustersList"]:
+ """Gets the clusters in the specified resource group.
+
+ :param resource_group_name: Name of the resource group in which the cluster is located.
+ :type resource_group_name: str
+ :param skiptoken: Continuation token for pagination.
+ :type skiptoken: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either PaginatedOperationalizationClustersList or the result of cls(response)
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningcompute.models.PaginatedOperationalizationClustersList]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.PaginatedOperationalizationClustersList"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2017-08-01-preview"
+ accept = "application/json"
+
+ def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ if not next_link:
+ # Construct URL
+ url = self.list_by_resource_group.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+ if skiptoken is not None:
+ query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ else:
+ url = next_link
+ query_parameters = {} # type: Dict[str, Any]
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize('PaginatedOperationalizationClustersList', 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)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return AsyncItemPaged(
+ get_next, extract_data
+ )
+ list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters'} # type: ignore
+
+ def list_by_subscription_id(
+ self,
+ skiptoken: Optional[str] = None,
+ **kwargs
+ ) -> AsyncIterable["_models.PaginatedOperationalizationClustersList"]:
+ """Gets the operationalization clusters in the specified subscription.
+
+ :param skiptoken: Continuation token for pagination.
+ :type skiptoken: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either PaginatedOperationalizationClustersList or the result of cls(response)
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningcompute.models.PaginatedOperationalizationClustersList]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.PaginatedOperationalizationClustersList"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2017-08-01-preview"
+ accept = "application/json"
+
+ def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ if not next_link:
+ # Construct URL
+ url = self.list_by_subscription_id.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+ if skiptoken is not None:
+ query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ else:
+ url = next_link
+ query_parameters = {} # type: Dict[str, Any]
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize('PaginatedOperationalizationClustersList', 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)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return AsyncItemPaged(
+ get_next, extract_data
+ )
+ list_by_subscription_id.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningCompute/operationalizationClusters'} # type: ignore
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/__init__.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/__init__.py
new file mode 100644
index 000000000000..73ceb102b5be
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/__init__.py
@@ -0,0 +1,114 @@
+# 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 AcsClusterProperties
+ from ._models_py3 import AppInsightsCredentials
+ from ._models_py3 import AppInsightsProperties
+ from ._models_py3 import AutoScaleConfiguration
+ from ._models_py3 import AvailableOperations
+ from ._models_py3 import CheckSystemServicesUpdatesAvailableResponse
+ from ._models_py3 import ContainerRegistryCredentials
+ from ._models_py3 import ContainerRegistryProperties
+ from ._models_py3 import ContainerServiceCredentials
+ from ._models_py3 import ErrorDetail
+ from ._models_py3 import ErrorResponse
+ from ._models_py3 import ErrorResponseWrapper
+ from ._models_py3 import GlobalServiceConfiguration
+ from ._models_py3 import KubernetesClusterProperties
+ from ._models_py3 import OperationalizationCluster
+ from ._models_py3 import OperationalizationClusterCredentials
+ from ._models_py3 import OperationalizationClusterUpdateParameters
+ from ._models_py3 import PaginatedOperationalizationClustersList
+ from ._models_py3 import Resource
+ from ._models_py3 import ResourceOperation
+ from ._models_py3 import ResourceOperationDisplay
+ from ._models_py3 import ServiceAuthConfiguration
+ from ._models_py3 import ServicePrincipalProperties
+ from ._models_py3 import SslConfiguration
+ from ._models_py3 import StorageAccountCredentials
+ from ._models_py3 import StorageAccountProperties
+ from ._models_py3 import SystemService
+ from ._models_py3 import UpdateSystemServicesResponse
+except (SyntaxError, ImportError):
+ from ._models import AcsClusterProperties # type: ignore
+ from ._models import AppInsightsCredentials # type: ignore
+ from ._models import AppInsightsProperties # type: ignore
+ from ._models import AutoScaleConfiguration # type: ignore
+ from ._models import AvailableOperations # type: ignore
+ from ._models import CheckSystemServicesUpdatesAvailableResponse # type: ignore
+ from ._models import ContainerRegistryCredentials # type: ignore
+ from ._models import ContainerRegistryProperties # type: ignore
+ from ._models import ContainerServiceCredentials # type: ignore
+ from ._models import ErrorDetail # type: ignore
+ from ._models import ErrorResponse # type: ignore
+ from ._models import ErrorResponseWrapper # type: ignore
+ from ._models import GlobalServiceConfiguration # type: ignore
+ from ._models import KubernetesClusterProperties # type: ignore
+ from ._models import OperationalizationCluster # type: ignore
+ from ._models import OperationalizationClusterCredentials # type: ignore
+ from ._models import OperationalizationClusterUpdateParameters # type: ignore
+ from ._models import PaginatedOperationalizationClustersList # type: ignore
+ from ._models import Resource # type: ignore
+ from ._models import ResourceOperation # type: ignore
+ from ._models import ResourceOperationDisplay # type: ignore
+ from ._models import ServiceAuthConfiguration # type: ignore
+ from ._models import ServicePrincipalProperties # type: ignore
+ from ._models import SslConfiguration # type: ignore
+ from ._models import StorageAccountCredentials # type: ignore
+ from ._models import StorageAccountProperties # type: ignore
+ from ._models import SystemService # type: ignore
+ from ._models import UpdateSystemServicesResponse # type: ignore
+
+from ._machine_learning_compute_management_client_enums import (
+ AgentVMSizeTypes,
+ ClusterType,
+ OperationStatus,
+ OrchestratorType,
+ Status,
+ SystemServiceType,
+ UpdatesAvailable,
+)
+
+__all__ = [
+ 'AcsClusterProperties',
+ 'AppInsightsCredentials',
+ 'AppInsightsProperties',
+ 'AutoScaleConfiguration',
+ 'AvailableOperations',
+ 'CheckSystemServicesUpdatesAvailableResponse',
+ 'ContainerRegistryCredentials',
+ 'ContainerRegistryProperties',
+ 'ContainerServiceCredentials',
+ 'ErrorDetail',
+ 'ErrorResponse',
+ 'ErrorResponseWrapper',
+ 'GlobalServiceConfiguration',
+ 'KubernetesClusterProperties',
+ 'OperationalizationCluster',
+ 'OperationalizationClusterCredentials',
+ 'OperationalizationClusterUpdateParameters',
+ 'PaginatedOperationalizationClustersList',
+ 'Resource',
+ 'ResourceOperation',
+ 'ResourceOperationDisplay',
+ 'ServiceAuthConfiguration',
+ 'ServicePrincipalProperties',
+ 'SslConfiguration',
+ 'StorageAccountCredentials',
+ 'StorageAccountProperties',
+ 'SystemService',
+ 'UpdateSystemServicesResponse',
+ 'AgentVMSizeTypes',
+ 'ClusterType',
+ 'OperationStatus',
+ 'OrchestratorType',
+ 'Status',
+ 'SystemServiceType',
+ 'UpdatesAvailable',
+]
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/_machine_learning_compute_management_client_enums.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/_machine_learning_compute_management_client_enums.py
new file mode 100644
index 000000000000..f07194326483
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/_machine_learning_compute_management_client_enums.py
@@ -0,0 +1,131 @@
+# 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, EnumMeta
+from six import with_metaclass
+
+class _CaseInsensitiveEnumMeta(EnumMeta):
+ def __getitem__(self, name):
+ return super().__getitem__(name.upper())
+
+ def __getattr__(cls, name):
+ """Return the enum member matching `name`
+ We use __getattr__ instead of descriptors or inserting into the enum
+ class' __dict__ in order to support `name` and `value` being both
+ properties for enum members (which live in the class' __dict__) and
+ enum members themselves.
+ """
+ try:
+ return cls._member_map_[name.upper()]
+ except KeyError:
+ raise AttributeError(name)
+
+
+class AgentVMSizeTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+ """The Azure VM size of the agent VM nodes. This cannot be changed once the cluster is created.
+ This list is non exhaustive; refer to
+ https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes for the possible VM
+ sizes.
+ """
+
+ STANDARD_A0 = "Standard_A0"
+ STANDARD_A1 = "Standard_A1"
+ STANDARD_A2 = "Standard_A2"
+ STANDARD_A3 = "Standard_A3"
+ STANDARD_A4 = "Standard_A4"
+ STANDARD_A5 = "Standard_A5"
+ STANDARD_A6 = "Standard_A6"
+ STANDARD_A7 = "Standard_A7"
+ STANDARD_A8 = "Standard_A8"
+ STANDARD_A9 = "Standard_A9"
+ STANDARD_A10 = "Standard_A10"
+ STANDARD_A11 = "Standard_A11"
+ STANDARD_D1 = "Standard_D1"
+ STANDARD_D2 = "Standard_D2"
+ STANDARD_D3 = "Standard_D3"
+ STANDARD_D4 = "Standard_D4"
+ STANDARD_D11 = "Standard_D11"
+ STANDARD_D12 = "Standard_D12"
+ STANDARD_D13 = "Standard_D13"
+ STANDARD_D14 = "Standard_D14"
+ STANDARD_D1_V2 = "Standard_D1_v2"
+ STANDARD_D2_V2 = "Standard_D2_v2"
+ STANDARD_D3_V2 = "Standard_D3_v2"
+ STANDARD_D4_V2 = "Standard_D4_v2"
+ STANDARD_D5_V2 = "Standard_D5_v2"
+ STANDARD_D11_V2 = "Standard_D11_v2"
+ STANDARD_D12_V2 = "Standard_D12_v2"
+ STANDARD_D13_V2 = "Standard_D13_v2"
+ STANDARD_D14_V2 = "Standard_D14_v2"
+ STANDARD_G1 = "Standard_G1"
+ STANDARD_G2 = "Standard_G2"
+ STANDARD_G3 = "Standard_G3"
+ STANDARD_G4 = "Standard_G4"
+ STANDARD_G5 = "Standard_G5"
+ STANDARD_DS1 = "Standard_DS1"
+ STANDARD_DS2 = "Standard_DS2"
+ STANDARD_DS3 = "Standard_DS3"
+ STANDARD_DS4 = "Standard_DS4"
+ STANDARD_DS11 = "Standard_DS11"
+ STANDARD_DS12 = "Standard_DS12"
+ STANDARD_DS13 = "Standard_DS13"
+ STANDARD_DS14 = "Standard_DS14"
+ STANDARD_GS1 = "Standard_GS1"
+ STANDARD_GS2 = "Standard_GS2"
+ STANDARD_GS3 = "Standard_GS3"
+ STANDARD_GS4 = "Standard_GS4"
+ STANDARD_GS5 = "Standard_GS5"
+
+class ClusterType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+ """The cluster type.
+ """
+
+ ACS = "ACS"
+ LOCAL = "Local"
+
+class OperationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+ """The provision state of the cluster. Valid values are Unknown, Updating, Provisioning,
+ Succeeded, and Failed.
+ """
+
+ UNKNOWN = "Unknown"
+ UPDATING = "Updating"
+ CREATING = "Creating"
+ DELETING = "Deleting"
+ SUCCEEDED = "Succeeded"
+ FAILED = "Failed"
+ CANCELED = "Canceled"
+
+class OrchestratorType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+ """Type of orchestrator. It cannot be changed once the cluster is created.
+ """
+
+ KUBERNETES = "Kubernetes"
+ NONE = "None"
+
+class Status(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+ """SSL status. Allowed values are Enabled and Disabled.
+ """
+
+ ENABLED = "Enabled"
+ DISABLED = "Disabled"
+
+class SystemServiceType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+ """The system service type
+ """
+
+ NONE = "None"
+ SCORING_FRONT_END = "ScoringFrontEnd"
+ BATCH_FRONT_END = "BatchFrontEnd"
+
+class UpdatesAvailable(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+ """Yes if updates are available for the system services, No if not.
+ """
+
+ YES = "Yes"
+ NO = "No"
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/_models.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/_models.py
new file mode 100644
index 000000000000..f6ed840f0cc4
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/_models.py
@@ -0,0 +1,954 @@
+# 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 AcsClusterProperties(msrest.serialization.Model):
+ """Information about the container service backing the cluster.
+
+ 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 cluster_fqdn: The FQDN of the cluster.
+ :vartype cluster_fqdn: str
+ :param orchestrator_type: Required. Type of orchestrator. It cannot be changed once the cluster
+ is created. Possible values include: "Kubernetes", "None".
+ :type orchestrator_type: str or ~azure.mgmt.machinelearningcompute.models.OrchestratorType
+ :param orchestrator_properties: Orchestrator specific properties.
+ :type orchestrator_properties:
+ ~azure.mgmt.machinelearningcompute.models.KubernetesClusterProperties
+ :param system_services: The system services deployed to the cluster.
+ :type system_services: list[~azure.mgmt.machinelearningcompute.models.SystemService]
+ :param master_count: The number of master nodes in the container service.
+ :type master_count: int
+ :param agent_count: The number of agent nodes in the Container Service. This can be changed to
+ scale the cluster.
+ :type agent_count: int
+ :param agent_vm_size: The Azure VM size of the agent VM nodes. This cannot be changed once the
+ cluster is created. This list is non exhaustive; refer to
+ https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes for the possible VM
+ sizes. Possible values include: "Standard_A0", "Standard_A1", "Standard_A2", "Standard_A3",
+ "Standard_A4", "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A9",
+ "Standard_A10", "Standard_A11", "Standard_D1", "Standard_D2", "Standard_D3", "Standard_D4",
+ "Standard_D11", "Standard_D12", "Standard_D13", "Standard_D14", "Standard_D1_v2",
+ "Standard_D2_v2", "Standard_D3_v2", "Standard_D4_v2", "Standard_D5_v2", "Standard_D11_v2",
+ "Standard_D12_v2", "Standard_D13_v2", "Standard_D14_v2", "Standard_G1", "Standard_G2",
+ "Standard_G3", "Standard_G4", "Standard_G5", "Standard_DS1", "Standard_DS2", "Standard_DS3",
+ "Standard_DS4", "Standard_DS11", "Standard_DS12", "Standard_DS13", "Standard_DS14",
+ "Standard_GS1", "Standard_GS2", "Standard_GS3", "Standard_GS4", "Standard_GS5". Default value:
+ "Standard_D3_v2".
+ :type agent_vm_size: str or ~azure.mgmt.machinelearningcompute.models.AgentVMSizeTypes
+ """
+
+ _validation = {
+ 'cluster_fqdn': {'readonly': True},
+ 'orchestrator_type': {'required': True},
+ 'master_count': {'maximum': 5, 'minimum': 1},
+ 'agent_count': {'maximum': 100, 'minimum': 1},
+ }
+
+ _attribute_map = {
+ 'cluster_fqdn': {'key': 'clusterFqdn', 'type': 'str'},
+ 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'},
+ 'orchestrator_properties': {'key': 'orchestratorProperties', 'type': 'KubernetesClusterProperties'},
+ 'system_services': {'key': 'systemServices', 'type': '[SystemService]'},
+ 'master_count': {'key': 'masterCount', 'type': 'int'},
+ 'agent_count': {'key': 'agentCount', 'type': 'int'},
+ 'agent_vm_size': {'key': 'agentVmSize', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(AcsClusterProperties, self).__init__(**kwargs)
+ self.cluster_fqdn = None
+ self.orchestrator_type = kwargs['orchestrator_type']
+ self.orchestrator_properties = kwargs.get('orchestrator_properties', None)
+ self.system_services = kwargs.get('system_services', None)
+ self.master_count = kwargs.get('master_count', 1)
+ self.agent_count = kwargs.get('agent_count', 2)
+ self.agent_vm_size = kwargs.get('agent_vm_size', "Standard_D3_v2")
+
+
+class AppInsightsCredentials(msrest.serialization.Model):
+ """AppInsights credentials.
+
+ :param app_id: The AppInsights application ID.
+ :type app_id: str
+ :param instrumentation_key: The AppInsights instrumentation key. This is not returned in
+ response of GET/PUT on the resource. To see this please call listKeys API.
+ :type instrumentation_key: str
+ """
+
+ _attribute_map = {
+ 'app_id': {'key': 'appId', 'type': 'str'},
+ 'instrumentation_key': {'key': 'instrumentationKey', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(AppInsightsCredentials, self).__init__(**kwargs)
+ self.app_id = kwargs.get('app_id', None)
+ self.instrumentation_key = kwargs.get('instrumentation_key', None)
+
+
+class AppInsightsProperties(msrest.serialization.Model):
+ """Properties of App Insights.
+
+ :param resource_id: ARM resource ID of the App Insights.
+ :type resource_id: str
+ """
+
+ _attribute_map = {
+ 'resource_id': {'key': 'resourceId', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(AppInsightsProperties, self).__init__(**kwargs)
+ self.resource_id = kwargs.get('resource_id', None)
+
+
+class AutoScaleConfiguration(msrest.serialization.Model):
+ """AutoScale configuration properties.
+
+ :param status: If auto-scale is enabled for all services. Each service can turn it off
+ individually. Possible values include: "Enabled", "Disabled".
+ :type status: str or ~azure.mgmt.machinelearningcompute.models.Status
+ :param min_replicas: The minimum number of replicas for each service.
+ :type min_replicas: int
+ :param max_replicas: The maximum number of replicas for each service.
+ :type max_replicas: int
+ :param target_utilization: The target utilization.
+ :type target_utilization: float
+ :param refresh_period_in_seconds: Refresh period in seconds.
+ :type refresh_period_in_seconds: int
+ """
+
+ _validation = {
+ 'min_replicas': {'minimum': 1},
+ 'max_replicas': {'minimum': 1},
+ }
+
+ _attribute_map = {
+ 'status': {'key': 'status', 'type': 'str'},
+ 'min_replicas': {'key': 'minReplicas', 'type': 'int'},
+ 'max_replicas': {'key': 'maxReplicas', 'type': 'int'},
+ 'target_utilization': {'key': 'targetUtilization', 'type': 'float'},
+ 'refresh_period_in_seconds': {'key': 'refreshPeriodInSeconds', 'type': 'int'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(AutoScaleConfiguration, self).__init__(**kwargs)
+ self.status = kwargs.get('status', None)
+ self.min_replicas = kwargs.get('min_replicas', 1)
+ self.max_replicas = kwargs.get('max_replicas', 100)
+ self.target_utilization = kwargs.get('target_utilization', None)
+ self.refresh_period_in_seconds = kwargs.get('refresh_period_in_seconds', None)
+
+
+class AvailableOperations(msrest.serialization.Model):
+ """Available operation list.
+
+ :param value: An array of available operations.
+ :type value: list[~azure.mgmt.machinelearningcompute.models.ResourceOperation]
+ """
+
+ _attribute_map = {
+ 'value': {'key': 'value', 'type': '[ResourceOperation]'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(AvailableOperations, self).__init__(**kwargs)
+ self.value = kwargs.get('value', None)
+
+
+class CheckSystemServicesUpdatesAvailableResponse(msrest.serialization.Model):
+ """Information about updates available for system services in a cluster.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar updates_available: Yes if updates are available for the system services, No if not.
+ Possible values include: "Yes", "No".
+ :vartype updates_available: str or ~azure.mgmt.machinelearningcompute.models.UpdatesAvailable
+ """
+
+ _validation = {
+ 'updates_available': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'updates_available': {'key': 'updatesAvailable', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(CheckSystemServicesUpdatesAvailableResponse, self).__init__(**kwargs)
+ self.updates_available = None
+
+
+class ContainerRegistryCredentials(msrest.serialization.Model):
+ """Information about the Azure Container Registry which contains the images deployed to the cluster.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar login_server: The ACR login server name. User name is the first part of the FQDN.
+ :vartype login_server: str
+ :ivar password: The ACR primary password.
+ :vartype password: str
+ :ivar password2: The ACR secondary password.
+ :vartype password2: str
+ :ivar username: The ACR login username.
+ :vartype username: str
+ """
+
+ _validation = {
+ 'login_server': {'readonly': True},
+ 'password': {'readonly': True},
+ 'password2': {'readonly': True},
+ 'username': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'login_server': {'key': 'loginServer', 'type': 'str'},
+ 'password': {'key': 'password', 'type': 'str'},
+ 'password2': {'key': 'password2', 'type': 'str'},
+ 'username': {'key': 'username', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(ContainerRegistryCredentials, self).__init__(**kwargs)
+ self.login_server = None
+ self.password = None
+ self.password2 = None
+ self.username = None
+
+
+class ContainerRegistryProperties(msrest.serialization.Model):
+ """Properties of Azure Container Registry.
+
+ :param resource_id: ARM resource ID of the Azure Container Registry used to store Docker images
+ for web services in the cluster. If not provided one will be created. This cannot be changed
+ once the cluster is created.
+ :type resource_id: str
+ """
+
+ _attribute_map = {
+ 'resource_id': {'key': 'resourceId', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(ContainerRegistryProperties, self).__init__(**kwargs)
+ self.resource_id = kwargs.get('resource_id', None)
+
+
+class ContainerServiceCredentials(msrest.serialization.Model):
+ """Information about the Azure Container Registry which contains the images deployed to the cluster.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar acs_kube_config: The ACS kube config file.
+ :vartype acs_kube_config: str
+ :ivar service_principal_configuration: Service principal configuration used by Kubernetes.
+ :vartype service_principal_configuration:
+ ~azure.mgmt.machinelearningcompute.models.ServicePrincipalProperties
+ :ivar image_pull_secret_name: The ACR image pull secret name which was created in Kubernetes.
+ :vartype image_pull_secret_name: str
+ """
+
+ _validation = {
+ 'acs_kube_config': {'readonly': True},
+ 'service_principal_configuration': {'readonly': True},
+ 'image_pull_secret_name': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'acs_kube_config': {'key': 'acsKubeConfig', 'type': 'str'},
+ 'service_principal_configuration': {'key': 'servicePrincipalConfiguration', 'type': 'ServicePrincipalProperties'},
+ 'image_pull_secret_name': {'key': 'imagePullSecretName', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(ContainerServiceCredentials, self).__init__(**kwargs)
+ self.acs_kube_config = None
+ self.service_principal_configuration = None
+ self.image_pull_secret_name = None
+
+
+class ErrorDetail(msrest.serialization.Model):
+ """Error detail information.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param code: Required. Error code.
+ :type code: str
+ :param message: Required. Error message.
+ :type message: str
+ """
+
+ _validation = {
+ 'code': {'required': True},
+ 'message': {'required': True},
+ }
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(ErrorDetail, self).__init__(**kwargs)
+ self.code = kwargs['code']
+ self.message = kwargs['message']
+
+
+class ErrorResponse(msrest.serialization.Model):
+ """Error response information.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param code: Required. Error code.
+ :type code: str
+ :param message: Required. Error message.
+ :type message: str
+ :param details: An array of error detail objects.
+ :type details: list[~azure.mgmt.machinelearningcompute.models.ErrorDetail]
+ """
+
+ _validation = {
+ 'code': {'required': True},
+ 'message': {'required': True},
+ }
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ 'details': {'key': 'details', 'type': '[ErrorDetail]'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(ErrorResponse, self).__init__(**kwargs)
+ self.code = kwargs['code']
+ self.message = kwargs['message']
+ self.details = kwargs.get('details', None)
+
+
+class ErrorResponseWrapper(msrest.serialization.Model):
+ """Wrapper for error response to follow ARM guidelines.
+
+ :param error: The error response.
+ :type error: ~azure.mgmt.machinelearningcompute.models.ErrorResponse
+ """
+
+ _attribute_map = {
+ 'error': {'key': 'error', 'type': 'ErrorResponse'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(ErrorResponseWrapper, self).__init__(**kwargs)
+ self.error = kwargs.get('error', None)
+
+
+class GlobalServiceConfiguration(msrest.serialization.Model):
+ """Global configuration for services in the cluster.
+
+ :param additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :type additional_properties: dict[str, str]
+ :param etag: The configuration ETag for updates.
+ :type etag: str
+ :param ssl: The SSL configuration properties.
+ :type ssl: ~azure.mgmt.machinelearningcompute.models.SslConfiguration
+ :param service_auth: Optional global authorization keys for all user services deployed in
+ cluster. These are used if the service does not have auth keys.
+ :type service_auth: ~azure.mgmt.machinelearningcompute.models.ServiceAuthConfiguration
+ :param auto_scale: The auto-scale configuration.
+ :type auto_scale: ~azure.mgmt.machinelearningcompute.models.AutoScaleConfiguration
+ """
+
+ _attribute_map = {
+ 'additional_properties': {'key': '', 'type': '{str}'},
+ 'etag': {'key': 'etag', 'type': 'str'},
+ 'ssl': {'key': 'ssl', 'type': 'SslConfiguration'},
+ 'service_auth': {'key': 'serviceAuth', 'type': 'ServiceAuthConfiguration'},
+ 'auto_scale': {'key': 'autoScale', 'type': 'AutoScaleConfiguration'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(GlobalServiceConfiguration, self).__init__(**kwargs)
+ self.additional_properties = kwargs.get('additional_properties', None)
+ self.etag = kwargs.get('etag', None)
+ self.ssl = kwargs.get('ssl', None)
+ self.service_auth = kwargs.get('service_auth', None)
+ self.auto_scale = kwargs.get('auto_scale', None)
+
+
+class KubernetesClusterProperties(msrest.serialization.Model):
+ """Kubernetes cluster specific properties.
+
+ :param service_principal: The Azure Service Principal used by Kubernetes.
+ :type service_principal: ~azure.mgmt.machinelearningcompute.models.ServicePrincipalProperties
+ """
+
+ _attribute_map = {
+ 'service_principal': {'key': 'servicePrincipal', 'type': 'ServicePrincipalProperties'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(KubernetesClusterProperties, self).__init__(**kwargs)
+ self.service_principal = kwargs.get('service_principal', None)
+
+
+class Resource(msrest.serialization.Model):
+ """Azure resource.
+
+ 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: Specifies the resource ID.
+ :vartype id: str
+ :ivar name: Specifies the name of the resource.
+ :vartype name: str
+ :param location: Required. Specifies the location of the resource.
+ :type location: str
+ :ivar type: Specifies the type of the resource.
+ :vartype type: str
+ :param tags: A set of tags. Contains resource tags defined as key/value pairs.
+ :type tags: dict[str, str]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'location': {'required': True},
+ 'type': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(Resource, self).__init__(**kwargs)
+ self.id = None
+ self.name = None
+ self.location = kwargs['location']
+ self.type = None
+ self.tags = kwargs.get('tags', None)
+
+
+class OperationalizationCluster(Resource):
+ """Instance of an Azure ML Operationalization Cluster resource.
+
+ 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: Specifies the resource ID.
+ :vartype id: str
+ :ivar name: Specifies the name of the resource.
+ :vartype name: str
+ :param location: Required. Specifies the location of the resource.
+ :type location: str
+ :ivar type: Specifies the type of the resource.
+ :vartype type: str
+ :param tags: A set of tags. Contains resource tags defined as key/value pairs.
+ :type tags: dict[str, str]
+ :param description: The description of the cluster.
+ :type description: str
+ :ivar created_on: The date and time when the cluster was created.
+ :vartype created_on: ~datetime.datetime
+ :ivar modified_on: The date and time when the cluster was last modified.
+ :vartype modified_on: ~datetime.datetime
+ :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.machinelearningcompute.models.OperationStatus
+ :ivar provisioning_errors: List of provisioning errors reported by the resource provider.
+ :vartype provisioning_errors:
+ list[~azure.mgmt.machinelearningcompute.models.ErrorResponseWrapper]
+ :param cluster_type: The cluster type. Possible values include: "ACS", "Local".
+ :type cluster_type: str or ~azure.mgmt.machinelearningcompute.models.ClusterType
+ :param storage_account: Storage Account properties.
+ :type storage_account: ~azure.mgmt.machinelearningcompute.models.StorageAccountProperties
+ :param container_registry: Container Registry properties.
+ :type container_registry: ~azure.mgmt.machinelearningcompute.models.ContainerRegistryProperties
+ :param container_service: Parameters for the Azure Container Service cluster.
+ :type container_service: ~azure.mgmt.machinelearningcompute.models.AcsClusterProperties
+ :param app_insights: AppInsights configuration.
+ :type app_insights: ~azure.mgmt.machinelearningcompute.models.AppInsightsProperties
+ :param global_service_configuration: Contains global configuration for the web services in the
+ cluster.
+ :type global_service_configuration:
+ ~azure.mgmt.machinelearningcompute.models.GlobalServiceConfiguration
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'location': {'required': True},
+ 'type': {'readonly': True},
+ 'created_on': {'readonly': True},
+ 'modified_on': {'readonly': True},
+ 'provisioning_state': {'readonly': True},
+ 'provisioning_errors': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'description': {'key': 'properties.description', 'type': 'str'},
+ 'created_on': {'key': 'properties.createdOn', 'type': 'iso-8601'},
+ 'modified_on': {'key': 'properties.modifiedOn', 'type': 'iso-8601'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ 'provisioning_errors': {'key': 'properties.provisioningErrors', 'type': '[ErrorResponseWrapper]'},
+ 'cluster_type': {'key': 'properties.clusterType', 'type': 'str'},
+ 'storage_account': {'key': 'properties.storageAccount', 'type': 'StorageAccountProperties'},
+ 'container_registry': {'key': 'properties.containerRegistry', 'type': 'ContainerRegistryProperties'},
+ 'container_service': {'key': 'properties.containerService', 'type': 'AcsClusterProperties'},
+ 'app_insights': {'key': 'properties.appInsights', 'type': 'AppInsightsProperties'},
+ 'global_service_configuration': {'key': 'properties.globalServiceConfiguration', 'type': 'GlobalServiceConfiguration'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(OperationalizationCluster, self).__init__(**kwargs)
+ self.description = kwargs.get('description', None)
+ self.created_on = None
+ self.modified_on = None
+ self.provisioning_state = None
+ self.provisioning_errors = None
+ self.cluster_type = kwargs.get('cluster_type', None)
+ self.storage_account = kwargs.get('storage_account', None)
+ self.container_registry = kwargs.get('container_registry', None)
+ self.container_service = kwargs.get('container_service', None)
+ self.app_insights = kwargs.get('app_insights', None)
+ self.global_service_configuration = kwargs.get('global_service_configuration', None)
+
+
+class OperationalizationClusterCredentials(msrest.serialization.Model):
+ """Credentials to resources in the cluster.
+
+ :param storage_account: Credentials for the Storage Account.
+ :type storage_account: ~azure.mgmt.machinelearningcompute.models.StorageAccountCredentials
+ :param container_registry: Credentials for Azure Container Registry.
+ :type container_registry:
+ ~azure.mgmt.machinelearningcompute.models.ContainerRegistryCredentials
+ :param container_service: Credentials for Azure Container Service.
+ :type container_service: ~azure.mgmt.machinelearningcompute.models.ContainerServiceCredentials
+ :param app_insights: Credentials for Azure AppInsights.
+ :type app_insights: ~azure.mgmt.machinelearningcompute.models.AppInsightsCredentials
+ :param service_auth_configuration: Global authorization keys for all user services deployed in
+ cluster. These are used if the service does not have auth keys.
+ :type service_auth_configuration:
+ ~azure.mgmt.machinelearningcompute.models.ServiceAuthConfiguration
+ :param ssl_configuration: The SSL configuration for the services.
+ :type ssl_configuration: ~azure.mgmt.machinelearningcompute.models.SslConfiguration
+ """
+
+ _attribute_map = {
+ 'storage_account': {'key': 'storageAccount', 'type': 'StorageAccountCredentials'},
+ 'container_registry': {'key': 'containerRegistry', 'type': 'ContainerRegistryCredentials'},
+ 'container_service': {'key': 'containerService', 'type': 'ContainerServiceCredentials'},
+ 'app_insights': {'key': 'appInsights', 'type': 'AppInsightsCredentials'},
+ 'service_auth_configuration': {'key': 'serviceAuthConfiguration', 'type': 'ServiceAuthConfiguration'},
+ 'ssl_configuration': {'key': 'sslConfiguration', 'type': 'SslConfiguration'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(OperationalizationClusterCredentials, self).__init__(**kwargs)
+ self.storage_account = kwargs.get('storage_account', None)
+ self.container_registry = kwargs.get('container_registry', None)
+ self.container_service = kwargs.get('container_service', None)
+ self.app_insights = kwargs.get('app_insights', None)
+ self.service_auth_configuration = kwargs.get('service_auth_configuration', None)
+ self.ssl_configuration = kwargs.get('ssl_configuration', None)
+
+
+class OperationalizationClusterUpdateParameters(msrest.serialization.Model):
+ """Parameters for PATCH operation on an operationalization cluster.
+
+ :param tags: A set of tags. Gets or sets a list of key value pairs that describe the resource.
+ These tags can be used in viewing and grouping this resource (across resource groups). A
+ maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in
+ length than 128 characters and a value no greater in length than 256 characters.
+ :type tags: dict[str, str]
+ """
+
+ _attribute_map = {
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(OperationalizationClusterUpdateParameters, self).__init__(**kwargs)
+ self.tags = kwargs.get('tags', None)
+
+
+class PaginatedOperationalizationClustersList(msrest.serialization.Model):
+ """Paginated list of operationalization clusters.
+
+ :param value: An array of cluster objects.
+ :type value: list[~azure.mgmt.machinelearningcompute.models.OperationalizationCluster]
+ :param next_link: A continuation link (absolute URI) to the next page of results in the list.
+ :type next_link: str
+ """
+
+ _attribute_map = {
+ 'value': {'key': 'value', 'type': '[OperationalizationCluster]'},
+ 'next_link': {'key': 'nextLink', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(PaginatedOperationalizationClustersList, self).__init__(**kwargs)
+ self.value = kwargs.get('value', None)
+ self.next_link = kwargs.get('next_link', None)
+
+
+class ResourceOperation(msrest.serialization.Model):
+ """Resource operation.
+
+ :param name: Name of this operation.
+ :type name: str
+ :param display: Display of the operation.
+ :type display: ~azure.mgmt.machinelearningcompute.models.ResourceOperationDisplay
+ :param origin: The operation origin.
+ :type origin: str
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'display': {'key': 'display', 'type': 'ResourceOperationDisplay'},
+ 'origin': {'key': 'origin', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(ResourceOperation, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.display = kwargs.get('display', None)
+ self.origin = kwargs.get('origin', None)
+
+
+class ResourceOperationDisplay(msrest.serialization.Model):
+ """Display of the operation.
+
+ :param provider: The resource provider name.
+ :type provider: str
+ :param resource: The resource name.
+ :type resource: str
+ :param operation: The operation.
+ :type operation: str
+ :param description: The description of the operation.
+ :type 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
+ ):
+ super(ResourceOperationDisplay, 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 ServiceAuthConfiguration(msrest.serialization.Model):
+ """Global service auth configuration properties. These are the data-plane authorization keys and are used if a service doesn't define it's own.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param primary_auth_key_hash: Required. The primary auth key hash. This is not returned in
+ response of GET/PUT on the resource.. To see this please call listKeys API.
+ :type primary_auth_key_hash: str
+ :param secondary_auth_key_hash: Required. The secondary auth key hash. This is not returned in
+ response of GET/PUT on the resource.. To see this please call listKeys API.
+ :type secondary_auth_key_hash: str
+ """
+
+ _validation = {
+ 'primary_auth_key_hash': {'required': True},
+ 'secondary_auth_key_hash': {'required': True},
+ }
+
+ _attribute_map = {
+ 'primary_auth_key_hash': {'key': 'primaryAuthKeyHash', 'type': 'str'},
+ 'secondary_auth_key_hash': {'key': 'secondaryAuthKeyHash', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(ServiceAuthConfiguration, self).__init__(**kwargs)
+ self.primary_auth_key_hash = kwargs['primary_auth_key_hash']
+ self.secondary_auth_key_hash = kwargs['secondary_auth_key_hash']
+
+
+class ServicePrincipalProperties(msrest.serialization.Model):
+ """The Azure service principal used by Kubernetes for configuring load balancers.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param client_id: Required. The service principal client ID.
+ :type client_id: str
+ :param secret: Required. The service principal secret. This is not returned in response of
+ GET/PUT on the resource. To see this please call listKeys.
+ :type secret: str
+ """
+
+ _validation = {
+ 'client_id': {'required': True},
+ 'secret': {'required': True},
+ }
+
+ _attribute_map = {
+ 'client_id': {'key': 'clientId', 'type': 'str'},
+ 'secret': {'key': 'secret', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(ServicePrincipalProperties, self).__init__(**kwargs)
+ self.client_id = kwargs['client_id']
+ self.secret = kwargs['secret']
+
+
+class SslConfiguration(msrest.serialization.Model):
+ """SSL configuration. If configured data-plane calls to user services will be exposed over SSL only.
+
+ :param status: SSL status. Allowed values are Enabled and Disabled. Possible values include:
+ "Enabled", "Disabled".
+ :type status: str or ~azure.mgmt.machinelearningcompute.models.Status
+ :param cert: The SSL cert data in PEM format.
+ :type cert: str
+ :param key: The SSL key data in PEM format. This is not returned in response of GET/PUT on the
+ resource. To see this please call listKeys API.
+ :type key: str
+ :param cname: The CName of the certificate.
+ :type cname: str
+ """
+
+ _attribute_map = {
+ 'status': {'key': 'status', 'type': 'str'},
+ 'cert': {'key': 'cert', 'type': 'str'},
+ 'key': {'key': 'key', 'type': 'str'},
+ 'cname': {'key': 'cname', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ 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)
+
+
+class StorageAccountCredentials(msrest.serialization.Model):
+ """Access information for the storage account.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar resource_id: The ARM resource ID of the storage account.
+ :vartype resource_id: str
+ :ivar primary_key: The primary key of the storage account.
+ :vartype primary_key: str
+ :ivar secondary_key: The secondary key of the storage account.
+ :vartype secondary_key: str
+ """
+
+ _validation = {
+ 'resource_id': {'readonly': True},
+ 'primary_key': {'readonly': True},
+ 'secondary_key': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'resource_id': {'key': 'resourceId', 'type': 'str'},
+ 'primary_key': {'key': 'primaryKey', 'type': 'str'},
+ 'secondary_key': {'key': 'secondaryKey', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(StorageAccountCredentials, self).__init__(**kwargs)
+ self.resource_id = None
+ self.primary_key = None
+ self.secondary_key = None
+
+
+class StorageAccountProperties(msrest.serialization.Model):
+ """Properties of Storage Account.
+
+ :param resource_id: ARM resource ID of the Azure Storage Account to store CLI specific files.
+ If not provided one will be created. This cannot be changed once the cluster is created.
+ :type resource_id: str
+ """
+
+ _attribute_map = {
+ 'resource_id': {'key': 'resourceId', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(StorageAccountProperties, self).__init__(**kwargs)
+ self.resource_id = kwargs.get('resource_id', None)
+
+
+class SystemService(msrest.serialization.Model):
+ """Information about a system service deployed in the cluster.
+
+ 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.
+
+ :param system_service_type: Required. The system service type. Possible values include: "None",
+ "ScoringFrontEnd", "BatchFrontEnd".
+ :type system_service_type: str or ~azure.mgmt.machinelearningcompute.models.SystemServiceType
+ :ivar public_ip_address: The public IP address of the system service.
+ :vartype public_ip_address: str
+ :ivar version: The state of the system service.
+ :vartype version: str
+ """
+
+ _validation = {
+ 'system_service_type': {'required': 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 = kwargs['system_service_type']
+ self.public_ip_address = None
+ self.version = None
+
+
+class UpdateSystemServicesResponse(msrest.serialization.Model):
+ """Response of the update system services API.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar update_status: Update status. Possible values include: "Unknown", "Updating", "Creating",
+ "Deleting", "Succeeded", "Failed", "Canceled".
+ :vartype update_status: str or ~azure.mgmt.machinelearningcompute.models.OperationStatus
+ :ivar update_started_on: The date and time when the last system services update was started.
+ :vartype update_started_on: ~datetime.datetime
+ :ivar update_completed_on: The date and time when the last system services update completed.
+ :vartype update_completed_on: ~datetime.datetime
+ """
+
+ _validation = {
+ 'update_status': {'readonly': True},
+ 'update_started_on': {'readonly': True},
+ 'update_completed_on': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'update_status': {'key': 'updateStatus', 'type': 'str'},
+ 'update_started_on': {'key': 'updateStartedOn', 'type': 'iso-8601'},
+ 'update_completed_on': {'key': 'updateCompletedOn', 'type': 'iso-8601'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(UpdateSystemServicesResponse, self).__init__(**kwargs)
+ self.update_status = None
+ self.update_started_on = None
+ self.update_completed_on = None
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/_models_py3.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/_models_py3.py
new file mode 100644
index 000000000000..ce6fe4b0b556
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/_models_py3.py
@@ -0,0 +1,1046 @@
+# 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 Dict, List, Optional, Union
+
+from azure.core.exceptions import HttpResponseError
+import msrest.serialization
+
+from ._machine_learning_compute_management_client_enums import *
+
+
+class AcsClusterProperties(msrest.serialization.Model):
+ """Information about the container service backing the cluster.
+
+ 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 cluster_fqdn: The FQDN of the cluster.
+ :vartype cluster_fqdn: str
+ :param orchestrator_type: Required. Type of orchestrator. It cannot be changed once the cluster
+ is created. Possible values include: "Kubernetes", "None".
+ :type orchestrator_type: str or ~azure.mgmt.machinelearningcompute.models.OrchestratorType
+ :param orchestrator_properties: Orchestrator specific properties.
+ :type orchestrator_properties:
+ ~azure.mgmt.machinelearningcompute.models.KubernetesClusterProperties
+ :param system_services: The system services deployed to the cluster.
+ :type system_services: list[~azure.mgmt.machinelearningcompute.models.SystemService]
+ :param master_count: The number of master nodes in the container service.
+ :type master_count: int
+ :param agent_count: The number of agent nodes in the Container Service. This can be changed to
+ scale the cluster.
+ :type agent_count: int
+ :param agent_vm_size: The Azure VM size of the agent VM nodes. This cannot be changed once the
+ cluster is created. This list is non exhaustive; refer to
+ https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes for the possible VM
+ sizes. Possible values include: "Standard_A0", "Standard_A1", "Standard_A2", "Standard_A3",
+ "Standard_A4", "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A9",
+ "Standard_A10", "Standard_A11", "Standard_D1", "Standard_D2", "Standard_D3", "Standard_D4",
+ "Standard_D11", "Standard_D12", "Standard_D13", "Standard_D14", "Standard_D1_v2",
+ "Standard_D2_v2", "Standard_D3_v2", "Standard_D4_v2", "Standard_D5_v2", "Standard_D11_v2",
+ "Standard_D12_v2", "Standard_D13_v2", "Standard_D14_v2", "Standard_G1", "Standard_G2",
+ "Standard_G3", "Standard_G4", "Standard_G5", "Standard_DS1", "Standard_DS2", "Standard_DS3",
+ "Standard_DS4", "Standard_DS11", "Standard_DS12", "Standard_DS13", "Standard_DS14",
+ "Standard_GS1", "Standard_GS2", "Standard_GS3", "Standard_GS4", "Standard_GS5". Default value:
+ "Standard_D3_v2".
+ :type agent_vm_size: str or ~azure.mgmt.machinelearningcompute.models.AgentVMSizeTypes
+ """
+
+ _validation = {
+ 'cluster_fqdn': {'readonly': True},
+ 'orchestrator_type': {'required': True},
+ 'master_count': {'maximum': 5, 'minimum': 1},
+ 'agent_count': {'maximum': 100, 'minimum': 1},
+ }
+
+ _attribute_map = {
+ 'cluster_fqdn': {'key': 'clusterFqdn', 'type': 'str'},
+ 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'},
+ 'orchestrator_properties': {'key': 'orchestratorProperties', 'type': 'KubernetesClusterProperties'},
+ 'system_services': {'key': 'systemServices', 'type': '[SystemService]'},
+ 'master_count': {'key': 'masterCount', 'type': 'int'},
+ 'agent_count': {'key': 'agentCount', 'type': 'int'},
+ 'agent_vm_size': {'key': 'agentVmSize', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ orchestrator_type: Union[str, "OrchestratorType"],
+ orchestrator_properties: Optional["KubernetesClusterProperties"] = None,
+ system_services: Optional[List["SystemService"]] = None,
+ master_count: Optional[int] = 1,
+ agent_count: Optional[int] = 2,
+ agent_vm_size: Optional[Union[str, "AgentVMSizeTypes"]] = "Standard_D3_v2",
+ **kwargs
+ ):
+ super(AcsClusterProperties, self).__init__(**kwargs)
+ self.cluster_fqdn = None
+ self.orchestrator_type = orchestrator_type
+ self.orchestrator_properties = orchestrator_properties
+ self.system_services = system_services
+ self.master_count = master_count
+ self.agent_count = agent_count
+ self.agent_vm_size = agent_vm_size
+
+
+class AppInsightsCredentials(msrest.serialization.Model):
+ """AppInsights credentials.
+
+ :param app_id: The AppInsights application ID.
+ :type app_id: str
+ :param instrumentation_key: The AppInsights instrumentation key. This is not returned in
+ response of GET/PUT on the resource. To see this please call listKeys API.
+ :type instrumentation_key: str
+ """
+
+ _attribute_map = {
+ 'app_id': {'key': 'appId', 'type': 'str'},
+ 'instrumentation_key': {'key': 'instrumentationKey', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ app_id: Optional[str] = None,
+ instrumentation_key: Optional[str] = None,
+ **kwargs
+ ):
+ super(AppInsightsCredentials, self).__init__(**kwargs)
+ self.app_id = app_id
+ self.instrumentation_key = instrumentation_key
+
+
+class AppInsightsProperties(msrest.serialization.Model):
+ """Properties of App Insights.
+
+ :param resource_id: ARM resource ID of the App Insights.
+ :type resource_id: str
+ """
+
+ _attribute_map = {
+ 'resource_id': {'key': 'resourceId', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ resource_id: Optional[str] = None,
+ **kwargs
+ ):
+ super(AppInsightsProperties, self).__init__(**kwargs)
+ self.resource_id = resource_id
+
+
+class AutoScaleConfiguration(msrest.serialization.Model):
+ """AutoScale configuration properties.
+
+ :param status: If auto-scale is enabled for all services. Each service can turn it off
+ individually. Possible values include: "Enabled", "Disabled".
+ :type status: str or ~azure.mgmt.machinelearningcompute.models.Status
+ :param min_replicas: The minimum number of replicas for each service.
+ :type min_replicas: int
+ :param max_replicas: The maximum number of replicas for each service.
+ :type max_replicas: int
+ :param target_utilization: The target utilization.
+ :type target_utilization: float
+ :param refresh_period_in_seconds: Refresh period in seconds.
+ :type refresh_period_in_seconds: int
+ """
+
+ _validation = {
+ 'min_replicas': {'minimum': 1},
+ 'max_replicas': {'minimum': 1},
+ }
+
+ _attribute_map = {
+ 'status': {'key': 'status', 'type': 'str'},
+ 'min_replicas': {'key': 'minReplicas', 'type': 'int'},
+ 'max_replicas': {'key': 'maxReplicas', 'type': 'int'},
+ 'target_utilization': {'key': 'targetUtilization', 'type': 'float'},
+ 'refresh_period_in_seconds': {'key': 'refreshPeriodInSeconds', 'type': 'int'},
+ }
+
+ def __init__(
+ self,
+ *,
+ status: Optional[Union[str, "Status"]] = None,
+ min_replicas: Optional[int] = 1,
+ max_replicas: Optional[int] = 100,
+ target_utilization: Optional[float] = None,
+ refresh_period_in_seconds: Optional[int] = None,
+ **kwargs
+ ):
+ super(AutoScaleConfiguration, self).__init__(**kwargs)
+ self.status = status
+ self.min_replicas = min_replicas
+ self.max_replicas = max_replicas
+ self.target_utilization = target_utilization
+ self.refresh_period_in_seconds = refresh_period_in_seconds
+
+
+class AvailableOperations(msrest.serialization.Model):
+ """Available operation list.
+
+ :param value: An array of available operations.
+ :type value: list[~azure.mgmt.machinelearningcompute.models.ResourceOperation]
+ """
+
+ _attribute_map = {
+ 'value': {'key': 'value', 'type': '[ResourceOperation]'},
+ }
+
+ def __init__(
+ self,
+ *,
+ value: Optional[List["ResourceOperation"]] = None,
+ **kwargs
+ ):
+ super(AvailableOperations, self).__init__(**kwargs)
+ self.value = value
+
+
+class CheckSystemServicesUpdatesAvailableResponse(msrest.serialization.Model):
+ """Information about updates available for system services in a cluster.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar updates_available: Yes if updates are available for the system services, No if not.
+ Possible values include: "Yes", "No".
+ :vartype updates_available: str or ~azure.mgmt.machinelearningcompute.models.UpdatesAvailable
+ """
+
+ _validation = {
+ 'updates_available': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'updates_available': {'key': 'updatesAvailable', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(CheckSystemServicesUpdatesAvailableResponse, self).__init__(**kwargs)
+ self.updates_available = None
+
+
+class ContainerRegistryCredentials(msrest.serialization.Model):
+ """Information about the Azure Container Registry which contains the images deployed to the cluster.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar login_server: The ACR login server name. User name is the first part of the FQDN.
+ :vartype login_server: str
+ :ivar password: The ACR primary password.
+ :vartype password: str
+ :ivar password2: The ACR secondary password.
+ :vartype password2: str
+ :ivar username: The ACR login username.
+ :vartype username: str
+ """
+
+ _validation = {
+ 'login_server': {'readonly': True},
+ 'password': {'readonly': True},
+ 'password2': {'readonly': True},
+ 'username': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'login_server': {'key': 'loginServer', 'type': 'str'},
+ 'password': {'key': 'password', 'type': 'str'},
+ 'password2': {'key': 'password2', 'type': 'str'},
+ 'username': {'key': 'username', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(ContainerRegistryCredentials, self).__init__(**kwargs)
+ self.login_server = None
+ self.password = None
+ self.password2 = None
+ self.username = None
+
+
+class ContainerRegistryProperties(msrest.serialization.Model):
+ """Properties of Azure Container Registry.
+
+ :param resource_id: ARM resource ID of the Azure Container Registry used to store Docker images
+ for web services in the cluster. If not provided one will be created. This cannot be changed
+ once the cluster is created.
+ :type resource_id: str
+ """
+
+ _attribute_map = {
+ 'resource_id': {'key': 'resourceId', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ resource_id: Optional[str] = None,
+ **kwargs
+ ):
+ super(ContainerRegistryProperties, self).__init__(**kwargs)
+ self.resource_id = resource_id
+
+
+class ContainerServiceCredentials(msrest.serialization.Model):
+ """Information about the Azure Container Registry which contains the images deployed to the cluster.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar acs_kube_config: The ACS kube config file.
+ :vartype acs_kube_config: str
+ :ivar service_principal_configuration: Service principal configuration used by Kubernetes.
+ :vartype service_principal_configuration:
+ ~azure.mgmt.machinelearningcompute.models.ServicePrincipalProperties
+ :ivar image_pull_secret_name: The ACR image pull secret name which was created in Kubernetes.
+ :vartype image_pull_secret_name: str
+ """
+
+ _validation = {
+ 'acs_kube_config': {'readonly': True},
+ 'service_principal_configuration': {'readonly': True},
+ 'image_pull_secret_name': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'acs_kube_config': {'key': 'acsKubeConfig', 'type': 'str'},
+ 'service_principal_configuration': {'key': 'servicePrincipalConfiguration', 'type': 'ServicePrincipalProperties'},
+ 'image_pull_secret_name': {'key': 'imagePullSecretName', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(ContainerServiceCredentials, self).__init__(**kwargs)
+ self.acs_kube_config = None
+ self.service_principal_configuration = None
+ self.image_pull_secret_name = None
+
+
+class ErrorDetail(msrest.serialization.Model):
+ """Error detail information.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param code: Required. Error code.
+ :type code: str
+ :param message: Required. Error message.
+ :type message: str
+ """
+
+ _validation = {
+ 'code': {'required': True},
+ 'message': {'required': True},
+ }
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ code: str,
+ message: str,
+ **kwargs
+ ):
+ super(ErrorDetail, self).__init__(**kwargs)
+ self.code = code
+ self.message = message
+
+
+class ErrorResponse(msrest.serialization.Model):
+ """Error response information.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param code: Required. Error code.
+ :type code: str
+ :param message: Required. Error message.
+ :type message: str
+ :param details: An array of error detail objects.
+ :type details: list[~azure.mgmt.machinelearningcompute.models.ErrorDetail]
+ """
+
+ _validation = {
+ 'code': {'required': True},
+ 'message': {'required': True},
+ }
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ 'details': {'key': 'details', 'type': '[ErrorDetail]'},
+ }
+
+ def __init__(
+ self,
+ *,
+ code: str,
+ message: str,
+ details: Optional[List["ErrorDetail"]] = None,
+ **kwargs
+ ):
+ super(ErrorResponse, self).__init__(**kwargs)
+ self.code = code
+ self.message = message
+ self.details = details
+
+
+class ErrorResponseWrapper(msrest.serialization.Model):
+ """Wrapper for error response to follow ARM guidelines.
+
+ :param error: The error response.
+ :type error: ~azure.mgmt.machinelearningcompute.models.ErrorResponse
+ """
+
+ _attribute_map = {
+ 'error': {'key': 'error', 'type': 'ErrorResponse'},
+ }
+
+ def __init__(
+ self,
+ *,
+ error: Optional["ErrorResponse"] = None,
+ **kwargs
+ ):
+ super(ErrorResponseWrapper, self).__init__(**kwargs)
+ self.error = error
+
+
+class GlobalServiceConfiguration(msrest.serialization.Model):
+ """Global configuration for services in the cluster.
+
+ :param additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :type additional_properties: dict[str, str]
+ :param etag: The configuration ETag for updates.
+ :type etag: str
+ :param ssl: The SSL configuration properties.
+ :type ssl: ~azure.mgmt.machinelearningcompute.models.SslConfiguration
+ :param service_auth: Optional global authorization keys for all user services deployed in
+ cluster. These are used if the service does not have auth keys.
+ :type service_auth: ~azure.mgmt.machinelearningcompute.models.ServiceAuthConfiguration
+ :param auto_scale: The auto-scale configuration.
+ :type auto_scale: ~azure.mgmt.machinelearningcompute.models.AutoScaleConfiguration
+ """
+
+ _attribute_map = {
+ 'additional_properties': {'key': '', 'type': '{str}'},
+ 'etag': {'key': 'etag', 'type': 'str'},
+ 'ssl': {'key': 'ssl', 'type': 'SslConfiguration'},
+ 'service_auth': {'key': 'serviceAuth', 'type': 'ServiceAuthConfiguration'},
+ 'auto_scale': {'key': 'autoScale', 'type': 'AutoScaleConfiguration'},
+ }
+
+ def __init__(
+ self,
+ *,
+ additional_properties: Optional[Dict[str, str]] = None,
+ etag: Optional[str] = None,
+ ssl: Optional["SslConfiguration"] = None,
+ service_auth: Optional["ServiceAuthConfiguration"] = None,
+ auto_scale: Optional["AutoScaleConfiguration"] = None,
+ **kwargs
+ ):
+ super(GlobalServiceConfiguration, self).__init__(**kwargs)
+ self.additional_properties = additional_properties
+ self.etag = etag
+ self.ssl = ssl
+ self.service_auth = service_auth
+ self.auto_scale = auto_scale
+
+
+class KubernetesClusterProperties(msrest.serialization.Model):
+ """Kubernetes cluster specific properties.
+
+ :param service_principal: The Azure Service Principal used by Kubernetes.
+ :type service_principal: ~azure.mgmt.machinelearningcompute.models.ServicePrincipalProperties
+ """
+
+ _attribute_map = {
+ 'service_principal': {'key': 'servicePrincipal', 'type': 'ServicePrincipalProperties'},
+ }
+
+ def __init__(
+ self,
+ *,
+ service_principal: Optional["ServicePrincipalProperties"] = None,
+ **kwargs
+ ):
+ super(KubernetesClusterProperties, self).__init__(**kwargs)
+ self.service_principal = service_principal
+
+
+class Resource(msrest.serialization.Model):
+ """Azure resource.
+
+ 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: Specifies the resource ID.
+ :vartype id: str
+ :ivar name: Specifies the name of the resource.
+ :vartype name: str
+ :param location: Required. Specifies the location of the resource.
+ :type location: str
+ :ivar type: Specifies the type of the resource.
+ :vartype type: str
+ :param tags: A set of tags. Contains resource tags defined as key/value pairs.
+ :type tags: dict[str, str]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'location': {'required': True},
+ 'type': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ }
+
+ def __init__(
+ self,
+ *,
+ location: str,
+ tags: Optional[Dict[str, str]] = None,
+ **kwargs
+ ):
+ super(Resource, self).__init__(**kwargs)
+ self.id = None
+ self.name = None
+ self.location = location
+ self.type = None
+ self.tags = tags
+
+
+class OperationalizationCluster(Resource):
+ """Instance of an Azure ML Operationalization Cluster resource.
+
+ 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: Specifies the resource ID.
+ :vartype id: str
+ :ivar name: Specifies the name of the resource.
+ :vartype name: str
+ :param location: Required. Specifies the location of the resource.
+ :type location: str
+ :ivar type: Specifies the type of the resource.
+ :vartype type: str
+ :param tags: A set of tags. Contains resource tags defined as key/value pairs.
+ :type tags: dict[str, str]
+ :param description: The description of the cluster.
+ :type description: str
+ :ivar created_on: The date and time when the cluster was created.
+ :vartype created_on: ~datetime.datetime
+ :ivar modified_on: The date and time when the cluster was last modified.
+ :vartype modified_on: ~datetime.datetime
+ :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.machinelearningcompute.models.OperationStatus
+ :ivar provisioning_errors: List of provisioning errors reported by the resource provider.
+ :vartype provisioning_errors:
+ list[~azure.mgmt.machinelearningcompute.models.ErrorResponseWrapper]
+ :param cluster_type: The cluster type. Possible values include: "ACS", "Local".
+ :type cluster_type: str or ~azure.mgmt.machinelearningcompute.models.ClusterType
+ :param storage_account: Storage Account properties.
+ :type storage_account: ~azure.mgmt.machinelearningcompute.models.StorageAccountProperties
+ :param container_registry: Container Registry properties.
+ :type container_registry: ~azure.mgmt.machinelearningcompute.models.ContainerRegistryProperties
+ :param container_service: Parameters for the Azure Container Service cluster.
+ :type container_service: ~azure.mgmt.machinelearningcompute.models.AcsClusterProperties
+ :param app_insights: AppInsights configuration.
+ :type app_insights: ~azure.mgmt.machinelearningcompute.models.AppInsightsProperties
+ :param global_service_configuration: Contains global configuration for the web services in the
+ cluster.
+ :type global_service_configuration:
+ ~azure.mgmt.machinelearningcompute.models.GlobalServiceConfiguration
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'location': {'required': True},
+ 'type': {'readonly': True},
+ 'created_on': {'readonly': True},
+ 'modified_on': {'readonly': True},
+ 'provisioning_state': {'readonly': True},
+ 'provisioning_errors': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'description': {'key': 'properties.description', 'type': 'str'},
+ 'created_on': {'key': 'properties.createdOn', 'type': 'iso-8601'},
+ 'modified_on': {'key': 'properties.modifiedOn', 'type': 'iso-8601'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ 'provisioning_errors': {'key': 'properties.provisioningErrors', 'type': '[ErrorResponseWrapper]'},
+ 'cluster_type': {'key': 'properties.clusterType', 'type': 'str'},
+ 'storage_account': {'key': 'properties.storageAccount', 'type': 'StorageAccountProperties'},
+ 'container_registry': {'key': 'properties.containerRegistry', 'type': 'ContainerRegistryProperties'},
+ 'container_service': {'key': 'properties.containerService', 'type': 'AcsClusterProperties'},
+ 'app_insights': {'key': 'properties.appInsights', 'type': 'AppInsightsProperties'},
+ 'global_service_configuration': {'key': 'properties.globalServiceConfiguration', 'type': 'GlobalServiceConfiguration'},
+ }
+
+ def __init__(
+ self,
+ *,
+ location: str,
+ tags: Optional[Dict[str, str]] = None,
+ description: Optional[str] = None,
+ cluster_type: Optional[Union[str, "ClusterType"]] = None,
+ storage_account: Optional["StorageAccountProperties"] = None,
+ container_registry: Optional["ContainerRegistryProperties"] = None,
+ container_service: Optional["AcsClusterProperties"] = None,
+ app_insights: Optional["AppInsightsProperties"] = None,
+ global_service_configuration: Optional["GlobalServiceConfiguration"] = None,
+ **kwargs
+ ):
+ super(OperationalizationCluster, self).__init__(location=location, tags=tags, **kwargs)
+ self.description = description
+ self.created_on = None
+ self.modified_on = None
+ self.provisioning_state = None
+ self.provisioning_errors = None
+ self.cluster_type = cluster_type
+ self.storage_account = storage_account
+ self.container_registry = container_registry
+ self.container_service = container_service
+ self.app_insights = app_insights
+ self.global_service_configuration = global_service_configuration
+
+
+class OperationalizationClusterCredentials(msrest.serialization.Model):
+ """Credentials to resources in the cluster.
+
+ :param storage_account: Credentials for the Storage Account.
+ :type storage_account: ~azure.mgmt.machinelearningcompute.models.StorageAccountCredentials
+ :param container_registry: Credentials for Azure Container Registry.
+ :type container_registry:
+ ~azure.mgmt.machinelearningcompute.models.ContainerRegistryCredentials
+ :param container_service: Credentials for Azure Container Service.
+ :type container_service: ~azure.mgmt.machinelearningcompute.models.ContainerServiceCredentials
+ :param app_insights: Credentials for Azure AppInsights.
+ :type app_insights: ~azure.mgmt.machinelearningcompute.models.AppInsightsCredentials
+ :param service_auth_configuration: Global authorization keys for all user services deployed in
+ cluster. These are used if the service does not have auth keys.
+ :type service_auth_configuration:
+ ~azure.mgmt.machinelearningcompute.models.ServiceAuthConfiguration
+ :param ssl_configuration: The SSL configuration for the services.
+ :type ssl_configuration: ~azure.mgmt.machinelearningcompute.models.SslConfiguration
+ """
+
+ _attribute_map = {
+ 'storage_account': {'key': 'storageAccount', 'type': 'StorageAccountCredentials'},
+ 'container_registry': {'key': 'containerRegistry', 'type': 'ContainerRegistryCredentials'},
+ 'container_service': {'key': 'containerService', 'type': 'ContainerServiceCredentials'},
+ 'app_insights': {'key': 'appInsights', 'type': 'AppInsightsCredentials'},
+ 'service_auth_configuration': {'key': 'serviceAuthConfiguration', 'type': 'ServiceAuthConfiguration'},
+ 'ssl_configuration': {'key': 'sslConfiguration', 'type': 'SslConfiguration'},
+ }
+
+ def __init__(
+ self,
+ *,
+ storage_account: Optional["StorageAccountCredentials"] = None,
+ container_registry: Optional["ContainerRegistryCredentials"] = None,
+ container_service: Optional["ContainerServiceCredentials"] = None,
+ app_insights: Optional["AppInsightsCredentials"] = None,
+ service_auth_configuration: Optional["ServiceAuthConfiguration"] = None,
+ ssl_configuration: Optional["SslConfiguration"] = None,
+ **kwargs
+ ):
+ super(OperationalizationClusterCredentials, self).__init__(**kwargs)
+ self.storage_account = storage_account
+ self.container_registry = container_registry
+ self.container_service = container_service
+ self.app_insights = app_insights
+ self.service_auth_configuration = service_auth_configuration
+ self.ssl_configuration = ssl_configuration
+
+
+class OperationalizationClusterUpdateParameters(msrest.serialization.Model):
+ """Parameters for PATCH operation on an operationalization cluster.
+
+ :param tags: A set of tags. Gets or sets a list of key value pairs that describe the resource.
+ These tags can be used in viewing and grouping this resource (across resource groups). A
+ maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in
+ length than 128 characters and a value no greater in length than 256 characters.
+ :type tags: dict[str, str]
+ """
+
+ _attribute_map = {
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ }
+
+ def __init__(
+ self,
+ *,
+ tags: Optional[Dict[str, str]] = None,
+ **kwargs
+ ):
+ super(OperationalizationClusterUpdateParameters, self).__init__(**kwargs)
+ self.tags = tags
+
+
+class PaginatedOperationalizationClustersList(msrest.serialization.Model):
+ """Paginated list of operationalization clusters.
+
+ :param value: An array of cluster objects.
+ :type value: list[~azure.mgmt.machinelearningcompute.models.OperationalizationCluster]
+ :param next_link: A continuation link (absolute URI) to the next page of results in the list.
+ :type next_link: str
+ """
+
+ _attribute_map = {
+ 'value': {'key': 'value', 'type': '[OperationalizationCluster]'},
+ 'next_link': {'key': 'nextLink', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ value: Optional[List["OperationalizationCluster"]] = None,
+ next_link: Optional[str] = None,
+ **kwargs
+ ):
+ super(PaginatedOperationalizationClustersList, self).__init__(**kwargs)
+ self.value = value
+ self.next_link = next_link
+
+
+class ResourceOperation(msrest.serialization.Model):
+ """Resource operation.
+
+ :param name: Name of this operation.
+ :type name: str
+ :param display: Display of the operation.
+ :type display: ~azure.mgmt.machinelearningcompute.models.ResourceOperationDisplay
+ :param origin: The operation origin.
+ :type origin: str
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'display': {'key': 'display', 'type': 'ResourceOperationDisplay'},
+ 'origin': {'key': 'origin', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ name: Optional[str] = None,
+ display: Optional["ResourceOperationDisplay"] = None,
+ origin: Optional[str] = None,
+ **kwargs
+ ):
+ super(ResourceOperation, self).__init__(**kwargs)
+ self.name = name
+ self.display = display
+ self.origin = origin
+
+
+class ResourceOperationDisplay(msrest.serialization.Model):
+ """Display of the operation.
+
+ :param provider: The resource provider name.
+ :type provider: str
+ :param resource: The resource name.
+ :type resource: str
+ :param operation: The operation.
+ :type operation: str
+ :param description: The description of the operation.
+ :type 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
+ ):
+ super(ResourceOperationDisplay, self).__init__(**kwargs)
+ self.provider = provider
+ self.resource = resource
+ self.operation = operation
+ self.description = description
+
+
+class ServiceAuthConfiguration(msrest.serialization.Model):
+ """Global service auth configuration properties. These are the data-plane authorization keys and are used if a service doesn't define it's own.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param primary_auth_key_hash: Required. The primary auth key hash. This is not returned in
+ response of GET/PUT on the resource.. To see this please call listKeys API.
+ :type primary_auth_key_hash: str
+ :param secondary_auth_key_hash: Required. The secondary auth key hash. This is not returned in
+ response of GET/PUT on the resource.. To see this please call listKeys API.
+ :type secondary_auth_key_hash: str
+ """
+
+ _validation = {
+ 'primary_auth_key_hash': {'required': True},
+ 'secondary_auth_key_hash': {'required': True},
+ }
+
+ _attribute_map = {
+ 'primary_auth_key_hash': {'key': 'primaryAuthKeyHash', 'type': 'str'},
+ 'secondary_auth_key_hash': {'key': 'secondaryAuthKeyHash', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ primary_auth_key_hash: str,
+ secondary_auth_key_hash: str,
+ **kwargs
+ ):
+ super(ServiceAuthConfiguration, self).__init__(**kwargs)
+ self.primary_auth_key_hash = primary_auth_key_hash
+ self.secondary_auth_key_hash = secondary_auth_key_hash
+
+
+class ServicePrincipalProperties(msrest.serialization.Model):
+ """The Azure service principal used by Kubernetes for configuring load balancers.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param client_id: Required. The service principal client ID.
+ :type client_id: str
+ :param secret: Required. The service principal secret. This is not returned in response of
+ GET/PUT on the resource. To see this please call listKeys.
+ :type secret: str
+ """
+
+ _validation = {
+ 'client_id': {'required': True},
+ 'secret': {'required': True},
+ }
+
+ _attribute_map = {
+ 'client_id': {'key': 'clientId', 'type': 'str'},
+ 'secret': {'key': 'secret', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ client_id: str,
+ secret: str,
+ **kwargs
+ ):
+ super(ServicePrincipalProperties, self).__init__(**kwargs)
+ self.client_id = client_id
+ self.secret = secret
+
+
+class SslConfiguration(msrest.serialization.Model):
+ """SSL configuration. If configured data-plane calls to user services will be exposed over SSL only.
+
+ :param status: SSL status. Allowed values are Enabled and Disabled. Possible values include:
+ "Enabled", "Disabled".
+ :type status: str or ~azure.mgmt.machinelearningcompute.models.Status
+ :param cert: The SSL cert data in PEM format.
+ :type cert: str
+ :param key: The SSL key data in PEM format. This is not returned in response of GET/PUT on the
+ resource. To see this please call listKeys API.
+ :type key: str
+ :param cname: The CName of the certificate.
+ :type cname: str
+ """
+
+ _attribute_map = {
+ 'status': {'key': 'status', 'type': 'str'},
+ 'cert': {'key': 'cert', 'type': 'str'},
+ 'key': {'key': 'key', 'type': 'str'},
+ 'cname': {'key': 'cname', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ status: Optional[Union[str, "Status"]] = None,
+ cert: Optional[str] = None,
+ key: Optional[str] = None,
+ cname: Optional[str] = None,
+ **kwargs
+ ):
+ super(SslConfiguration, self).__init__(**kwargs)
+ self.status = status
+ self.cert = cert
+ self.key = key
+ self.cname = cname
+
+
+class StorageAccountCredentials(msrest.serialization.Model):
+ """Access information for the storage account.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar resource_id: The ARM resource ID of the storage account.
+ :vartype resource_id: str
+ :ivar primary_key: The primary key of the storage account.
+ :vartype primary_key: str
+ :ivar secondary_key: The secondary key of the storage account.
+ :vartype secondary_key: str
+ """
+
+ _validation = {
+ 'resource_id': {'readonly': True},
+ 'primary_key': {'readonly': True},
+ 'secondary_key': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'resource_id': {'key': 'resourceId', 'type': 'str'},
+ 'primary_key': {'key': 'primaryKey', 'type': 'str'},
+ 'secondary_key': {'key': 'secondaryKey', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(StorageAccountCredentials, self).__init__(**kwargs)
+ self.resource_id = None
+ self.primary_key = None
+ self.secondary_key = None
+
+
+class StorageAccountProperties(msrest.serialization.Model):
+ """Properties of Storage Account.
+
+ :param resource_id: ARM resource ID of the Azure Storage Account to store CLI specific files.
+ If not provided one will be created. This cannot be changed once the cluster is created.
+ :type resource_id: str
+ """
+
+ _attribute_map = {
+ 'resource_id': {'key': 'resourceId', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ resource_id: Optional[str] = None,
+ **kwargs
+ ):
+ super(StorageAccountProperties, self).__init__(**kwargs)
+ self.resource_id = resource_id
+
+
+class SystemService(msrest.serialization.Model):
+ """Information about a system service deployed in the cluster.
+
+ 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.
+
+ :param system_service_type: Required. The system service type. Possible values include: "None",
+ "ScoringFrontEnd", "BatchFrontEnd".
+ :type system_service_type: str or ~azure.mgmt.machinelearningcompute.models.SystemServiceType
+ :ivar public_ip_address: The public IP address of the system service.
+ :vartype public_ip_address: str
+ :ivar version: The state of the system service.
+ :vartype version: str
+ """
+
+ _validation = {
+ 'system_service_type': {'required': 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,
+ *,
+ system_service_type: Union[str, "SystemServiceType"],
+ **kwargs
+ ):
+ super(SystemService, self).__init__(**kwargs)
+ self.system_service_type = system_service_type
+ self.public_ip_address = None
+ self.version = None
+
+
+class UpdateSystemServicesResponse(msrest.serialization.Model):
+ """Response of the update system services API.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar update_status: Update status. Possible values include: "Unknown", "Updating", "Creating",
+ "Deleting", "Succeeded", "Failed", "Canceled".
+ :vartype update_status: str or ~azure.mgmt.machinelearningcompute.models.OperationStatus
+ :ivar update_started_on: The date and time when the last system services update was started.
+ :vartype update_started_on: ~datetime.datetime
+ :ivar update_completed_on: The date and time when the last system services update completed.
+ :vartype update_completed_on: ~datetime.datetime
+ """
+
+ _validation = {
+ 'update_status': {'readonly': True},
+ 'update_started_on': {'readonly': True},
+ 'update_completed_on': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'update_status': {'key': 'updateStatus', 'type': 'str'},
+ 'update_started_on': {'key': 'updateStartedOn', 'type': 'iso-8601'},
+ 'update_completed_on': {'key': 'updateCompletedOn', 'type': 'iso-8601'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ super(UpdateSystemServicesResponse, self).__init__(**kwargs)
+ self.update_status = None
+ self.update_started_on = None
+ self.update_completed_on = None
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/operations/__init__.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/operations/__init__.py
new file mode 100644
index 000000000000..2dbc2ddbdd04
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/operations/__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 ._operationalization_clusters_operations import OperationalizationClustersOperations
+from ._machine_learning_compute_operations import MachineLearningComputeOperations
+
+__all__ = [
+ 'OperationalizationClustersOperations',
+ 'MachineLearningComputeOperations',
+]
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/operations/_machine_learning_compute_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/operations/_machine_learning_compute_operations.py
new file mode 100644
index 000000000000..b6bbe129c8ce
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/operations/_machine_learning_compute_operations.py
@@ -0,0 +1,92 @@
+# 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
+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 HttpRequest, HttpResponse
+from azure.mgmt.core.exceptions import ARMErrorFormat
+
+from .. import models as _models
+
+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]]
+
+class MachineLearningComputeOperations(object):
+ """MachineLearningComputeOperations 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.machinelearningcompute.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
+
+ def list_available_operations(
+ self,
+ **kwargs # type: Any
+ ):
+ # type: (...) -> "_models.AvailableOperations"
+ """Gets all available operations.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: AvailableOperations, or the result of cls(response)
+ :rtype: ~azure.mgmt.machinelearningcompute.models.AvailableOperations
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableOperations"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2017-08-01-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.list_available_operations.metadata['url'] # type: ignore
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ 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('AvailableOperations', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ list_available_operations.metadata = {'url': '/providers/Microsoft.MachineLearningCompute/operations'} # type: ignore
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/operations/_operationalization_clusters_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/operations/_operationalization_clusters_operations.py
new file mode 100644
index 000000000000..8851e706db7a
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/operations/_operationalization_clusters_operations.py
@@ -0,0 +1,820 @@
+# 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
+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 HttpRequest, HttpResponse
+from azure.core.polling import LROPoller, NoPolling, PollingMethod
+from azure.mgmt.core.exceptions import ARMErrorFormat
+from azure.mgmt.core.polling.arm_polling import ARMPolling
+
+from .. import models as _models
+
+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]]
+
+class OperationalizationClustersOperations(object):
+ """OperationalizationClustersOperations 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.machinelearningcompute.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
+
+ def _create_or_update_initial(
+ self,
+ resource_group_name, # type: str
+ cluster_name, # type: str
+ parameters, # type: "_models.OperationalizationCluster"
+ **kwargs # type: Any
+ ):
+ # type: (...) -> "_models.OperationalizationCluster"
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationalizationCluster"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2017-08-01-preview"
+ content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
+
+ # Construct URL
+ url = self._create_or_update_initial.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z][-\w\._\(\)]+[a-zA-Z0-9]$'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ body_content_kwargs = {} # type: Dict[str, Any]
+ body_content = self._serialize.body(parameters, 'OperationalizationCluster')
+ body_content_kwargs['content'] = body_content
+ request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
+ 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.ErrorResponseWrapper, response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ if response.status_code == 200:
+ deserialized = self._deserialize('OperationalizationCluster', pipeline_response)
+
+ if response.status_code == 201:
+ deserialized = self._deserialize('OperationalizationCluster', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}'} # type: ignore
+
+ def begin_create_or_update(
+ self,
+ resource_group_name, # type: str
+ cluster_name, # type: str
+ parameters, # type: "_models.OperationalizationCluster"
+ **kwargs # type: Any
+ ):
+ # type: (...) -> LROPoller["_models.OperationalizationCluster"]
+ """Create or update an operationalization cluster.
+
+ :param resource_group_name: Name of the resource group in which the cluster is located.
+ :type resource_group_name: str
+ :param cluster_name: The name of the cluster.
+ :type cluster_name: str
+ :param parameters: Parameters supplied to create or update an Operationalization cluster.
+ :type parameters: ~azure.mgmt.machinelearningcompute.models.OperationalizationCluster
+ :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: Pass in True if you'd like the ARMPolling polling method,
+ False for no polling, or 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 OperationalizationCluster or the result of cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.machinelearningcompute.models.OperationalizationCluster]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod]
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationalizationCluster"]
+ 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,
+ cluster_name=cluster_name,
+ parameters=parameters,
+ cls=lambda x,y,z: x,
+ **kwargs
+ )
+
+ kwargs.pop('error_map', None)
+ kwargs.pop('content_type', None)
+
+ def get_long_running_output(pipeline_response):
+ deserialized = self._deserialize('OperationalizationCluster', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+ return deserialized
+
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z][-\w\._\(\)]+[a-zA-Z0-9]$'),
+ }
+
+ if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **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.MachineLearningCompute/operationalizationClusters/{clusterName}'} # type: ignore
+
+ def get(
+ self,
+ resource_group_name, # type: str
+ cluster_name, # type: str
+ **kwargs # type: Any
+ ):
+ # type: (...) -> "_models.OperationalizationCluster"
+ """Gets the operationalization cluster resource view. Note that the credentials are not returned
+ by this call. Call ListKeys to get them.
+
+ :param resource_group_name: Name of the resource group in which the cluster is located.
+ :type resource_group_name: str
+ :param cluster_name: The name of the cluster.
+ :type cluster_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: OperationalizationCluster, or the result of cls(response)
+ :rtype: ~azure.mgmt.machinelearningcompute.models.OperationalizationCluster
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationalizationCluster"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2017-08-01-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.get.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z][-\w\._\(\)]+[a-zA-Z0-9]$'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ 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.ErrorResponseWrapper, response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('OperationalizationCluster', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}'} # type: ignore
+
+ def update(
+ self,
+ resource_group_name, # type: str
+ cluster_name, # type: str
+ parameters, # type: "_models.OperationalizationClusterUpdateParameters"
+ **kwargs # type: Any
+ ):
+ # type: (...) -> "_models.OperationalizationCluster"
+ """The PATCH operation can be used to update only the tags for a cluster. Use PUT operation to
+ update other properties.
+
+ :param resource_group_name: Name of the resource group in which the cluster is located.
+ :type resource_group_name: str
+ :param cluster_name: The name of the cluster.
+ :type cluster_name: str
+ :param parameters: The parameters supplied to patch the cluster.
+ :type parameters: ~azure.mgmt.machinelearningcompute.models.OperationalizationClusterUpdateParameters
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: OperationalizationCluster, or the result of cls(response)
+ :rtype: ~azure.mgmt.machinelearningcompute.models.OperationalizationCluster
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationalizationCluster"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2017-08-01-preview"
+ content_type = kwargs.pop("content_type", "application/json")
+ accept = "application/json"
+
+ # Construct URL
+ url = self.update.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z][-\w\._\(\)]+[a-zA-Z0-9]$'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ body_content_kwargs = {} # type: Dict[str, Any]
+ body_content = self._serialize.body(parameters, 'OperationalizationClusterUpdateParameters')
+ body_content_kwargs['content'] = body_content
+ request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
+ 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.ErrorResponseWrapper, response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('OperationalizationCluster', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}'} # type: ignore
+
+ def _delete_initial(
+ self,
+ resource_group_name, # type: str
+ cluster_name, # type: str
+ delete_all=None, # type: Optional[bool]
+ **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', {}))
+ api_version = "2017-08-01-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self._delete_initial.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z][-\w\._\(\)]+[a-zA-Z0-9]$'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+ if delete_all is not None:
+ query_parameters['deleteAll'] = self._serialize.query("delete_all", delete_all, 'bool')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.delete(url, query_parameters, header_parameters)
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [202, 204]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponseWrapper, response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 202:
+ 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.MachineLearningCompute/operationalizationClusters/{clusterName}'} # type: ignore
+
+ def begin_delete(
+ self,
+ resource_group_name, # type: str
+ cluster_name, # type: str
+ delete_all=None, # type: Optional[bool]
+ **kwargs # type: Any
+ ):
+ # type: (...) -> LROPoller[None]
+ """Deletes the specified cluster.
+
+ :param resource_group_name: Name of the resource group in which the cluster is located.
+ :type resource_group_name: str
+ :param cluster_name: The name of the cluster.
+ :type cluster_name: str
+ :param delete_all: If true, deletes all resources associated with this cluster.
+ :type delete_all: bool
+ :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: Pass in True if you'd like the ARMPolling polling method,
+ False for no polling, or 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, 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,
+ cluster_name=cluster_name,
+ delete_all=delete_all,
+ cls=lambda x,y,z: x,
+ **kwargs
+ )
+
+ kwargs.pop('error_map', None)
+ kwargs.pop('content_type', None)
+
+ def get_long_running_output(pipeline_response):
+ if cls:
+ return cls(pipeline_response, None, {})
+
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z][-\w\._\(\)]+[a-zA-Z0-9]$'),
+ }
+
+ if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **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.MachineLearningCompute/operationalizationClusters/{clusterName}'} # type: ignore
+
+ def list_keys(
+ self,
+ resource_group_name, # type: str
+ cluster_name, # type: str
+ **kwargs # type: Any
+ ):
+ # type: (...) -> "_models.OperationalizationClusterCredentials"
+ """Gets the credentials for the specified cluster such as Storage, ACR and ACS credentials. This
+ is a long running operation because it fetches keys from dependencies.
+
+ :param resource_group_name: Name of the resource group in which the cluster is located.
+ :type resource_group_name: str
+ :param cluster_name: The name of the cluster.
+ :type cluster_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: OperationalizationClusterCredentials, or the result of cls(response)
+ :rtype: ~azure.mgmt.machinelearningcompute.models.OperationalizationClusterCredentials
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationalizationClusterCredentials"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2017-08-01-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.list_keys.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z][-\w\._\(\)]+[a-zA-Z0-9]$'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.post(url, query_parameters, header_parameters)
+ 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('OperationalizationClusterCredentials', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}/listKeys'} # type: ignore
+
+ def check_system_services_updates_available(
+ self,
+ resource_group_name, # type: str
+ cluster_name, # type: str
+ **kwargs # type: Any
+ ):
+ # type: (...) -> "_models.CheckSystemServicesUpdatesAvailableResponse"
+ """Checks if updates are available for system services in the cluster.
+
+ :param resource_group_name: Name of the resource group in which the cluster is located.
+ :type resource_group_name: str
+ :param cluster_name: The name of the cluster.
+ :type cluster_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: CheckSystemServicesUpdatesAvailableResponse, or the result of cls(response)
+ :rtype: ~azure.mgmt.machinelearningcompute.models.CheckSystemServicesUpdatesAvailableResponse
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckSystemServicesUpdatesAvailableResponse"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2017-08-01-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self.check_system_services_updates_available.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z][-\w\._\(\)]+[a-zA-Z0-9]$'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.post(url, query_parameters, header_parameters)
+ 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('CheckSystemServicesUpdatesAvailableResponse', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+ check_system_services_updates_available.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}/checkSystemServicesUpdatesAvailable'} # type: ignore
+
+ def _update_system_services_initial(
+ self,
+ resource_group_name, # type: str
+ cluster_name, # type: str
+ **kwargs # type: Any
+ ):
+ # type: (...) -> Optional["_models.UpdateSystemServicesResponse"]
+ cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.UpdateSystemServicesResponse"]]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2017-08-01-preview"
+ accept = "application/json"
+
+ # Construct URL
+ url = self._update_system_services_initial.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z][-\w\._\(\)]+[a-zA-Z0-9]$'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = self._client.post(url, query_parameters, header_parameters)
+ 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 = {}
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('UpdateSystemServicesResponse', pipeline_response)
+
+ if response.status_code == 202:
+ response_headers['Location']=self._deserialize('str', response.headers.get('Location'))
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers)
+
+ return deserialized
+ _update_system_services_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}/updateSystemServices'} # type: ignore
+
+ def begin_update_system_services(
+ self,
+ resource_group_name, # type: str
+ cluster_name, # type: str
+ **kwargs # type: Any
+ ):
+ # type: (...) -> LROPoller["_models.UpdateSystemServicesResponse"]
+ """Updates system services in a cluster.
+
+ :param resource_group_name: Name of the resource group in which the cluster is located.
+ :type resource_group_name: str
+ :param cluster_name: The name of the cluster.
+ :type cluster_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: Pass in True if you'd like the ARMPolling polling method,
+ False for no polling, or 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 UpdateSystemServicesResponse or the result of cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.machinelearningcompute.models.UpdateSystemServicesResponse]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod]
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.UpdateSystemServicesResponse"]
+ 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_system_services_initial(
+ resource_group_name=resource_group_name,
+ cluster_name=cluster_name,
+ cls=lambda x,y,z: x,
+ **kwargs
+ )
+
+ kwargs.pop('error_map', None)
+ kwargs.pop('content_type', None)
+
+ def get_long_running_output(pipeline_response):
+ deserialized = self._deserialize('UpdateSystemServicesResponse', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+ return deserialized
+
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z][-\w\._\(\)]+[a-zA-Z0-9]$'),
+ }
+
+ if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **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_system_services.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}/updateSystemServices'} # type: ignore
+
+ def list_by_resource_group(
+ self,
+ resource_group_name, # type: str
+ skiptoken=None, # type: Optional[str]
+ **kwargs # type: Any
+ ):
+ # type: (...) -> Iterable["_models.PaginatedOperationalizationClustersList"]
+ """Gets the clusters in the specified resource group.
+
+ :param resource_group_name: Name of the resource group in which the cluster is located.
+ :type resource_group_name: str
+ :param skiptoken: Continuation token for pagination.
+ :type skiptoken: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either PaginatedOperationalizationClustersList or the result of cls(response)
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningcompute.models.PaginatedOperationalizationClustersList]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.PaginatedOperationalizationClustersList"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2017-08-01-preview"
+ accept = "application/json"
+
+ def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ if not next_link:
+ # Construct URL
+ url = self.list_by_resource_group.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+ if skiptoken is not None:
+ query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ else:
+ url = next_link
+ query_parameters = {} # type: Dict[str, Any]
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def extract_data(pipeline_response):
+ deserialized = self._deserialize('PaginatedOperationalizationClustersList', 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)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return ItemPaged(
+ get_next, extract_data
+ )
+ list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters'} # type: ignore
+
+ def list_by_subscription_id(
+ self,
+ skiptoken=None, # type: Optional[str]
+ **kwargs # type: Any
+ ):
+ # type: (...) -> Iterable["_models.PaginatedOperationalizationClustersList"]
+ """Gets the operationalization clusters in the specified subscription.
+
+ :param skiptoken: Continuation token for pagination.
+ :type skiptoken: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either PaginatedOperationalizationClustersList or the result of cls(response)
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningcompute.models.PaginatedOperationalizationClustersList]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.PaginatedOperationalizationClustersList"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ api_version = "2017-08-01-preview"
+ accept = "application/json"
+
+ def prepare_request(next_link=None):
+ # Construct headers
+ header_parameters = {} # type: Dict[str, Any]
+ header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ if not next_link:
+ # Construct URL
+ url = self.list_by_subscription_id.metadata['url'] # type: ignore
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+ # Construct parameters
+ query_parameters = {} # type: Dict[str, Any]
+ query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+ if skiptoken is not None:
+ query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str')
+
+ request = self._client.get(url, query_parameters, header_parameters)
+ else:
+ url = next_link
+ query_parameters = {} # type: Dict[str, Any]
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def extract_data(pipeline_response):
+ deserialized = self._deserialize('PaginatedOperationalizationClustersList', 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)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return ItemPaged(
+ get_next, extract_data
+ )
+ list_by_subscription_id.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningCompute/operationalizationClusters'} # type: ignore
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/py.typed b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/py.typed
new file mode 100644
index 000000000000..e5aff4f83af8
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/py.typed
@@ -0,0 +1 @@
+# Marker file for PEP 561.
\ No newline at end of file
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/sdk_packaging.toml b/sdk/machinelearning/azure-mgmt-machinelearningcompute/sdk_packaging.toml
new file mode 100644
index 000000000000..d3102976019a
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/sdk_packaging.toml
@@ -0,0 +1,9 @@
+[packaging]
+package_name = "azure-mgmt-machinelearningcompute"
+package_nspkg = "azure-mgmt-nspkg"
+package_pprint_name = "MyService Management"
+package_doc_id = ""
+is_stable = false
+is_arm = true
+need_msrestazure = false
+need_azuremgmtcore = true
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/setup.cfg b/sdk/machinelearning/azure-mgmt-machinelearningcompute/setup.cfg
new file mode 100644
index 000000000000..3c6e79cf31da
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/setup.cfg
@@ -0,0 +1,2 @@
+[bdist_wheel]
+universal=1
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/setup.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/setup.py
new file mode 100644
index 000000000000..fae61476e8f4
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/setup.py
@@ -0,0 +1,91 @@
+#!/usr/bin/env python
+
+#-------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#--------------------------------------------------------------------------
+
+import re
+import os.path
+from io import open
+from setuptools import find_packages, setup
+
+# Change the PACKAGE_NAME only to change folder and different name
+PACKAGE_NAME = "azure-mgmt-machinelearningcompute"
+PACKAGE_PPRINT_NAME = "MyService Management"
+
+# a-b-c => a/b/c
+package_folder_path = PACKAGE_NAME.replace('-', '/')
+# a-b-c => a.b.c
+namespace_name = PACKAGE_NAME.replace('-', '.')
+
+# azure v0.x is not compatible with this package
+# azure v0.x used to have a __version__ attribute (newer versions don't)
+try:
+ import azure
+ try:
+ ver = azure.__version__
+ raise Exception(
+ 'This package is incompatible with azure=={}. '.format(ver) +
+ 'Uninstall it with "pip uninstall azure".'
+ )
+ except AttributeError:
+ pass
+except ImportError:
+ pass
+
+# Version extraction inspired from 'requests'
+with open(os.path.join(package_folder_path, 'version.py')
+ if os.path.exists(os.path.join(package_folder_path, 'version.py'))
+ else os.path.join(package_folder_path, '_version.py'), 'r') as fd:
+ version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]',
+ fd.read(), re.MULTILINE).group(1)
+
+if not version:
+ raise RuntimeError('Cannot find version information')
+
+with open('README.md', encoding='utf-8') as f:
+ readme = f.read()
+with open('CHANGELOG.md', encoding='utf-8') as f:
+ changelog = f.read()
+
+setup(
+ name=PACKAGE_NAME,
+ version=version,
+ description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME),
+ long_description=readme + '\n\n' + changelog,
+ long_description_content_type='text/markdown',
+ license='MIT License',
+ author='Microsoft Corporation',
+ author_email='azpysdkhelp@microsoft.com',
+ url='https://github.com/Azure/azure-sdk-for-python',
+ classifiers=[
+ 'Development Status :: 4 - Beta',
+ 'Programming Language :: Python',
+ 'Programming Language :: Python :: 2',
+ 'Programming Language :: Python :: 2.7',
+ 'Programming Language :: Python :: 3',
+ 'Programming Language :: Python :: 3.5',
+ 'Programming Language :: Python :: 3.6',
+ 'Programming Language :: Python :: 3.7',
+ 'Programming Language :: Python :: 3.8',
+ 'Programming Language :: Python :: 3.9',
+ 'License :: OSI Approved :: MIT License',
+ ],
+ zip_safe=False,
+ packages=find_packages(exclude=[
+ 'tests',
+ # Exclude packages that will be covered by PEP420 or nspkg
+ 'azure',
+ 'azure.mgmt',
+ ]),
+ install_requires=[
+ 'msrest>=0.6.21',
+ 'azure-common~=1.1',
+ 'azure-mgmt-core>=1.2.0,<2.0.0',
+ ],
+ extras_require={
+ ":python_version<'3.0'": ['azure-mgmt-nspkg'],
+ }
+)