diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/_meta.json b/sdk/machinelearning/azure-mgmt-machinelearningcompute/_meta.json
index f095077255d3..203f247b7ec6 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/_meta.json
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/_meta.json
@@ -1,8 +1,11 @@
{
- "autorest": "3.4.2",
- "use": "@autorest/python@5.6.6",
- "commit": "3f1d9a2fd7d79c0e10cca4a4750a00e725ddc541",
+ "autorest": "3.7.2",
+ "use": [
+ "@autorest/python@5.12.0",
+ "@autorest/modelerfour@4.19.3"
+ ],
+ "commit": "3080959fbda0b602e0af875d4b90a094c0f6016e",
"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",
+ "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 --python3-only --track2 --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
"readme": "specification/machinelearningcompute/resource-manager/readme.md"
}
\ 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
index bec3f4cbfb1a..b8a6ac22df5c 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/__init__.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/__init__.py
@@ -12,8 +12,7 @@
__version__ = VERSION
__all__ = ['MachineLearningComputeManagementClient']
-try:
- from ._patch import patch_sdk # type: ignore
- patch_sdk()
-except ImportError:
- pass
+# `._patch.py` is used for handwritten extensions to the generated code
+# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
+from ._patch import patch_sdk
+patch_sdk()
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/_configuration.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/_configuration.py
index 36b0434fd671..4fb4facef752 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/_configuration.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/_configuration.py
@@ -6,18 +6,16 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-from typing import TYPE_CHECKING
+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 azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
from ._version import VERSION
if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
- from typing import Any
-
from azure.core.credentials import TokenCredential
@@ -35,16 +33,15 @@ class MachineLearningComputeManagementClientConfiguration(Configuration):
def __init__(
self,
- credential, # type: "TokenCredential"
- subscription_id, # type: str
- **kwargs # type: Any
- ):
- # type: (...) -> None
+ credential: "TokenCredential",
+ subscription_id: str,
+ **kwargs: Any
+ ) -> None:
+ super(MachineLearningComputeManagementClientConfiguration, self).__init__(**kwargs)
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
- super(MachineLearningComputeManagementClientConfiguration, self).__init__(**kwargs)
self.credential = credential
self.subscription_id = subscription_id
@@ -68,4 +65,4 @@ def _configure(
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)
+ self.authentication_policy = ARMChallengeAuthenticationPolicy(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
index 26ce93371533..181b40f8a251 100644
--- 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
@@ -6,79 +6,83 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-from typing import TYPE_CHECKING
+from copy import deepcopy
+from typing import Any, Optional, TYPE_CHECKING
+from azure.core.rest import HttpRequest, HttpResponse
from azure.mgmt.core import ARMPipelineClient
from msrest import Deserializer, Serializer
+from . import models
+from ._configuration import MachineLearningComputeManagementClientConfiguration
+from .operations import MachineLearningComputeOperations, OperationalizationClustersOperations
+
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):
+class MachineLearningComputeManagementClient:
"""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
+ :vartype operationalization_clusters:
+ azure.mgmt.machinelearningcompute.operations.OperationalizationClustersOperations
:ivar machine_learning_compute: MachineLearningComputeOperations operations
- :vartype machine_learning_compute: azure.mgmt.machinelearningcompute.operations.MachineLearningComputeOperations
+ :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.
+ :param base_url: Service URL. Default value is 'https://management.azure.com'.
+ :type base_url: str
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
"""
def __init__(
self,
- credential, # type: "TokenCredential"
- subscription_id, # type: str
- base_url=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)
+ credential: "TokenCredential",
+ subscription_id: str,
+ base_url: str = "https://management.azure.com",
+ **kwargs: Any
+ ) -> None:
+ self._config = MachineLearningComputeManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
- self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)
+ self._serialize.client_side_validation = False
+ 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)
- 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
+ def _send_request(
+ self,
+ request, # type: HttpRequest
+ **kwargs: 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.
+ >>> from azure.core.rest import HttpRequest
+ >>> request = HttpRequest("GET", "https://www.example.org/")
+
+ >>> response = client._send_request(request)
+
+
+ For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart
+
+ :param request: The network request you want to make. Required.
+ :type request: ~azure.core.rest.HttpRequest
+ :keyword bool stream: Whether the response payload will be streamed. Defaults to False.
:return: The response of your network call. Does not do error handling on your response.
- :rtype: ~azure.core.pipeline.transport.HttpResponse
+ :rtype: ~azure.core.rest.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
+
+ request_copy = deepcopy(request)
+ request_copy.url = self._client.format_url(request_copy.url)
+ return self._client.send_request(request_copy, **kwargs)
def close(self):
# type: () -> None
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/_metadata.json b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/_metadata.json
index a3f3617969cd..a1c0d04853f8 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/_metadata.json
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/_metadata.json
@@ -5,13 +5,13 @@
"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,
+ "host_value": "\"https://management.azure.com\"",
+ "parameterized_host_template": 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\"]}}}"
+ "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\"]}}}",
+ "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"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\"]}}}"
},
"global_parameters": {
"sync": {
@@ -54,7 +54,7 @@
"required": false
},
"base_url": {
- "signature": "base_url=None, # type: Optional[str]",
+ "signature": "base_url=\"https://management.azure.com\", # type: str",
"description": "Service URL",
"docstring_type": "str",
"required": false
@@ -74,7 +74,7 @@
"required": false
},
"base_url": {
- "signature": "base_url: Optional[str] = None,",
+ "signature": "base_url: str = \"https://management.azure.com\",",
"description": "Service URL",
"docstring_type": "str",
"required": false
@@ -91,11 +91,10 @@
"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\"]}}}"
+ "credential_call_sync": "ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)",
+ "credential_call_async": "AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)",
+ "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMChallengeAuthenticationPolicy\", \"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\", \"AsyncARMChallengeAuthenticationPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
},
"operation_groups": {
"operationalization_clusters": "OperationalizationClustersOperations",
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/_patch.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/_patch.py
new file mode 100644
index 000000000000..74e48ecd07cf
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/_patch.py
@@ -0,0 +1,31 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+#
+# Copyright (c) Microsoft Corporation. All rights reserved.
+#
+# The MIT License (MIT)
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the ""Software""), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+# IN THE SOFTWARE.
+#
+# --------------------------------------------------------------------------
+
+# This file is used for handwritten extensions to the generated code. Example:
+# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
+def patch_sdk():
+ pass
\ No newline at end of file
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/_vendor.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/_vendor.py
new file mode 100644
index 000000000000..138f663c53a4
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/_vendor.py
@@ -0,0 +1,27 @@
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from azure.core.pipeline.transport import HttpRequest
+
+def _convert_request(request, files=None):
+ data = request.content if not files else None
+ request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data)
+ if files:
+ request.set_formdata_body(files)
+ return request
+
+def _format_url_section(template, **kwargs):
+ components = template.split("/")
+ while components:
+ try:
+ return template.format(**kwargs)
+ except KeyError as key:
+ formatted_components = template.split("/")
+ components = [
+ c for c in formatted_components if "{}".format(key.args[0]) not in c
+ ]
+ template = "/".join(components)
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/__init__.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/__init__.py
index 88188e3f0f13..03f4ea764c97 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/__init__.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/__init__.py
@@ -8,3 +8,8 @@
from ._machine_learning_compute_management_client import MachineLearningComputeManagementClient
__all__ = ['MachineLearningComputeManagementClient']
+
+# `._patch.py` is used for handwritten extensions to the generated code
+# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
+from ._patch import patch_sdk
+patch_sdk()
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/_configuration.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/_configuration.py
index daa78697b7e1..19796986a48e 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/_configuration.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/_configuration.py
@@ -10,7 +10,7 @@
from azure.core.configuration import Configuration
from azure.core.pipeline import policies
-from azure.mgmt.core.policies import ARMHttpLoggingPolicy
+from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy
from .._version import VERSION
@@ -37,11 +37,11 @@ def __init__(
subscription_id: str,
**kwargs: Any
) -> None:
+ super(MachineLearningComputeManagementClientConfiguration, self).__init__(**kwargs)
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
- super(MachineLearningComputeManagementClientConfiguration, self).__init__(**kwargs)
self.credential = credential
self.subscription_id = subscription_id
@@ -64,4 +64,4 @@ def _configure(
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)
+ self.authentication_policy = AsyncARMChallengeAuthenticationPolicy(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
index 23afab1904de..aecbb726151d 100644
--- 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
@@ -6,75 +6,83 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-from typing import Any, Optional, TYPE_CHECKING
+from copy import deepcopy
+from typing import Any, Awaitable, Optional, TYPE_CHECKING
-from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
+from azure.core.rest import AsyncHttpResponse, HttpRequest
from azure.mgmt.core import AsyncARMPipelineClient
from msrest import Deserializer, Serializer
+from .. import models
+from ._configuration import MachineLearningComputeManagementClientConfiguration
+from .operations import MachineLearningComputeOperations, OperationalizationClustersOperations
+
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):
+class MachineLearningComputeManagementClient:
"""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
+ :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
+ :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.
+ :param base_url: Service URL. Default value is 'https://management.azure.com'.
+ :type base_url: str
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
"""
def __init__(
self,
credential: "AsyncTokenCredential",
subscription_id: str,
- base_url: Optional[str] = None,
+ base_url: str = "https://management.azure.com",
**kwargs: Any
) -> None:
- if not base_url:
- base_url = 'https://management.azure.com'
- self._config = MachineLearningComputeManagementClientConfiguration(credential, subscription_id, **kwargs)
+ self._config = MachineLearningComputeManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs)
self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
- self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)
+ self._serialize.client_side_validation = False
+ 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)
- 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:
+ def _send_request(
+ self,
+ request: HttpRequest,
+ **kwargs: Any
+ ) -> Awaitable[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.
+ >>> from azure.core.rest import HttpRequest
+ >>> request = HttpRequest("GET", "https://www.example.org/")
+
+ >>> response = await client._send_request(request)
+
+
+ For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart
+
+ :param request: The network request you want to make. Required.
+ :type request: ~azure.core.rest.HttpRequest
+ :keyword bool stream: Whether the response payload will be streamed. Defaults to False.
:return: The response of your network call. Does not do error handling on your response.
- :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse
+ :rtype: ~azure.core.rest.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
+
+ request_copy = deepcopy(request)
+ request_copy.url = self._client.format_url(request_copy.url)
+ return self._client.send_request(request_copy, **kwargs)
async def close(self) -> None:
await self._client.close()
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/_patch.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/_patch.py
new file mode 100644
index 000000000000..74e48ecd07cf
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/aio/_patch.py
@@ -0,0 +1,31 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+#
+# Copyright (c) Microsoft Corporation. All rights reserved.
+#
+# The MIT License (MIT)
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the ""Software""), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+# IN THE SOFTWARE.
+#
+# --------------------------------------------------------------------------
+
+# This file is used for handwritten extensions to the generated code. Example:
+# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
+def patch_sdk():
+ pass
\ No newline at end of file
diff --git a/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
index 370db471f993..9ddae7c90d47 100644
--- 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
@@ -5,16 +5,20 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
+import functools
from typing import Any, Callable, Dict, Generic, Optional, TypeVar
import warnings
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pipeline import PipelineResponse
-from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
+from azure.core.pipeline.transport import AsyncHttpResponse
+from azure.core.rest import HttpRequest
+from azure.core.tracing.decorator_async import distributed_trace_async
from azure.mgmt.core.exceptions import ARMErrorFormat
from ... import models as _models
-
+from ..._vendor import _convert_request
+from ...operations._machine_learning_compute_operations import build_list_available_operations_request
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -40,9 +44,10 @@ def __init__(self, client, config, serializer, deserializer) -> None:
self._deserialize = deserializer
self._config = config
+ @distributed_trace_async
async def list_available_operations(
self,
- **kwargs
+ **kwargs: Any
) -> "_models.AvailableOperations":
"""Gets all available operations.
@@ -56,21 +61,14 @@ async def list_available_operations(
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 = build_list_available_operations_request(
+ template_url=self.list_available_operations.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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
@@ -84,4 +82,6 @@ async def list_available_operations(
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
index da70526f4970..cde294ff7656 100644
--- 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
@@ -5,19 +5,24 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
+import functools
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union
import warnings
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pipeline import PipelineResponse
-from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
+from azure.core.pipeline.transport import AsyncHttpResponse
from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod
+from azure.core.rest import HttpRequest
+from azure.core.tracing.decorator import distributed_trace
+from azure.core.tracing.decorator_async import distributed_trace_async
from azure.mgmt.core.exceptions import ARMErrorFormat
from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling
from ... import models as _models
-
+from ..._vendor import _convert_request
+from ...operations._operationalization_clusters_operations import build_check_system_services_updates_available_request, build_create_or_update_request_initial, build_delete_request_initial, build_get_request, build_list_by_resource_group_request, build_list_by_subscription_id_request, build_list_keys_request, build_update_request, build_update_system_services_request_initial
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -48,46 +53,35 @@ async def _create_or_update_initial(
resource_group_name: str,
cluster_name: str,
parameters: "_models.OperationalizationCluster",
- **kwargs
+ **kwargs: Any
) -> "_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')
+ content_type = kwargs.pop('content_type', "application/json") # type: Optional[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')
+ _json = self._serialize.body(parameters, 'OperationalizationCluster')
+
+ request = build_create_or_update_request_initial(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ cluster_name=cluster_name,
+ content_type=content_type,
+ json=_json,
+ template_url=self._create_or_update_initial.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
if response.status_code == 200:
deserialized = self._deserialize('OperationalizationCluster', pipeline_response)
@@ -99,14 +93,17 @@ async def _create_or_update_initial(
return cls(pipeline_response, deserialized, {})
return deserialized
+
_create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}'} # type: ignore
+
+ @distributed_trace_async
async def begin_create_or_update(
self,
resource_group_name: str,
cluster_name: str,
parameters: "_models.OperationalizationCluster",
- **kwargs
+ **kwargs: Any
) -> AsyncLROPoller["_models.OperationalizationCluster"]:
"""Create or update an operationalization cluster.
@@ -118,15 +115,20 @@ async def begin_create_or_update(
: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.
+ :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
+ this operation to not poll, or pass in your own initialized polling object for a personal
+ polling strategy.
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
- :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
- :return: An instance of AsyncLROPoller that returns either OperationalizationCluster or the result of cls(response)
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.machinelearningcompute.models.OperationalizationCluster]
- :raises ~azure.core.exceptions.HttpResponseError:
+ :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]
+ content_type = kwargs.pop('content_type', "application/json") # type: Optional[str]
+ polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationalizationCluster"]
lro_delay = kwargs.pop(
'polling_interval',
@@ -138,27 +140,21 @@ async def begin_create_or_update(
resource_group_name=resource_group_name,
cluster_name=cluster_name,
parameters=parameters,
+ content_type=content_type,
cls=lambda x,y,z: x,
**kwargs
)
-
kwargs.pop('error_map', None)
- kwargs.pop('content_type', None)
def get_long_running_output(pipeline_response):
+ response = pipeline_response.http_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)
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
@@ -170,13 +166,15 @@ def get_long_running_output(pipeline_response):
)
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
+ @distributed_trace_async
async def get(
self,
resource_group_name: str,
cluster_name: str,
- **kwargs
+ **kwargs: Any
) -> "_models.OperationalizationCluster":
"""Gets the operationalization cluster resource view. Note that the credentials are not returned
by this call. Call ListKeys to get them.
@@ -195,33 +193,23 @@ async def get(
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 = build_get_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ cluster_name=cluster_name,
+ template_url=self.get.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponseWrapper, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
deserialized = self._deserialize('OperationalizationCluster', pipeline_response)
@@ -230,14 +218,17 @@ async def get(
return cls(pipeline_response, deserialized, {})
return deserialized
+
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}'} # type: ignore
+
+ @distributed_trace_async
async def update(
self,
resource_group_name: str,
cluster_name: str,
parameters: "_models.OperationalizationClusterUpdateParameters",
- **kwargs
+ **kwargs: Any
) -> "_models.OperationalizationCluster":
"""The PATCH operation can be used to update only the tags for a cluster. Use PUT operation to
update other properties.
@@ -247,7 +238,8 @@ async def update(
: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
+ :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
@@ -258,38 +250,28 @@ async def update(
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')
+ content_type = kwargs.pop('content_type', "application/json") # type: Optional[str]
+
+ _json = self._serialize.body(parameters, 'OperationalizationClusterUpdateParameters')
- # 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')
+ request = build_update_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ cluster_name=cluster_name,
+ content_type=content_type,
+ json=_json,
+ template_url=self.update.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponseWrapper, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
deserialized = self._deserialize('OperationalizationCluster', pipeline_response)
@@ -298,66 +280,59 @@ async def update(
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
+ **kwargs: Any
) -> None:
cls = kwargs.pop('cls', None) # type: ClsType[None]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- 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 = build_delete_request_initial(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ cluster_name=cluster_name,
+ delete_all=delete_all,
+ template_url=self._delete_initial.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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)
+ raise HttpResponseError(response=response, 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
+
+ @distributed_trace_async
async def begin_delete(
self,
resource_group_name: str,
cluster_name: str,
delete_all: Optional[bool] = None,
- **kwargs
+ **kwargs: Any
) -> AsyncLROPoller[None]:
"""Deletes the specified cluster.
@@ -369,15 +344,17 @@ async def begin_delete(
: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.
+ :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
+ this operation to not poll, or pass in your own initialized polling object for a personal
+ polling strategy.
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
- :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
+ :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:
+ :raises: ~azure.core.exceptions.HttpResponseError
"""
- polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
+ polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType[None]
lro_delay = kwargs.pop(
'polling_interval',
@@ -392,21 +369,14 @@ async def begin_delete(
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)
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
@@ -418,13 +388,15 @@ def get_long_running_output(pipeline_response):
)
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
+ @distributed_trace_async
async def list_keys(
self,
resource_group_name: str,
cluster_name: str,
- **kwargs
+ **kwargs: Any
) -> "_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.
@@ -443,27 +415,17 @@ async def list_keys(
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 = build_list_keys_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ cluster_name=cluster_name,
+ template_url=self.list_keys.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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
@@ -477,13 +439,16 @@ async def list_keys(
return cls(pipeline_response, deserialized, {})
return deserialized
+
list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}/listKeys'} # type: ignore
+
+ @distributed_trace_async
async def check_system_services_updates_available(
self,
resource_group_name: str,
cluster_name: str,
- **kwargs
+ **kwargs: Any
) -> "_models.CheckSystemServicesUpdatesAvailableResponse":
"""Checks if updates are available for system services in the cluster.
@@ -501,27 +466,17 @@ async def check_system_services_updates_available(
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 = build_check_system_services_updates_available_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ cluster_name=cluster_name,
+ template_url=self.check_system_services_updates_available.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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
@@ -535,40 +490,32 @@ async def check_system_services_updates_available(
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
+ **kwargs: Any
) -> 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 = build_update_system_services_request_initial(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ cluster_name=cluster_name,
+ template_url=self._update_system_services_initial.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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
@@ -576,25 +523,29 @@ async def _update_system_services_initial(
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
- response_headers = {}
deserialized = None
+ response_headers = {}
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
+
+ @distributed_trace_async
async def begin_update_system_services(
self,
resource_group_name: str,
cluster_name: str,
- **kwargs
+ **kwargs: Any
) -> AsyncLROPoller["_models.UpdateSystemServicesResponse"]:
"""Updates system services in a cluster.
@@ -604,15 +555,19 @@ async def begin_update_system_services(
: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.
+ :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
+ this operation to not poll, or pass in your own initialized polling object for a personal
+ polling strategy.
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
- :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
- :return: An instance of AsyncLROPoller that returns either UpdateSystemServicesResponse or the result of cls(response)
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.machinelearningcompute.models.UpdateSystemServicesResponse]
- :raises ~azure.core.exceptions.HttpResponseError:
+ :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]
+ polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType["_models.UpdateSystemServicesResponse"]
lro_delay = kwargs.pop(
'polling_interval',
@@ -626,24 +581,17 @@ async def begin_update_system_services(
cls=lambda x,y,z: x,
**kwargs
)
-
kwargs.pop('error_map', None)
- kwargs.pop('content_type', None)
def get_long_running_output(pipeline_response):
+ response = pipeline_response.http_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)
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
@@ -655,13 +603,15 @@ def get_long_running_output(pipeline_response):
)
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
+ @distributed_trace
def list_by_resource_group(
self,
resource_group_name: str,
skiptoken: Optional[str] = None,
- **kwargs
+ **kwargs: Any
) -> AsyncIterable["_models.PaginatedOperationalizationClustersList"]:
"""Gets the clusters in the specified resource group.
@@ -670,8 +620,10 @@ def list_by_resource_group(
: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]
+ :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"]
@@ -679,37 +631,33 @@ def list_by_resource_group(
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)
+
+ request = build_list_by_resource_group_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ skiptoken=skiptoken,
+ template_url=self.list_by_resource_group.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
else:
- url = next_link
- query_parameters = {} # type: Dict[str, Any]
- request = self._client.get(url, query_parameters, header_parameters)
+
+ request = build_list_by_resource_group_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ skiptoken=skiptoken,
+ template_url=next_link,
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
return request
async def extract_data(pipeline_response):
- deserialized = self._deserialize('PaginatedOperationalizationClustersList', pipeline_response)
+ deserialized = self._deserialize("PaginatedOperationalizationClustersList", pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
@@ -727,23 +675,27 @@ async def get_next(next_link=None):
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
+ @distributed_trace
def list_by_subscription_id(
self,
skiptoken: Optional[str] = None,
- **kwargs
+ **kwargs: Any
) -> 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]
+ :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"]
@@ -751,36 +703,31 @@ def list_by_subscription_id(
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)
+
+ request = build_list_by_subscription_id_request(
+ subscription_id=self._config.subscription_id,
+ skiptoken=skiptoken,
+ template_url=self.list_by_subscription_id.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
else:
- url = next_link
- query_parameters = {} # type: Dict[str, Any]
- request = self._client.get(url, query_parameters, header_parameters)
+
+ request = build_list_by_subscription_id_request(
+ subscription_id=self._config.subscription_id,
+ skiptoken=skiptoken,
+ template_url=next_link,
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
return request
async def extract_data(pipeline_response):
- deserialized = self._deserialize('PaginatedOperationalizationClustersList', pipeline_response)
+ deserialized = self._deserialize("PaginatedOperationalizationClustersList", pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
@@ -798,6 +745,7 @@ async def get_next(next_link=None):
return pipeline_response
+
return AsyncItemPaged(
get_next, extract_data
)
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
index 73ceb102b5be..797a969316cd 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/__init__.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/__init__.py
@@ -6,64 +6,35 @@
# 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 ._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
+
from ._machine_learning_compute_management_client_enums import (
AgentVMSizeTypes,
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
index f07194326483..6d9585a2bbff 100644
--- 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
@@ -6,27 +6,12 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-from enum import Enum, EnumMeta
+from enum import Enum
from six import with_metaclass
+from azure.core import CaseInsensitiveEnumMeta
-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)):
+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
@@ -81,14 +66,14 @@ class AgentVMSizeTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
STANDARD_GS4 = "Standard_GS4"
STANDARD_GS5 = "Standard_GS5"
-class ClusterType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+class ClusterType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
"""The cluster type.
"""
ACS = "ACS"
LOCAL = "Local"
-class OperationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+class OperationStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
"""The provision state of the cluster. Valid values are Unknown, Updating, Provisioning,
Succeeded, and Failed.
"""
@@ -101,21 +86,21 @@ class OperationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
FAILED = "Failed"
CANCELED = "Canceled"
-class OrchestratorType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+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)):
+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)):
+class SystemServiceType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
"""The system service type
"""
@@ -123,7 +108,7 @@ class SystemServiceType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
SCORING_FRONT_END = "ScoringFrontEnd"
BATCH_FRONT_END = "BatchFrontEnd"
-class UpdatesAvailable(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+class UpdatesAvailable(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
"""Yes if updates are available for the system services, No if not.
"""
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
deleted file mode 100644
index f6ed840f0cc4..000000000000
--- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/_models.py
+++ /dev/null
@@ -1,954 +0,0 @@
-# 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
index ce6fe4b0b556..6656a292bcaa 100644
--- 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
@@ -6,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-from typing import Dict, List, Optional, Union
+from typing import Any, Dict, List, Optional, Union
from azure.core.exceptions import HttpResponseError
import msrest.serialization
@@ -23,20 +23,20 @@ class AcsClusterProperties(msrest.serialization.Model):
: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
+ :ivar 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:
+ :vartype orchestrator_type: str or ~azure.mgmt.machinelearningcompute.models.OrchestratorType
+ :ivar orchestrator_properties: Orchestrator specific properties.
+ :vartype 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
+ :ivar system_services: The system services deployed to the cluster.
+ :vartype system_services: list[~azure.mgmt.machinelearningcompute.models.SystemService]
+ :ivar master_count: The number of master nodes in the container service.
+ :vartype master_count: int
+ :ivar 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
+ :vartype agent_count: int
+ :ivar 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",
@@ -49,7 +49,7 @@ class AcsClusterProperties(msrest.serialization.Model):
"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
+ :vartype agent_vm_size: str or ~azure.mgmt.machinelearningcompute.models.AgentVMSizeTypes
"""
_validation = {
@@ -80,6 +80,35 @@ def __init__(
agent_vm_size: Optional[Union[str, "AgentVMSizeTypes"]] = "Standard_D3_v2",
**kwargs
):
+ """
+ :keyword orchestrator_type: Required. Type of orchestrator. It cannot be changed once the
+ cluster is created. Possible values include: "Kubernetes", "None".
+ :paramtype orchestrator_type: str or ~azure.mgmt.machinelearningcompute.models.OrchestratorType
+ :keyword orchestrator_properties: Orchestrator specific properties.
+ :paramtype orchestrator_properties:
+ ~azure.mgmt.machinelearningcompute.models.KubernetesClusterProperties
+ :keyword system_services: The system services deployed to the cluster.
+ :paramtype system_services: list[~azure.mgmt.machinelearningcompute.models.SystemService]
+ :keyword master_count: The number of master nodes in the container service.
+ :paramtype master_count: int
+ :keyword agent_count: The number of agent nodes in the Container Service. This can be changed
+ to scale the cluster.
+ :paramtype agent_count: int
+ :keyword 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".
+ :paramtype agent_vm_size: str or ~azure.mgmt.machinelearningcompute.models.AgentVMSizeTypes
+ """
super(AcsClusterProperties, self).__init__(**kwargs)
self.cluster_fqdn = None
self.orchestrator_type = orchestrator_type
@@ -93,11 +122,11 @@ def __init__(
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
+ :ivar app_id: The AppInsights application ID.
+ :vartype app_id: str
+ :ivar 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
+ :vartype instrumentation_key: str
"""
_attribute_map = {
@@ -112,6 +141,13 @@ def __init__(
instrumentation_key: Optional[str] = None,
**kwargs
):
+ """
+ :keyword app_id: The AppInsights application ID.
+ :paramtype app_id: str
+ :keyword 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.
+ :paramtype instrumentation_key: str
+ """
super(AppInsightsCredentials, self).__init__(**kwargs)
self.app_id = app_id
self.instrumentation_key = instrumentation_key
@@ -120,8 +156,8 @@ def __init__(
class AppInsightsProperties(msrest.serialization.Model):
"""Properties of App Insights.
- :param resource_id: ARM resource ID of the App Insights.
- :type resource_id: str
+ :ivar resource_id: ARM resource ID of the App Insights.
+ :vartype resource_id: str
"""
_attribute_map = {
@@ -134,6 +170,10 @@ def __init__(
resource_id: Optional[str] = None,
**kwargs
):
+ """
+ :keyword resource_id: ARM resource ID of the App Insights.
+ :paramtype resource_id: str
+ """
super(AppInsightsProperties, self).__init__(**kwargs)
self.resource_id = resource_id
@@ -141,17 +181,17 @@ def __init__(
class AutoScaleConfiguration(msrest.serialization.Model):
"""AutoScale configuration properties.
- :param status: If auto-scale is enabled for all services. Each service can turn it off
+ :ivar 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
+ :vartype status: str or ~azure.mgmt.machinelearningcompute.models.Status
+ :ivar min_replicas: The minimum number of replicas for each service.
+ :vartype min_replicas: int
+ :ivar max_replicas: The maximum number of replicas for each service.
+ :vartype max_replicas: int
+ :ivar target_utilization: The target utilization.
+ :vartype target_utilization: float
+ :ivar refresh_period_in_seconds: Refresh period in seconds.
+ :vartype refresh_period_in_seconds: int
"""
_validation = {
@@ -177,6 +217,19 @@ def __init__(
refresh_period_in_seconds: Optional[int] = None,
**kwargs
):
+ """
+ :keyword status: If auto-scale is enabled for all services. Each service can turn it off
+ individually. Possible values include: "Enabled", "Disabled".
+ :paramtype status: str or ~azure.mgmt.machinelearningcompute.models.Status
+ :keyword min_replicas: The minimum number of replicas for each service.
+ :paramtype min_replicas: int
+ :keyword max_replicas: The maximum number of replicas for each service.
+ :paramtype max_replicas: int
+ :keyword target_utilization: The target utilization.
+ :paramtype target_utilization: float
+ :keyword refresh_period_in_seconds: Refresh period in seconds.
+ :paramtype refresh_period_in_seconds: int
+ """
super(AutoScaleConfiguration, self).__init__(**kwargs)
self.status = status
self.min_replicas = min_replicas
@@ -188,8 +241,8 @@ def __init__(
class AvailableOperations(msrest.serialization.Model):
"""Available operation list.
- :param value: An array of available operations.
- :type value: list[~azure.mgmt.machinelearningcompute.models.ResourceOperation]
+ :ivar value: An array of available operations.
+ :vartype value: list[~azure.mgmt.machinelearningcompute.models.ResourceOperation]
"""
_attribute_map = {
@@ -202,6 +255,10 @@ def __init__(
value: Optional[List["ResourceOperation"]] = None,
**kwargs
):
+ """
+ :keyword value: An array of available operations.
+ :paramtype value: list[~azure.mgmt.machinelearningcompute.models.ResourceOperation]
+ """
super(AvailableOperations, self).__init__(**kwargs)
self.value = value
@@ -228,6 +285,8 @@ def __init__(
self,
**kwargs
):
+ """
+ """
super(CheckSystemServicesUpdatesAvailableResponse, self).__init__(**kwargs)
self.updates_available = None
@@ -265,6 +324,8 @@ def __init__(
self,
**kwargs
):
+ """
+ """
super(ContainerRegistryCredentials, self).__init__(**kwargs)
self.login_server = None
self.password = None
@@ -275,10 +336,10 @@ def __init__(
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
+ :ivar 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
+ :vartype resource_id: str
"""
_attribute_map = {
@@ -291,6 +352,12 @@ def __init__(
resource_id: Optional[str] = None,
**kwargs
):
+ """
+ :keyword 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.
+ :paramtype resource_id: str
+ """
super(ContainerRegistryProperties, self).__init__(**kwargs)
self.resource_id = resource_id
@@ -325,6 +392,8 @@ def __init__(
self,
**kwargs
):
+ """
+ """
super(ContainerServiceCredentials, self).__init__(**kwargs)
self.acs_kube_config = None
self.service_principal_configuration = None
@@ -336,10 +405,10 @@ class ErrorDetail(msrest.serialization.Model):
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
+ :ivar code: Required. Error code.
+ :vartype code: str
+ :ivar message: Required. Error message.
+ :vartype message: str
"""
_validation = {
@@ -359,6 +428,12 @@ def __init__(
message: str,
**kwargs
):
+ """
+ :keyword code: Required. Error code.
+ :paramtype code: str
+ :keyword message: Required. Error message.
+ :paramtype message: str
+ """
super(ErrorDetail, self).__init__(**kwargs)
self.code = code
self.message = message
@@ -369,12 +444,12 @@ class ErrorResponse(msrest.serialization.Model):
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]
+ :ivar code: Required. Error code.
+ :vartype code: str
+ :ivar message: Required. Error message.
+ :vartype message: str
+ :ivar details: An array of error detail objects.
+ :vartype details: list[~azure.mgmt.machinelearningcompute.models.ErrorDetail]
"""
_validation = {
@@ -396,6 +471,14 @@ def __init__(
details: Optional[List["ErrorDetail"]] = None,
**kwargs
):
+ """
+ :keyword code: Required. Error code.
+ :paramtype code: str
+ :keyword message: Required. Error message.
+ :paramtype message: str
+ :keyword details: An array of error detail objects.
+ :paramtype details: list[~azure.mgmt.machinelearningcompute.models.ErrorDetail]
+ """
super(ErrorResponse, self).__init__(**kwargs)
self.code = code
self.message = message
@@ -405,8 +488,8 @@ def __init__(
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
+ :ivar error: The error response.
+ :vartype error: ~azure.mgmt.machinelearningcompute.models.ErrorResponse
"""
_attribute_map = {
@@ -419,6 +502,10 @@ def __init__(
error: Optional["ErrorResponse"] = None,
**kwargs
):
+ """
+ :keyword error: The error response.
+ :paramtype error: ~azure.mgmt.machinelearningcompute.models.ErrorResponse
+ """
super(ErrorResponseWrapper, self).__init__(**kwargs)
self.error = error
@@ -426,22 +513,22 @@ def __init__(
class GlobalServiceConfiguration(msrest.serialization.Model):
"""Global configuration for services in the cluster.
- :param additional_properties: Unmatched properties from the message are deserialized to this
+ :ivar 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
+ :vartype additional_properties: dict[str, any]
+ :ivar etag: The configuration ETag for updates.
+ :vartype etag: str
+ :ivar ssl: The SSL configuration properties.
+ :vartype ssl: ~azure.mgmt.machinelearningcompute.models.SslConfiguration
+ :ivar 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
+ :vartype service_auth: ~azure.mgmt.machinelearningcompute.models.ServiceAuthConfiguration
+ :ivar auto_scale: The auto-scale configuration.
+ :vartype auto_scale: ~azure.mgmt.machinelearningcompute.models.AutoScaleConfiguration
"""
_attribute_map = {
- 'additional_properties': {'key': '', 'type': '{str}'},
+ 'additional_properties': {'key': '', 'type': '{object}'},
'etag': {'key': 'etag', 'type': 'str'},
'ssl': {'key': 'ssl', 'type': 'SslConfiguration'},
'service_auth': {'key': 'serviceAuth', 'type': 'ServiceAuthConfiguration'},
@@ -451,13 +538,27 @@ class GlobalServiceConfiguration(msrest.serialization.Model):
def __init__(
self,
*,
- additional_properties: Optional[Dict[str, str]] = None,
+ additional_properties: Optional[Dict[str, Any]] = None,
etag: Optional[str] = None,
ssl: Optional["SslConfiguration"] = None,
service_auth: Optional["ServiceAuthConfiguration"] = None,
auto_scale: Optional["AutoScaleConfiguration"] = None,
**kwargs
):
+ """
+ :keyword additional_properties: Unmatched properties from the message are deserialized to this
+ collection.
+ :paramtype additional_properties: dict[str, any]
+ :keyword etag: The configuration ETag for updates.
+ :paramtype etag: str
+ :keyword ssl: The SSL configuration properties.
+ :paramtype ssl: ~azure.mgmt.machinelearningcompute.models.SslConfiguration
+ :keyword service_auth: Optional global authorization keys for all user services deployed in
+ cluster. These are used if the service does not have auth keys.
+ :paramtype service_auth: ~azure.mgmt.machinelearningcompute.models.ServiceAuthConfiguration
+ :keyword auto_scale: The auto-scale configuration.
+ :paramtype auto_scale: ~azure.mgmt.machinelearningcompute.models.AutoScaleConfiguration
+ """
super(GlobalServiceConfiguration, self).__init__(**kwargs)
self.additional_properties = additional_properties
self.etag = etag
@@ -469,8 +570,9 @@ def __init__(
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
+ :ivar service_principal: The Azure Service Principal used by Kubernetes.
+ :vartype service_principal:
+ ~azure.mgmt.machinelearningcompute.models.ServicePrincipalProperties
"""
_attribute_map = {
@@ -483,6 +585,11 @@ def __init__(
service_principal: Optional["ServicePrincipalProperties"] = None,
**kwargs
):
+ """
+ :keyword service_principal: The Azure Service Principal used by Kubernetes.
+ :paramtype service_principal:
+ ~azure.mgmt.machinelearningcompute.models.ServicePrincipalProperties
+ """
super(KubernetesClusterProperties, self).__init__(**kwargs)
self.service_principal = service_principal
@@ -498,12 +605,12 @@ class Resource(msrest.serialization.Model):
: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 location: Required. Specifies the location of the resource.
+ :vartype 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]
+ :ivar tags: A set of tags. Contains resource tags defined as key/value pairs.
+ :vartype tags: dict[str, str]
"""
_validation = {
@@ -528,6 +635,12 @@ def __init__(
tags: Optional[Dict[str, str]] = None,
**kwargs
):
+ """
+ :keyword location: Required. Specifies the location of the resource.
+ :paramtype location: str
+ :keyword tags: A set of tags. Contains resource tags defined as key/value pairs.
+ :paramtype tags: dict[str, str]
+ """
super(Resource, self).__init__(**kwargs)
self.id = None
self.name = None
@@ -547,14 +660,14 @@ class OperationalizationCluster(Resource):
: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 location: Required. Specifies the location of the resource.
+ :vartype 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 tags: A set of tags. Contains resource tags defined as key/value pairs.
+ :vartype tags: dict[str, str]
+ :ivar description: The description of the cluster.
+ :vartype 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.
@@ -566,19 +679,20 @@ class OperationalizationCluster(Resource):
: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
+ :ivar cluster_type: The cluster type. Possible values include: "ACS", "Local".
+ :vartype cluster_type: str or ~azure.mgmt.machinelearningcompute.models.ClusterType
+ :ivar storage_account: Storage Account properties.
+ :vartype storage_account: ~azure.mgmt.machinelearningcompute.models.StorageAccountProperties
+ :ivar container_registry: Container Registry properties.
+ :vartype container_registry:
+ ~azure.mgmt.machinelearningcompute.models.ContainerRegistryProperties
+ :ivar container_service: Parameters for the Azure Container Service cluster.
+ :vartype container_service: ~azure.mgmt.machinelearningcompute.models.AcsClusterProperties
+ :ivar app_insights: AppInsights configuration.
+ :vartype app_insights: ~azure.mgmt.machinelearningcompute.models.AppInsightsProperties
+ :ivar global_service_configuration: Contains global configuration for the web services in the
cluster.
- :type global_service_configuration:
+ :vartype global_service_configuration:
~azure.mgmt.machinelearningcompute.models.GlobalServiceConfiguration
"""
@@ -626,6 +740,29 @@ def __init__(
global_service_configuration: Optional["GlobalServiceConfiguration"] = None,
**kwargs
):
+ """
+ :keyword location: Required. Specifies the location of the resource.
+ :paramtype location: str
+ :keyword tags: A set of tags. Contains resource tags defined as key/value pairs.
+ :paramtype tags: dict[str, str]
+ :keyword description: The description of the cluster.
+ :paramtype description: str
+ :keyword cluster_type: The cluster type. Possible values include: "ACS", "Local".
+ :paramtype cluster_type: str or ~azure.mgmt.machinelearningcompute.models.ClusterType
+ :keyword storage_account: Storage Account properties.
+ :paramtype storage_account: ~azure.mgmt.machinelearningcompute.models.StorageAccountProperties
+ :keyword container_registry: Container Registry properties.
+ :paramtype container_registry:
+ ~azure.mgmt.machinelearningcompute.models.ContainerRegistryProperties
+ :keyword container_service: Parameters for the Azure Container Service cluster.
+ :paramtype container_service: ~azure.mgmt.machinelearningcompute.models.AcsClusterProperties
+ :keyword app_insights: AppInsights configuration.
+ :paramtype app_insights: ~azure.mgmt.machinelearningcompute.models.AppInsightsProperties
+ :keyword global_service_configuration: Contains global configuration for the web services in
+ the cluster.
+ :paramtype global_service_configuration:
+ ~azure.mgmt.machinelearningcompute.models.GlobalServiceConfiguration
+ """
super(OperationalizationCluster, self).__init__(location=location, tags=tags, **kwargs)
self.description = description
self.created_on = None
@@ -643,21 +780,22 @@ def __init__(
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:
+ :ivar storage_account: Credentials for the Storage Account.
+ :vartype storage_account: ~azure.mgmt.machinelearningcompute.models.StorageAccountCredentials
+ :ivar container_registry: Credentials for Azure Container Registry.
+ :vartype 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
+ :ivar container_service: Credentials for Azure Container Service.
+ :vartype container_service:
+ ~azure.mgmt.machinelearningcompute.models.ContainerServiceCredentials
+ :ivar app_insights: Credentials for Azure AppInsights.
+ :vartype app_insights: ~azure.mgmt.machinelearningcompute.models.AppInsightsCredentials
+ :ivar 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:
+ :vartype 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
+ :ivar ssl_configuration: The SSL configuration for the services.
+ :vartype ssl_configuration: ~azure.mgmt.machinelearningcompute.models.SslConfiguration
"""
_attribute_map = {
@@ -680,6 +818,24 @@ def __init__(
ssl_configuration: Optional["SslConfiguration"] = None,
**kwargs
):
+ """
+ :keyword storage_account: Credentials for the Storage Account.
+ :paramtype storage_account: ~azure.mgmt.machinelearningcompute.models.StorageAccountCredentials
+ :keyword container_registry: Credentials for Azure Container Registry.
+ :paramtype container_registry:
+ ~azure.mgmt.machinelearningcompute.models.ContainerRegistryCredentials
+ :keyword container_service: Credentials for Azure Container Service.
+ :paramtype container_service:
+ ~azure.mgmt.machinelearningcompute.models.ContainerServiceCredentials
+ :keyword app_insights: Credentials for Azure AppInsights.
+ :paramtype app_insights: ~azure.mgmt.machinelearningcompute.models.AppInsightsCredentials
+ :keyword service_auth_configuration: Global authorization keys for all user services deployed
+ in cluster. These are used if the service does not have auth keys.
+ :paramtype service_auth_configuration:
+ ~azure.mgmt.machinelearningcompute.models.ServiceAuthConfiguration
+ :keyword ssl_configuration: The SSL configuration for the services.
+ :paramtype ssl_configuration: ~azure.mgmt.machinelearningcompute.models.SslConfiguration
+ """
super(OperationalizationClusterCredentials, self).__init__(**kwargs)
self.storage_account = storage_account
self.container_registry = container_registry
@@ -692,11 +848,11 @@ def __init__(
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.
+ :ivar 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]
+ :vartype tags: dict[str, str]
"""
_attribute_map = {
@@ -709,6 +865,13 @@ def __init__(
tags: Optional[Dict[str, str]] = None,
**kwargs
):
+ """
+ :keyword 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.
+ :paramtype tags: dict[str, str]
+ """
super(OperationalizationClusterUpdateParameters, self).__init__(**kwargs)
self.tags = tags
@@ -716,10 +879,10 @@ def __init__(
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
+ :ivar value: An array of cluster objects.
+ :vartype value: list[~azure.mgmt.machinelearningcompute.models.OperationalizationCluster]
+ :ivar next_link: A continuation link (absolute URI) to the next page of results in the list.
+ :vartype next_link: str
"""
_attribute_map = {
@@ -734,6 +897,12 @@ def __init__(
next_link: Optional[str] = None,
**kwargs
):
+ """
+ :keyword value: An array of cluster objects.
+ :paramtype value: list[~azure.mgmt.machinelearningcompute.models.OperationalizationCluster]
+ :keyword next_link: A continuation link (absolute URI) to the next page of results in the list.
+ :paramtype next_link: str
+ """
super(PaginatedOperationalizationClustersList, self).__init__(**kwargs)
self.value = value
self.next_link = next_link
@@ -742,12 +911,12 @@ def __init__(
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
+ :ivar name: Name of this operation.
+ :vartype name: str
+ :ivar display: Display of the operation.
+ :vartype display: ~azure.mgmt.machinelearningcompute.models.ResourceOperationDisplay
+ :ivar origin: The operation origin.
+ :vartype origin: str
"""
_attribute_map = {
@@ -764,6 +933,14 @@ def __init__(
origin: Optional[str] = None,
**kwargs
):
+ """
+ :keyword name: Name of this operation.
+ :paramtype name: str
+ :keyword display: Display of the operation.
+ :paramtype display: ~azure.mgmt.machinelearningcompute.models.ResourceOperationDisplay
+ :keyword origin: The operation origin.
+ :paramtype origin: str
+ """
super(ResourceOperation, self).__init__(**kwargs)
self.name = name
self.display = display
@@ -773,14 +950,14 @@ def __init__(
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
+ :ivar provider: The resource provider name.
+ :vartype provider: str
+ :ivar resource: The resource name.
+ :vartype resource: str
+ :ivar operation: The operation.
+ :vartype operation: str
+ :ivar description: The description of the operation.
+ :vartype description: str
"""
_attribute_map = {
@@ -799,6 +976,16 @@ def __init__(
description: Optional[str] = None,
**kwargs
):
+ """
+ :keyword provider: The resource provider name.
+ :paramtype provider: str
+ :keyword resource: The resource name.
+ :paramtype resource: str
+ :keyword operation: The operation.
+ :paramtype operation: str
+ :keyword description: The description of the operation.
+ :paramtype description: str
+ """
super(ResourceOperationDisplay, self).__init__(**kwargs)
self.provider = provider
self.resource = resource
@@ -811,12 +998,12 @@ class ServiceAuthConfiguration(msrest.serialization.Model):
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
+ :ivar 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
+ :vartype primary_auth_key_hash: str
+ :ivar 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
+ :vartype secondary_auth_key_hash: str
"""
_validation = {
@@ -836,6 +1023,14 @@ def __init__(
secondary_auth_key_hash: str,
**kwargs
):
+ """
+ :keyword 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.
+ :paramtype primary_auth_key_hash: str
+ :keyword 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.
+ :paramtype secondary_auth_key_hash: str
+ """
super(ServiceAuthConfiguration, self).__init__(**kwargs)
self.primary_auth_key_hash = primary_auth_key_hash
self.secondary_auth_key_hash = secondary_auth_key_hash
@@ -846,11 +1041,11 @@ class ServicePrincipalProperties(msrest.serialization.Model):
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
+ :ivar client_id: Required. The service principal client ID.
+ :vartype client_id: str
+ :ivar 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
+ :vartype secret: str
"""
_validation = {
@@ -870,6 +1065,13 @@ def __init__(
secret: str,
**kwargs
):
+ """
+ :keyword client_id: Required. The service principal client ID.
+ :paramtype client_id: str
+ :keyword secret: Required. The service principal secret. This is not returned in response of
+ GET/PUT on the resource. To see this please call listKeys.
+ :paramtype secret: str
+ """
super(ServicePrincipalProperties, self).__init__(**kwargs)
self.client_id = client_id
self.secret = secret
@@ -878,16 +1080,16 @@ def __init__(
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:
+ :ivar 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
+ :vartype status: str or ~azure.mgmt.machinelearningcompute.models.Status
+ :ivar cert: The SSL cert data in PEM format.
+ :vartype cert: str
+ :ivar 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
+ :vartype key: str
+ :ivar cname: The CName of the certificate.
+ :vartype cname: str
"""
_attribute_map = {
@@ -906,6 +1108,18 @@ def __init__(
cname: Optional[str] = None,
**kwargs
):
+ """
+ :keyword status: SSL status. Allowed values are Enabled and Disabled. Possible values include:
+ "Enabled", "Disabled".
+ :paramtype status: str or ~azure.mgmt.machinelearningcompute.models.Status
+ :keyword cert: The SSL cert data in PEM format.
+ :paramtype cert: str
+ :keyword 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.
+ :paramtype key: str
+ :keyword cname: The CName of the certificate.
+ :paramtype cname: str
+ """
super(SslConfiguration, self).__init__(**kwargs)
self.status = status
self.cert = cert
@@ -942,6 +1156,8 @@ def __init__(
self,
**kwargs
):
+ """
+ """
super(StorageAccountCredentials, self).__init__(**kwargs)
self.resource_id = None
self.primary_key = None
@@ -951,9 +1167,9 @@ def __init__(
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
+ :ivar 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.
+ :vartype resource_id: str
"""
_attribute_map = {
@@ -966,6 +1182,11 @@ def __init__(
resource_id: Optional[str] = None,
**kwargs
):
+ """
+ :keyword 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.
+ :paramtype resource_id: str
+ """
super(StorageAccountProperties, self).__init__(**kwargs)
self.resource_id = resource_id
@@ -977,9 +1198,10 @@ class SystemService(msrest.serialization.Model):
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",
+ :ivar 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
+ :vartype 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.
@@ -1004,6 +1226,12 @@ def __init__(
system_service_type: Union[str, "SystemServiceType"],
**kwargs
):
+ """
+ :keyword system_service_type: Required. The system service type. Possible values include:
+ "None", "ScoringFrontEnd", "BatchFrontEnd".
+ :paramtype system_service_type: str or
+ ~azure.mgmt.machinelearningcompute.models.SystemServiceType
+ """
super(SystemService, self).__init__(**kwargs)
self.system_service_type = system_service_type
self.public_ip_address = None
@@ -1040,6 +1268,8 @@ def __init__(
self,
**kwargs
):
+ """
+ """
super(UpdateSystemServicesResponse, self).__init__(**kwargs)
self.update_status = None
self.update_started_on = None
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
index b6bbe129c8ce..06dbe6f36861 100644
--- 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
@@ -5,22 +5,49 @@
# 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 functools
+from typing import Any, Callable, Dict, Generic, Optional, TypeVar
import warnings
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pipeline import PipelineResponse
-from azure.core.pipeline.transport import HttpRequest, HttpResponse
+from azure.core.pipeline.transport import HttpResponse
+from azure.core.rest import HttpRequest
+from azure.core.tracing.decorator import distributed_trace
from azure.mgmt.core.exceptions import ARMErrorFormat
+from msrest import Serializer
from .. import models as _models
-
-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]]
+from .._vendor import _convert_request
+T = TypeVar('T')
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+
+_SERIALIZER = Serializer()
+_SERIALIZER.client_side_validation = False
+
+def build_list_available_operations_request(
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2017-08-01-preview"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/providers/Microsoft.MachineLearningCompute/operations')
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="GET",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
class MachineLearningComputeOperations(object):
"""MachineLearningComputeOperations operations.
@@ -44,11 +71,11 @@ def __init__(self, client, config, serializer, deserializer):
self._deserialize = deserializer
self._config = config
+ @distributed_trace
def list_available_operations(
self,
- **kwargs # type: Any
- ):
- # type: (...) -> "_models.AvailableOperations"
+ **kwargs: Any
+ ) -> "_models.AvailableOperations":
"""Gets all available operations.
:keyword callable cls: A custom type or function that will be passed the direct response
@@ -61,21 +88,14 @@ def list_available_operations(
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')
+
+ request = build_list_available_operations_request(
+ template_url=self.list_available_operations.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- # 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
@@ -89,4 +109,6 @@ def list_available_operations(
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
index 8851e706db7a..75d85fa2737e 100644
--- 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
@@ -5,25 +5,367 @@
# 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 functools
+from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union
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.pipeline.transport import HttpResponse
from azure.core.polling import LROPoller, NoPolling, PollingMethod
+from azure.core.rest import HttpRequest
+from azure.core.tracing.decorator import distributed_trace
from azure.mgmt.core.exceptions import ARMErrorFormat
from azure.mgmt.core.polling.arm_polling import ARMPolling
+from msrest import Serializer
from .. import models as _models
-
-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]]
+from .._vendor import _convert_request, _format_url_section
+T = TypeVar('T')
+JSONType = Any
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+
+_SERIALIZER = Serializer()
+_SERIALIZER.client_side_validation = False
+
+def build_create_or_update_request_initial(
+ subscription_id: str,
+ resource_group_name: str,
+ cluster_name: str,
+ *,
+ json: JSONType = None,
+ content: Any = None,
+ **kwargs: Any
+) -> HttpRequest:
+ content_type = kwargs.pop('content_type', None) # type: Optional[str]
+
+ api_version = "2017-08-01-preview"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ "clusterName": _SERIALIZER.url("cluster_name", cluster_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z][-\w\._\(\)]+[a-zA-Z0-9]$'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ if content_type is not None:
+ header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="PUT",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ json=json,
+ content=content,
+ **kwargs
+ )
+
+
+def build_get_request(
+ subscription_id: str,
+ resource_group_name: str,
+ cluster_name: str,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2017-08-01-preview"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ "clusterName": _SERIALIZER.url("cluster_name", cluster_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z][-\w\._\(\)]+[a-zA-Z0-9]$'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="GET",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
+
+
+def build_update_request(
+ subscription_id: str,
+ resource_group_name: str,
+ cluster_name: str,
+ *,
+ json: JSONType = None,
+ content: Any = None,
+ **kwargs: Any
+) -> HttpRequest:
+ content_type = kwargs.pop('content_type', None) # type: Optional[str]
+
+ api_version = "2017-08-01-preview"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ "clusterName": _SERIALIZER.url("cluster_name", cluster_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z][-\w\._\(\)]+[a-zA-Z0-9]$'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ if content_type is not None:
+ header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="PATCH",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ json=json,
+ content=content,
+ **kwargs
+ )
+
+
+def build_delete_request_initial(
+ subscription_id: str,
+ resource_group_name: str,
+ cluster_name: str,
+ *,
+ delete_all: Optional[bool] = None,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2017-08-01-preview"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ "clusterName": _SERIALIZER.url("cluster_name", cluster_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z][-\w\._\(\)]+[a-zA-Z0-9]$'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+ if delete_all is not None:
+ query_parameters['deleteAll'] = _SERIALIZER.query("delete_all", delete_all, 'bool')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="DELETE",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
+
+
+def build_list_keys_request(
+ subscription_id: str,
+ resource_group_name: str,
+ cluster_name: str,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2017-08-01-preview"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}/listKeys')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ "clusterName": _SERIALIZER.url("cluster_name", cluster_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z][-\w\._\(\)]+[a-zA-Z0-9]$'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="POST",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
+
+
+def build_check_system_services_updates_available_request(
+ subscription_id: str,
+ resource_group_name: str,
+ cluster_name: str,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2017-08-01-preview"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}/checkSystemServicesUpdatesAvailable')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ "clusterName": _SERIALIZER.url("cluster_name", cluster_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z][-\w\._\(\)]+[a-zA-Z0-9]$'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="POST",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
+
+
+def build_update_system_services_request_initial(
+ subscription_id: str,
+ resource_group_name: str,
+ cluster_name: str,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2017-08-01-preview"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}/updateSystemServices')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ "clusterName": _SERIALIZER.url("cluster_name", cluster_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z][-\w\._\(\)]+[a-zA-Z0-9]$'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="POST",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
+
+
+def build_list_by_resource_group_request(
+ subscription_id: str,
+ resource_group_name: str,
+ *,
+ skiptoken: Optional[str] = None,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2017-08-01-preview"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+ if skiptoken is not None:
+ query_parameters['$skiptoken'] = _SERIALIZER.query("skiptoken", skiptoken, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="GET",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
+
+
+def build_list_by_subscription_id_request(
+ subscription_id: str,
+ *,
+ skiptoken: Optional[str] = None,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2017-08-01-preview"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningCompute/operationalizationClusters')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+ if skiptoken is not None:
+ query_parameters['$skiptoken'] = _SERIALIZER.query("skiptoken", skiptoken, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="GET",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
class OperationalizationClustersOperations(object):
"""OperationalizationClustersOperations operations.
@@ -49,50 +391,38 @@ def __init__(self, client, config, serializer, deserializer):
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"
+ resource_group_name: str,
+ cluster_name: str,
+ parameters: "_models.OperationalizationCluster",
+ **kwargs: Any
+ ) -> "_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')
+ content_type = kwargs.pop('content_type', "application/json") # type: Optional[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')
+ _json = self._serialize.body(parameters, 'OperationalizationCluster')
+
+ request = build_create_or_update_request_initial(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ cluster_name=cluster_name,
+ content_type=content_type,
+ json=_json,
+ template_url=self._create_or_update_initial.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
if response.status_code == 200:
deserialized = self._deserialize('OperationalizationCluster', pipeline_response)
@@ -104,16 +434,18 @@ def _create_or_update_initial(
return cls(pipeline_response, deserialized, {})
return deserialized
+
_create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}'} # type: ignore
+
+ @distributed_trace
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"]
+ resource_group_name: str,
+ cluster_name: str,
+ parameters: "_models.OperationalizationCluster",
+ **kwargs: Any
+ ) -> LROPoller["_models.OperationalizationCluster"]:
"""Create or update an operationalization cluster.
:param resource_group_name: Name of the resource group in which the cluster is located.
@@ -124,15 +456,20 @@ def begin_create_or_update(
: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.
+ :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
+ operation to not poll, or pass in your own initialized polling object for a personal polling
+ strategy.
:paramtype polling: bool or ~azure.core.polling.PollingMethod
- :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
- :return: An instance of LROPoller that returns either OperationalizationCluster or the result of cls(response)
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.machinelearningcompute.models.OperationalizationCluster]
- :raises ~azure.core.exceptions.HttpResponseError:
+ :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]
+ content_type = kwargs.pop('content_type', "application/json") # type: Optional[str]
+ polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationalizationCluster"]
lro_delay = kwargs.pop(
'polling_interval',
@@ -144,27 +481,21 @@ def begin_create_or_update(
resource_group_name=resource_group_name,
cluster_name=cluster_name,
parameters=parameters,
+ content_type=content_type,
cls=lambda x,y,z: x,
**kwargs
)
-
kwargs.pop('error_map', None)
- kwargs.pop('content_type', None)
def get_long_running_output(pipeline_response):
+ response = pipeline_response.http_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)
+ if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
@@ -176,15 +507,16 @@ def get_long_running_output(pipeline_response):
)
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
+ @distributed_trace
def get(
self,
- resource_group_name, # type: str
- cluster_name, # type: str
- **kwargs # type: Any
- ):
- # type: (...) -> "_models.OperationalizationCluster"
+ resource_group_name: str,
+ cluster_name: str,
+ **kwargs: Any
+ ) -> "_models.OperationalizationCluster":
"""Gets the operationalization cluster resource view. Note that the credentials are not returned
by this call. Call ListKeys to get them.
@@ -202,33 +534,23 @@ def get(
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 = build_get_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ cluster_name=cluster_name,
+ template_url=self.get.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponseWrapper, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
deserialized = self._deserialize('OperationalizationCluster', pipeline_response)
@@ -237,16 +559,18 @@ def get(
return cls(pipeline_response, deserialized, {})
return deserialized
+
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}'} # type: ignore
+
+ @distributed_trace
def update(
self,
- resource_group_name, # type: str
- cluster_name, # type: str
- parameters, # type: "_models.OperationalizationClusterUpdateParameters"
- **kwargs # type: Any
- ):
- # type: (...) -> "_models.OperationalizationCluster"
+ resource_group_name: str,
+ cluster_name: str,
+ parameters: "_models.OperationalizationClusterUpdateParameters",
+ **kwargs: Any
+ ) -> "_models.OperationalizationCluster":
"""The PATCH operation can be used to update only the tags for a cluster. Use PUT operation to
update other properties.
@@ -255,7 +579,8 @@ def update(
: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
+ :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
@@ -266,38 +591,28 @@ def update(
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')
+ content_type = kwargs.pop('content_type', "application/json") # type: Optional[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')
+ _json = self._serialize.body(parameters, 'OperationalizationClusterUpdateParameters')
+
+ request = build_update_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ cluster_name=cluster_name,
+ content_type=content_type,
+ json=_json,
+ template_url=self.update.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponseWrapper, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
deserialized = self._deserialize('OperationalizationCluster', pipeline_response)
@@ -306,69 +621,60 @@ def update(
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
+ resource_group_name: str,
+ cluster_name: str,
+ delete_all: Optional[bool] = None,
+ **kwargs: Any
+ ) -> None:
cls = kwargs.pop('cls', None) # type: ClsType[None]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- 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 = build_delete_request_initial(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ cluster_name=cluster_name,
+ delete_all=delete_all,
+ template_url=self._delete_initial.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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)
+ raise HttpResponseError(response=response, 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
+
+ @distributed_trace
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]
+ resource_group_name: str,
+ cluster_name: str,
+ delete_all: Optional[bool] = None,
+ **kwargs: Any
+ ) -> LROPoller[None]:
"""Deletes the specified cluster.
:param resource_group_name: Name of the resource group in which the cluster is located.
@@ -379,15 +685,17 @@ def begin_delete(
: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.
+ :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
+ operation to not poll, or pass in your own initialized polling object for a personal polling
+ strategy.
:paramtype polling: bool or ~azure.core.polling.PollingMethod
- :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
+ :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:
+ :raises: ~azure.core.exceptions.HttpResponseError
"""
- polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod]
+ polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType[None]
lro_delay = kwargs.pop(
'polling_interval',
@@ -402,21 +710,14 @@ def begin_delete(
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)
+ if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
@@ -428,15 +729,16 @@ def get_long_running_output(pipeline_response):
)
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
+ @distributed_trace
def list_keys(
self,
- resource_group_name, # type: str
- cluster_name, # type: str
- **kwargs # type: Any
- ):
- # type: (...) -> "_models.OperationalizationClusterCredentials"
+ resource_group_name: str,
+ cluster_name: str,
+ **kwargs: Any
+ ) -> "_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.
@@ -454,27 +756,17 @@ def list_keys(
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 = build_list_keys_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ cluster_name=cluster_name,
+ template_url=self.list_keys.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- request = self._client.post(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -488,15 +780,17 @@ def list_keys(
return cls(pipeline_response, deserialized, {})
return deserialized
+
list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}/listKeys'} # type: ignore
+
+ @distributed_trace
def check_system_services_updates_available(
self,
- resource_group_name, # type: str
- cluster_name, # type: str
- **kwargs # type: Any
- ):
- # type: (...) -> "_models.CheckSystemServicesUpdatesAvailableResponse"
+ resource_group_name: str,
+ cluster_name: str,
+ **kwargs: Any
+ ) -> "_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.
@@ -513,27 +807,17 @@ def check_system_services_updates_available(
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 = build_check_system_services_updates_available_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ cluster_name=cluster_name,
+ template_url=self.check_system_services_updates_available.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- request = self._client.post(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -547,41 +831,32 @@ def check_system_services_updates_available(
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"]
+ resource_group_name: str,
+ cluster_name: str,
+ **kwargs: Any
+ ) -> 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 = build_update_system_services_request_initial(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ cluster_name=cluster_name,
+ template_url=self._update_system_services_initial.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- request = self._client.post(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
@@ -589,27 +864,30 @@ def _update_system_services_initial(
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
- response_headers = {}
deserialized = None
+ response_headers = {}
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
+
+ @distributed_trace
def begin_update_system_services(
self,
- resource_group_name, # type: str
- cluster_name, # type: str
- **kwargs # type: Any
- ):
- # type: (...) -> LROPoller["_models.UpdateSystemServicesResponse"]
+ resource_group_name: str,
+ cluster_name: str,
+ **kwargs: Any
+ ) -> LROPoller["_models.UpdateSystemServicesResponse"]:
"""Updates system services in a cluster.
:param resource_group_name: Name of the resource group in which the cluster is located.
@@ -618,15 +896,19 @@ def begin_update_system_services(
: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.
+ :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
+ operation to not poll, or pass in your own initialized polling object for a personal polling
+ strategy.
:paramtype polling: bool or ~azure.core.polling.PollingMethod
- :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
- :return: An instance of LROPoller that returns either UpdateSystemServicesResponse or the result of cls(response)
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.machinelearningcompute.models.UpdateSystemServicesResponse]
- :raises ~azure.core.exceptions.HttpResponseError:
+ :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]
+ polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType["_models.UpdateSystemServicesResponse"]
lro_delay = kwargs.pop(
'polling_interval',
@@ -640,24 +922,17 @@ def begin_update_system_services(
cls=lambda x,y,z: x,
**kwargs
)
-
kwargs.pop('error_map', None)
- kwargs.pop('content_type', None)
def get_long_running_output(pipeline_response):
+ response = pipeline_response.http_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)
+ if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
@@ -669,15 +944,16 @@ def get_long_running_output(pipeline_response):
)
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
+ @distributed_trace
def list_by_resource_group(
self,
- resource_group_name, # type: str
- skiptoken=None, # type: Optional[str]
- **kwargs # type: Any
- ):
- # type: (...) -> Iterable["_models.PaginatedOperationalizationClustersList"]
+ resource_group_name: str,
+ skiptoken: Optional[str] = None,
+ **kwargs: Any
+ ) -> 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.
@@ -685,8 +961,10 @@ def list_by_resource_group(
: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]
+ :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"]
@@ -694,37 +972,33 @@ def list_by_resource_group(
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)
+
+ request = build_list_by_resource_group_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ skiptoken=skiptoken,
+ template_url=self.list_by_resource_group.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
else:
- url = next_link
- query_parameters = {} # type: Dict[str, Any]
- request = self._client.get(url, query_parameters, header_parameters)
+
+ request = build_list_by_resource_group_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ skiptoken=skiptoken,
+ template_url=next_link,
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
return request
def extract_data(pipeline_response):
- deserialized = self._deserialize('PaginatedOperationalizationClustersList', pipeline_response)
+ deserialized = self._deserialize("PaginatedOperationalizationClustersList", pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
@@ -742,24 +1016,27 @@ def get_next(next_link=None):
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
+ @distributed_trace
def list_by_subscription_id(
self,
- skiptoken=None, # type: Optional[str]
- **kwargs # type: Any
- ):
- # type: (...) -> Iterable["_models.PaginatedOperationalizationClustersList"]
+ skiptoken: Optional[str] = None,
+ **kwargs: Any
+ ) -> 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]
+ :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"]
@@ -767,36 +1044,31 @@ def list_by_subscription_id(
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)
+
+ request = build_list_by_subscription_id_request(
+ subscription_id=self._config.subscription_id,
+ skiptoken=skiptoken,
+ template_url=self.list_by_subscription_id.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
else:
- url = next_link
- query_parameters = {} # type: Dict[str, Any]
- request = self._client.get(url, query_parameters, header_parameters)
+
+ request = build_list_by_subscription_id_request(
+ subscription_id=self._config.subscription_id,
+ skiptoken=skiptoken,
+ template_url=next_link,
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
return request
def extract_data(pipeline_response):
- deserialized = self._deserialize('PaginatedOperationalizationClustersList', pipeline_response)
+ deserialized = self._deserialize("PaginatedOperationalizationClustersList", pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
@@ -814,6 +1086,7 @@ def get_next(next_link=None):
return pipeline_response
+
return ItemPaged(
get_next, extract_data
)
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/_meta.json b/sdk/machinelearning/azure-mgmt-machinelearningservices/_meta.json
new file mode 100644
index 000000000000..dd575db928f8
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/_meta.json
@@ -0,0 +1,11 @@
+{
+ "autorest": "3.7.2",
+ "use": [
+ "@autorest/python@5.12.0",
+ "@autorest/modelerfour@4.19.3"
+ ],
+ "commit": "3080959fbda0b602e0af875d4b90a094c0f6016e",
+ "repository_url": "https://github.com/Azure/azure-rest-api-specs",
+ "autorest_command": "autorest specification/machinelearningservices/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --python3-only --track2 --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
+ "readme": "specification/machinelearningservices/resource-manager/readme.md"
+}
\ No newline at end of file
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/__init__.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/__init__.py
index 67feb9a70351..da46614477a9 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/__init__.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/__init__.py
@@ -12,8 +12,7 @@
__version__ = VERSION
__all__ = ['AzureMachineLearningWorkspaces']
-try:
- from ._patch import patch_sdk # type: ignore
- patch_sdk()
-except ImportError:
- pass
+# `._patch.py` is used for handwritten extensions to the generated code
+# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
+from ._patch import patch_sdk
+patch_sdk()
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_azure_machine_learning_workspaces.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_azure_machine_learning_workspaces.py
index 527b9e2bb787..39e327498ff8 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_azure_machine_learning_workspaces.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_azure_machine_learning_workspaces.py
@@ -6,106 +6,113 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-from typing import TYPE_CHECKING
+from copy import deepcopy
+from typing import Any, Optional, TYPE_CHECKING
+from azure.core.rest import HttpRequest, HttpResponse
from azure.mgmt.core import ARMPipelineClient
from msrest import Deserializer, Serializer
+from . import models
+from ._configuration import AzureMachineLearningWorkspacesConfiguration
+from .operations import ComputeOperations, Operations, PrivateEndpointConnectionsOperations, PrivateLinkResourcesOperations, QuotasOperations, UsagesOperations, VirtualMachineSizesOperations, WorkspaceConnectionsOperations, WorkspaceFeaturesOperations, WorkspaceSkusOperations, WorkspacesOperations
+
if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
- from typing import Any, Optional
-
from azure.core.credentials import TokenCredential
-from ._configuration import AzureMachineLearningWorkspacesConfiguration
-from .operations import Operations
-from .operations import WorkspacesOperations
-from .operations import WorkspaceFeaturesOperations
-from .operations import NotebooksOperations
-from .operations import UsagesOperations
-from .operations import VirtualMachineSizesOperations
-from .operations import QuotasOperations
-from .operations import WorkspaceConnectionsOperations
-from .operations import MachineLearningComputeOperations
-from .operations import AzureMachineLearningWorkspacesOperationsMixin
-from .operations import PrivateEndpointConnectionsOperations
-from .operations import PrivateLinkResourcesOperations
-from . import models
-
-
-class AzureMachineLearningWorkspaces(AzureMachineLearningWorkspacesOperationsMixin):
+class AzureMachineLearningWorkspaces:
"""These APIs allow end users to operate on Azure Machine Learning Workspace resources.
:ivar operations: Operations operations
- :vartype operations: azure.mgmt.machinelearningservices.operations.Operations
+ :vartype operations: azure_machine_learning_workspaces.operations.Operations
:ivar workspaces: WorkspacesOperations operations
- :vartype workspaces: azure.mgmt.machinelearningservices.operations.WorkspacesOperations
- :ivar workspace_features: WorkspaceFeaturesOperations operations
- :vartype workspace_features: azure.mgmt.machinelearningservices.operations.WorkspaceFeaturesOperations
- :ivar notebooks: NotebooksOperations operations
- :vartype notebooks: azure.mgmt.machinelearningservices.operations.NotebooksOperations
+ :vartype workspaces: azure_machine_learning_workspaces.operations.WorkspacesOperations
:ivar usages: UsagesOperations operations
- :vartype usages: azure.mgmt.machinelearningservices.operations.UsagesOperations
+ :vartype usages: azure_machine_learning_workspaces.operations.UsagesOperations
:ivar virtual_machine_sizes: VirtualMachineSizesOperations operations
- :vartype virtual_machine_sizes: azure.mgmt.machinelearningservices.operations.VirtualMachineSizesOperations
+ :vartype virtual_machine_sizes:
+ azure_machine_learning_workspaces.operations.VirtualMachineSizesOperations
:ivar quotas: QuotasOperations operations
- :vartype quotas: azure.mgmt.machinelearningservices.operations.QuotasOperations
- :ivar workspace_connections: WorkspaceConnectionsOperations operations
- :vartype workspace_connections: azure.mgmt.machinelearningservices.operations.WorkspaceConnectionsOperations
- :ivar machine_learning_compute: MachineLearningComputeOperations operations
- :vartype machine_learning_compute: azure.mgmt.machinelearningservices.operations.MachineLearningComputeOperations
+ :vartype quotas: azure_machine_learning_workspaces.operations.QuotasOperations
+ :ivar compute: ComputeOperations operations
+ :vartype compute: azure_machine_learning_workspaces.operations.ComputeOperations
:ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
- :vartype private_endpoint_connections: azure.mgmt.machinelearningservices.operations.PrivateEndpointConnectionsOperations
+ :vartype private_endpoint_connections:
+ azure_machine_learning_workspaces.operations.PrivateEndpointConnectionsOperations
:ivar private_link_resources: PrivateLinkResourcesOperations operations
- :vartype private_link_resources: azure.mgmt.machinelearningservices.operations.PrivateLinkResourcesOperations
+ :vartype private_link_resources:
+ azure_machine_learning_workspaces.operations.PrivateLinkResourcesOperations
+ :ivar workspace_connections: WorkspaceConnectionsOperations operations
+ :vartype workspace_connections:
+ azure_machine_learning_workspaces.operations.WorkspaceConnectionsOperations
+ :ivar workspace_features: WorkspaceFeaturesOperations operations
+ :vartype workspace_features:
+ azure_machine_learning_workspaces.operations.WorkspaceFeaturesOperations
+ :ivar workspace_skus: WorkspaceSkusOperations operations
+ :vartype workspace_skus: azure_machine_learning_workspaces.operations.WorkspaceSkusOperations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
- :param subscription_id: Azure subscription identifier.
+ :param subscription_id: The ID of the target subscription.
: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.
+ :param base_url: Service URL. Default value is 'https://management.azure.com'.
+ :type base_url: str
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
"""
def __init__(
self,
- credential, # type: "TokenCredential"
- subscription_id, # type: str
- base_url=None, # type: Optional[str]
- **kwargs # type: Any
- ):
- # type: (...) -> None
- if not base_url:
- base_url = 'https://management.azure.com'
- self._config = AzureMachineLearningWorkspacesConfiguration(credential, subscription_id, **kwargs)
+ credential: "TokenCredential",
+ subscription_id: str,
+ base_url: str = "https://management.azure.com",
+ **kwargs: Any
+ ) -> None:
+ self._config = AzureMachineLearningWorkspacesConfiguration(credential=credential, subscription_id=subscription_id, **kwargs)
self._client = 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._serialize.client_side_validation = False
+ self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
+ self.workspaces = WorkspacesOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.usages = UsagesOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.virtual_machine_sizes = VirtualMachineSizesOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.quotas = QuotasOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.compute = ComputeOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.private_endpoint_connections = PrivateEndpointConnectionsOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.private_link_resources = PrivateLinkResourcesOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.workspace_connections = WorkspaceConnectionsOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.workspace_features = WorkspaceFeaturesOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.workspace_skus = WorkspaceSkusOperations(self._client, self._config, self._serialize, self._deserialize)
+
+
+ def _send_request(
+ self,
+ request, # type: HttpRequest
+ **kwargs: Any
+ ) -> HttpResponse:
+ """Runs the network request through the client's chained policies.
+
+ >>> from azure.core.rest import HttpRequest
+ >>> request = HttpRequest("GET", "https://www.example.org/")
+
+ >>> response = client._send_request(request)
+
+
+ For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart
+
+ :param request: The network request you want to make. Required.
+ :type request: ~azure.core.rest.HttpRequest
+ :keyword bool stream: Whether the response payload will be streamed. Defaults to False.
+ :return: The response of your network call. Does not do error handling on your response.
+ :rtype: ~azure.core.rest.HttpResponse
+ """
- self.operations = Operations(
- self._client, self._config, self._serialize, self._deserialize)
- self.workspaces = WorkspacesOperations(
- self._client, self._config, self._serialize, self._deserialize)
- self.workspace_features = WorkspaceFeaturesOperations(
- self._client, self._config, self._serialize, self._deserialize)
- self.notebooks = NotebooksOperations(
- self._client, self._config, self._serialize, self._deserialize)
- self.usages = UsagesOperations(
- self._client, self._config, self._serialize, self._deserialize)
- self.virtual_machine_sizes = VirtualMachineSizesOperations(
- self._client, self._config, self._serialize, self._deserialize)
- self.quotas = QuotasOperations(
- self._client, self._config, self._serialize, self._deserialize)
- self.workspace_connections = WorkspaceConnectionsOperations(
- self._client, self._config, self._serialize, self._deserialize)
- self.machine_learning_compute = MachineLearningComputeOperations(
- self._client, self._config, self._serialize, self._deserialize)
- self.private_endpoint_connections = PrivateEndpointConnectionsOperations(
- self._client, self._config, self._serialize, self._deserialize)
- self.private_link_resources = PrivateLinkResourcesOperations(
- self._client, self._config, self._serialize, self._deserialize)
+ request_copy = deepcopy(request)
+ request_copy.url = self._client.format_url(request_copy.url)
+ return self._client.send_request(request_copy, **kwargs)
def close(self):
# type: () -> None
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_configuration.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_configuration.py
index 79ded5841781..969f699e1188 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_configuration.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_configuration.py
@@ -6,18 +6,16 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-from typing import TYPE_CHECKING
+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 azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
from ._version import VERSION
if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
- from typing import Any
-
from azure.core.credentials import TokenCredential
@@ -29,26 +27,25 @@ class AzureMachineLearningWorkspacesConfiguration(Configuration):
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
- :param subscription_id: Azure subscription identifier.
+ :param subscription_id: The ID of the target subscription.
:type subscription_id: str
"""
def __init__(
self,
- credential, # type: "TokenCredential"
- subscription_id, # type: str
- **kwargs # type: Any
- ):
- # type: (...) -> None
+ credential: "TokenCredential",
+ subscription_id: str,
+ **kwargs: Any
+ ) -> None:
+ super(AzureMachineLearningWorkspacesConfiguration, self).__init__(**kwargs)
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
- super(AzureMachineLearningWorkspacesConfiguration, self).__init__(**kwargs)
self.credential = credential
self.subscription_id = subscription_id
- self.api_version = "2020-08-01"
+ self.api_version = "2021-07-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-machinelearningservices/{}'.format(VERSION))
self._configure(**kwargs)
@@ -68,4 +65,4 @@ def _configure(
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)
+ self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_metadata.json b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_metadata.json
new file mode 100644
index 000000000000..311b03dc5e41
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_metadata.json
@@ -0,0 +1,112 @@
+{
+ "chosen_version": "2021-07-01",
+ "total_api_version_list": ["2021-07-01"],
+ "client": {
+ "name": "AzureMachineLearningWorkspaces",
+ "filename": "_azure_machine_learning_workspaces",
+ "description": "These APIs allow end users to operate on Azure Machine Learning Workspace resources.",
+ "host_value": "\"https://management.azure.com\"",
+ "parameterized_host_template": 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\": [\"AzureMachineLearningWorkspacesConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}",
+ "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"AzureMachineLearningWorkspacesConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}"
+ },
+ "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 ID of the target subscription.",
+ "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 ID of the target subscription.",
+ "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=\"https://management.azure.com\", # type: 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: str = \"https://management.azure.com\",",
+ "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_call_sync": "ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)",
+ "credential_call_async": "AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)",
+ "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMChallengeAuthenticationPolicy\", \"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\", \"AsyncARMChallengeAuthenticationPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
+ },
+ "operation_groups": {
+ "operations": "Operations",
+ "workspaces": "WorkspacesOperations",
+ "usages": "UsagesOperations",
+ "virtual_machine_sizes": "VirtualMachineSizesOperations",
+ "quotas": "QuotasOperations",
+ "compute": "ComputeOperations",
+ "private_endpoint_connections": "PrivateEndpointConnectionsOperations",
+ "private_link_resources": "PrivateLinkResourcesOperations",
+ "workspace_connections": "WorkspaceConnectionsOperations",
+ "workspace_features": "WorkspaceFeaturesOperations",
+ "workspace_skus": "WorkspaceSkusOperations"
+ }
+}
\ No newline at end of file
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_patch.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_patch.py
new file mode 100644
index 000000000000..74e48ecd07cf
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_patch.py
@@ -0,0 +1,31 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+#
+# Copyright (c) Microsoft Corporation. All rights reserved.
+#
+# The MIT License (MIT)
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the ""Software""), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+# IN THE SOFTWARE.
+#
+# --------------------------------------------------------------------------
+
+# This file is used for handwritten extensions to the generated code. Example:
+# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
+def patch_sdk():
+ pass
\ No newline at end of file
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_vendor.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_vendor.py
new file mode 100644
index 000000000000..138f663c53a4
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_vendor.py
@@ -0,0 +1,27 @@
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+
+from azure.core.pipeline.transport import HttpRequest
+
+def _convert_request(request, files=None):
+ data = request.content if not files else None
+ request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data)
+ if files:
+ request.set_formdata_body(files)
+ return request
+
+def _format_url_section(template, **kwargs):
+ components = template.split("/")
+ while components:
+ try:
+ return template.format(**kwargs)
+ except KeyError as key:
+ formatted_components = template.split("/")
+ components = [
+ c for c in formatted_components if "{}".format(key.args[0]) not in c
+ ]
+ template = "/".join(components)
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_version.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_version.py
index c47f66669f1b..e5754a47ce68 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_version.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_version.py
@@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-VERSION = "1.0.0"
+VERSION = "1.0.0b1"
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/__init__.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/__init__.py
index 872474577c4f..f67ccda966f1 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/__init__.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/__init__.py
@@ -8,3 +8,8 @@
from ._azure_machine_learning_workspaces import AzureMachineLearningWorkspaces
__all__ = ['AzureMachineLearningWorkspaces']
+
+# `._patch.py` is used for handwritten extensions to the generated code
+# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
+from ._patch import patch_sdk
+patch_sdk()
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/_azure_machine_learning_workspaces.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/_azure_machine_learning_workspaces.py
index 77636808b2d6..1feecdc136df 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/_azure_machine_learning_workspaces.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/_azure_machine_learning_workspaces.py
@@ -6,103 +6,114 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-from typing import Any, Optional, TYPE_CHECKING
+from copy import deepcopy
+from typing import Any, Awaitable, Optional, TYPE_CHECKING
+from azure.core.rest import AsyncHttpResponse, HttpRequest
from azure.mgmt.core import AsyncARMPipelineClient
from msrest import Deserializer, Serializer
+from .. import models
+from ._configuration import AzureMachineLearningWorkspacesConfiguration
+from .operations import ComputeOperations, Operations, PrivateEndpointConnectionsOperations, PrivateLinkResourcesOperations, QuotasOperations, UsagesOperations, VirtualMachineSizesOperations, WorkspaceConnectionsOperations, WorkspaceFeaturesOperations, WorkspaceSkusOperations, WorkspacesOperations
+
if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials_async import AsyncTokenCredential
-from ._configuration import AzureMachineLearningWorkspacesConfiguration
-from .operations import Operations
-from .operations import WorkspacesOperations
-from .operations import WorkspaceFeaturesOperations
-from .operations import NotebooksOperations
-from .operations import UsagesOperations
-from .operations import VirtualMachineSizesOperations
-from .operations import QuotasOperations
-from .operations import WorkspaceConnectionsOperations
-from .operations import MachineLearningComputeOperations
-from .operations import AzureMachineLearningWorkspacesOperationsMixin
-from .operations import PrivateEndpointConnectionsOperations
-from .operations import PrivateLinkResourcesOperations
-from .. import models
-
-
-class AzureMachineLearningWorkspaces(AzureMachineLearningWorkspacesOperationsMixin):
+class AzureMachineLearningWorkspaces:
"""These APIs allow end users to operate on Azure Machine Learning Workspace resources.
:ivar operations: Operations operations
- :vartype operations: azure.mgmt.machinelearningservices.aio.operations.Operations
+ :vartype operations: azure_machine_learning_workspaces.aio.operations.Operations
:ivar workspaces: WorkspacesOperations operations
- :vartype workspaces: azure.mgmt.machinelearningservices.aio.operations.WorkspacesOperations
- :ivar workspace_features: WorkspaceFeaturesOperations operations
- :vartype workspace_features: azure.mgmt.machinelearningservices.aio.operations.WorkspaceFeaturesOperations
- :ivar notebooks: NotebooksOperations operations
- :vartype notebooks: azure.mgmt.machinelearningservices.aio.operations.NotebooksOperations
+ :vartype workspaces: azure_machine_learning_workspaces.aio.operations.WorkspacesOperations
:ivar usages: UsagesOperations operations
- :vartype usages: azure.mgmt.machinelearningservices.aio.operations.UsagesOperations
+ :vartype usages: azure_machine_learning_workspaces.aio.operations.UsagesOperations
:ivar virtual_machine_sizes: VirtualMachineSizesOperations operations
- :vartype virtual_machine_sizes: azure.mgmt.machinelearningservices.aio.operations.VirtualMachineSizesOperations
+ :vartype virtual_machine_sizes:
+ azure_machine_learning_workspaces.aio.operations.VirtualMachineSizesOperations
:ivar quotas: QuotasOperations operations
- :vartype quotas: azure.mgmt.machinelearningservices.aio.operations.QuotasOperations
- :ivar workspace_connections: WorkspaceConnectionsOperations operations
- :vartype workspace_connections: azure.mgmt.machinelearningservices.aio.operations.WorkspaceConnectionsOperations
- :ivar machine_learning_compute: MachineLearningComputeOperations operations
- :vartype machine_learning_compute: azure.mgmt.machinelearningservices.aio.operations.MachineLearningComputeOperations
+ :vartype quotas: azure_machine_learning_workspaces.aio.operations.QuotasOperations
+ :ivar compute: ComputeOperations operations
+ :vartype compute: azure_machine_learning_workspaces.aio.operations.ComputeOperations
:ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
- :vartype private_endpoint_connections: azure.mgmt.machinelearningservices.aio.operations.PrivateEndpointConnectionsOperations
+ :vartype private_endpoint_connections:
+ azure_machine_learning_workspaces.aio.operations.PrivateEndpointConnectionsOperations
:ivar private_link_resources: PrivateLinkResourcesOperations operations
- :vartype private_link_resources: azure.mgmt.machinelearningservices.aio.operations.PrivateLinkResourcesOperations
+ :vartype private_link_resources:
+ azure_machine_learning_workspaces.aio.operations.PrivateLinkResourcesOperations
+ :ivar workspace_connections: WorkspaceConnectionsOperations operations
+ :vartype workspace_connections:
+ azure_machine_learning_workspaces.aio.operations.WorkspaceConnectionsOperations
+ :ivar workspace_features: WorkspaceFeaturesOperations operations
+ :vartype workspace_features:
+ azure_machine_learning_workspaces.aio.operations.WorkspaceFeaturesOperations
+ :ivar workspace_skus: WorkspaceSkusOperations operations
+ :vartype workspace_skus:
+ azure_machine_learning_workspaces.aio.operations.WorkspaceSkusOperations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
- :param subscription_id: Azure subscription identifier.
+ :param subscription_id: The ID of the target subscription.
: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.
+ :param base_url: Service URL. Default value is 'https://management.azure.com'.
+ :type base_url: str
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
"""
def __init__(
self,
credential: "AsyncTokenCredential",
subscription_id: str,
- base_url: Optional[str] = None,
+ base_url: str = "https://management.azure.com",
**kwargs: Any
) -> None:
- if not base_url:
- base_url = 'https://management.azure.com'
- self._config = AzureMachineLearningWorkspacesConfiguration(credential, subscription_id, **kwargs)
+ self._config = AzureMachineLearningWorkspacesConfiguration(credential=credential, subscription_id=subscription_id, **kwargs)
self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
- self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)
+ self._serialize.client_side_validation = False
+ self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
+ self.workspaces = WorkspacesOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.usages = UsagesOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.virtual_machine_sizes = VirtualMachineSizesOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.quotas = QuotasOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.compute = ComputeOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.private_endpoint_connections = PrivateEndpointConnectionsOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.private_link_resources = PrivateLinkResourcesOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.workspace_connections = WorkspaceConnectionsOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.workspace_features = WorkspaceFeaturesOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.workspace_skus = WorkspaceSkusOperations(self._client, self._config, self._serialize, self._deserialize)
+
+
+ def _send_request(
+ self,
+ request: HttpRequest,
+ **kwargs: Any
+ ) -> Awaitable[AsyncHttpResponse]:
+ """Runs the network request through the client's chained policies.
+
+ >>> from azure.core.rest import HttpRequest
+ >>> request = HttpRequest("GET", "https://www.example.org/")
+
+ >>> response = await client._send_request(request)
+
+
+ For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart
+
+ :param request: The network request you want to make. Required.
+ :type request: ~azure.core.rest.HttpRequest
+ :keyword bool stream: Whether the response payload will be streamed. Defaults to False.
+ :return: The response of your network call. Does not do error handling on your response.
+ :rtype: ~azure.core.rest.AsyncHttpResponse
+ """
- self.operations = Operations(
- self._client, self._config, self._serialize, self._deserialize)
- self.workspaces = WorkspacesOperations(
- self._client, self._config, self._serialize, self._deserialize)
- self.workspace_features = WorkspaceFeaturesOperations(
- self._client, self._config, self._serialize, self._deserialize)
- self.notebooks = NotebooksOperations(
- self._client, self._config, self._serialize, self._deserialize)
- self.usages = UsagesOperations(
- self._client, self._config, self._serialize, self._deserialize)
- self.virtual_machine_sizes = VirtualMachineSizesOperations(
- self._client, self._config, self._serialize, self._deserialize)
- self.quotas = QuotasOperations(
- self._client, self._config, self._serialize, self._deserialize)
- self.workspace_connections = WorkspaceConnectionsOperations(
- self._client, self._config, self._serialize, self._deserialize)
- self.machine_learning_compute = MachineLearningComputeOperations(
- self._client, self._config, self._serialize, self._deserialize)
- self.private_endpoint_connections = PrivateEndpointConnectionsOperations(
- self._client, self._config, self._serialize, self._deserialize)
- self.private_link_resources = PrivateLinkResourcesOperations(
- self._client, self._config, self._serialize, self._deserialize)
+ request_copy = deepcopy(request)
+ request_copy.url = self._client.format_url(request_copy.url)
+ return self._client.send_request(request_copy, **kwargs)
async def close(self) -> None:
await self._client.close()
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/_configuration.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/_configuration.py
index a11cb071c326..cc038776ed83 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/_configuration.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/_configuration.py
@@ -10,7 +10,7 @@
from azure.core.configuration import Configuration
from azure.core.pipeline import policies
-from azure.mgmt.core.policies import ARMHttpLoggingPolicy
+from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy
from .._version import VERSION
@@ -27,7 +27,7 @@ class AzureMachineLearningWorkspacesConfiguration(Configuration):
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
- :param subscription_id: Azure subscription identifier.
+ :param subscription_id: The ID of the target subscription.
:type subscription_id: str
"""
@@ -37,15 +37,15 @@ def __init__(
subscription_id: str,
**kwargs: Any
) -> None:
+ super(AzureMachineLearningWorkspacesConfiguration, self).__init__(**kwargs)
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
- super(AzureMachineLearningWorkspacesConfiguration, self).__init__(**kwargs)
self.credential = credential
self.subscription_id = subscription_id
- self.api_version = "2020-08-01"
+ self.api_version = "2021-07-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-machinelearningservices/{}'.format(VERSION))
self._configure(**kwargs)
@@ -64,4 +64,4 @@ def _configure(
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)
+ self.authentication_policy = AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/_patch.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/_patch.py
new file mode 100644
index 000000000000..74e48ecd07cf
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/_patch.py
@@ -0,0 +1,31 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+#
+# Copyright (c) Microsoft Corporation. All rights reserved.
+#
+# The MIT License (MIT)
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the ""Software""), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+# IN THE SOFTWARE.
+#
+# --------------------------------------------------------------------------
+
+# This file is used for handwritten extensions to the generated code. Example:
+# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
+def patch_sdk():
+ pass
\ No newline at end of file
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/__init__.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/__init__.py
index 516999b100d8..44c7bf6aeeb9 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/__init__.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/__init__.py
@@ -8,28 +8,26 @@
from ._operations import Operations
from ._workspaces_operations import WorkspacesOperations
-from ._workspace_features_operations import WorkspaceFeaturesOperations
-from ._notebooks_operations import NotebooksOperations
from ._usages_operations import UsagesOperations
from ._virtual_machine_sizes_operations import VirtualMachineSizesOperations
from ._quotas_operations import QuotasOperations
-from ._workspace_connections_operations import WorkspaceConnectionsOperations
-from ._machine_learning_compute_operations import MachineLearningComputeOperations
-from ._azure_machine_learning_workspaces_operations import AzureMachineLearningWorkspacesOperationsMixin
+from ._compute_operations import ComputeOperations
from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations
from ._private_link_resources_operations import PrivateLinkResourcesOperations
+from ._workspace_connections_operations import WorkspaceConnectionsOperations
+from ._workspace_features_operations import WorkspaceFeaturesOperations
+from ._workspace_skus_operations import WorkspaceSkusOperations
__all__ = [
'Operations',
'WorkspacesOperations',
- 'WorkspaceFeaturesOperations',
- 'NotebooksOperations',
'UsagesOperations',
'VirtualMachineSizesOperations',
'QuotasOperations',
- 'WorkspaceConnectionsOperations',
- 'MachineLearningComputeOperations',
- 'AzureMachineLearningWorkspacesOperationsMixin',
+ 'ComputeOperations',
'PrivateEndpointConnectionsOperations',
'PrivateLinkResourcesOperations',
+ 'WorkspaceConnectionsOperations',
+ 'WorkspaceFeaturesOperations',
+ 'WorkspaceSkusOperations',
]
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_machine_learning_compute_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_compute_operations.py
similarity index 53%
rename from sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_machine_learning_compute_operations.py
rename to sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_compute_operations.py
index 3efc5f75d467..2baba63853cf 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_machine_learning_compute_operations.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_compute_operations.py
@@ -5,30 +5,35 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
+import functools
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union
import warnings
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pipeline import PipelineResponse
-from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
+from azure.core.pipeline.transport import AsyncHttpResponse
from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod
+from azure.core.rest import HttpRequest
+from azure.core.tracing.decorator import distributed_trace
+from azure.core.tracing.decorator_async import distributed_trace_async
from azure.mgmt.core.exceptions import ARMErrorFormat
from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling
from ... import models as _models
-
+from ..._vendor import _convert_request
+from ...operations._compute_operations import build_create_or_update_request_initial, build_delete_request_initial, build_get_request, build_list_keys_request, build_list_nodes_request, build_list_request, build_restart_request_initial, build_start_request_initial, build_stop_request_initial, build_update_request_initial
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
-class MachineLearningComputeOperations:
- """MachineLearningComputeOperations async operations.
+class ComputeOperations:
+ """ComputeOperations async operations.
You should not instantiate this class directly. Instead, you should create a Client instance that
instantiates it for you and attaches it as an attribute.
:ivar models: Alias to model classes used in this operation group.
- :type models: ~azure.mgmt.machinelearningservices.models
+ :type models: ~azure_machine_learning_workspaces.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
@@ -43,24 +48,27 @@ def __init__(self, client, config, serializer, deserializer) -> None:
self._deserialize = deserializer
self._config = config
- def list_by_workspace(
+ @distributed_trace
+ def list(
self,
resource_group_name: str,
workspace_name: str,
- skiptoken: Optional[str] = None,
- **kwargs
+ skip: Optional[str] = None,
+ **kwargs: Any
) -> AsyncIterable["_models.PaginatedComputeResourcesList"]:
"""Gets computes in specified workspace.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
- :param skiptoken: Continuation token for pagination.
- :type skiptoken: str
+ :param skip: Continuation token for pagination.
+ :type skip: str
:keyword callable cls: A custom type or function that will be passed the direct response
- :return: An iterator like instance of either PaginatedComputeResourcesList or the result of cls(response)
- :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.PaginatedComputeResourcesList]
+ :return: An iterator like instance of either PaginatedComputeResourcesList or the result of
+ cls(response)
+ :rtype:
+ ~azure.core.async_paging.AsyncItemPaged[~azure_machine_learning_workspaces.models.PaginatedComputeResourcesList]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.PaginatedComputeResourcesList"]
@@ -68,38 +76,35 @@ def list_by_workspace(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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_workspace.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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, '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)
+
+ request = build_list_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ skip=skip,
+ template_url=self.list.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
else:
- url = next_link
- query_parameters = {} # type: Dict[str, Any]
- request = self._client.get(url, query_parameters, header_parameters)
+
+ request = build_list_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ skip=skip,
+ template_url=next_link,
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
return request
async def extract_data(pipeline_response):
- deserialized = self._deserialize('PaginatedComputeResourcesList', pipeline_response)
+ deserialized = self._deserialize("PaginatedComputeResourcesList", pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
@@ -112,28 +117,30 @@ async def get_next(next_link=None):
response = pipeline_response.http_response
if response.status_code not in [200]:
- error = self._deserialize(_models.MachineLearningServiceError, response)
map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
return pipeline_response
+
return AsyncItemPaged(
get_next, extract_data
)
- list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes'} # type: ignore
+ list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes'} # type: ignore
+ @distributed_trace_async
async def get(
self,
resource_group_name: str,
workspace_name: str,
compute_name: str,
- **kwargs
+ **kwargs: Any
) -> "_models.ComputeResource":
"""Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are
not returned - use 'keys' nested resource to get them.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
@@ -141,7 +148,7 @@ async def get(
:type compute_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: ComputeResource, or the result of cls(response)
- :rtype: ~azure.mgmt.machinelearningservices.models.ComputeResource
+ :rtype: ~azure_machine_learning_workspaces.models.ComputeResource
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.ComputeResource"]
@@ -149,34 +156,24 @@ async def get(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'computeName': self._serialize.url("compute_name", compute_name, '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')
-
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = build_get_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ compute_name=compute_name,
+ template_url=self.get.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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(_models.MachineLearningServiceError, response)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
deserialized = self._deserialize('ComputeResource', pipeline_response)
@@ -185,55 +182,46 @@ async def get(
return cls(pipeline_response, deserialized, {})
return deserialized
+
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore
+
async def _create_or_update_initial(
self,
resource_group_name: str,
workspace_name: str,
compute_name: str,
parameters: "_models.ComputeResource",
- **kwargs
+ **kwargs: Any
) -> "_models.ComputeResource":
cls = kwargs.pop('cls', None) # type: ClsType["_models.ComputeResource"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'computeName': self._serialize.url("compute_name", compute_name, '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')
+ content_type = kwargs.pop('content_type', "application/json") # type: Optional[str]
+
+ _json = self._serialize.body(parameters, 'ComputeResource')
- # 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')
+ request = build_create_or_update_request_initial(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ compute_name=compute_name,
+ content_type=content_type,
+ json=_json,
+ template_url=self._create_or_update_initial.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- body_content_kwargs = {} # type: Dict[str, Any]
- body_content = self._serialize.body(parameters, 'ComputeResource')
- 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(_models.MachineLearningServiceError, response)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
response_headers = {}
if response.status_code == 200:
@@ -241,45 +229,54 @@ async def _create_or_update_initial(
if response.status_code == 201:
response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation'))
+
deserialized = self._deserialize('ComputeResource', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, response_headers)
return deserialized
+
_create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore
+
+ @distributed_trace_async
async def begin_create_or_update(
self,
resource_group_name: str,
workspace_name: str,
compute_name: str,
parameters: "_models.ComputeResource",
- **kwargs
+ **kwargs: Any
) -> AsyncLROPoller["_models.ComputeResource"]:
"""Creates or updates compute. This call will overwrite a compute if it exists. This is a
nonrecoverable operation. If your intent is to create a new compute, do a GET first to verify
that it does not exist yet.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
:param compute_name: Name of the Azure Machine Learning compute.
:type compute_name: str
:param parameters: Payload with Machine Learning compute definition.
- :type parameters: ~azure.mgmt.machinelearningservices.models.ComputeResource
+ :type parameters: ~azure_machine_learning_workspaces.models.ComputeResource
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
- :keyword polling: True for ARMPolling, False for no polling, or a
- polling object for personal polling strategy
+ :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
+ this operation to not poll, or pass in your own initialized polling object for a personal
+ polling strategy.
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
- :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
- :return: An instance of AsyncLROPoller that returns either ComputeResource or the result of cls(response)
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.machinelearningservices.models.ComputeResource]
- :raises ~azure.core.exceptions.HttpResponseError:
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of AsyncLROPoller that returns either ComputeResource or the result of
+ cls(response)
+ :rtype:
+ ~azure.core.polling.AsyncLROPoller[~azure_machine_learning_workspaces.models.ComputeResource]
+ :raises: ~azure.core.exceptions.HttpResponseError
"""
- polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
+ content_type = kwargs.pop('content_type', "application/json") # type: Optional[str]
+ polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType["_models.ComputeResource"]
lro_delay = kwargs.pop(
'polling_interval',
@@ -292,28 +289,21 @@ async def begin_create_or_update(
workspace_name=workspace_name,
compute_name=compute_name,
parameters=parameters,
+ content_type=content_type,
cls=lambda x,y,z: x,
**kwargs
)
-
kwargs.pop('error_map', None)
- kwargs.pop('content_type', None)
def get_long_running_output(pipeline_response):
+ response = pipeline_response.http_response
deserialized = self._deserialize('ComputeResource', pipeline_response)
-
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
- 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'computeName': self._serialize.url("compute_name", compute_name, 'str'),
- }
- if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
@@ -325,6 +315,7 @@ def get_long_running_output(pipeline_response):
)
else:
return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
+
begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore
async def _update_initial(
@@ -333,47 +324,36 @@ async def _update_initial(
workspace_name: str,
compute_name: str,
parameters: "_models.ClusterUpdateParameters",
- **kwargs
+ **kwargs: Any
) -> "_models.ComputeResource":
cls = kwargs.pop('cls', None) # type: ClsType["_models.ComputeResource"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- content_type = kwargs.pop("content_type", "application/json")
- accept = "application/json"
-
- # Construct URL
- url = self._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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'computeName': self._serialize.url("compute_name", compute_name, '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')
+ content_type = kwargs.pop('content_type', "application/json") # type: Optional[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')
+ _json = self._serialize.body(parameters, 'ClusterUpdateParameters')
+
+ request = build_update_request_initial(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ compute_name=compute_name,
+ content_type=content_type,
+ json=_json,
+ template_url=self._update_initial.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- body_content_kwargs = {} # type: Dict[str, Any]
- body_content = self._serialize.body(parameters, 'ClusterUpdateParameters')
- 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(_models.MachineLearningServiceError, response)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
deserialized = self._deserialize('ComputeResource', pipeline_response)
@@ -381,38 +361,46 @@ async def _update_initial(
return cls(pipeline_response, deserialized, {})
return deserialized
+
_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore
+
+ @distributed_trace_async
async def begin_update(
self,
resource_group_name: str,
workspace_name: str,
compute_name: str,
parameters: "_models.ClusterUpdateParameters",
- **kwargs
+ **kwargs: Any
) -> AsyncLROPoller["_models.ComputeResource"]:
"""Updates properties of a compute. This call will overwrite a compute if it exists. This is a
nonrecoverable operation.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
:param compute_name: Name of the Azure Machine Learning compute.
:type compute_name: str
:param parameters: Additional parameters for cluster update.
- :type parameters: ~azure.mgmt.machinelearningservices.models.ClusterUpdateParameters
+ :type parameters: ~azure_machine_learning_workspaces.models.ClusterUpdateParameters
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
- :keyword polling: True for ARMPolling, False for no polling, or a
- polling object for personal polling strategy
+ :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
+ this operation to not poll, or pass in your own initialized polling object for a personal
+ polling strategy.
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
- :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
- :return: An instance of AsyncLROPoller that returns either ComputeResource or the result of cls(response)
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.machinelearningservices.models.ComputeResource]
- :raises ~azure.core.exceptions.HttpResponseError:
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of AsyncLROPoller that returns either ComputeResource or the result of
+ cls(response)
+ :rtype:
+ ~azure.core.polling.AsyncLROPoller[~azure_machine_learning_workspaces.models.ComputeResource]
+ :raises: ~azure.core.exceptions.HttpResponseError
"""
- polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
+ content_type = kwargs.pop('content_type', "application/json") # type: Optional[str]
+ polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType["_models.ComputeResource"]
lro_delay = kwargs.pop(
'polling_interval',
@@ -425,28 +413,21 @@ async def begin_update(
workspace_name=workspace_name,
compute_name=compute_name,
parameters=parameters,
+ content_type=content_type,
cls=lambda x,y,z: x,
**kwargs
)
-
kwargs.pop('error_map', None)
- kwargs.pop('content_type', None)
def get_long_running_output(pipeline_response):
+ response = pipeline_response.http_response
deserialized = self._deserialize('ComputeResource', pipeline_response)
-
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
- 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'computeName': self._serialize.url("compute_name", compute_name, 'str'),
- }
- if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
@@ -458,6 +439,7 @@ def get_long_running_output(pipeline_response):
)
else:
return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
+
begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore
async def _delete_initial(
@@ -466,65 +448,57 @@ async def _delete_initial(
workspace_name: str,
compute_name: str,
underlying_resource_action: Union[str, "_models.UnderlyingResourceAction"],
- **kwargs
+ **kwargs: Any
) -> None:
cls = kwargs.pop('cls', None) # type: ClsType[None]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'computeName': self._serialize.url("compute_name", compute_name, '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')
- query_parameters['underlyingResourceAction'] = self._serialize.query("underlying_resource_action", underlying_resource_action, 'str')
-
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = build_delete_request_initial(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ compute_name=compute_name,
+ underlying_resource_action=underlying_resource_action,
+ template_url=self._delete_initial.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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 [200, 202]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = self._deserialize(_models.MachineLearningServiceError, response)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
response_headers = {}
if response.status_code == 202:
response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation'))
response_headers['Location']=self._deserialize('str', response.headers.get('Location'))
+
if cls:
return cls(pipeline_response, None, response_headers)
_delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore
+
+ @distributed_trace_async
async def begin_delete(
self,
resource_group_name: str,
workspace_name: str,
compute_name: str,
underlying_resource_action: Union[str, "_models.UnderlyingResourceAction"],
- **kwargs
+ **kwargs: Any
) -> AsyncLROPoller[None]:
"""Deletes specified Machine Learning compute.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
@@ -532,18 +506,21 @@ async def begin_delete(
:type compute_name: str
:param underlying_resource_action: Delete the underlying compute if 'Delete', or detach the
underlying compute from workspace if 'Detach'.
- :type underlying_resource_action: str or ~azure.mgmt.machinelearningservices.models.UnderlyingResourceAction
+ :type underlying_resource_action: str or
+ ~azure_machine_learning_workspaces.models.UnderlyingResourceAction
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
- :keyword polling: True for ARMPolling, False for no polling, or a
- polling object for personal polling strategy
+ :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
+ this operation to not poll, or pass in your own initialized polling object for a personal
+ polling strategy.
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
- :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
+ :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:
+ :raises: ~azure.core.exceptions.HttpResponseError
"""
- polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
+ polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType[None]
lro_delay = kwargs.pop(
'polling_interval',
@@ -559,22 +536,14 @@ async def begin_delete(
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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'computeName': self._serialize.url("compute_name", compute_name, 'str'),
- }
- if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
@@ -586,26 +555,30 @@ def get_long_running_output(pipeline_response):
)
else:
return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
+
begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore
- async def list_nodes(
+ @distributed_trace
+ def list_nodes(
self,
resource_group_name: str,
workspace_name: str,
compute_name: str,
- **kwargs
- ) -> "_models.AmlComputeNodesInformation":
+ **kwargs: Any
+ ) -> AsyncIterable["_models.AmlComputeNodesInformation"]:
"""Get the details (e.g IP address, port etc) of all the compute nodes in the compute.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
:param compute_name: Name of the Azure Machine Learning compute.
:type compute_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
- :return: AmlComputeNodesInformation, or the result of cls(response)
- :rtype: ~azure.mgmt.machinelearningservices.models.AmlComputeNodesInformation
+ :return: An iterator like instance of either AmlComputeNodesInformation or the result of
+ cls(response)
+ :rtype:
+ ~azure.core.async_paging.AsyncItemPaged[~azure_machine_learning_workspaces.models.AmlComputeNodesInformation]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.AmlComputeNodesInformation"]
@@ -613,54 +586,70 @@ async def list_nodes(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- accept = "application/json"
-
- # Construct URL
- url = self.list_nodes.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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'computeName': self._serialize.url("compute_name", compute_name, 'str'),
- }
- url = self._client.format_url(url, **path_format_arguments)
+ def prepare_request(next_link=None):
+ if not next_link:
+
+ request = build_list_nodes_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ compute_name=compute_name,
+ template_url=self.list_nodes.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- # Construct parameters
- query_parameters = {} # type: Dict[str, Any]
- query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+ else:
+
+ request = build_list_nodes_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ compute_name=compute_name,
+ template_url=next_link,
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
+ return request
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize("AmlComputeNodesInformation", pipeline_response)
+ list_of_elem = deserialized.nodes
+ if cls:
+ list_of_elem = cls(list_of_elem)
+ return deserialized.next_link or None, AsyncList(list_of_elem)
- 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
+ async def get_next(next_link=None):
+ request = prepare_request(next_link)
- if response.status_code not in [200]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = self._deserialize(_models.MachineLearningServiceError, response)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
- deserialized = self._deserialize('AmlComputeNodesInformation', pipeline_response)
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
- if cls:
- return cls(pipeline_response, deserialized, {})
+ return pipeline_response
- return deserialized
+
+ return AsyncItemPaged(
+ get_next, extract_data
+ )
list_nodes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listNodes'} # type: ignore
+ @distributed_trace_async
async def list_keys(
self,
resource_group_name: str,
workspace_name: str,
compute_name: str,
- **kwargs
+ **kwargs: Any
) -> "_models.ComputeSecrets":
"""Gets secrets related to Machine Learning compute (storage keys, service credentials, etc).
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
@@ -668,7 +657,7 @@ async def list_keys(
:type compute_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: ComputeSecrets, or the result of cls(response)
- :rtype: ~azure.mgmt.machinelearningservices.models.ComputeSecrets
+ :rtype: ~azure_machine_learning_workspaces.models.ComputeSecrets
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.ComputeSecrets"]
@@ -676,34 +665,24 @@ async def list_keys(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'computeName': self._serialize.url("compute_name", compute_name, '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')
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = build_list_keys_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ compute_name=compute_name,
+ template_url=self.list_keys.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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)
- error = self._deserialize(_models.MachineLearningServiceError, response)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
deserialized = self._deserialize('ComputeSecrets', pipeline_response)
@@ -712,184 +691,312 @@ async def list_keys(
return cls(pipeline_response, deserialized, {})
return deserialized
+
list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listKeys'} # type: ignore
- async def start(
+
+ async def _start_initial(
self,
resource_group_name: str,
workspace_name: str,
compute_name: str,
- **kwargs
+ **kwargs: Any
) -> None:
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+
+ request = build_start_request_initial(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ compute_name=compute_name,
+ template_url=self._start_initial.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [202]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ if cls:
+ return cls(pipeline_response, None, {})
+
+ _start_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/start'} # type: ignore
+
+
+ @distributed_trace_async
+ async def begin_start(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ compute_name: str,
+ **kwargs: Any
+ ) -> AsyncLROPoller[None]:
"""Posts a start action to a compute instance.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
:param compute_name: Name of the Azure Machine Learning compute.
:type compute_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
- :return: None, or the result of cls(response)
- :rtype: None
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
+ this operation to not poll, or pass in your own initialized polling object for a personal
+ polling strategy.
+ :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[None]
:raises: ~azure.core.exceptions.HttpResponseError
"""
+ polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod]
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ lro_delay = kwargs.pop(
+ 'polling_interval',
+ self._config.polling_interval
+ )
+ cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
+ if cont_token is None:
+ raw_result = await self._start_initial(
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ compute_name=compute_name,
+ cls=lambda x,y,z: x,
+ **kwargs
+ )
+ kwargs.pop('error_map', None)
+
+ def get_long_running_output(pipeline_response):
+ if cls:
+ return cls(pipeline_response, None, {})
+
+
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
+ elif polling is False: polling_method = AsyncNoPolling()
+ else: polling_method = polling
+ if cont_token:
+ return AsyncLROPoller.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output
+ )
+ else:
+ return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
+
+ begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/start'} # type: ignore
+
+ async def _stop_initial(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ compute_name: str,
+ **kwargs: Any
+ ) -> None:
cls = kwargs.pop('cls', None) # type: ClsType[None]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- accept = "application/json"
-
- # Construct URL
- url = self.start.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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'computeName': self._serialize.url("compute_name", compute_name, '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')
-
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = build_stop_request_initial(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ compute_name=compute_name,
+ template_url=self._stop_initial.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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]:
+ if response.status_code not in [202]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = self._deserialize(_models.MachineLearningServiceError, response)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
if cls:
return cls(pipeline_response, None, {})
- start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/start'} # type: ignore
+ _stop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/stop'} # type: ignore
- async def stop(
+
+ @distributed_trace_async
+ async def begin_stop(
self,
resource_group_name: str,
workspace_name: str,
compute_name: str,
- **kwargs
- ) -> None:
+ **kwargs: Any
+ ) -> AsyncLROPoller[None]:
"""Posts a stop action to a compute instance.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
:param compute_name: Name of the Azure Machine Learning compute.
:type compute_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
- :return: None, or the result of cls(response)
- :rtype: None
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
+ this operation to not poll, or pass in your own initialized polling object for a personal
+ polling strategy.
+ :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[None]
:raises: ~azure.core.exceptions.HttpResponseError
"""
+ polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod]
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ lro_delay = kwargs.pop(
+ 'polling_interval',
+ self._config.polling_interval
+ )
+ cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
+ if cont_token is None:
+ raw_result = await self._stop_initial(
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ compute_name=compute_name,
+ cls=lambda x,y,z: x,
+ **kwargs
+ )
+ kwargs.pop('error_map', None)
+
+ def get_long_running_output(pipeline_response):
+ if cls:
+ return cls(pipeline_response, None, {})
+
+
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
+ elif polling is False: polling_method = AsyncNoPolling()
+ else: polling_method = polling
+ if cont_token:
+ return AsyncLROPoller.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output
+ )
+ else:
+ return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
+
+ begin_stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/stop'} # type: ignore
+
+ async def _restart_initial(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ compute_name: str,
+ **kwargs: Any
+ ) -> None:
cls = kwargs.pop('cls', None) # type: ClsType[None]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- accept = "application/json"
-
- # Construct URL
- url = self.stop.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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'computeName': self._serialize.url("compute_name", compute_name, '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')
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = build_restart_request_initial(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ compute_name=compute_name,
+ template_url=self._restart_initial.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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]:
+ if response.status_code not in [202]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = self._deserialize(_models.MachineLearningServiceError, response)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
if cls:
return cls(pipeline_response, None, {})
- stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/stop'} # type: ignore
+ _restart_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/restart'} # type: ignore
+
- async def restart(
+ @distributed_trace_async
+ async def begin_restart(
self,
resource_group_name: str,
workspace_name: str,
compute_name: str,
- **kwargs
- ) -> None:
+ **kwargs: Any
+ ) -> AsyncLROPoller[None]:
"""Posts a restart action to a compute instance.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
:param compute_name: Name of the Azure Machine Learning compute.
:type compute_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
- :return: None, or the result of cls(response)
- :rtype: None
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
+ this operation to not poll, or pass in your own initialized polling object for a personal
+ polling strategy.
+ :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[None]
:raises: ~azure.core.exceptions.HttpResponseError
"""
+ polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {
- 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
- }
- error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- accept = "application/json"
-
- # Construct URL
- url = self.restart.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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'computeName': self._serialize.url("compute_name", compute_name, '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')
-
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+ lro_delay = kwargs.pop(
+ 'polling_interval',
+ self._config.polling_interval
+ )
+ cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
+ if cont_token is None:
+ raw_result = await self._restart_initial(
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ compute_name=compute_name,
+ cls=lambda x,y,z: x,
+ **kwargs
+ )
+ kwargs.pop('error_map', None)
- 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
+ def get_long_running_output(pipeline_response):
+ if cls:
+ return cls(pipeline_response, None, {})
- if response.status_code not in [200]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = self._deserialize(_models.MachineLearningServiceError, response)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
- if cls:
- return cls(pipeline_response, None, {})
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
+ elif polling is False: polling_method = AsyncNoPolling()
+ else: polling_method = polling
+ if cont_token:
+ return AsyncLROPoller.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output
+ )
+ else:
+ return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
- restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/restart'} # type: ignore
+ begin_restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/restart'} # type: ignore
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_notebooks_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_notebooks_operations.py
deleted file mode 100644
index b1dac0e119be..000000000000
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_notebooks_operations.py
+++ /dev/null
@@ -1,160 +0,0 @@
-# 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, Union
-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.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 NotebooksOperations:
- """NotebooksOperations async operations.
-
- You should not instantiate this class directly. Instead, you should create a Client instance that
- instantiates it for you and attaches it as an attribute.
-
- :ivar models: Alias to model classes used in this operation group.
- :type models: ~azure.mgmt.machinelearningservices.models
- :param client: Client for service requests.
- :param config: Configuration of service client.
- :param serializer: An object model serializer.
- :param deserializer: An object model deserializer.
- """
-
- models = _models
-
- def __init__(self, client, config, serializer, deserializer) -> None:
- self._client = client
- self._serialize = serializer
- self._deserialize = deserializer
- self._config = config
-
- async def _prepare_initial(
- self,
- resource_group_name: str,
- workspace_name: str,
- **kwargs
- ) -> Optional["_models.NotebookResourceInfo"]:
- cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.NotebookResourceInfo"]]
- error_map = {
- 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
- }
- error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- accept = "application/json"
-
- # Construct URL
- url = self._prepare_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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, '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')
-
- # 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)
- error = self._deserialize(_models.MachineLearningServiceError, response)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- deserialized = None
- if response.status_code == 200:
- deserialized = self._deserialize('NotebookResourceInfo', pipeline_response)
-
- if cls:
- return cls(pipeline_response, deserialized, {})
-
- return deserialized
- _prepare_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook'} # type: ignore
-
- async def begin_prepare(
- self,
- resource_group_name: str,
- workspace_name: str,
- **kwargs
- ) -> AsyncLROPoller["_models.NotebookResourceInfo"]:
- """prepare.
-
- :param resource_group_name: Name of the resource group in which workspace is located.
- :type resource_group_name: str
- :param workspace_name: Name of Azure Machine Learning workspace.
- :type workspace_name: str
- :keyword callable cls: A custom type or function that will be passed the direct response
- :keyword str continuation_token: A continuation token to restart a poller from a saved state.
- :keyword polling: True for ARMPolling, False for no polling, or a
- polling object for personal polling strategy
- :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
- :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
- :return: An instance of AsyncLROPoller that returns either NotebookResourceInfo or the result of cls(response)
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.machinelearningservices.models.NotebookResourceInfo]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
- cls = kwargs.pop('cls', None) # type: ClsType["_models.NotebookResourceInfo"]
- lro_delay = kwargs.pop(
- 'polling_interval',
- self._config.polling_interval
- )
- cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
- if cont_token is None:
- raw_result = await self._prepare_initial(
- resource_group_name=resource_group_name,
- workspace_name=workspace_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('NotebookResourceInfo', 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- }
-
- if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, 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_prepare.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook'} # type: ignore
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_operations.py
index 6b2ed5f29d08..536b48d555a5 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_operations.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_operations.py
@@ -5,17 +5,22 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
+import functools
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar
import warnings
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pipeline import PipelineResponse
-from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
+from azure.core.pipeline.transport import AsyncHttpResponse
+from azure.core.rest import HttpRequest
+from azure.core.tracing.decorator import distributed_trace
+from azure.core.tracing.decorator_async import distributed_trace_async
from azure.mgmt.core.exceptions import ARMErrorFormat
from ... import models as _models
-
+from ..._vendor import _convert_request
+from ...operations._operations import build_list_request
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -26,7 +31,7 @@ class Operations:
instantiates it for you and attaches it as an attribute.
:ivar models: Alias to model classes used in this operation group.
- :type models: ~azure.mgmt.machinelearningservices.models
+ :type models: ~azure_machine_learning_workspaces.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
@@ -41,15 +46,17 @@ def __init__(self, client, config, serializer, deserializer) -> None:
self._deserialize = deserializer
self._config = config
+ @distributed_trace
def list(
self,
- **kwargs
+ **kwargs: Any
) -> AsyncIterable["_models.OperationListResult"]:
"""Lists all of the available Azure Machine Learning Workspaces REST API operations.
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either OperationListResult or the result of cls(response)
- :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.OperationListResult]
+ :rtype:
+ ~azure.core.async_paging.AsyncItemPaged[~azure_machine_learning_workspaces.models.OperationListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"]
@@ -57,30 +64,27 @@ def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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.metadata['url'] # type: ignore
- # Construct parameters
- query_parameters = {} # type: Dict[str, Any]
- query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ request = build_list_request(
+ template_url=self.list.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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)
+
+ request = build_list_request(
+ template_url=next_link,
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
return request
async def extract_data(pipeline_response):
- deserialized = self._deserialize('OperationListResult', pipeline_response)
+ deserialized = self._deserialize("OperationListResult", pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
@@ -93,12 +97,13 @@ async def get_next(next_link=None):
response = pipeline_response.http_response
if response.status_code not in [200]:
- error = self._deserialize(_models.MachineLearningServiceError, response)
map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
return pipeline_response
+
return AsyncItemPaged(
get_next, extract_data
)
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_private_endpoint_connections_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_private_endpoint_connections_operations.py
index 5ef7c0591ff1..199612cb5e6f 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_private_endpoint_connections_operations.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_private_endpoint_connections_operations.py
@@ -5,18 +5,22 @@
# 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, Union
+import functools
+from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar
import warnings
+from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pipeline import PipelineResponse
-from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
-from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod
+from azure.core.pipeline.transport import AsyncHttpResponse
+from azure.core.rest import HttpRequest
+from azure.core.tracing.decorator import distributed_trace
+from azure.core.tracing.decorator_async import distributed_trace_async
from azure.mgmt.core.exceptions import ARMErrorFormat
-from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling
from ... import models as _models
-
+from ..._vendor import _convert_request
+from ...operations._private_endpoint_connections_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_request
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -27,7 +31,7 @@ class PrivateEndpointConnectionsOperations:
instantiates it for you and attaches it as an attribute.
:ivar models: Alias to model classes used in this operation group.
- :type models: ~azure.mgmt.machinelearningservices.models
+ :type models: ~azure_machine_learning_workspaces.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
@@ -42,16 +46,93 @@ def __init__(self, client, config, serializer, deserializer) -> None:
self._deserialize = deserializer
self._config = config
+ @distributed_trace
+ def list(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs: Any
+ ) -> AsyncIterable["_models.PrivateEndpointConnectionListResult"]:
+ """List all the private endpoint connections associated with the workspace.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param workspace_name: Name of Azure Machine Learning workspace.
+ :type workspace_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result
+ of cls(response)
+ :rtype:
+ ~azure.core.async_paging.AsyncItemPaged[~azure_machine_learning_workspaces.models.PrivateEndpointConnectionListResult]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ def prepare_request(next_link=None):
+ if not next_link:
+
+ request = build_list_request(
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ subscription_id=self._config.subscription_id,
+ template_url=self.list.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
+ else:
+
+ request = build_list_request(
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ subscription_id=self._config.subscription_id,
+ template_url=next_link,
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
+ return request
+
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize("PrivateEndpointConnectionListResult", pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem)
+ return None, AsyncList(list_of_elem)
+
+ async def get_next(next_link=None):
+ request = prepare_request(next_link)
+
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+
+ return AsyncItemPaged(
+ get_next, extract_data
+ )
+ list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections'} # type: ignore
+
+ @distributed_trace_async
async def get(
self,
resource_group_name: str,
workspace_name: str,
private_endpoint_connection_name: str,
- **kwargs
+ **kwargs: Any
) -> "_models.PrivateEndpointConnection":
"""Gets the specified private endpoint connection associated with the workspace.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
@@ -60,7 +141,7 @@ async def get(
:type private_endpoint_connection_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: PrivateEndpointConnection, or the result of cls(response)
- :rtype: ~azure.mgmt.machinelearningservices.models.PrivateEndpointConnection
+ :rtype: ~azure_machine_learning_workspaces.models.PrivateEndpointConnection
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"]
@@ -68,34 +149,24 @@ async def get(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, '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')
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = build_get_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ private_endpoint_connection_name=private_endpoint_connection_name,
+ template_url=self.get.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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(_models.MachineLearningServiceError, response)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response)
@@ -104,19 +175,22 @@ async def get(
return cls(pipeline_response, deserialized, {})
return deserialized
+
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore
- async def put(
+
+ @distributed_trace_async
+ async def create_or_update(
self,
resource_group_name: str,
workspace_name: str,
private_endpoint_connection_name: str,
properties: "_models.PrivateEndpointConnection",
- **kwargs
+ **kwargs: Any
) -> "_models.PrivateEndpointConnection":
"""Update the state of specified private endpoint connection associated with the workspace.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
@@ -124,10 +198,10 @@ async def put(
with the workspace.
:type private_endpoint_connection_name: str
:param properties: The private endpoint connection properties.
- :type properties: ~azure.mgmt.machinelearningservices.models.PrivateEndpointConnection
+ :type properties: ~azure_machine_learning_workspaces.models.PrivateEndpointConnection
:keyword callable cls: A custom type or function that will be passed the direct response
:return: PrivateEndpointConnection, or the result of cls(response)
- :rtype: ~azure.mgmt.machinelearningservices.models.PrivateEndpointConnection
+ :rtype: ~azure_machine_learning_workspaces.models.PrivateEndpointConnection
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"]
@@ -135,39 +209,29 @@ async def put(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- content_type = kwargs.pop("content_type", "application/json")
- accept = "application/json"
-
- # Construct URL
- url = self.put.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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, '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')
+ content_type = kwargs.pop('content_type', "application/json") # type: Optional[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')
+ _json = self._serialize.body(properties, 'PrivateEndpointConnection')
+
+ request = build_create_or_update_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ private_endpoint_connection_name=private_endpoint_connection_name,
+ content_type=content_type,
+ json=_json,
+ template_url=self.create_or_update.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- body_content_kwargs = {} # type: Dict[str, Any]
- body_content = self._serialize.body(properties, 'PrivateEndpointConnection')
- 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]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = self._deserialize(_models.MachineLearningServiceError, response)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response)
@@ -176,121 +240,59 @@ async def put(
return cls(pipeline_response, deserialized, {})
return deserialized
- put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore
- async def _delete_initial(
+ create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore
+
+
+ @distributed_trace_async
+ async def delete(
self,
resource_group_name: str,
workspace_name: str,
private_endpoint_connection_name: str,
- **kwargs
+ **kwargs: Any
) -> None:
+ """Deletes the specified private endpoint connection associated with the workspace.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param workspace_name: Name of Azure Machine Learning workspace.
+ :type workspace_name: str
+ :param private_endpoint_connection_name: The name of the private endpoint connection associated
+ with the workspace.
+ :type private_endpoint_connection_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: None, or the result of cls(response)
+ :rtype: None
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
cls = kwargs.pop('cls', None) # type: ClsType[None]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, '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')
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = build_delete_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ private_endpoint_connection_name=private_endpoint_connection_name,
+ template_url=self.delete.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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 [200, 202, 204]:
+ if response.status_code not in [200, 204]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = self._deserialize(_models.MachineLearningServiceError, response)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
if cls:
return cls(pipeline_response, None, {})
- _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore
-
- async def begin_delete(
- self,
- resource_group_name: str,
- workspace_name: str,
- private_endpoint_connection_name: str,
- **kwargs
- ) -> AsyncLROPoller[None]:
- """Deletes the specified private endpoint connection associated with the workspace.
-
- :param resource_group_name: Name of the resource group in which workspace is located.
- :type resource_group_name: str
- :param workspace_name: Name of Azure Machine Learning workspace.
- :type workspace_name: str
- :param private_endpoint_connection_name: The name of the private endpoint connection associated
- with the workspace.
- :type private_endpoint_connection_name: str
- :keyword callable cls: A custom type or function that will be passed the direct response
- :keyword str continuation_token: A continuation token to restart a poller from a saved state.
- :keyword polling: True for ARMPolling, False for no polling, or a
- polling object for 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,
- workspace_name=workspace_name,
- private_endpoint_connection_name=private_endpoint_connection_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):
- 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'),
- }
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore
- 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.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_private_link_resources_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_private_link_resources_operations.py
index 882726b29838..6f2cb6751620 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_private_link_resources_operations.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_private_link_resources_operations.py
@@ -5,16 +5,20 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
+import functools
from typing import Any, Callable, Dict, Generic, Optional, TypeVar
import warnings
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pipeline import PipelineResponse
-from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
+from azure.core.pipeline.transport import AsyncHttpResponse
+from azure.core.rest import HttpRequest
+from azure.core.tracing.decorator_async import distributed_trace_async
from azure.mgmt.core.exceptions import ARMErrorFormat
from ... import models as _models
-
+from ..._vendor import _convert_request
+from ...operations._private_link_resources_operations import build_list_request
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -25,7 +29,7 @@ class PrivateLinkResourcesOperations:
instantiates it for you and attaches it as an attribute.
:ivar models: Alias to model classes used in this operation group.
- :type models: ~azure.mgmt.machinelearningservices.models
+ :type models: ~azure_machine_learning_workspaces.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
@@ -40,21 +44,22 @@ def __init__(self, client, config, serializer, deserializer) -> None:
self._deserialize = deserializer
self._config = config
- async def list_by_workspace(
+ @distributed_trace_async
+ async def list(
self,
resource_group_name: str,
workspace_name: str,
- **kwargs
+ **kwargs: Any
) -> "_models.PrivateLinkResourceListResult":
"""Gets the private link resources that need to be created for a workspace.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: PrivateLinkResourceListResult, or the result of cls(response)
- :rtype: ~azure.mgmt.machinelearningservices.models.PrivateLinkResourceListResult
+ :rtype: ~azure_machine_learning_workspaces.models.PrivateLinkResourceListResult
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"]
@@ -62,27 +67,17 @@ async def list_by_workspace(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- accept = "application/json"
-
- # Construct URL
- url = self.list_by_workspace.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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, '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')
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = build_list_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ template_url=self.list.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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
@@ -96,4 +91,6 @@ async def list_by_workspace(
return cls(pipeline_response, deserialized, {})
return deserialized
- list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateLinkResources'} # type: ignore
+
+ list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateLinkResources'} # type: ignore
+
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_quotas_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_quotas_operations.py
index 6bdae569077f..eb4c4c71ba4c 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_quotas_operations.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_quotas_operations.py
@@ -5,17 +5,22 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
+import functools
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar
import warnings
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pipeline import PipelineResponse
-from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
+from azure.core.pipeline.transport import AsyncHttpResponse
+from azure.core.rest import HttpRequest
+from azure.core.tracing.decorator import distributed_trace
+from azure.core.tracing.decorator_async import distributed_trace_async
from azure.mgmt.core.exceptions import ARMErrorFormat
from ... import models as _models
-
+from ..._vendor import _convert_request
+from ...operations._quotas_operations import build_list_request, build_update_request
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -26,7 +31,7 @@ class QuotasOperations:
instantiates it for you and attaches it as an attribute.
:ivar models: Alias to model classes used in this operation group.
- :type models: ~azure.mgmt.machinelearningservices.models
+ :type models: ~azure_machine_learning_workspaces.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
@@ -41,21 +46,22 @@ def __init__(self, client, config, serializer, deserializer) -> None:
self._deserialize = deserializer
self._config = config
+ @distributed_trace_async
async def update(
self,
location: str,
parameters: "_models.QuotaUpdateParameters",
- **kwargs
+ **kwargs: Any
) -> "_models.UpdateWorkspaceQuotasResult":
"""Update quota for each VM family in workspace.
:param location: The location for update quota is queried.
:type location: str
:param parameters: Quota update parameters.
- :type parameters: ~azure.mgmt.machinelearningservices.models.QuotaUpdateParameters
+ :type parameters: ~azure_machine_learning_workspaces.models.QuotaUpdateParameters
:keyword callable cls: A custom type or function that will be passed the direct response
:return: UpdateWorkspaceQuotasResult, or the result of cls(response)
- :rtype: ~azure.mgmt.machinelearningservices.models.UpdateWorkspaceQuotasResult
+ :rtype: ~azure_machine_learning_workspaces.models.UpdateWorkspaceQuotasResult
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.UpdateWorkspaceQuotasResult"]
@@ -63,37 +69,27 @@ async def update(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- content_type = kwargs.pop("content_type", "application/json")
- accept = "application/json"
-
- # Construct URL
- url = self.update.metadata['url'] # type: ignore
- path_format_arguments = {
- 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'),
- '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')
+ content_type = kwargs.pop('content_type', "application/json") # type: Optional[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')
+ _json = self._serialize.body(parameters, 'QuotaUpdateParameters')
+
+ request = build_update_request(
+ location=location,
+ subscription_id=self._config.subscription_id,
+ content_type=content_type,
+ json=_json,
+ template_url=self.update.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- body_content_kwargs = {} # type: Dict[str, Any]
- body_content = self._serialize.body(parameters, 'QuotaUpdateParameters')
- body_content_kwargs['content'] = body_content
- request = self._client.post(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(_models.MachineLearningServiceError, response)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
deserialized = self._deserialize('UpdateWorkspaceQuotasResult', pipeline_response)
@@ -102,12 +98,15 @@ async def update(
return cls(pipeline_response, deserialized, {})
return deserialized
+
update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/updateQuotas'} # type: ignore
+
+ @distributed_trace
def list(
self,
location: str,
- **kwargs
+ **kwargs: Any
) -> AsyncIterable["_models.ListWorkspaceQuotas"]:
"""Gets the currently assigned Workspace Quotas based on VMFamily.
@@ -115,7 +114,8 @@ def list(
:type location: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either ListWorkspaceQuotas or the result of cls(response)
- :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.ListWorkspaceQuotas]
+ :rtype:
+ ~azure.core.async_paging.AsyncItemPaged[~azure_machine_learning_workspaces.models.ListWorkspaceQuotas]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.ListWorkspaceQuotas"]
@@ -123,35 +123,31 @@ def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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.metadata['url'] # type: ignore
- path_format_arguments = {
- 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
- 'location': self._serialize.url("location", location, 'str', 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')
-
- request = self._client.get(url, query_parameters, header_parameters)
+
+ request = build_list_request(
+ subscription_id=self._config.subscription_id,
+ location=location,
+ template_url=self.list.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
else:
- url = next_link
- query_parameters = {} # type: Dict[str, Any]
- request = self._client.get(url, query_parameters, header_parameters)
+
+ request = build_list_request(
+ subscription_id=self._config.subscription_id,
+ location=location,
+ template_url=next_link,
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
return request
async def extract_data(pipeline_response):
- deserialized = self._deserialize('ListWorkspaceQuotas', pipeline_response)
+ deserialized = self._deserialize("ListWorkspaceQuotas", pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
@@ -165,11 +161,13 @@ async def get_next(next_link=None):
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)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
return pipeline_response
+
return AsyncItemPaged(
get_next, extract_data
)
- list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/Quotas'} # type: ignore
+ list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/quotas'} # type: ignore
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_usages_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_usages_operations.py
index b5a6eb14f798..0a2d58d466fc 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_usages_operations.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_usages_operations.py
@@ -5,17 +5,22 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
+import functools
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar
import warnings
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pipeline import PipelineResponse
-from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
+from azure.core.pipeline.transport import AsyncHttpResponse
+from azure.core.rest import HttpRequest
+from azure.core.tracing.decorator import distributed_trace
+from azure.core.tracing.decorator_async import distributed_trace_async
from azure.mgmt.core.exceptions import ARMErrorFormat
from ... import models as _models
-
+from ..._vendor import _convert_request
+from ...operations._usages_operations import build_list_request
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -26,7 +31,7 @@ class UsagesOperations:
instantiates it for you and attaches it as an attribute.
:ivar models: Alias to model classes used in this operation group.
- :type models: ~azure.mgmt.machinelearningservices.models
+ :type models: ~azure_machine_learning_workspaces.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
@@ -41,10 +46,11 @@ def __init__(self, client, config, serializer, deserializer) -> None:
self._deserialize = deserializer
self._config = config
+ @distributed_trace
def list(
self,
location: str,
- **kwargs
+ **kwargs: Any
) -> AsyncIterable["_models.ListUsagesResult"]:
"""Gets the current usage information as well as limits for AML resources for given subscription
and location.
@@ -53,7 +59,8 @@ def list(
:type location: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either ListUsagesResult or the result of cls(response)
- :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.ListUsagesResult]
+ :rtype:
+ ~azure.core.async_paging.AsyncItemPaged[~azure_machine_learning_workspaces.models.ListUsagesResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.ListUsagesResult"]
@@ -61,35 +68,31 @@ def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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.metadata['url'] # type: ignore
- path_format_arguments = {
- 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
- 'location': self._serialize.url("location", location, 'str', 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')
-
- request = self._client.get(url, query_parameters, header_parameters)
+
+ request = build_list_request(
+ subscription_id=self._config.subscription_id,
+ location=location,
+ template_url=self.list.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
else:
- url = next_link
- query_parameters = {} # type: Dict[str, Any]
- request = self._client.get(url, query_parameters, header_parameters)
+
+ request = build_list_request(
+ subscription_id=self._config.subscription_id,
+ location=location,
+ template_url=next_link,
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
return request
async def extract_data(pipeline_response):
- deserialized = self._deserialize('ListUsagesResult', pipeline_response)
+ deserialized = self._deserialize("ListUsagesResult", pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
@@ -107,6 +110,7 @@ async def get_next(next_link=None):
return pipeline_response
+
return AsyncItemPaged(
get_next, extract_data
)
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_virtual_machine_sizes_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_virtual_machine_sizes_operations.py
index 109eba1351e8..2d6de3d89c74 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_virtual_machine_sizes_operations.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_virtual_machine_sizes_operations.py
@@ -5,16 +5,20 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
+import functools
from typing import Any, Callable, Dict, Generic, Optional, TypeVar
import warnings
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pipeline import PipelineResponse
-from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
+from azure.core.pipeline.transport import AsyncHttpResponse
+from azure.core.rest import HttpRequest
+from azure.core.tracing.decorator_async import distributed_trace_async
from azure.mgmt.core.exceptions import ARMErrorFormat
from ... import models as _models
-
+from ..._vendor import _convert_request
+from ...operations._virtual_machine_sizes_operations import build_list_request
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -25,7 +29,7 @@ class VirtualMachineSizesOperations:
instantiates it for you and attaches it as an attribute.
:ivar models: Alias to model classes used in this operation group.
- :type models: ~azure.mgmt.machinelearningservices.models
+ :type models: ~azure_machine_learning_workspaces.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
@@ -40,24 +44,19 @@ def __init__(self, client, config, serializer, deserializer) -> None:
self._deserialize = deserializer
self._config = config
+ @distributed_trace_async
async def list(
self,
location: str,
- compute_type: Optional[str] = None,
- recommended: Optional[bool] = None,
- **kwargs
+ **kwargs: Any
) -> "_models.VirtualMachineSizeListResult":
"""Returns supported VM Sizes in a location.
:param location: The location upon which virtual-machine-sizes is queried.
:type location: str
- :param compute_type: Type of compute to filter by.
- :type compute_type: str
- :param recommended: Specifies whether to return recommended vm sizes or all vm sizes.
- :type recommended: bool
:keyword callable cls: A custom type or function that will be passed the direct response
:return: VirtualMachineSizeListResult, or the result of cls(response)
- :rtype: ~azure.mgmt.machinelearningservices.models.VirtualMachineSizeListResult
+ :rtype: ~azure_machine_learning_workspaces.models.VirtualMachineSizeListResult
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineSizeListResult"]
@@ -65,30 +64,16 @@ async def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- accept = "application/json"
-
- # Construct URL
- url = self.list.metadata['url'] # type: ignore
- path_format_arguments = {
- 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'),
- '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 compute_type is not None:
- query_parameters['compute-type'] = self._serialize.query("compute_type", compute_type, 'str')
- if recommended is not None:
- query_parameters['recommended'] = self._serialize.query("recommended", recommended, 'bool')
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = build_list_request(
+ location=location,
+ subscription_id=self._config.subscription_id,
+ template_url=self.list.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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
@@ -102,4 +87,6 @@ async def list(
return cls(pipeline_response, deserialized, {})
return deserialized
+
list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/vmSizes'} # type: ignore
+
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_workspace_connections_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_workspace_connections_operations.py
index c01237741478..c255d66412e3 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_workspace_connections_operations.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_workspace_connections_operations.py
@@ -5,17 +5,22 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
+import functools
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar
import warnings
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pipeline import PipelineResponse
-from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
+from azure.core.pipeline.transport import AsyncHttpResponse
+from azure.core.rest import HttpRequest
+from azure.core.tracing.decorator import distributed_trace
+from azure.core.tracing.decorator_async import distributed_trace_async
from azure.mgmt.core.exceptions import ARMErrorFormat
from ... import models as _models
-
+from ..._vendor import _convert_request
+from ...operations._workspace_connections_operations import build_create_request, build_delete_request, build_get_request, build_list_request
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -26,7 +31,7 @@ class WorkspaceConnectionsOperations:
instantiates it for you and attaches it as an attribute.
:ivar models: Alias to model classes used in this operation group.
- :type models: ~azure.mgmt.machinelearningservices.models
+ :type models: ~azure_machine_learning_workspaces.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
@@ -41,17 +46,18 @@ def __init__(self, client, config, serializer, deserializer) -> None:
self._deserialize = deserializer
self._config = config
+ @distributed_trace
def list(
self,
resource_group_name: str,
workspace_name: str,
target: Optional[str] = None,
category: Optional[str] = None,
- **kwargs
+ **kwargs: Any
) -> AsyncIterable["_models.PaginatedWorkspaceConnectionsList"]:
"""List all connections under a AML workspace.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
@@ -60,8 +66,10 @@ def list(
:param category: Category of the workspace connection.
:type category: str
:keyword callable cls: A custom type or function that will be passed the direct response
- :return: An iterator like instance of either PaginatedWorkspaceConnectionsList or the result of cls(response)
- :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.PaginatedWorkspaceConnectionsList]
+ :return: An iterator like instance of either PaginatedWorkspaceConnectionsList or the result of
+ cls(response)
+ :rtype:
+ ~azure.core.async_paging.AsyncItemPaged[~azure_machine_learning_workspaces.models.PaginatedWorkspaceConnectionsList]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.PaginatedWorkspaceConnectionsList"]
@@ -69,40 +77,37 @@ def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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.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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, '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 target is not None:
- query_parameters['target'] = self._serialize.query("target", target, 'str')
- if category is not None:
- query_parameters['category'] = self._serialize.query("category", category, 'str')
-
- request = self._client.get(url, query_parameters, header_parameters)
+
+ request = build_list_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ target=target,
+ category=category,
+ template_url=self.list.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
else:
- url = next_link
- query_parameters = {} # type: Dict[str, Any]
- request = self._client.get(url, query_parameters, header_parameters)
+
+ request = build_list_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ target=target,
+ category=category,
+ template_url=next_link,
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
return request
async def extract_data(pipeline_response):
- deserialized = self._deserialize('PaginatedWorkspaceConnectionsList', pipeline_response)
+ deserialized = self._deserialize("PaginatedWorkspaceConnectionsList", pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
@@ -115,38 +120,40 @@ async def get_next(next_link=None):
response = pipeline_response.http_response
if response.status_code not in [200]:
- error = self._deserialize(_models.MachineLearningServiceError, response)
map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
return pipeline_response
+
return AsyncItemPaged(
get_next, extract_data
)
list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections'} # type: ignore
+ @distributed_trace_async
async def create(
self,
resource_group_name: str,
workspace_name: str,
connection_name: str,
- parameters: "_models.WorkspaceConnectionDto",
- **kwargs
+ parameters: "_models.WorkspaceConnection",
+ **kwargs: Any
) -> "_models.WorkspaceConnection":
"""Add a new workspace connection.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
:param connection_name: Friendly name of the workspace connection.
:type connection_name: str
:param parameters: The object for creating or updating a new workspace connection.
- :type parameters: ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionDto
+ :type parameters: ~azure_machine_learning_workspaces.models.WorkspaceConnection
:keyword callable cls: A custom type or function that will be passed the direct response
:return: WorkspaceConnection, or the result of cls(response)
- :rtype: ~azure.mgmt.machinelearningservices.models.WorkspaceConnection
+ :rtype: ~azure_machine_learning_workspaces.models.WorkspaceConnection
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkspaceConnection"]
@@ -154,39 +161,29 @@ async def create(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- content_type = kwargs.pop("content_type", "application/json")
- accept = "application/json"
-
- # Construct URL
- url = self.create.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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'connectionName': self._serialize.url("connection_name", connection_name, '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')
+ content_type = kwargs.pop('content_type', "application/json") # type: Optional[str]
+
+ _json = self._serialize.body(parameters, 'WorkspaceConnection')
- # 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')
+ request = build_create_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ connection_name=connection_name,
+ content_type=content_type,
+ json=_json,
+ template_url=self.create.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- body_content_kwargs = {} # type: Dict[str, Any]
- body_content = self._serialize.body(parameters, 'WorkspaceConnectionDto')
- 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]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = self._deserialize(_models.MachineLearningServiceError, response)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
deserialized = self._deserialize('WorkspaceConnection', pipeline_response)
@@ -195,18 +192,21 @@ async def create(
return cls(pipeline_response, deserialized, {})
return deserialized
+
create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}'} # type: ignore
+
+ @distributed_trace_async
async def get(
self,
resource_group_name: str,
workspace_name: str,
connection_name: str,
- **kwargs
+ **kwargs: Any
) -> "_models.WorkspaceConnection":
"""Get the detail of a workspace connection.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
@@ -214,7 +214,7 @@ async def get(
:type connection_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: WorkspaceConnection, or the result of cls(response)
- :rtype: ~azure.mgmt.machinelearningservices.models.WorkspaceConnection
+ :rtype: ~azure_machine_learning_workspaces.models.WorkspaceConnection
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkspaceConnection"]
@@ -222,34 +222,24 @@ async def get(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'connectionName': self._serialize.url("connection_name", connection_name, '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')
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = build_get_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ connection_name=connection_name,
+ template_url=self.get.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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(_models.MachineLearningServiceError, response)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
deserialized = self._deserialize('WorkspaceConnection', pipeline_response)
@@ -258,18 +248,21 @@ async def get(
return cls(pipeline_response, deserialized, {})
return deserialized
+
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}'} # type: ignore
+
+ @distributed_trace_async
async def delete(
self,
resource_group_name: str,
workspace_name: str,
connection_name: str,
- **kwargs
+ **kwargs: Any
) -> None:
"""Delete a workspace connection.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
@@ -285,37 +278,28 @@ async def delete(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- accept = "application/json"
-
- # Construct URL
- url = self.delete.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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'connectionName': self._serialize.url("connection_name", connection_name, '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')
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = build_delete_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ connection_name=connection_name,
+ template_url=self.delete.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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 [200, 204]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = self._deserialize(_models.MachineLearningServiceError, response)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
if cls:
return cls(pipeline_response, None, {})
delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}'} # type: ignore
+
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_workspace_features_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_workspace_features_operations.py
index 019e736e719f..8a28b935809a 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_workspace_features_operations.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_workspace_features_operations.py
@@ -5,17 +5,22 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
+import functools
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar
import warnings
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pipeline import PipelineResponse
-from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
+from azure.core.pipeline.transport import AsyncHttpResponse
+from azure.core.rest import HttpRequest
+from azure.core.tracing.decorator import distributed_trace
+from azure.core.tracing.decorator_async import distributed_trace_async
from azure.mgmt.core.exceptions import ARMErrorFormat
from ... import models as _models
-
+from ..._vendor import _convert_request
+from ...operations._workspace_features_operations import build_list_request
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -26,7 +31,7 @@ class WorkspaceFeaturesOperations:
instantiates it for you and attaches it as an attribute.
:ivar models: Alias to model classes used in this operation group.
- :type models: ~azure.mgmt.machinelearningservices.models
+ :type models: ~azure_machine_learning_workspaces.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
@@ -41,21 +46,24 @@ def __init__(self, client, config, serializer, deserializer) -> None:
self._deserialize = deserializer
self._config = config
+ @distributed_trace
def list(
self,
resource_group_name: str,
workspace_name: str,
- **kwargs
+ **kwargs: Any
) -> AsyncIterable["_models.ListAmlUserFeatureResult"]:
"""Lists all enabled features for a workspace.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
- :return: An iterator like instance of either ListAmlUserFeatureResult or the result of cls(response)
- :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.ListAmlUserFeatureResult]
+ :return: An iterator like instance of either ListAmlUserFeatureResult or the result of
+ cls(response)
+ :rtype:
+ ~azure.core.async_paging.AsyncItemPaged[~azure_machine_learning_workspaces.models.ListAmlUserFeatureResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.ListAmlUserFeatureResult"]
@@ -63,36 +71,33 @@ def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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.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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, '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')
-
- request = self._client.get(url, query_parameters, header_parameters)
+
+ request = build_list_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ template_url=self.list.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
else:
- url = next_link
- query_parameters = {} # type: Dict[str, Any]
- request = self._client.get(url, query_parameters, header_parameters)
+
+ request = build_list_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ template_url=next_link,
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
return request
async def extract_data(pipeline_response):
- deserialized = self._deserialize('ListAmlUserFeatureResult', pipeline_response)
+ deserialized = self._deserialize("ListAmlUserFeatureResult", pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
@@ -105,12 +110,13 @@ async def get_next(next_link=None):
response = pipeline_response.http_response
if response.status_code not in [200]:
- error = self._deserialize(_models.MachineLearningServiceError, response)
map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
return pipeline_response
+
return AsyncItemPaged(
get_next, extract_data
)
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_azure_machine_learning_workspaces_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_workspace_skus_operations.py
similarity index 53%
rename from sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_azure_machine_learning_workspaces_operations.py
rename to sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_workspace_skus_operations.py
index dd37ffc498c3..a3392ca759e9 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_azure_machine_learning_workspaces_operations.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_workspace_skus_operations.py
@@ -5,31 +5,58 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
+import functools
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar
import warnings
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pipeline import PipelineResponse
-from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
+from azure.core.pipeline.transport import AsyncHttpResponse
+from azure.core.rest import HttpRequest
+from azure.core.tracing.decorator import distributed_trace
+from azure.core.tracing.decorator_async import distributed_trace_async
from azure.mgmt.core.exceptions import ARMErrorFormat
from ... import models as _models
-
+from ..._vendor import _convert_request
+from ...operations._workspace_skus_operations import build_list_request
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
-class AzureMachineLearningWorkspacesOperationsMixin:
+class WorkspaceSkusOperations:
+ """WorkspaceSkusOperations 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_machine_learning_workspaces.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
- def list_skus(
+ @distributed_trace
+ def list(
self,
- **kwargs
+ **kwargs: Any
) -> AsyncIterable["_models.SkuListResult"]:
"""Lists all skus with associated features.
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either SkuListResult or the result of cls(response)
- :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.SkuListResult]
+ :rtype:
+ ~azure.core.async_paging.AsyncItemPaged[~azure_machine_learning_workspaces.models.SkuListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuListResult"]
@@ -37,34 +64,29 @@ def list_skus(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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_skus.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')
-
- request = self._client.get(url, query_parameters, header_parameters)
+
+ request = build_list_request(
+ subscription_id=self._config.subscription_id,
+ template_url=self.list.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
else:
- url = next_link
- query_parameters = {} # type: Dict[str, Any]
- request = self._client.get(url, query_parameters, header_parameters)
+
+ request = build_list_request(
+ subscription_id=self._config.subscription_id,
+ template_url=next_link,
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
return request
async def extract_data(pipeline_response):
- deserialized = self._deserialize('SkuListResult', pipeline_response)
+ deserialized = self._deserialize("SkuListResult", pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
@@ -77,13 +99,14 @@ async def get_next(next_link=None):
response = pipeline_response.http_response
if response.status_code not in [200]:
- error = self._deserialize(_models.MachineLearningServiceError, response)
map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
return pipeline_response
+
return AsyncItemPaged(
get_next, extract_data
)
- list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces/skus'} # type: ignore
+ list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces/skus'} # type: ignore
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_workspaces_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_workspaces_operations.py
index 75d2153d645f..f2b1b62d9658 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_workspaces_operations.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/aio/operations/_workspaces_operations.py
@@ -5,19 +5,24 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
+import functools
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union
import warnings
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pipeline import PipelineResponse
-from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
+from azure.core.pipeline.transport import AsyncHttpResponse
from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod
+from azure.core.rest import HttpRequest
+from azure.core.tracing.decorator import distributed_trace
+from azure.core.tracing.decorator_async import distributed_trace_async
from azure.mgmt.core.exceptions import ARMErrorFormat
from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling
from ... import models as _models
-
+from ..._vendor import _convert_request
+from ...operations._workspaces_operations import build_create_or_update_request_initial, build_delete_request_initial, build_diagnose_request_initial, build_get_request, build_list_by_resource_group_request, build_list_by_subscription_request, build_list_keys_request, build_list_notebook_access_token_request, build_list_notebook_keys_request, build_list_outbound_network_dependencies_endpoints_request, build_list_storage_account_keys_request, build_prepare_notebook_request_initial, build_resync_keys_request_initial, build_update_request
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -28,7 +33,7 @@ class WorkspacesOperations:
instantiates it for you and attaches it as an attribute.
:ivar models: Alias to model classes used in this operation group.
- :type models: ~azure.mgmt.machinelearningservices.models
+ :type models: ~azure_machine_learning_workspaces.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
@@ -43,21 +48,22 @@ def __init__(self, client, config, serializer, deserializer) -> None:
self._deserialize = deserializer
self._config = config
+ @distributed_trace_async
async def get(
self,
resource_group_name: str,
workspace_name: str,
- **kwargs
+ **kwargs: Any
) -> "_models.Workspace":
"""Gets the properties of the specified machine learning workspace.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: Workspace, or the result of cls(response)
- :rtype: ~azure.mgmt.machinelearningservices.models.Workspace
+ :rtype: ~azure_machine_learning_workspaces.models.Workspace
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.Workspace"]
@@ -65,33 +71,23 @@ async def get(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, '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')
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = build_get_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ template_url=self.get.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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(_models.MachineLearningServiceError, response)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
deserialized = self._deserialize('Workspace', pipeline_response)
@@ -100,93 +96,88 @@ async def get(
return cls(pipeline_response, deserialized, {})
return deserialized
+
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} # type: ignore
+
async def _create_or_update_initial(
self,
resource_group_name: str,
workspace_name: str,
parameters: "_models.Workspace",
- **kwargs
+ **kwargs: Any
) -> Optional["_models.Workspace"]:
cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Workspace"]]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, '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')
+ content_type = kwargs.pop('content_type', "application/json") # type: Optional[str]
+
+ _json = self._serialize.body(parameters, 'Workspace')
- # 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')
+ request = build_create_or_update_request_initial(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ content_type=content_type,
+ json=_json,
+ template_url=self._create_or_update_initial.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- body_content_kwargs = {} # type: Dict[str, Any]
- body_content = self._serialize.body(parameters, 'Workspace')
- 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, 202]:
+ if response.status_code not in [200, 202]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = self._deserialize(_models.MachineLearningServiceError, response)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('Workspace', pipeline_response)
- if response.status_code == 201:
- deserialized = self._deserialize('Workspace', pipeline_response)
-
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
+
_create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} # type: ignore
+
+ @distributed_trace_async
async def begin_create_or_update(
self,
resource_group_name: str,
workspace_name: str,
parameters: "_models.Workspace",
- **kwargs
+ **kwargs: Any
) -> AsyncLROPoller["_models.Workspace"]:
"""Creates or updates a workspace with the specified parameters.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
:param parameters: The parameters for creating or updating a machine learning workspace.
- :type parameters: ~azure.mgmt.machinelearningservices.models.Workspace
+ :type parameters: ~azure_machine_learning_workspaces.models.Workspace
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
- :keyword polling: True for ARMPolling, False for no polling, or a
- polling object for personal polling strategy
+ :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
+ this operation to not poll, or pass in your own initialized polling object for a personal
+ polling strategy.
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
- :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
- :return: An instance of AsyncLROPoller that returns either Workspace or the result of cls(response)
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.machinelearningservices.models.Workspace]
- :raises ~azure.core.exceptions.HttpResponseError:
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of AsyncLROPoller that returns either Workspace or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure_machine_learning_workspaces.models.Workspace]
+ :raises: ~azure.core.exceptions.HttpResponseError
"""
- polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
+ content_type = kwargs.pop('content_type', "application/json") # type: Optional[str]
+ polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType["_models.Workspace"]
lro_delay = kwargs.pop(
'polling_interval',
@@ -198,27 +189,21 @@ async def begin_create_or_update(
resource_group_name=resource_group_name,
workspace_name=workspace_name,
parameters=parameters,
+ content_type=content_type,
cls=lambda x,y,z: x,
**kwargs
)
-
kwargs.pop('error_map', None)
- kwargs.pop('content_type', None)
def get_long_running_output(pipeline_response):
+ response = pipeline_response.http_response
deserialized = self._deserialize('Workspace', pipeline_response)
-
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
- 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- }
- if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
@@ -230,76 +215,70 @@ def get_long_running_output(pipeline_response):
)
else:
return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
+
begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} # type: ignore
async def _delete_initial(
self,
resource_group_name: str,
workspace_name: str,
- **kwargs
+ **kwargs: Any
) -> None:
cls = kwargs.pop('cls', None) # type: ClsType[None]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, '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')
-
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = build_delete_request_initial(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ template_url=self._delete_initial.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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 [200, 202, 204]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = self._deserialize(_models.MachineLearningServiceError, response)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
if cls:
return cls(pipeline_response, None, {})
_delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} # type: ignore
+
+ @distributed_trace_async
async def begin_delete(
self,
resource_group_name: str,
workspace_name: str,
- **kwargs
+ **kwargs: Any
) -> AsyncLROPoller[None]:
"""Deletes a machine learning workspace.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
- :keyword polling: True for ARMPolling, False for no polling, or a
- polling object for personal polling strategy
+ :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
+ this operation to not poll, or pass in your own initialized polling object for a personal
+ polling strategy.
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
- :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
+ :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:
+ :raises: ~azure.core.exceptions.HttpResponseError
"""
- polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
+ polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType[None]
lro_delay = kwargs.pop(
'polling_interval',
@@ -313,21 +292,14 @@ async def begin_delete(
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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- }
- if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
@@ -339,26 +311,28 @@ def get_long_running_output(pipeline_response):
)
else:
return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
+
begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} # type: ignore
+ @distributed_trace_async
async def update(
self,
resource_group_name: str,
workspace_name: str,
parameters: "_models.WorkspaceUpdateParameters",
- **kwargs
+ **kwargs: Any
) -> "_models.Workspace":
"""Updates a machine learning workspace with the specified parameters.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
:param parameters: The parameters for updating a machine learning workspace.
- :type parameters: ~azure.mgmt.machinelearningservices.models.WorkspaceUpdateParameters
+ :type parameters: ~azure_machine_learning_workspaces.models.WorkspaceUpdateParameters
:keyword callable cls: A custom type or function that will be passed the direct response
:return: Workspace, or the result of cls(response)
- :rtype: ~azure.mgmt.machinelearningservices.models.Workspace
+ :rtype: ~azure_machine_learning_workspaces.models.Workspace
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.Workspace"]
@@ -366,38 +340,28 @@ async def update(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, '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')
+ content_type = kwargs.pop('content_type', "application/json") # type: Optional[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')
+ _json = self._serialize.body(parameters, 'WorkspaceUpdateParameters')
+
+ request = build_update_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ content_type=content_type,
+ json=_json,
+ template_url=self.update.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- body_content_kwargs = {} # type: Dict[str, Any]
- body_content = self._serialize.body(parameters, 'WorkspaceUpdateParameters')
- 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(_models.MachineLearningServiceError, response)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
deserialized = self._deserialize('Workspace', pipeline_response)
@@ -406,23 +370,27 @@ async def update(
return cls(pipeline_response, deserialized, {})
return deserialized
+
update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} # type: ignore
+
+ @distributed_trace
def list_by_resource_group(
self,
resource_group_name: str,
- skiptoken: Optional[str] = None,
- **kwargs
+ skip: Optional[str] = None,
+ **kwargs: Any
) -> AsyncIterable["_models.WorkspaceListResult"]:
"""Lists all the available machine learning workspaces under the specified resource group.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
- :param skiptoken: Continuation token for pagination.
- :type skiptoken: str
+ :param skip: Continuation token for pagination.
+ :type skip: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either WorkspaceListResult or the result of cls(response)
- :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.WorkspaceListResult]
+ :rtype:
+ ~azure.core.async_paging.AsyncItemPaged[~azure_machine_learning_workspaces.models.WorkspaceListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkspaceListResult"]
@@ -430,37 +398,33 @@ def list_by_resource_group(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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'),
- }
- 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)
+
+ request = build_list_by_resource_group_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ skip=skip,
+ template_url=self.list_by_resource_group.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
else:
- url = next_link
- query_parameters = {} # type: Dict[str, Any]
- request = self._client.get(url, query_parameters, header_parameters)
+
+ request = build_list_by_resource_group_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ skip=skip,
+ template_url=next_link,
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
return request
async def extract_data(pipeline_response):
- deserialized = self._deserialize('WorkspaceListResult', pipeline_response)
+ deserialized = self._deserialize("WorkspaceListResult", pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
@@ -473,33 +437,165 @@ async def get_next(next_link=None):
response = pipeline_response.http_response
if response.status_code not in [200]:
- error = self._deserialize(_models.MachineLearningServiceError, response)
map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
return pipeline_response
+
return AsyncItemPaged(
get_next, extract_data
)
list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces'} # type: ignore
+ async def _diagnose_initial(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ parameters: Optional["_models.DiagnoseWorkspaceParameters"] = None,
+ **kwargs: Any
+ ) -> Optional["_models.DiagnoseResponseResult"]:
+ cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.DiagnoseResponseResult"]]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+ content_type = kwargs.pop('content_type', "application/json") # type: Optional[str]
+
+ if parameters is not None:
+ _json = self._serialize.body(parameters, 'DiagnoseWorkspaceParameters')
+ else:
+ _json = None
+
+ request = build_diagnose_request_initial(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ content_type=content_type,
+ json=_json,
+ template_url=self._diagnose_initial.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 202]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = None
+ response_headers = {}
+ if response.status_code == 200:
+ deserialized = self._deserialize('DiagnoseResponseResult', pipeline_response)
+
+ if response.status_code == 202:
+ response_headers['Location']=self._deserialize('str', response.headers.get('Location'))
+ response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After'))
+
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers)
+
+ return deserialized
+
+ _diagnose_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/diagnose'} # type: ignore
+
+
+ @distributed_trace_async
+ async def begin_diagnose(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ parameters: Optional["_models.DiagnoseWorkspaceParameters"] = None,
+ **kwargs: Any
+ ) -> AsyncLROPoller["_models.DiagnoseResponseResult"]:
+ """Diagnose workspace setup issue.
+
+ Diagnose workspace setup issue.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param workspace_name: Name of Azure Machine Learning workspace.
+ :type workspace_name: str
+ :param parameters: The parameter of diagnosing workspace health.
+ :type parameters: ~azure_machine_learning_workspaces.models.DiagnoseWorkspaceParameters
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
+ this operation to not poll, or pass in your own initialized polling object for a personal
+ polling strategy.
+ :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of AsyncLROPoller that returns either DiagnoseResponseResult or the result
+ of cls(response)
+ :rtype:
+ ~azure.core.polling.AsyncLROPoller[~azure_machine_learning_workspaces.models.DiagnoseResponseResult]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ content_type = kwargs.pop('content_type', "application/json") # type: Optional[str]
+ polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod]
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnoseResponseResult"]
+ lro_delay = kwargs.pop(
+ 'polling_interval',
+ self._config.polling_interval
+ )
+ cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
+ if cont_token is None:
+ raw_result = await self._diagnose_initial(
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ parameters=parameters,
+ content_type=content_type,
+ cls=lambda x,y,z: x,
+ **kwargs
+ )
+ kwargs.pop('error_map', None)
+
+ def get_long_running_output(pipeline_response):
+ response = pipeline_response.http_response
+ deserialized = self._deserialize('DiagnoseResponseResult', pipeline_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+ return deserialized
+
+
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs)
+ elif polling is False: polling_method = AsyncNoPolling()
+ else: polling_method = polling
+ if cont_token:
+ return AsyncLROPoller.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output
+ )
+ else:
+ return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
+
+ begin_diagnose.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/diagnose'} # type: ignore
+
+ @distributed_trace_async
async def list_keys(
self,
resource_group_name: str,
workspace_name: str,
- **kwargs
+ **kwargs: Any
) -> "_models.ListWorkspaceKeysResult":
"""Lists all the keys associated with this workspace. This includes keys for the storage account,
app insights and password for container registry.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: ListWorkspaceKeysResult, or the result of cls(response)
- :rtype: ~azure.mgmt.machinelearningservices.models.ListWorkspaceKeysResult
+ :rtype: ~azure_machine_learning_workspaces.models.ListWorkspaceKeysResult
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.ListWorkspaceKeysResult"]
@@ -507,33 +603,23 @@ async def list_keys(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, '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')
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = build_list_keys_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ template_url=self.list_keys.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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)
- error = self._deserialize(_models.MachineLearningServiceError, response)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
deserialized = self._deserialize('ListWorkspaceKeysResult', pipeline_response)
@@ -542,77 +628,121 @@ async def list_keys(
return cls(pipeline_response, deserialized, {})
return deserialized
+
list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listKeys'} # type: ignore
- async def resync_keys(
+
+ async def _resync_keys_initial(
self,
resource_group_name: str,
workspace_name: str,
- **kwargs
+ **kwargs: Any
) -> None:
- """Resync all the keys associated with this workspace. This includes keys for the storage account,
- app insights and password for container registry.
-
- :param resource_group_name: Name of the resource group in which workspace is located.
- :type resource_group_name: str
- :param workspace_name: Name of Azure Machine Learning workspace.
- :type workspace_name: str
- :keyword callable cls: A custom type or function that will be passed the direct response
- :return: None, or the result of cls(response)
- :rtype: None
- :raises: ~azure.core.exceptions.HttpResponseError
- """
cls = kwargs.pop('cls', None) # type: ClsType[None]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- accept = "application/json"
-
- # Construct URL
- url = self.resync_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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, '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')
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = build_resync_keys_request_initial(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ template_url=self._resync_keys_initial.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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]:
+ if response.status_code not in [200, 202]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = self._deserialize(_models.MachineLearningServiceError, response)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
if cls:
return cls(pipeline_response, None, {})
- resync_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys'} # type: ignore
+ _resync_keys_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys'} # type: ignore
+
+
+ @distributed_trace_async
+ async def begin_resync_keys(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs: Any
+ ) -> AsyncLROPoller[None]:
+ """Resync all the keys associated with this workspace. This includes keys for the storage account,
+ app insights and password for container registry.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param workspace_name: Name of Azure Machine Learning workspace.
+ :type workspace_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
+ this operation to not poll, or pass in your own initialized polling object for a personal
+ polling strategy.
+ :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[None]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod]
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ lro_delay = kwargs.pop(
+ 'polling_interval',
+ self._config.polling_interval
+ )
+ cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
+ if cont_token is None:
+ raw_result = await self._resync_keys_initial(
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ cls=lambda x,y,z: x,
+ **kwargs
+ )
+ kwargs.pop('error_map', None)
+
+ def get_long_running_output(pipeline_response):
+ if cls:
+ return cls(pipeline_response, None, {})
+
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
+ elif polling is False: polling_method = AsyncNoPolling()
+ else: polling_method = polling
+ if cont_token:
+ return AsyncLROPoller.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output
+ )
+ else:
+ return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
+
+ begin_resync_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys'} # type: ignore
+
+ @distributed_trace
def list_by_subscription(
self,
- skiptoken: Optional[str] = None,
- **kwargs
+ skip: Optional[str] = None,
+ **kwargs: Any
) -> AsyncIterable["_models.WorkspaceListResult"]:
"""Lists all the available machine learning workspaces under the specified subscription.
- :param skiptoken: Continuation token for pagination.
- :type skiptoken: str
+ :param skip: Continuation token for pagination.
+ :type skip: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either WorkspaceListResult or the result of cls(response)
- :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.WorkspaceListResult]
+ :rtype:
+ ~azure.core.async_paging.AsyncItemPaged[~azure_machine_learning_workspaces.models.WorkspaceListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkspaceListResult"]
@@ -620,36 +750,31 @@ def list_by_subscription(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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.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)
+
+ request = build_list_by_subscription_request(
+ subscription_id=self._config.subscription_id,
+ skip=skip,
+ template_url=self.list_by_subscription.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
else:
- url = next_link
- query_parameters = {} # type: Dict[str, Any]
- request = self._client.get(url, query_parameters, header_parameters)
+
+ request = build_list_by_subscription_request(
+ subscription_id=self._config.subscription_id,
+ skip=skip,
+ template_url=next_link,
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
return request
async def extract_data(pipeline_response):
- deserialized = self._deserialize('WorkspaceListResult', pipeline_response)
+ deserialized = self._deserialize("WorkspaceListResult", pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
@@ -662,13 +787,333 @@ async def get_next(next_link=None):
response = pipeline_response.http_response
if response.status_code not in [200]:
- error = self._deserialize(_models.MachineLearningServiceError, response)
map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
return pipeline_response
+
return AsyncItemPaged(
get_next, extract_data
)
list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces'} # type: ignore
+
+ @distributed_trace_async
+ async def list_notebook_access_token(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs: Any
+ ) -> "_models.NotebookAccessTokenResult":
+ """return notebook access token and refresh token.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param workspace_name: Name of Azure Machine Learning workspace.
+ :type workspace_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: NotebookAccessTokenResult, or the result of cls(response)
+ :rtype: ~azure_machine_learning_workspaces.models.NotebookAccessTokenResult
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.NotebookAccessTokenResult"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+
+ request = build_list_notebook_access_token_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ template_url=self.list_notebook_access_token.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('NotebookAccessTokenResult', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+
+ list_notebook_access_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookAccessToken'} # type: ignore
+
+
+ async def _prepare_notebook_initial(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs: Any
+ ) -> Optional["_models.NotebookResourceInfo"]:
+ cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.NotebookResourceInfo"]]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+
+ request = build_prepare_notebook_request_initial(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ template_url=self._prepare_notebook_initial.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 202]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('NotebookResourceInfo', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+
+ _prepare_notebook_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook'} # type: ignore
+
+
+ @distributed_trace_async
+ async def begin_prepare_notebook(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs: Any
+ ) -> AsyncLROPoller["_models.NotebookResourceInfo"]:
+ """Prepare a notebook.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param workspace_name: Name of Azure Machine Learning workspace.
+ :type workspace_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for
+ this operation to not poll, or pass in your own initialized polling object for a personal
+ polling strategy.
+ :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of AsyncLROPoller that returns either NotebookResourceInfo or the result
+ of cls(response)
+ :rtype:
+ ~azure.core.polling.AsyncLROPoller[~azure_machine_learning_workspaces.models.NotebookResourceInfo]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod]
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.NotebookResourceInfo"]
+ lro_delay = kwargs.pop(
+ 'polling_interval',
+ self._config.polling_interval
+ )
+ cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
+ if cont_token is None:
+ raw_result = await self._prepare_notebook_initial(
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ cls=lambda x,y,z: x,
+ **kwargs
+ )
+ kwargs.pop('error_map', None)
+
+ def get_long_running_output(pipeline_response):
+ response = pipeline_response.http_response
+ deserialized = self._deserialize('NotebookResourceInfo', pipeline_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+ return deserialized
+
+
+ if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs)
+ elif polling is False: polling_method = AsyncNoPolling()
+ else: polling_method = polling
+ if cont_token:
+ return AsyncLROPoller.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output
+ )
+ else:
+ return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
+
+ begin_prepare_notebook.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook'} # type: ignore
+
+ @distributed_trace_async
+ async def list_storage_account_keys(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs: Any
+ ) -> "_models.ListStorageAccountKeysResult":
+ """List storage account keys of a workspace.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param workspace_name: Name of Azure Machine Learning workspace.
+ :type workspace_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: ListStorageAccountKeysResult, or the result of cls(response)
+ :rtype: ~azure_machine_learning_workspaces.models.ListStorageAccountKeysResult
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.ListStorageAccountKeysResult"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+
+ request = build_list_storage_account_keys_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ template_url=self.list_storage_account_keys.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('ListStorageAccountKeysResult', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+
+ list_storage_account_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listStorageAccountKeys'} # type: ignore
+
+
+ @distributed_trace_async
+ async def list_notebook_keys(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs: Any
+ ) -> "_models.ListNotebookKeysResult":
+ """List keys of a notebook.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param workspace_name: Name of Azure Machine Learning workspace.
+ :type workspace_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: ListNotebookKeysResult, or the result of cls(response)
+ :rtype: ~azure_machine_learning_workspaces.models.ListNotebookKeysResult
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.ListNotebookKeysResult"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+
+ request = build_list_notebook_keys_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ template_url=self.list_notebook_keys.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('ListNotebookKeysResult', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+
+ list_notebook_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookKeys'} # type: ignore
+
+
+ @distributed_trace_async
+ async def list_outbound_network_dependencies_endpoints(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs: Any
+ ) -> "_models.ExternalFQDNResponse":
+ """Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs)
+ programmatically.
+
+ Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs)
+ programmatically.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param workspace_name: Name of Azure Machine Learning workspace.
+ :type workspace_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: ExternalFQDNResponse, or the result of cls(response)
+ :rtype: ~azure_machine_learning_workspaces.models.ExternalFQDNResponse
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.ExternalFQDNResponse"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+
+ request = build_list_outbound_network_dependencies_endpoints_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ template_url=self.list_outbound_network_dependencies_endpoints.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
+ pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('ExternalFQDNResponse', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+
+ list_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints'} # type: ignore
+
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/__init__.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/__init__.py
index 05c48b7f14c0..72441fea526f 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/__init__.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/__init__.py
@@ -6,208 +6,155 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-try:
- from ._models_py3 import AKS
- from ._models_py3 import AKSProperties
- from ._models_py3 import AksComputeSecrets
- from ._models_py3 import AksNetworkingConfiguration
- from ._models_py3 import AmlCompute
- from ._models_py3 import AmlComputeNodeInformation
- from ._models_py3 import AmlComputeNodesInformation
- from ._models_py3 import AmlComputeProperties
- from ._models_py3 import AmlUserFeature
- from ._models_py3 import ClusterUpdateParameters
- from ._models_py3 import ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties
- from ._models_py3 import Compute
- from ._models_py3 import ComputeInstance
- from ._models_py3 import ComputeInstanceApplication
- from ._models_py3 import ComputeInstanceConnectivityEndpoints
- from ._models_py3 import ComputeInstanceCreatedBy
- from ._models_py3 import ComputeInstanceLastOperation
- from ._models_py3 import ComputeInstanceProperties
- from ._models_py3 import ComputeInstanceSshSettings
- from ._models_py3 import ComputeNodesInformation
- from ._models_py3 import ComputeResource
- from ._models_py3 import ComputeSecrets
- from ._models_py3 import DataFactory
- from ._models_py3 import DataLakeAnalytics
- from ._models_py3 import DataLakeAnalyticsProperties
- from ._models_py3 import Databricks
- from ._models_py3 import DatabricksComputeSecrets
- from ._models_py3 import DatabricksProperties
- from ._models_py3 import EncryptionProperty
- from ._models_py3 import ErrorDetail
- from ._models_py3 import ErrorResponse
- from ._models_py3 import EstimatedVMPrice
- from ._models_py3 import EstimatedVMPrices
- from ._models_py3 import HDInsight
- from ._models_py3 import HDInsightProperties
- from ._models_py3 import Identity
- from ._models_py3 import KeyVaultProperties
- from ._models_py3 import ListAmlUserFeatureResult
- from ._models_py3 import ListUsagesResult
- from ._models_py3 import ListWorkspaceKeysResult
- from ._models_py3 import ListWorkspaceQuotas
- from ._models_py3 import MachineLearningServiceError
- from ._models_py3 import NodeStateCounts
- from ._models_py3 import NotebookListCredentialsResult
- from ._models_py3 import NotebookPreparationError
- from ._models_py3 import NotebookResourceInfo
- from ._models_py3 import Operation
- from ._models_py3 import OperationDisplay
- from ._models_py3 import OperationListResult
- from ._models_py3 import PaginatedComputeResourcesList
- from ._models_py3 import PaginatedWorkspaceConnectionsList
- from ._models_py3 import Password
- from ._models_py3 import PrivateEndpoint
- from ._models_py3 import PrivateEndpointConnection
- from ._models_py3 import PrivateLinkResource
- from ._models_py3 import PrivateLinkResourceListResult
- from ._models_py3 import PrivateLinkServiceConnectionState
- from ._models_py3 import QuotaBaseProperties
- from ._models_py3 import QuotaUpdateParameters
- from ._models_py3 import RegistryListCredentialsResult
- from ._models_py3 import Resource
- from ._models_py3 import ResourceId
- from ._models_py3 import ResourceName
- from ._models_py3 import ResourceQuota
- from ._models_py3 import ResourceSkuLocationInfo
- from ._models_py3 import ResourceSkuZoneDetails
- from ._models_py3 import Restriction
- from ._models_py3 import SKUCapability
- from ._models_py3 import ScaleSettings
- from ._models_py3 import ServicePrincipalCredentials
- from ._models_py3 import SharedPrivateLinkResource
- from ._models_py3 import Sku
- from ._models_py3 import SkuListResult
- from ._models_py3 import SkuSettings
- from ._models_py3 import SslConfiguration
- from ._models_py3 import SystemService
- from ._models_py3 import UpdateWorkspaceQuotas
- from ._models_py3 import UpdateWorkspaceQuotasResult
- from ._models_py3 import Usage
- from ._models_py3 import UsageName
- from ._models_py3 import UserAccountCredentials
- from ._models_py3 import VirtualMachine
- from ._models_py3 import VirtualMachineProperties
- from ._models_py3 import VirtualMachineSecrets
- from ._models_py3 import VirtualMachineSize
- from ._models_py3 import VirtualMachineSizeListResult
- from ._models_py3 import VirtualMachineSshCredentials
- from ._models_py3 import Workspace
- from ._models_py3 import WorkspaceConnection
- from ._models_py3 import WorkspaceConnectionDto
- from ._models_py3 import WorkspaceListResult
- from ._models_py3 import WorkspaceSku
- from ._models_py3 import WorkspaceUpdateParameters
-except (SyntaxError, ImportError):
- from ._models import AKS # type: ignore
- from ._models import AKSProperties # type: ignore
- from ._models import AksComputeSecrets # type: ignore
- from ._models import AksNetworkingConfiguration # type: ignore
- from ._models import AmlCompute # type: ignore
- from ._models import AmlComputeNodeInformation # type: ignore
- from ._models import AmlComputeNodesInformation # type: ignore
- from ._models import AmlComputeProperties # type: ignore
- from ._models import AmlUserFeature # type: ignore
- from ._models import ClusterUpdateParameters # type: ignore
- from ._models import ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties # type: ignore
- from ._models import Compute # type: ignore
- from ._models import ComputeInstance # type: ignore
- from ._models import ComputeInstanceApplication # type: ignore
- from ._models import ComputeInstanceConnectivityEndpoints # type: ignore
- from ._models import ComputeInstanceCreatedBy # type: ignore
- from ._models import ComputeInstanceLastOperation # type: ignore
- from ._models import ComputeInstanceProperties # type: ignore
- from ._models import ComputeInstanceSshSettings # type: ignore
- from ._models import ComputeNodesInformation # type: ignore
- from ._models import ComputeResource # type: ignore
- from ._models import ComputeSecrets # type: ignore
- from ._models import DataFactory # type: ignore
- from ._models import DataLakeAnalytics # type: ignore
- from ._models import DataLakeAnalyticsProperties # type: ignore
- from ._models import Databricks # type: ignore
- from ._models import DatabricksComputeSecrets # type: ignore
- from ._models import DatabricksProperties # type: ignore
- from ._models import EncryptionProperty # type: ignore
- from ._models import ErrorDetail # type: ignore
- from ._models import ErrorResponse # type: ignore
- from ._models import EstimatedVMPrice # type: ignore
- from ._models import EstimatedVMPrices # type: ignore
- from ._models import HDInsight # type: ignore
- from ._models import HDInsightProperties # type: ignore
- from ._models import Identity # type: ignore
- from ._models import KeyVaultProperties # type: ignore
- from ._models import ListAmlUserFeatureResult # type: ignore
- from ._models import ListUsagesResult # type: ignore
- from ._models import ListWorkspaceKeysResult # type: ignore
- from ._models import ListWorkspaceQuotas # type: ignore
- from ._models import MachineLearningServiceError # type: ignore
- from ._models import NodeStateCounts # type: ignore
- from ._models import NotebookListCredentialsResult # type: ignore
- from ._models import NotebookPreparationError # type: ignore
- from ._models import NotebookResourceInfo # type: ignore
- from ._models import Operation # type: ignore
- from ._models import OperationDisplay # type: ignore
- from ._models import OperationListResult # type: ignore
- from ._models import PaginatedComputeResourcesList # type: ignore
- from ._models import PaginatedWorkspaceConnectionsList # type: ignore
- from ._models import Password # type: ignore
- from ._models import PrivateEndpoint # type: ignore
- from ._models import PrivateEndpointConnection # type: ignore
- from ._models import PrivateLinkResource # type: ignore
- from ._models import PrivateLinkResourceListResult # type: ignore
- from ._models import PrivateLinkServiceConnectionState # type: ignore
- from ._models import QuotaBaseProperties # type: ignore
- from ._models import QuotaUpdateParameters # type: ignore
- from ._models import RegistryListCredentialsResult # type: ignore
- from ._models import Resource # type: ignore
- from ._models import ResourceId # type: ignore
- from ._models import ResourceName # type: ignore
- from ._models import ResourceQuota # type: ignore
- from ._models import ResourceSkuLocationInfo # type: ignore
- from ._models import ResourceSkuZoneDetails # type: ignore
- from ._models import Restriction # type: ignore
- from ._models import SKUCapability # type: ignore
- from ._models import ScaleSettings # type: ignore
- from ._models import ServicePrincipalCredentials # type: ignore
- from ._models import SharedPrivateLinkResource # type: ignore
- from ._models import Sku # type: ignore
- from ._models import SkuListResult # type: ignore
- from ._models import SkuSettings # type: ignore
- from ._models import SslConfiguration # type: ignore
- from ._models import SystemService # type: ignore
- from ._models import UpdateWorkspaceQuotas # type: ignore
- from ._models import UpdateWorkspaceQuotasResult # type: ignore
- from ._models import Usage # type: ignore
- from ._models import UsageName # type: ignore
- from ._models import UserAccountCredentials # type: ignore
- from ._models import VirtualMachine # type: ignore
- from ._models import VirtualMachineProperties # type: ignore
- from ._models import VirtualMachineSecrets # type: ignore
- from ._models import VirtualMachineSize # type: ignore
- from ._models import VirtualMachineSizeListResult # type: ignore
- from ._models import VirtualMachineSshCredentials # type: ignore
- from ._models import Workspace # type: ignore
- from ._models import WorkspaceConnection # type: ignore
- from ._models import WorkspaceConnectionDto # type: ignore
- from ._models import WorkspaceListResult # type: ignore
- from ._models import WorkspaceSku # type: ignore
- from ._models import WorkspaceUpdateParameters # type: ignore
+from ._models_py3 import AKS
+from ._models_py3 import AKSProperties
+from ._models_py3 import AksComputeSecrets
+from ._models_py3 import AksComputeSecretsProperties
+from ._models_py3 import AksNetworkingConfiguration
+from ._models_py3 import AmlCompute
+from ._models_py3 import AmlComputeNodeInformation
+from ._models_py3 import AmlComputeNodesInformation
+from ._models_py3 import AmlComputeProperties
+from ._models_py3 import AmlUserFeature
+from ._models_py3 import AssignedUser
+from ._models_py3 import AutoPauseProperties
+from ._models_py3 import AutoScaleProperties
+from ._models_py3 import ClusterUpdateParameters
+from ._models_py3 import Components1D3SwueSchemasComputeresourceAllof1
+from ._models_py3 import Compute
+from ._models_py3 import ComputeInstance
+from ._models_py3 import ComputeInstanceApplication
+from ._models_py3 import ComputeInstanceConnectivityEndpoints
+from ._models_py3 import ComputeInstanceCreatedBy
+from ._models_py3 import ComputeInstanceLastOperation
+from ._models_py3 import ComputeInstanceProperties
+from ._models_py3 import ComputeInstanceSshSettings
+from ._models_py3 import ComputeResource
+from ._models_py3 import ComputeSecrets
+from ._models_py3 import ContainerResourceRequirements
+from ._models_py3 import CosmosDbSettings
+from ._models_py3 import DataFactory
+from ._models_py3 import DataLakeAnalytics
+from ._models_py3 import DataLakeAnalyticsProperties
+from ._models_py3 import Databricks
+from ._models_py3 import DatabricksComputeSecrets
+from ._models_py3 import DatabricksComputeSecretsProperties
+from ._models_py3 import DatabricksProperties
+from ._models_py3 import DiagnoseRequestProperties
+from ._models_py3 import DiagnoseResponseResult
+from ._models_py3 import DiagnoseResponseResultValue
+from ._models_py3 import DiagnoseResult
+from ._models_py3 import DiagnoseWorkspaceParameters
+from ._models_py3 import EncryptionProperty
+from ._models_py3 import ErrorAdditionalInfo
+from ._models_py3 import ErrorDetail
+from ._models_py3 import ErrorResponse
+from ._models_py3 import EstimatedVMPrice
+from ._models_py3 import EstimatedVMPrices
+from ._models_py3 import ExternalFQDNResponse
+from ._models_py3 import FQDNEndpoint
+from ._models_py3 import FQDNEndpointDetail
+from ._models_py3 import FQDNEndpoints
+from ._models_py3 import FQDNEndpointsProperties
+from ._models_py3 import HDInsight
+from ._models_py3 import HDInsightProperties
+from ._models_py3 import Identity
+from ._models_py3 import IdentityForCmk
+from ._models_py3 import InstanceTypeSchema
+from ._models_py3 import InstanceTypeSchemaResources
+from ._models_py3 import KeyVaultProperties
+from ._models_py3 import Kubernetes
+from ._models_py3 import KubernetesProperties
+from ._models_py3 import KubernetesSchema
+from ._models_py3 import ListAmlUserFeatureResult
+from ._models_py3 import ListNotebookKeysResult
+from ._models_py3 import ListStorageAccountKeysResult
+from ._models_py3 import ListUsagesResult
+from ._models_py3 import ListWorkspaceKeysResult
+from ._models_py3 import ListWorkspaceQuotas
+from ._models_py3 import NodeStateCounts
+from ._models_py3 import NotebookAccessTokenResult
+from ._models_py3 import NotebookPreparationError
+from ._models_py3 import NotebookResourceInfo
+from ._models_py3 import Operation
+from ._models_py3 import OperationDisplay
+from ._models_py3 import OperationListResult
+from ._models_py3 import PaginatedComputeResourcesList
+from ._models_py3 import PaginatedWorkspaceConnectionsList
+from ._models_py3 import Password
+from ._models_py3 import PersonalComputeInstanceSettings
+from ._models_py3 import PrivateEndpoint
+from ._models_py3 import PrivateEndpointConnection
+from ._models_py3 import PrivateEndpointConnectionListResult
+from ._models_py3 import PrivateLinkResource
+from ._models_py3 import PrivateLinkResourceListResult
+from ._models_py3 import PrivateLinkServiceConnectionState
+from ._models_py3 import QuotaBaseProperties
+from ._models_py3 import QuotaUpdateParameters
+from ._models_py3 import RegistryListCredentialsResult
+from ._models_py3 import Resource
+from ._models_py3 import ResourceId
+from ._models_py3 import ResourceName
+from ._models_py3 import ResourceQuota
+from ._models_py3 import ResourceSkuLocationInfo
+from ._models_py3 import ResourceSkuZoneDetails
+from ._models_py3 import Restriction
+from ._models_py3 import SKUCapability
+from ._models_py3 import ScaleSettings
+from ._models_py3 import ScaleSettingsInformation
+from ._models_py3 import ScriptReference
+from ._models_py3 import ScriptsToExecute
+from ._models_py3 import ServiceManagedResourcesSettings
+from ._models_py3 import ServicePrincipalCredentials
+from ._models_py3 import SetupScripts
+from ._models_py3 import SharedPrivateLinkResource
+from ._models_py3 import Sku
+from ._models_py3 import SkuListResult
+from ._models_py3 import SslConfiguration
+from ._models_py3 import SynapseSpark
+from ._models_py3 import SynapseSparkProperties
+from ._models_py3 import SystemData
+from ._models_py3 import SystemService
+from ._models_py3 import UpdateWorkspaceQuotas
+from ._models_py3 import UpdateWorkspaceQuotasResult
+from ._models_py3 import Usage
+from ._models_py3 import UsageName
+from ._models_py3 import UserAccountCredentials
+from ._models_py3 import UserAssignedIdentity
+from ._models_py3 import VirtualMachine
+from ._models_py3 import VirtualMachineImage
+from ._models_py3 import VirtualMachineProperties
+from ._models_py3 import VirtualMachineSecrets
+from ._models_py3 import VirtualMachineSize
+from ._models_py3 import VirtualMachineSizeListResult
+from ._models_py3 import VirtualMachineSshCredentials
+from ._models_py3 import Workspace
+from ._models_py3 import WorkspaceConnection
+from ._models_py3 import WorkspaceListResult
+from ._models_py3 import WorkspaceSku
+from ._models_py3 import WorkspaceUpdateParameters
+
from ._azure_machine_learning_workspaces_enums import (
AllocationState,
ApplicationSharingPolicy,
BillingCurrency,
+ ClusterPurpose,
+ ComputeInstanceAuthorizationType,
ComputeInstanceState,
ComputeType,
+ CreatedByType,
+ DiagnoseResultLevel,
EncryptionStatus,
+ LoadBalancerType,
NodeState,
OperationName,
OperationStatus,
+ OsType,
PrivateEndpointConnectionProvisioningState,
PrivateEndpointServiceConnectionStatus,
ProvisioningState,
+ PublicNetworkAccess,
QuotaUnit,
ReasonCode,
RemoteLoginPortPublicAccess,
@@ -220,6 +167,7 @@
UsageUnit,
VMPriceOSType,
VMTier,
+ ValueFormat,
VmPriority,
)
@@ -227,14 +175,18 @@
'AKS',
'AKSProperties',
'AksComputeSecrets',
+ 'AksComputeSecretsProperties',
'AksNetworkingConfiguration',
'AmlCompute',
'AmlComputeNodeInformation',
'AmlComputeNodesInformation',
'AmlComputeProperties',
'AmlUserFeature',
+ 'AssignedUser',
+ 'AutoPauseProperties',
+ 'AutoScaleProperties',
'ClusterUpdateParameters',
- 'ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties',
+ 'Components1D3SwueSchemasComputeresourceAllof1',
'Compute',
'ComputeInstance',
'ComputeInstanceApplication',
@@ -243,31 +195,51 @@
'ComputeInstanceLastOperation',
'ComputeInstanceProperties',
'ComputeInstanceSshSettings',
- 'ComputeNodesInformation',
'ComputeResource',
'ComputeSecrets',
+ 'ContainerResourceRequirements',
+ 'CosmosDbSettings',
'DataFactory',
'DataLakeAnalytics',
'DataLakeAnalyticsProperties',
'Databricks',
'DatabricksComputeSecrets',
+ 'DatabricksComputeSecretsProperties',
'DatabricksProperties',
+ 'DiagnoseRequestProperties',
+ 'DiagnoseResponseResult',
+ 'DiagnoseResponseResultValue',
+ 'DiagnoseResult',
+ 'DiagnoseWorkspaceParameters',
'EncryptionProperty',
+ 'ErrorAdditionalInfo',
'ErrorDetail',
'ErrorResponse',
'EstimatedVMPrice',
'EstimatedVMPrices',
+ 'ExternalFQDNResponse',
+ 'FQDNEndpoint',
+ 'FQDNEndpointDetail',
+ 'FQDNEndpoints',
+ 'FQDNEndpointsProperties',
'HDInsight',
'HDInsightProperties',
'Identity',
+ 'IdentityForCmk',
+ 'InstanceTypeSchema',
+ 'InstanceTypeSchemaResources',
'KeyVaultProperties',
+ 'Kubernetes',
+ 'KubernetesProperties',
+ 'KubernetesSchema',
'ListAmlUserFeatureResult',
+ 'ListNotebookKeysResult',
+ 'ListStorageAccountKeysResult',
'ListUsagesResult',
'ListWorkspaceKeysResult',
'ListWorkspaceQuotas',
- 'MachineLearningServiceError',
'NodeStateCounts',
- 'NotebookListCredentialsResult',
+ 'NotebookAccessTokenResult',
'NotebookPreparationError',
'NotebookResourceInfo',
'Operation',
@@ -276,8 +248,10 @@
'PaginatedComputeResourcesList',
'PaginatedWorkspaceConnectionsList',
'Password',
+ 'PersonalComputeInstanceSettings',
'PrivateEndpoint',
'PrivateEndpointConnection',
+ 'PrivateEndpointConnectionListResult',
'PrivateLinkResource',
'PrivateLinkResourceListResult',
'PrivateLinkServiceConnectionState',
@@ -293,19 +267,28 @@
'Restriction',
'SKUCapability',
'ScaleSettings',
+ 'ScaleSettingsInformation',
+ 'ScriptReference',
+ 'ScriptsToExecute',
+ 'ServiceManagedResourcesSettings',
'ServicePrincipalCredentials',
+ 'SetupScripts',
'SharedPrivateLinkResource',
'Sku',
'SkuListResult',
- 'SkuSettings',
'SslConfiguration',
+ 'SynapseSpark',
+ 'SynapseSparkProperties',
+ 'SystemData',
'SystemService',
'UpdateWorkspaceQuotas',
'UpdateWorkspaceQuotasResult',
'Usage',
'UsageName',
'UserAccountCredentials',
+ 'UserAssignedIdentity',
'VirtualMachine',
+ 'VirtualMachineImage',
'VirtualMachineProperties',
'VirtualMachineSecrets',
'VirtualMachineSize',
@@ -313,22 +296,28 @@
'VirtualMachineSshCredentials',
'Workspace',
'WorkspaceConnection',
- 'WorkspaceConnectionDto',
'WorkspaceListResult',
'WorkspaceSku',
'WorkspaceUpdateParameters',
'AllocationState',
'ApplicationSharingPolicy',
'BillingCurrency',
+ 'ClusterPurpose',
+ 'ComputeInstanceAuthorizationType',
'ComputeInstanceState',
'ComputeType',
+ 'CreatedByType',
+ 'DiagnoseResultLevel',
'EncryptionStatus',
+ 'LoadBalancerType',
'NodeState',
'OperationName',
'OperationStatus',
+ 'OsType',
'PrivateEndpointConnectionProvisioningState',
'PrivateEndpointServiceConnectionStatus',
'ProvisioningState',
+ 'PublicNetworkAccess',
'QuotaUnit',
'ReasonCode',
'RemoteLoginPortPublicAccess',
@@ -341,5 +330,6 @@
'UsageUnit',
'VMPriceOSType',
'VMTier',
+ 'ValueFormat',
'VmPriority',
]
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_azure_machine_learning_workspaces_enums.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_azure_machine_learning_workspaces_enums.py
index efe5686a0c99..0e9cffb9cf17 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_azure_machine_learning_workspaces_enums.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_azure_machine_learning_workspaces_enums.py
@@ -6,27 +6,12 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-from enum import Enum, EnumMeta
+from enum import Enum
from six import with_metaclass
+from azure.core import CaseInsensitiveEnumMeta
-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 AllocationState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+class AllocationState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
"""Allocation state of the compute. Possible values are: steady - Indicates that the compute is
not resizing. There are no changes to the number of compute nodes in the compute in progress. A
compute enters this state when it is created and when no operations are being performed on the
@@ -37,7 +22,7 @@ class AllocationState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
STEADY = "Steady"
RESIZING = "Resizing"
-class ApplicationSharingPolicy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+class ApplicationSharingPolicy(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
"""Policy for sharing applications on this compute instance among users of parent workspace. If
Personal, only the creator can access applications on this compute instance. When Shared, any
workspace user can access applications on this instance depending on his/her assigned role.
@@ -46,14 +31,28 @@ class ApplicationSharingPolicy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enu
PERSONAL = "Personal"
SHARED = "Shared"
-class BillingCurrency(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+class BillingCurrency(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
"""Three lettered code specifying the currency of the VM price. Example: USD
"""
USD = "USD"
-class ComputeInstanceState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
- """Current state of a ComputeInstance.
+class ClusterPurpose(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
+ """Intended usage of the cluster
+ """
+
+ FAST_PROD = "FastProd"
+ DENSE_PROD = "DenseProd"
+ DEV_TEST = "DevTest"
+
+class ComputeInstanceAuthorizationType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
+ """The Compute Instance Authorization type. Available values are personal (default).
+ """
+
+ PERSONAL = "personal"
+
+class ComputeInstanceState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
+ """Current state of an ComputeInstance.
"""
CREATING = "Creating"
@@ -72,11 +71,12 @@ class ComputeInstanceState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
UNKNOWN = "Unknown"
UNUSABLE = "Unusable"
-class ComputeType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+class ComputeType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
"""The type of compute
"""
AKS = "AKS"
+ KUBERNETES = "Kubernetes"
AML_COMPUTE = "AmlCompute"
COMPUTE_INSTANCE = "ComputeInstance"
DATA_FACTORY = "DataFactory"
@@ -84,15 +84,40 @@ class ComputeType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
HD_INSIGHT = "HDInsight"
DATABRICKS = "Databricks"
DATA_LAKE_ANALYTICS = "DataLakeAnalytics"
+ SYNAPSE_SPARK = "SynapseSpark"
-class EncryptionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+class CreatedByType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
+ """The type of identity that created the resource.
+ """
+
+ USER = "User"
+ APPLICATION = "Application"
+ MANAGED_IDENTITY = "ManagedIdentity"
+ KEY = "Key"
+
+class DiagnoseResultLevel(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
+ """Level of workspace setup error
+ """
+
+ WARNING = "Warning"
+ ERROR = "Error"
+ INFORMATION = "Information"
+
+class EncryptionStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
"""Indicates whether or not the encryption is enabled for the workspace.
"""
ENABLED = "Enabled"
DISABLED = "Disabled"
-class NodeState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+class LoadBalancerType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
+ """Load Balancer Type
+ """
+
+ PUBLIC_IP = "PublicIp"
+ INTERNAL_LOAD_BALANCER = "InternalLoadBalancer"
+
+class NodeState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
"""State of the compute node. Values are idle, running, preparing, unusable, leaving and
preempted.
"""
@@ -104,7 +129,7 @@ class NodeState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
LEAVING = "leaving"
PREEMPTED = "preempted"
-class OperationName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+class OperationName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
"""Name of the last operation.
"""
@@ -115,7 +140,7 @@ class OperationName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
REIMAGE = "Reimage"
DELETE = "Delete"
-class OperationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+class OperationStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
"""Operation status.
"""
@@ -128,7 +153,14 @@ class OperationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
REIMAGE_FAILED = "ReimageFailed"
DELETE_FAILED = "DeleteFailed"
-class PrivateEndpointConnectionProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+class OsType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
+ """Compute OS Type
+ """
+
+ LINUX = "Linux"
+ WINDOWS = "Windows"
+
+class PrivateEndpointConnectionProvisioningState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
"""The current provisioning state.
"""
@@ -137,7 +169,7 @@ class PrivateEndpointConnectionProvisioningState(with_metaclass(_CaseInsensitive
DELETING = "Deleting"
FAILED = "Failed"
-class PrivateEndpointServiceConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+class PrivateEndpointServiceConnectionStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
"""The private endpoint connection status.
"""
@@ -147,7 +179,7 @@ class PrivateEndpointServiceConnectionStatus(with_metaclass(_CaseInsensitiveEnum
DISCONNECTED = "Disconnected"
TIMEOUT = "Timeout"
-class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+class ProvisioningState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
"""The current deployment state of workspace resource. The provisioningState is to indicate states
for resource provisioning.
"""
@@ -160,13 +192,20 @@ class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
FAILED = "Failed"
CANCELED = "Canceled"
-class QuotaUnit(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+class PublicNetworkAccess(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
+ """Whether requests from Public Network are allowed.
+ """
+
+ ENABLED = "Enabled"
+ DISABLED = "Disabled"
+
+class QuotaUnit(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
"""An enum describing the unit of quota measurement.
"""
COUNT = "Count"
-class ReasonCode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+class ReasonCode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
"""The reason for the restriction.
"""
@@ -174,7 +213,7 @@ class ReasonCode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
NOT_AVAILABLE_FOR_REGION = "NotAvailableForRegion"
NOT_AVAILABLE_FOR_SUBSCRIPTION = "NotAvailableForSubscription"
-class RemoteLoginPortPublicAccess(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+class RemoteLoginPortPublicAccess(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
"""State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh
port is closed on all nodes of the cluster. Enabled - Indicates that the public ssh port is
open on all nodes of the cluster. NotSpecified - Indicates that the public ssh port is closed
@@ -187,16 +226,16 @@ class RemoteLoginPortPublicAccess(with_metaclass(_CaseInsensitiveEnumMeta, str,
DISABLED = "Disabled"
NOT_SPECIFIED = "NotSpecified"
-class ResourceIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+class ResourceIdentityType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
"""The identity type.
"""
SYSTEM_ASSIGNED = "SystemAssigned"
- USER_ASSIGNED = "UserAssigned"
SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned,UserAssigned"
+ USER_ASSIGNED = "UserAssigned"
NONE = "None"
-class SshPublicAccess(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+class SshPublicAccess(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
"""State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh
port is closed on this instance. Enabled - Indicates that the public ssh port is open and
accessible according to the VNet/subnet policy if applicable.
@@ -205,14 +244,15 @@ class SshPublicAccess(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
ENABLED = "Enabled"
DISABLED = "Disabled"
-class SslConfigurationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+class SslConfigurationStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
"""Enable or disable ssl for scoring
"""
DISABLED = "Disabled"
ENABLED = "Enabled"
+ AUTO = "Auto"
-class Status(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+class Status(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
"""Status of update workspace quota.
"""
@@ -225,38 +265,44 @@ class Status(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
OPERATION_NOT_SUPPORTED_FOR_SKU = "OperationNotSupportedForSku"
OPERATION_NOT_ENABLED_FOR_REGION = "OperationNotEnabledForRegion"
-class UnderlyingResourceAction(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+class UnderlyingResourceAction(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
DELETE = "Delete"
DETACH = "Detach"
-class UnitOfMeasure(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+class UnitOfMeasure(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
"""The unit of time measurement for the specified VM price. Example: OneHour
"""
ONE_HOUR = "OneHour"
-class UsageUnit(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+class UsageUnit(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
"""An enum describing the unit of usage measurement.
"""
COUNT = "Count"
-class VMPriceOSType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+class ValueFormat(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
+ """format for the workspace connection value
+ """
+
+ JSON = "JSON"
+
+class VMPriceOSType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
"""Operating system type used by the VM.
"""
LINUX = "Linux"
WINDOWS = "Windows"
-class VmPriority(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+class VmPriority(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
"""Virtual Machine priority
"""
DEDICATED = "Dedicated"
LOW_PRIORITY = "LowPriority"
-class VMTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
+class VMTier(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)):
"""The type of the VM.
"""
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_models.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_models.py
deleted file mode 100644
index d95b81b6554e..000000000000
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_models.py
+++ /dev/null
@@ -1,3667 +0,0 @@
-# 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 Compute(msrest.serialization.Model):
- """Machine Learning compute object.
-
- You probably want to use the sub-classes and not this class directly. Known
- sub-classes are: AKS, AmlCompute, ComputeInstance, DataFactory, DataLakeAnalytics, Databricks, HDInsight, VirtualMachine.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- All required parameters must be populated in order to send to Azure.
-
- :param compute_type: Required. The type of compute.Constant filled by server. Possible values
- include: "AKS", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", "HDInsight",
- "Databricks", "DataLakeAnalytics".
- :type compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType
- :param compute_location: Location for the underlying compute.
- :type compute_location: str
- :ivar provisioning_state: The provision state of the cluster. Valid values are Unknown,
- Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating",
- "Creating", "Deleting", "Succeeded", "Failed", "Canceled".
- :vartype provisioning_state: str or
- ~azure.mgmt.machinelearningservices.models.ProvisioningState
- :param description: The description of the Machine Learning compute.
- :type description: str
- :ivar created_on: The date and time when the compute was created.
- :vartype created_on: ~datetime.datetime
- :ivar modified_on: The date and time when the compute was last modified.
- :vartype modified_on: ~datetime.datetime
- :param resource_id: ARM resource id of the underlying compute.
- :type resource_id: str
- :ivar provisioning_errors: Errors during provisioning.
- :vartype provisioning_errors:
- list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError]
- :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought
- from outside if true, or machine learning service provisioned it if false.
- :vartype is_attached_compute: bool
- """
-
- _validation = {
- 'compute_type': {'required': True},
- 'provisioning_state': {'readonly': True},
- 'created_on': {'readonly': True},
- 'modified_on': {'readonly': True},
- 'provisioning_errors': {'readonly': True},
- 'is_attached_compute': {'readonly': True},
- }
-
- _attribute_map = {
- 'compute_type': {'key': 'computeType', 'type': 'str'},
- 'compute_location': {'key': 'computeLocation', 'type': 'str'},
- 'provisioning_state': {'key': 'provisioningState', 'type': 'str'},
- 'description': {'key': 'description', 'type': 'str'},
- 'created_on': {'key': 'createdOn', 'type': 'iso-8601'},
- 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'},
- 'resource_id': {'key': 'resourceId', 'type': 'str'},
- 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'},
- 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'},
- }
-
- _subtype_map = {
- 'compute_type': {'AKS': 'AKS', 'AmlCompute': 'AmlCompute', 'ComputeInstance': 'ComputeInstance', 'DataFactory': 'DataFactory', 'DataLakeAnalytics': 'DataLakeAnalytics', 'Databricks': 'Databricks', 'HDInsight': 'HDInsight', 'VirtualMachine': 'VirtualMachine'}
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(Compute, self).__init__(**kwargs)
- self.compute_type = None # type: Optional[str]
- self.compute_location = kwargs.get('compute_location', None)
- self.provisioning_state = None
- self.description = kwargs.get('description', None)
- self.created_on = None
- self.modified_on = None
- self.resource_id = kwargs.get('resource_id', None)
- self.provisioning_errors = None
- self.is_attached_compute = None
-
-
-class AKS(Compute):
- """A Machine Learning compute based on AKS.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- All required parameters must be populated in order to send to Azure.
-
- :param compute_type: Required. The type of compute.Constant filled by server. Possible values
- include: "AKS", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", "HDInsight",
- "Databricks", "DataLakeAnalytics".
- :type compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType
- :param compute_location: Location for the underlying compute.
- :type compute_location: str
- :ivar provisioning_state: The provision state of the cluster. Valid values are Unknown,
- Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating",
- "Creating", "Deleting", "Succeeded", "Failed", "Canceled".
- :vartype provisioning_state: str or
- ~azure.mgmt.machinelearningservices.models.ProvisioningState
- :param description: The description of the Machine Learning compute.
- :type description: str
- :ivar created_on: The date and time when the compute was created.
- :vartype created_on: ~datetime.datetime
- :ivar modified_on: The date and time when the compute was last modified.
- :vartype modified_on: ~datetime.datetime
- :param resource_id: ARM resource id of the underlying compute.
- :type resource_id: str
- :ivar provisioning_errors: Errors during provisioning.
- :vartype provisioning_errors:
- list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError]
- :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought
- from outside if true, or machine learning service provisioned it if false.
- :vartype is_attached_compute: bool
- :param properties: AKS properties.
- :type properties: ~azure.mgmt.machinelearningservices.models.AKSProperties
- """
-
- _validation = {
- 'compute_type': {'required': True},
- 'provisioning_state': {'readonly': True},
- 'created_on': {'readonly': True},
- 'modified_on': {'readonly': True},
- 'provisioning_errors': {'readonly': True},
- 'is_attached_compute': {'readonly': True},
- }
-
- _attribute_map = {
- 'compute_type': {'key': 'computeType', 'type': 'str'},
- 'compute_location': {'key': 'computeLocation', 'type': 'str'},
- 'provisioning_state': {'key': 'provisioningState', 'type': 'str'},
- 'description': {'key': 'description', 'type': 'str'},
- 'created_on': {'key': 'createdOn', 'type': 'iso-8601'},
- 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'},
- 'resource_id': {'key': 'resourceId', 'type': 'str'},
- 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'},
- 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'},
- 'properties': {'key': 'properties', 'type': 'AKSProperties'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(AKS, self).__init__(**kwargs)
- self.compute_type = 'AKS' # type: str
- self.properties = kwargs.get('properties', None)
-
-
-class ComputeSecrets(msrest.serialization.Model):
- """Secrets related to a Machine Learning compute. Might differ for every type of compute.
-
- You probably want to use the sub-classes and not this class directly. Known
- sub-classes are: AksComputeSecrets, DatabricksComputeSecrets, VirtualMachineSecrets.
-
- All required parameters must be populated in order to send to Azure.
-
- :param compute_type: Required. The type of compute.Constant filled by server. Possible values
- include: "AKS", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", "HDInsight",
- "Databricks", "DataLakeAnalytics".
- :type compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType
- """
-
- _validation = {
- 'compute_type': {'required': True},
- }
-
- _attribute_map = {
- 'compute_type': {'key': 'computeType', 'type': 'str'},
- }
-
- _subtype_map = {
- 'compute_type': {'AKS': 'AksComputeSecrets', 'Databricks': 'DatabricksComputeSecrets', 'VirtualMachine': 'VirtualMachineSecrets'}
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(ComputeSecrets, self).__init__(**kwargs)
- self.compute_type = None # type: Optional[str]
-
-
-class AksComputeSecrets(ComputeSecrets):
- """Secrets related to a Machine Learning compute based on AKS.
-
- All required parameters must be populated in order to send to Azure.
-
- :param compute_type: Required. The type of compute.Constant filled by server. Possible values
- include: "AKS", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", "HDInsight",
- "Databricks", "DataLakeAnalytics".
- :type compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType
- :param user_kube_config: Content of kubeconfig file that can be used to connect to the
- Kubernetes cluster.
- :type user_kube_config: str
- :param admin_kube_config: Content of kubeconfig file that can be used to connect to the
- Kubernetes cluster.
- :type admin_kube_config: str
- :param image_pull_secret_name: Image registry pull secret.
- :type image_pull_secret_name: str
- """
-
- _validation = {
- 'compute_type': {'required': True},
- }
-
- _attribute_map = {
- 'compute_type': {'key': 'computeType', 'type': 'str'},
- 'user_kube_config': {'key': 'userKubeConfig', 'type': 'str'},
- 'admin_kube_config': {'key': 'adminKubeConfig', 'type': 'str'},
- 'image_pull_secret_name': {'key': 'imagePullSecretName', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(AksComputeSecrets, self).__init__(**kwargs)
- self.compute_type = 'AKS' # type: str
- self.user_kube_config = kwargs.get('user_kube_config', None)
- self.admin_kube_config = kwargs.get('admin_kube_config', None)
- self.image_pull_secret_name = kwargs.get('image_pull_secret_name', None)
-
-
-class AksNetworkingConfiguration(msrest.serialization.Model):
- """Advance configuration for AKS networking.
-
- :param subnet_id: Virtual network subnet resource ID the compute nodes belong to.
- :type subnet_id: str
- :param service_cidr: A CIDR notation IP range from which to assign service cluster IPs. It must
- not overlap with any Subnet IP ranges.
- :type service_cidr: str
- :param dns_service_ip: An IP address assigned to the Kubernetes DNS service. It must be within
- the Kubernetes service address range specified in serviceCidr.
- :type dns_service_ip: str
- :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker bridge network. It
- must not overlap with any Subnet IP ranges or the Kubernetes service address range.
- :type docker_bridge_cidr: str
- """
-
- _validation = {
- 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'},
- 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'},
- 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'},
- }
-
- _attribute_map = {
- 'subnet_id': {'key': 'subnetId', 'type': 'str'},
- 'service_cidr': {'key': 'serviceCidr', 'type': 'str'},
- 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'},
- 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(AksNetworkingConfiguration, self).__init__(**kwargs)
- self.subnet_id = kwargs.get('subnet_id', None)
- self.service_cidr = kwargs.get('service_cidr', None)
- self.dns_service_ip = kwargs.get('dns_service_ip', None)
- self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', None)
-
-
-class AKSProperties(msrest.serialization.Model):
- """AKS properties.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :param cluster_fqdn: Cluster full qualified domain name.
- :type cluster_fqdn: str
- :ivar system_services: System services.
- :vartype system_services: list[~azure.mgmt.machinelearningservices.models.SystemService]
- :param agent_count: Number of agents.
- :type agent_count: int
- :param agent_vm_size: Agent virtual machine size.
- :type agent_vm_size: str
- :param ssl_configuration: SSL configuration.
- :type ssl_configuration: ~azure.mgmt.machinelearningservices.models.SslConfiguration
- :param aks_networking_configuration: AKS networking configuration for vnet.
- :type aks_networking_configuration:
- ~azure.mgmt.machinelearningservices.models.AksNetworkingConfiguration
- """
-
- _validation = {
- 'system_services': {'readonly': True},
- 'agent_count': {'minimum': 1},
- }
-
- _attribute_map = {
- 'cluster_fqdn': {'key': 'clusterFqdn', 'type': 'str'},
- 'system_services': {'key': 'systemServices', 'type': '[SystemService]'},
- 'agent_count': {'key': 'agentCount', 'type': 'int'},
- 'agent_vm_size': {'key': 'agentVMSize', 'type': 'str'},
- 'ssl_configuration': {'key': 'sslConfiguration', 'type': 'SslConfiguration'},
- 'aks_networking_configuration': {'key': 'aksNetworkingConfiguration', 'type': 'AksNetworkingConfiguration'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(AKSProperties, self).__init__(**kwargs)
- self.cluster_fqdn = kwargs.get('cluster_fqdn', None)
- self.system_services = None
- self.agent_count = kwargs.get('agent_count', None)
- self.agent_vm_size = kwargs.get('agent_vm_size', None)
- self.ssl_configuration = kwargs.get('ssl_configuration', None)
- self.aks_networking_configuration = kwargs.get('aks_networking_configuration', None)
-
-
-class AmlCompute(Compute):
- """An Azure Machine Learning compute.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- All required parameters must be populated in order to send to Azure.
-
- :param compute_type: Required. The type of compute.Constant filled by server. Possible values
- include: "AKS", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", "HDInsight",
- "Databricks", "DataLakeAnalytics".
- :type compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType
- :param compute_location: Location for the underlying compute.
- :type compute_location: str
- :ivar provisioning_state: The provision state of the cluster. Valid values are Unknown,
- Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating",
- "Creating", "Deleting", "Succeeded", "Failed", "Canceled".
- :vartype provisioning_state: str or
- ~azure.mgmt.machinelearningservices.models.ProvisioningState
- :param description: The description of the Machine Learning compute.
- :type description: str
- :ivar created_on: The date and time when the compute was created.
- :vartype created_on: ~datetime.datetime
- :ivar modified_on: The date and time when the compute was last modified.
- :vartype modified_on: ~datetime.datetime
- :param resource_id: ARM resource id of the underlying compute.
- :type resource_id: str
- :ivar provisioning_errors: Errors during provisioning.
- :vartype provisioning_errors:
- list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError]
- :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought
- from outside if true, or machine learning service provisioned it if false.
- :vartype is_attached_compute: bool
- :param properties: AML Compute properties.
- :type properties: ~azure.mgmt.machinelearningservices.models.AmlComputeProperties
- """
-
- _validation = {
- 'compute_type': {'required': True},
- 'provisioning_state': {'readonly': True},
- 'created_on': {'readonly': True},
- 'modified_on': {'readonly': True},
- 'provisioning_errors': {'readonly': True},
- 'is_attached_compute': {'readonly': True},
- }
-
- _attribute_map = {
- 'compute_type': {'key': 'computeType', 'type': 'str'},
- 'compute_location': {'key': 'computeLocation', 'type': 'str'},
- 'provisioning_state': {'key': 'provisioningState', 'type': 'str'},
- 'description': {'key': 'description', 'type': 'str'},
- 'created_on': {'key': 'createdOn', 'type': 'iso-8601'},
- 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'},
- 'resource_id': {'key': 'resourceId', 'type': 'str'},
- 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'},
- 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'},
- 'properties': {'key': 'properties', 'type': 'AmlComputeProperties'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(AmlCompute, self).__init__(**kwargs)
- self.compute_type = 'AmlCompute' # type: str
- self.properties = kwargs.get('properties', None)
-
-
-class AmlComputeNodeInformation(msrest.serialization.Model):
- """Compute node information related to a AmlCompute.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :ivar node_id: ID of the compute node.
- :vartype node_id: str
- :ivar private_ip_address: Private IP address of the compute node.
- :vartype private_ip_address: str
- :ivar public_ip_address: Public IP address of the compute node.
- :vartype public_ip_address: str
- :ivar port: SSH port number of the node.
- :vartype port: int
- :ivar node_state: State of the compute node. Values are idle, running, preparing, unusable,
- leaving and preempted. Possible values include: "idle", "running", "preparing", "unusable",
- "leaving", "preempted".
- :vartype node_state: str or ~azure.mgmt.machinelearningservices.models.NodeState
- :ivar run_id: ID of the Experiment running on the node, if any else null.
- :vartype run_id: str
- """
-
- _validation = {
- 'node_id': {'readonly': True},
- 'private_ip_address': {'readonly': True},
- 'public_ip_address': {'readonly': True},
- 'port': {'readonly': True},
- 'node_state': {'readonly': True},
- 'run_id': {'readonly': True},
- }
-
- _attribute_map = {
- 'node_id': {'key': 'nodeId', 'type': 'str'},
- 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'},
- 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'},
- 'port': {'key': 'port', 'type': 'int'},
- 'node_state': {'key': 'nodeState', 'type': 'str'},
- 'run_id': {'key': 'runId', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(AmlComputeNodeInformation, self).__init__(**kwargs)
- self.node_id = None
- self.private_ip_address = None
- self.public_ip_address = None
- self.port = None
- self.node_state = None
- self.run_id = None
-
-
-class ComputeNodesInformation(msrest.serialization.Model):
- """Compute nodes information related to a Machine Learning compute. Might differ for every type of compute.
-
- You probably want to use the sub-classes and not this class directly. Known
- sub-classes are: AmlComputeNodesInformation.
-
- 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 compute_type: Required. The type of compute.Constant filled by server. Possible values
- include: "AKS", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", "HDInsight",
- "Databricks", "DataLakeAnalytics".
- :type compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType
- :ivar next_link: The continuation token.
- :vartype next_link: str
- """
-
- _validation = {
- 'compute_type': {'required': True},
- 'next_link': {'readonly': True},
- }
-
- _attribute_map = {
- 'compute_type': {'key': 'computeType', 'type': 'str'},
- 'next_link': {'key': 'nextLink', 'type': 'str'},
- }
-
- _subtype_map = {
- 'compute_type': {'AmlCompute': 'AmlComputeNodesInformation'}
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(ComputeNodesInformation, self).__init__(**kwargs)
- self.compute_type = None # type: Optional[str]
- self.next_link = None
-
-
-class AmlComputeNodesInformation(ComputeNodesInformation):
- """Compute node information related to a AmlCompute.
-
- 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 compute_type: Required. The type of compute.Constant filled by server. Possible values
- include: "AKS", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", "HDInsight",
- "Databricks", "DataLakeAnalytics".
- :type compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType
- :ivar next_link: The continuation token.
- :vartype next_link: str
- :ivar nodes: The collection of returned AmlCompute nodes details.
- :vartype nodes: list[~azure.mgmt.machinelearningservices.models.AmlComputeNodeInformation]
- """
-
- _validation = {
- 'compute_type': {'required': True},
- 'next_link': {'readonly': True},
- 'nodes': {'readonly': True},
- }
-
- _attribute_map = {
- 'compute_type': {'key': 'computeType', 'type': 'str'},
- 'next_link': {'key': 'nextLink', 'type': 'str'},
- 'nodes': {'key': 'nodes', 'type': '[AmlComputeNodeInformation]'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(AmlComputeNodesInformation, self).__init__(**kwargs)
- self.compute_type = 'AmlCompute' # type: str
- self.nodes = None
-
-
-class AmlComputeProperties(msrest.serialization.Model):
- """AML Compute properties.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :param vm_size: Virtual Machine Size.
- :type vm_size: str
- :param vm_priority: Virtual Machine priority. Possible values include: "Dedicated",
- "LowPriority".
- :type vm_priority: str or ~azure.mgmt.machinelearningservices.models.VmPriority
- :param scale_settings: Scale settings for AML Compute.
- :type scale_settings: ~azure.mgmt.machinelearningservices.models.ScaleSettings
- :param user_account_credentials: Credentials for an administrator user account that will be
- created on each compute node.
- :type user_account_credentials:
- ~azure.mgmt.machinelearningservices.models.UserAccountCredentials
- :param subnet: Virtual network subnet resource ID the compute nodes belong to.
- :type subnet: ~azure.mgmt.machinelearningservices.models.ResourceId
- :param remote_login_port_public_access: State of the public SSH port. Possible values are:
- Disabled - Indicates that the public ssh port is closed on all nodes of the cluster. Enabled -
- Indicates that the public ssh port is open on all nodes of the cluster. NotSpecified -
- Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined,
- else is open all public nodes. It can be default only during cluster creation time, after
- creation it will be either enabled or disabled. Possible values include: "Enabled", "Disabled",
- "NotSpecified". Default value: "NotSpecified".
- :type remote_login_port_public_access: str or
- ~azure.mgmt.machinelearningservices.models.RemoteLoginPortPublicAccess
- :ivar allocation_state: Allocation state of the compute. Possible values are: steady -
- Indicates that the compute is not resizing. There are no changes to the number of compute nodes
- in the compute in progress. A compute enters this state when it is created and when no
- operations are being performed on the compute to change the number of compute nodes. resizing -
- Indicates that the compute is resizing; that is, compute nodes are being added to or removed
- from the compute. Possible values include: "Steady", "Resizing".
- :vartype allocation_state: str or ~azure.mgmt.machinelearningservices.models.AllocationState
- :ivar allocation_state_transition_time: The time at which the compute entered its current
- allocation state.
- :vartype allocation_state_transition_time: ~datetime.datetime
- :ivar errors: Collection of errors encountered by various compute nodes during node setup.
- :vartype errors: list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError]
- :ivar current_node_count: The number of compute nodes currently assigned to the compute.
- :vartype current_node_count: int
- :ivar target_node_count: The target number of compute nodes for the compute. If the
- allocationState is resizing, this property denotes the target node count for the ongoing resize
- operation. If the allocationState is steady, this property denotes the target node count for
- the previous resize operation.
- :vartype target_node_count: int
- :ivar node_state_counts: Counts of various node states on the compute.
- :vartype node_state_counts: ~azure.mgmt.machinelearningservices.models.NodeStateCounts
- """
-
- _validation = {
- 'allocation_state': {'readonly': True},
- 'allocation_state_transition_time': {'readonly': True},
- 'errors': {'readonly': True},
- 'current_node_count': {'readonly': True},
- 'target_node_count': {'readonly': True},
- 'node_state_counts': {'readonly': True},
- }
-
- _attribute_map = {
- 'vm_size': {'key': 'vmSize', 'type': 'str'},
- 'vm_priority': {'key': 'vmPriority', 'type': 'str'},
- 'scale_settings': {'key': 'scaleSettings', 'type': 'ScaleSettings'},
- 'user_account_credentials': {'key': 'userAccountCredentials', 'type': 'UserAccountCredentials'},
- 'subnet': {'key': 'subnet', 'type': 'ResourceId'},
- 'remote_login_port_public_access': {'key': 'remoteLoginPortPublicAccess', 'type': 'str'},
- 'allocation_state': {'key': 'allocationState', 'type': 'str'},
- 'allocation_state_transition_time': {'key': 'allocationStateTransitionTime', 'type': 'iso-8601'},
- 'errors': {'key': 'errors', 'type': '[MachineLearningServiceError]'},
- 'current_node_count': {'key': 'currentNodeCount', 'type': 'int'},
- 'target_node_count': {'key': 'targetNodeCount', 'type': 'int'},
- 'node_state_counts': {'key': 'nodeStateCounts', 'type': 'NodeStateCounts'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(AmlComputeProperties, self).__init__(**kwargs)
- self.vm_size = kwargs.get('vm_size', None)
- self.vm_priority = kwargs.get('vm_priority', None)
- self.scale_settings = kwargs.get('scale_settings', None)
- self.user_account_credentials = kwargs.get('user_account_credentials', None)
- self.subnet = kwargs.get('subnet', None)
- self.remote_login_port_public_access = kwargs.get('remote_login_port_public_access', "NotSpecified")
- self.allocation_state = None
- self.allocation_state_transition_time = None
- self.errors = None
- self.current_node_count = None
- self.target_node_count = None
- self.node_state_counts = None
-
-
-class AmlUserFeature(msrest.serialization.Model):
- """Features enabled for a workspace.
-
- :param id: Specifies the feature ID.
- :type id: str
- :param display_name: Specifies the feature name.
- :type display_name: str
- :param description: Describes the feature for user experience.
- :type description: str
- """
-
- _attribute_map = {
- 'id': {'key': 'id', 'type': 'str'},
- 'display_name': {'key': 'displayName', 'type': 'str'},
- 'description': {'key': 'description', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(AmlUserFeature, self).__init__(**kwargs)
- self.id = kwargs.get('id', None)
- self.display_name = kwargs.get('display_name', None)
- self.description = kwargs.get('description', None)
-
-
-class ClusterUpdateParameters(msrest.serialization.Model):
- """AmlCompute update parameters.
-
- :param scale_settings: Desired scale settings for the amlCompute.
- :type scale_settings: ~azure.mgmt.machinelearningservices.models.ScaleSettings
- """
-
- _attribute_map = {
- 'scale_settings': {'key': 'properties.scaleSettings', 'type': 'ScaleSettings'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(ClusterUpdateParameters, self).__init__(**kwargs)
- self.scale_settings = kwargs.get('scale_settings', None)
-
-
-class ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model):
- """ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :ivar principal_id: The principal id of user assigned identity.
- :vartype principal_id: str
- :ivar client_id: The client id of user assigned identity.
- :vartype client_id: str
- """
-
- _validation = {
- 'principal_id': {'readonly': True},
- 'client_id': {'readonly': True},
- }
-
- _attribute_map = {
- 'principal_id': {'key': 'principalId', 'type': 'str'},
- 'client_id': {'key': 'clientId', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties, self).__init__(**kwargs)
- self.principal_id = None
- self.client_id = None
-
-
-class ComputeInstance(Compute):
- """An Azure Machine Learning compute instance.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- All required parameters must be populated in order to send to Azure.
-
- :param compute_type: Required. The type of compute.Constant filled by server. Possible values
- include: "AKS", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", "HDInsight",
- "Databricks", "DataLakeAnalytics".
- :type compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType
- :param compute_location: Location for the underlying compute.
- :type compute_location: str
- :ivar provisioning_state: The provision state of the cluster. Valid values are Unknown,
- Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating",
- "Creating", "Deleting", "Succeeded", "Failed", "Canceled".
- :vartype provisioning_state: str or
- ~azure.mgmt.machinelearningservices.models.ProvisioningState
- :param description: The description of the Machine Learning compute.
- :type description: str
- :ivar created_on: The date and time when the compute was created.
- :vartype created_on: ~datetime.datetime
- :ivar modified_on: The date and time when the compute was last modified.
- :vartype modified_on: ~datetime.datetime
- :param resource_id: ARM resource id of the underlying compute.
- :type resource_id: str
- :ivar provisioning_errors: Errors during provisioning.
- :vartype provisioning_errors:
- list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError]
- :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought
- from outside if true, or machine learning service provisioned it if false.
- :vartype is_attached_compute: bool
- :param properties: Compute Instance properties.
- :type properties: ~azure.mgmt.machinelearningservices.models.ComputeInstanceProperties
- """
-
- _validation = {
- 'compute_type': {'required': True},
- 'provisioning_state': {'readonly': True},
- 'created_on': {'readonly': True},
- 'modified_on': {'readonly': True},
- 'provisioning_errors': {'readonly': True},
- 'is_attached_compute': {'readonly': True},
- }
-
- _attribute_map = {
- 'compute_type': {'key': 'computeType', 'type': 'str'},
- 'compute_location': {'key': 'computeLocation', 'type': 'str'},
- 'provisioning_state': {'key': 'provisioningState', 'type': 'str'},
- 'description': {'key': 'description', 'type': 'str'},
- 'created_on': {'key': 'createdOn', 'type': 'iso-8601'},
- 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'},
- 'resource_id': {'key': 'resourceId', 'type': 'str'},
- 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'},
- 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'},
- 'properties': {'key': 'properties', 'type': 'ComputeInstanceProperties'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(ComputeInstance, self).__init__(**kwargs)
- self.compute_type = 'ComputeInstance' # type: str
- self.properties = kwargs.get('properties', None)
-
-
-class ComputeInstanceApplication(msrest.serialization.Model):
- """Defines an Aml Instance application and its connectivity endpoint URI.
-
- :param display_name: Name of the ComputeInstance application.
- :type display_name: str
- :param endpoint_uri: Application' endpoint URI.
- :type endpoint_uri: str
- """
-
- _attribute_map = {
- 'display_name': {'key': 'displayName', 'type': 'str'},
- 'endpoint_uri': {'key': 'endpointUri', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(ComputeInstanceApplication, self).__init__(**kwargs)
- self.display_name = kwargs.get('display_name', None)
- self.endpoint_uri = kwargs.get('endpoint_uri', None)
-
-
-class ComputeInstanceConnectivityEndpoints(msrest.serialization.Model):
- """Defines all connectivity endpoints and properties for a ComputeInstance.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :ivar public_ip_address: Public IP Address of this ComputeInstance.
- :vartype public_ip_address: str
- :ivar private_ip_address: Private IP Address of this ComputeInstance (local to the VNET in
- which the compute instance is deployed).
- :vartype private_ip_address: str
- """
-
- _validation = {
- 'public_ip_address': {'readonly': True},
- 'private_ip_address': {'readonly': True},
- }
-
- _attribute_map = {
- 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'},
- 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(ComputeInstanceConnectivityEndpoints, self).__init__(**kwargs)
- self.public_ip_address = None
- self.private_ip_address = None
-
-
-class ComputeInstanceCreatedBy(msrest.serialization.Model):
- """Describes information on user who created this ComputeInstance.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :ivar user_name: Name of the user.
- :vartype user_name: str
- :ivar user_org_id: Uniquely identifies user' Azure Active Directory organization.
- :vartype user_org_id: str
- :ivar user_id: Uniquely identifies the user within his/her organization.
- :vartype user_id: str
- """
-
- _validation = {
- 'user_name': {'readonly': True},
- 'user_org_id': {'readonly': True},
- 'user_id': {'readonly': True},
- }
-
- _attribute_map = {
- 'user_name': {'key': 'userName', 'type': 'str'},
- 'user_org_id': {'key': 'userOrgId', 'type': 'str'},
- 'user_id': {'key': 'userId', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(ComputeInstanceCreatedBy, self).__init__(**kwargs)
- self.user_name = None
- self.user_org_id = None
- self.user_id = None
-
-
-class ComputeInstanceLastOperation(msrest.serialization.Model):
- """The last operation on ComputeInstance.
-
- :param operation_name: Name of the last operation. Possible values include: "Create", "Start",
- "Stop", "Restart", "Reimage", "Delete".
- :type operation_name: str or ~azure.mgmt.machinelearningservices.models.OperationName
- :param operation_time: Time of the last operation.
- :type operation_time: ~datetime.datetime
- :param operation_status: Operation status. Possible values include: "InProgress", "Succeeded",
- "CreateFailed", "StartFailed", "StopFailed", "RestartFailed", "ReimageFailed", "DeleteFailed".
- :type operation_status: str or ~azure.mgmt.machinelearningservices.models.OperationStatus
- """
-
- _attribute_map = {
- 'operation_name': {'key': 'operationName', 'type': 'str'},
- 'operation_time': {'key': 'operationTime', 'type': 'iso-8601'},
- 'operation_status': {'key': 'operationStatus', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(ComputeInstanceLastOperation, self).__init__(**kwargs)
- self.operation_name = kwargs.get('operation_name', None)
- self.operation_time = kwargs.get('operation_time', None)
- self.operation_status = kwargs.get('operation_status', None)
-
-
-class ComputeInstanceProperties(msrest.serialization.Model):
- """Compute Instance properties.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :param vm_size: Virtual Machine Size.
- :type vm_size: str
- :param subnet: Virtual network subnet resource ID the compute nodes belong to.
- :type subnet: ~azure.mgmt.machinelearningservices.models.ResourceId
- :param application_sharing_policy: Policy for sharing applications on this compute instance
- among users of parent workspace. If Personal, only the creator can access applications on this
- compute instance. When Shared, any workspace user can access applications on this instance
- depending on his/her assigned role. Possible values include: "Personal", "Shared". Default
- value: "Shared".
- :type application_sharing_policy: str or
- ~azure.mgmt.machinelearningservices.models.ApplicationSharingPolicy
- :param ssh_settings: Specifies policy and settings for SSH access.
- :type ssh_settings: ~azure.mgmt.machinelearningservices.models.ComputeInstanceSshSettings
- :ivar connectivity_endpoints: Describes all connectivity endpoints available for this
- ComputeInstance.
- :vartype connectivity_endpoints:
- ~azure.mgmt.machinelearningservices.models.ComputeInstanceConnectivityEndpoints
- :ivar applications: Describes available applications and their endpoints on this
- ComputeInstance.
- :vartype applications:
- list[~azure.mgmt.machinelearningservices.models.ComputeInstanceApplication]
- :ivar created_by: Describes information on user who created this ComputeInstance.
- :vartype created_by: ~azure.mgmt.machinelearningservices.models.ComputeInstanceCreatedBy
- :ivar errors: Collection of errors encountered on this ComputeInstance.
- :vartype errors: list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError]
- :ivar state: The current state of this ComputeInstance. Possible values include: "Creating",
- "CreateFailed", "Deleting", "Running", "Restarting", "JobRunning", "SettingUp", "SetupFailed",
- "Starting", "Stopped", "Stopping", "UserSettingUp", "UserSetupFailed", "Unknown", "Unusable".
- :vartype state: str or ~azure.mgmt.machinelearningservices.models.ComputeInstanceState
- :ivar last_operation: The last operation on ComputeInstance.
- :vartype last_operation:
- ~azure.mgmt.machinelearningservices.models.ComputeInstanceLastOperation
- """
-
- _validation = {
- 'connectivity_endpoints': {'readonly': True},
- 'applications': {'readonly': True},
- 'created_by': {'readonly': True},
- 'errors': {'readonly': True},
- 'state': {'readonly': True},
- 'last_operation': {'readonly': True},
- }
-
- _attribute_map = {
- 'vm_size': {'key': 'vmSize', 'type': 'str'},
- 'subnet': {'key': 'subnet', 'type': 'ResourceId'},
- 'application_sharing_policy': {'key': 'applicationSharingPolicy', 'type': 'str'},
- 'ssh_settings': {'key': 'sshSettings', 'type': 'ComputeInstanceSshSettings'},
- 'connectivity_endpoints': {'key': 'connectivityEndpoints', 'type': 'ComputeInstanceConnectivityEndpoints'},
- 'applications': {'key': 'applications', 'type': '[ComputeInstanceApplication]'},
- 'created_by': {'key': 'createdBy', 'type': 'ComputeInstanceCreatedBy'},
- 'errors': {'key': 'errors', 'type': '[MachineLearningServiceError]'},
- 'state': {'key': 'state', 'type': 'str'},
- 'last_operation': {'key': 'lastOperation', 'type': 'ComputeInstanceLastOperation'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(ComputeInstanceProperties, self).__init__(**kwargs)
- self.vm_size = kwargs.get('vm_size', None)
- self.subnet = kwargs.get('subnet', None)
- self.application_sharing_policy = kwargs.get('application_sharing_policy', "Shared")
- self.ssh_settings = kwargs.get('ssh_settings', None)
- self.connectivity_endpoints = None
- self.applications = None
- self.created_by = None
- self.errors = None
- self.state = None
- self.last_operation = None
-
-
-class ComputeInstanceSshSettings(msrest.serialization.Model):
- """Specifies policy and settings for SSH access.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :param ssh_public_access: State of the public SSH port. Possible values are: Disabled -
- Indicates that the public ssh port is closed on this instance. Enabled - Indicates that the
- public ssh port is open and accessible according to the VNet/subnet policy if applicable.
- Possible values include: "Enabled", "Disabled". Default value: "Disabled".
- :type ssh_public_access: str or ~azure.mgmt.machinelearningservices.models.SshPublicAccess
- :ivar admin_user_name: Describes the admin user name.
- :vartype admin_user_name: str
- :ivar ssh_port: Describes the port for connecting through SSH.
- :vartype ssh_port: int
- :param admin_public_key: Specifies the SSH rsa public key file as a string. Use "ssh-keygen -t
- rsa -b 2048" to generate your SSH key pairs.
- :type admin_public_key: str
- """
-
- _validation = {
- 'admin_user_name': {'readonly': True},
- 'ssh_port': {'readonly': True},
- }
-
- _attribute_map = {
- 'ssh_public_access': {'key': 'sshPublicAccess', 'type': 'str'},
- 'admin_user_name': {'key': 'adminUserName', 'type': 'str'},
- 'ssh_port': {'key': 'sshPort', 'type': 'int'},
- 'admin_public_key': {'key': 'adminPublicKey', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(ComputeInstanceSshSettings, self).__init__(**kwargs)
- self.ssh_public_access = kwargs.get('ssh_public_access', "Disabled")
- self.admin_user_name = None
- self.ssh_port = None
- self.admin_public_key = kwargs.get('admin_public_key', None)
-
-
-class Resource(msrest.serialization.Model):
- """Azure Resource Manager resource envelope.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :ivar id: Specifies the resource ID.
- :vartype id: str
- :ivar name: Specifies the name of the resource.
- :vartype name: str
- :param identity: The identity of the resource.
- :type identity: ~azure.mgmt.machinelearningservices.models.Identity
- :param location: 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 sku: The sku of the workspace.
- :type sku: ~azure.mgmt.machinelearningservices.models.Sku
- """
-
- _validation = {
- 'id': {'readonly': True},
- 'name': {'readonly': True},
- 'type': {'readonly': True},
- }
-
- _attribute_map = {
- 'id': {'key': 'id', 'type': 'str'},
- 'name': {'key': 'name', 'type': 'str'},
- 'identity': {'key': 'identity', 'type': 'Identity'},
- 'location': {'key': 'location', 'type': 'str'},
- 'type': {'key': 'type', 'type': 'str'},
- 'tags': {'key': 'tags', 'type': '{str}'},
- 'sku': {'key': 'sku', 'type': 'Sku'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(Resource, self).__init__(**kwargs)
- self.id = None
- self.name = None
- self.identity = kwargs.get('identity', None)
- self.location = kwargs.get('location', None)
- self.type = None
- self.tags = kwargs.get('tags', None)
- self.sku = kwargs.get('sku', None)
-
-
-class ComputeResource(Resource):
- """Machine Learning compute object wrapped into ARM resource envelope.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :ivar id: Specifies the resource ID.
- :vartype id: str
- :ivar name: Specifies the name of the resource.
- :vartype name: str
- :param identity: The identity of the resource.
- :type identity: ~azure.mgmt.machinelearningservices.models.Identity
- :param location: 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 sku: The sku of the workspace.
- :type sku: ~azure.mgmt.machinelearningservices.models.Sku
- :param properties: Compute properties.
- :type properties: ~azure.mgmt.machinelearningservices.models.Compute
- """
-
- _validation = {
- 'id': {'readonly': True},
- 'name': {'readonly': True},
- 'type': {'readonly': True},
- }
-
- _attribute_map = {
- 'id': {'key': 'id', 'type': 'str'},
- 'name': {'key': 'name', 'type': 'str'},
- 'identity': {'key': 'identity', 'type': 'Identity'},
- 'location': {'key': 'location', 'type': 'str'},
- 'type': {'key': 'type', 'type': 'str'},
- 'tags': {'key': 'tags', 'type': '{str}'},
- 'sku': {'key': 'sku', 'type': 'Sku'},
- 'properties': {'key': 'properties', 'type': 'Compute'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(ComputeResource, self).__init__(**kwargs)
- self.properties = kwargs.get('properties', None)
-
-
-class Databricks(Compute):
- """A DataFactory compute.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- All required parameters must be populated in order to send to Azure.
-
- :param compute_type: Required. The type of compute.Constant filled by server. Possible values
- include: "AKS", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", "HDInsight",
- "Databricks", "DataLakeAnalytics".
- :type compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType
- :param compute_location: Location for the underlying compute.
- :type compute_location: str
- :ivar provisioning_state: The provision state of the cluster. Valid values are Unknown,
- Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating",
- "Creating", "Deleting", "Succeeded", "Failed", "Canceled".
- :vartype provisioning_state: str or
- ~azure.mgmt.machinelearningservices.models.ProvisioningState
- :param description: The description of the Machine Learning compute.
- :type description: str
- :ivar created_on: The date and time when the compute was created.
- :vartype created_on: ~datetime.datetime
- :ivar modified_on: The date and time when the compute was last modified.
- :vartype modified_on: ~datetime.datetime
- :param resource_id: ARM resource id of the underlying compute.
- :type resource_id: str
- :ivar provisioning_errors: Errors during provisioning.
- :vartype provisioning_errors:
- list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError]
- :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought
- from outside if true, or machine learning service provisioned it if false.
- :vartype is_attached_compute: bool
- :param properties:
- :type properties: ~azure.mgmt.machinelearningservices.models.DatabricksProperties
- """
-
- _validation = {
- 'compute_type': {'required': True},
- 'provisioning_state': {'readonly': True},
- 'created_on': {'readonly': True},
- 'modified_on': {'readonly': True},
- 'provisioning_errors': {'readonly': True},
- 'is_attached_compute': {'readonly': True},
- }
-
- _attribute_map = {
- 'compute_type': {'key': 'computeType', 'type': 'str'},
- 'compute_location': {'key': 'computeLocation', 'type': 'str'},
- 'provisioning_state': {'key': 'provisioningState', 'type': 'str'},
- 'description': {'key': 'description', 'type': 'str'},
- 'created_on': {'key': 'createdOn', 'type': 'iso-8601'},
- 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'},
- 'resource_id': {'key': 'resourceId', 'type': 'str'},
- 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'},
- 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'},
- 'properties': {'key': 'properties', 'type': 'DatabricksProperties'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(Databricks, self).__init__(**kwargs)
- self.compute_type = 'Databricks' # type: str
- self.properties = kwargs.get('properties', None)
-
-
-class DatabricksComputeSecrets(ComputeSecrets):
- """Secrets related to a Machine Learning compute based on Databricks.
-
- All required parameters must be populated in order to send to Azure.
-
- :param compute_type: Required. The type of compute.Constant filled by server. Possible values
- include: "AKS", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", "HDInsight",
- "Databricks", "DataLakeAnalytics".
- :type compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType
- :param databricks_access_token: access token for databricks account.
- :type databricks_access_token: str
- """
-
- _validation = {
- 'compute_type': {'required': True},
- }
-
- _attribute_map = {
- 'compute_type': {'key': 'computeType', 'type': 'str'},
- 'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(DatabricksComputeSecrets, self).__init__(**kwargs)
- self.compute_type = 'Databricks' # type: str
- self.databricks_access_token = kwargs.get('databricks_access_token', None)
-
-
-class DatabricksProperties(msrest.serialization.Model):
- """DatabricksProperties.
-
- :param databricks_access_token: Databricks access token.
- :type databricks_access_token: str
- """
-
- _attribute_map = {
- 'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(DatabricksProperties, self).__init__(**kwargs)
- self.databricks_access_token = kwargs.get('databricks_access_token', None)
-
-
-class DataFactory(Compute):
- """A DataFactory compute.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- All required parameters must be populated in order to send to Azure.
-
- :param compute_type: Required. The type of compute.Constant filled by server. Possible values
- include: "AKS", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", "HDInsight",
- "Databricks", "DataLakeAnalytics".
- :type compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType
- :param compute_location: Location for the underlying compute.
- :type compute_location: str
- :ivar provisioning_state: The provision state of the cluster. Valid values are Unknown,
- Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating",
- "Creating", "Deleting", "Succeeded", "Failed", "Canceled".
- :vartype provisioning_state: str or
- ~azure.mgmt.machinelearningservices.models.ProvisioningState
- :param description: The description of the Machine Learning compute.
- :type description: str
- :ivar created_on: The date and time when the compute was created.
- :vartype created_on: ~datetime.datetime
- :ivar modified_on: The date and time when the compute was last modified.
- :vartype modified_on: ~datetime.datetime
- :param resource_id: ARM resource id of the underlying compute.
- :type resource_id: str
- :ivar provisioning_errors: Errors during provisioning.
- :vartype provisioning_errors:
- list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError]
- :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought
- from outside if true, or machine learning service provisioned it if false.
- :vartype is_attached_compute: bool
- """
-
- _validation = {
- 'compute_type': {'required': True},
- 'provisioning_state': {'readonly': True},
- 'created_on': {'readonly': True},
- 'modified_on': {'readonly': True},
- 'provisioning_errors': {'readonly': True},
- 'is_attached_compute': {'readonly': True},
- }
-
- _attribute_map = {
- 'compute_type': {'key': 'computeType', 'type': 'str'},
- 'compute_location': {'key': 'computeLocation', 'type': 'str'},
- 'provisioning_state': {'key': 'provisioningState', 'type': 'str'},
- 'description': {'key': 'description', 'type': 'str'},
- 'created_on': {'key': 'createdOn', 'type': 'iso-8601'},
- 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'},
- 'resource_id': {'key': 'resourceId', 'type': 'str'},
- 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'},
- 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(DataFactory, self).__init__(**kwargs)
- self.compute_type = 'DataFactory' # type: str
-
-
-class DataLakeAnalytics(Compute):
- """A DataLakeAnalytics compute.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- All required parameters must be populated in order to send to Azure.
-
- :param compute_type: Required. The type of compute.Constant filled by server. Possible values
- include: "AKS", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", "HDInsight",
- "Databricks", "DataLakeAnalytics".
- :type compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType
- :param compute_location: Location for the underlying compute.
- :type compute_location: str
- :ivar provisioning_state: The provision state of the cluster. Valid values are Unknown,
- Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating",
- "Creating", "Deleting", "Succeeded", "Failed", "Canceled".
- :vartype provisioning_state: str or
- ~azure.mgmt.machinelearningservices.models.ProvisioningState
- :param description: The description of the Machine Learning compute.
- :type description: str
- :ivar created_on: The date and time when the compute was created.
- :vartype created_on: ~datetime.datetime
- :ivar modified_on: The date and time when the compute was last modified.
- :vartype modified_on: ~datetime.datetime
- :param resource_id: ARM resource id of the underlying compute.
- :type resource_id: str
- :ivar provisioning_errors: Errors during provisioning.
- :vartype provisioning_errors:
- list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError]
- :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought
- from outside if true, or machine learning service provisioned it if false.
- :vartype is_attached_compute: bool
- :param properties:
- :type properties: ~azure.mgmt.machinelearningservices.models.DataLakeAnalyticsProperties
- """
-
- _validation = {
- 'compute_type': {'required': True},
- 'provisioning_state': {'readonly': True},
- 'created_on': {'readonly': True},
- 'modified_on': {'readonly': True},
- 'provisioning_errors': {'readonly': True},
- 'is_attached_compute': {'readonly': True},
- }
-
- _attribute_map = {
- 'compute_type': {'key': 'computeType', 'type': 'str'},
- 'compute_location': {'key': 'computeLocation', 'type': 'str'},
- 'provisioning_state': {'key': 'provisioningState', 'type': 'str'},
- 'description': {'key': 'description', 'type': 'str'},
- 'created_on': {'key': 'createdOn', 'type': 'iso-8601'},
- 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'},
- 'resource_id': {'key': 'resourceId', 'type': 'str'},
- 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'},
- 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'},
- 'properties': {'key': 'properties', 'type': 'DataLakeAnalyticsProperties'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(DataLakeAnalytics, self).__init__(**kwargs)
- self.compute_type = 'DataLakeAnalytics' # type: str
- self.properties = kwargs.get('properties', None)
-
-
-class DataLakeAnalyticsProperties(msrest.serialization.Model):
- """DataLakeAnalyticsProperties.
-
- :param data_lake_store_account_name: DataLake Store Account Name.
- :type data_lake_store_account_name: str
- """
-
- _attribute_map = {
- 'data_lake_store_account_name': {'key': 'dataLakeStoreAccountName', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(DataLakeAnalyticsProperties, self).__init__(**kwargs)
- self.data_lake_store_account_name = kwargs.get('data_lake_store_account_name', None)
-
-
-class EncryptionProperty(msrest.serialization.Model):
- """EncryptionProperty.
-
- All required parameters must be populated in order to send to Azure.
-
- :param status: Required. Indicates whether or not the encryption is enabled for the workspace.
- Possible values include: "Enabled", "Disabled".
- :type status: str or ~azure.mgmt.machinelearningservices.models.EncryptionStatus
- :param key_vault_properties: Required. Customer Key vault properties.
- :type key_vault_properties: ~azure.mgmt.machinelearningservices.models.KeyVaultProperties
- """
-
- _validation = {
- 'status': {'required': True},
- 'key_vault_properties': {'required': True},
- }
-
- _attribute_map = {
- 'status': {'key': 'status', 'type': 'str'},
- 'key_vault_properties': {'key': 'keyVaultProperties', 'type': 'KeyVaultProperties'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(EncryptionProperty, self).__init__(**kwargs)
- self.status = kwargs['status']
- self.key_vault_properties = kwargs['key_vault_properties']
-
-
-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.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :ivar code: Error code.
- :vartype code: str
- :ivar message: Error message.
- :vartype message: str
- :ivar details: An array of error detail objects.
- :vartype details: list[~azure.mgmt.machinelearningservices.models.ErrorDetail]
- """
-
- _validation = {
- 'code': {'readonly': True},
- 'message': {'readonly': True},
- 'details': {'readonly': 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 = None
- self.message = None
- self.details = None
-
-
-class EstimatedVMPrice(msrest.serialization.Model):
- """The estimated price info for using a VM of a particular OS type, tier, etc.
-
- All required parameters must be populated in order to send to Azure.
-
- :param retail_price: Required. The price charged for using the VM.
- :type retail_price: float
- :param os_type: Required. Operating system type used by the VM. Possible values include:
- "Linux", "Windows".
- :type os_type: str or ~azure.mgmt.machinelearningservices.models.VMPriceOSType
- :param vm_tier: Required. The type of the VM. Possible values include: "Standard",
- "LowPriority", "Spot".
- :type vm_tier: str or ~azure.mgmt.machinelearningservices.models.VMTier
- """
-
- _validation = {
- 'retail_price': {'required': True},
- 'os_type': {'required': True},
- 'vm_tier': {'required': True},
- }
-
- _attribute_map = {
- 'retail_price': {'key': 'retailPrice', 'type': 'float'},
- 'os_type': {'key': 'osType', 'type': 'str'},
- 'vm_tier': {'key': 'vmTier', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(EstimatedVMPrice, self).__init__(**kwargs)
- self.retail_price = kwargs['retail_price']
- self.os_type = kwargs['os_type']
- self.vm_tier = kwargs['vm_tier']
-
-
-class EstimatedVMPrices(msrest.serialization.Model):
- """The estimated price info for using a VM.
-
- All required parameters must be populated in order to send to Azure.
-
- :param billing_currency: Required. Three lettered code specifying the currency of the VM price.
- Example: USD. Possible values include: "USD".
- :type billing_currency: str or ~azure.mgmt.machinelearningservices.models.BillingCurrency
- :param unit_of_measure: Required. The unit of time measurement for the specified VM price.
- Example: OneHour. Possible values include: "OneHour".
- :type unit_of_measure: str or ~azure.mgmt.machinelearningservices.models.UnitOfMeasure
- :param values: Required. The list of estimated prices for using a VM of a particular OS type,
- tier, etc.
- :type values: list[~azure.mgmt.machinelearningservices.models.EstimatedVMPrice]
- """
-
- _validation = {
- 'billing_currency': {'required': True},
- 'unit_of_measure': {'required': True},
- 'values': {'required': True},
- }
-
- _attribute_map = {
- 'billing_currency': {'key': 'billingCurrency', 'type': 'str'},
- 'unit_of_measure': {'key': 'unitOfMeasure', 'type': 'str'},
- 'values': {'key': 'values', 'type': '[EstimatedVMPrice]'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(EstimatedVMPrices, self).__init__(**kwargs)
- self.billing_currency = kwargs['billing_currency']
- self.unit_of_measure = kwargs['unit_of_measure']
- self.values = kwargs['values']
-
-
-class HDInsight(Compute):
- """A HDInsight compute.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- All required parameters must be populated in order to send to Azure.
-
- :param compute_type: Required. The type of compute.Constant filled by server. Possible values
- include: "AKS", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", "HDInsight",
- "Databricks", "DataLakeAnalytics".
- :type compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType
- :param compute_location: Location for the underlying compute.
- :type compute_location: str
- :ivar provisioning_state: The provision state of the cluster. Valid values are Unknown,
- Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating",
- "Creating", "Deleting", "Succeeded", "Failed", "Canceled".
- :vartype provisioning_state: str or
- ~azure.mgmt.machinelearningservices.models.ProvisioningState
- :param description: The description of the Machine Learning compute.
- :type description: str
- :ivar created_on: The date and time when the compute was created.
- :vartype created_on: ~datetime.datetime
- :ivar modified_on: The date and time when the compute was last modified.
- :vartype modified_on: ~datetime.datetime
- :param resource_id: ARM resource id of the underlying compute.
- :type resource_id: str
- :ivar provisioning_errors: Errors during provisioning.
- :vartype provisioning_errors:
- list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError]
- :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought
- from outside if true, or machine learning service provisioned it if false.
- :vartype is_attached_compute: bool
- :param properties:
- :type properties: ~azure.mgmt.machinelearningservices.models.HDInsightProperties
- """
-
- _validation = {
- 'compute_type': {'required': True},
- 'provisioning_state': {'readonly': True},
- 'created_on': {'readonly': True},
- 'modified_on': {'readonly': True},
- 'provisioning_errors': {'readonly': True},
- 'is_attached_compute': {'readonly': True},
- }
-
- _attribute_map = {
- 'compute_type': {'key': 'computeType', 'type': 'str'},
- 'compute_location': {'key': 'computeLocation', 'type': 'str'},
- 'provisioning_state': {'key': 'provisioningState', 'type': 'str'},
- 'description': {'key': 'description', 'type': 'str'},
- 'created_on': {'key': 'createdOn', 'type': 'iso-8601'},
- 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'},
- 'resource_id': {'key': 'resourceId', 'type': 'str'},
- 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'},
- 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'},
- 'properties': {'key': 'properties', 'type': 'HDInsightProperties'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(HDInsight, self).__init__(**kwargs)
- self.compute_type = 'HDInsight' # type: str
- self.properties = kwargs.get('properties', None)
-
-
-class HDInsightProperties(msrest.serialization.Model):
- """HDInsightProperties.
-
- :param ssh_port: Port open for ssh connections on the master node of the cluster.
- :type ssh_port: int
- :param address: Public IP address of the master node of the cluster.
- :type address: str
- :param administrator_account: Admin credentials for master node of the cluster.
- :type administrator_account:
- ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials
- """
-
- _attribute_map = {
- 'ssh_port': {'key': 'sshPort', 'type': 'int'},
- 'address': {'key': 'address', 'type': 'str'},
- 'administrator_account': {'key': 'administratorAccount', 'type': 'VirtualMachineSshCredentials'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(HDInsightProperties, self).__init__(**kwargs)
- self.ssh_port = kwargs.get('ssh_port', None)
- self.address = kwargs.get('address', None)
- self.administrator_account = kwargs.get('administrator_account', None)
-
-
-class Identity(msrest.serialization.Model):
- """Identity for the 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 principal_id: The principal ID of resource identity.
- :vartype principal_id: str
- :ivar tenant_id: The tenant ID of resource.
- :vartype tenant_id: str
- :param type: Required. The identity type. Possible values include: "SystemAssigned",
- "UserAssigned", "SystemAssigned,UserAssigned", "None".
- :type type: str or ~azure.mgmt.machinelearningservices.models.ResourceIdentityType
- :param user_assigned_identities: The list of user identities associated with resource. The user
- identity dictionary key references will be ARM resource ids in the form:
- '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
- :type user_assigned_identities: dict[str,
- ~azure.mgmt.machinelearningservices.models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties]
- """
-
- _validation = {
- 'principal_id': {'readonly': True},
- 'tenant_id': {'readonly': True},
- 'type': {'required': True},
- }
-
- _attribute_map = {
- 'principal_id': {'key': 'principalId', 'type': 'str'},
- 'tenant_id': {'key': 'tenantId', 'type': 'str'},
- 'type': {'key': 'type', 'type': 'str'},
- 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties}'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(Identity, self).__init__(**kwargs)
- self.principal_id = None
- self.tenant_id = None
- self.type = kwargs['type']
- self.user_assigned_identities = kwargs.get('user_assigned_identities', None)
-
-
-class KeyVaultProperties(msrest.serialization.Model):
- """KeyVaultProperties.
-
- All required parameters must be populated in order to send to Azure.
-
- :param key_vault_arm_id: Required. The ArmId of the keyVault where the customer owned
- encryption key is present.
- :type key_vault_arm_id: str
- :param key_identifier: Required. Key vault uri to access the encryption key.
- :type key_identifier: str
- :param identity_client_id: For future use - The client id of the identity which will be used to
- access key vault.
- :type identity_client_id: str
- """
-
- _validation = {
- 'key_vault_arm_id': {'required': True},
- 'key_identifier': {'required': True},
- }
-
- _attribute_map = {
- 'key_vault_arm_id': {'key': 'keyVaultArmId', 'type': 'str'},
- 'key_identifier': {'key': 'keyIdentifier', 'type': 'str'},
- 'identity_client_id': {'key': 'identityClientId', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(KeyVaultProperties, self).__init__(**kwargs)
- self.key_vault_arm_id = kwargs['key_vault_arm_id']
- self.key_identifier = kwargs['key_identifier']
- self.identity_client_id = kwargs.get('identity_client_id', None)
-
-
-class ListAmlUserFeatureResult(msrest.serialization.Model):
- """The List Aml user feature operation response.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :ivar value: The list of AML user facing features.
- :vartype value: list[~azure.mgmt.machinelearningservices.models.AmlUserFeature]
- :ivar next_link: The URI to fetch the next page of AML user features information. Call
- ListNext() with this to fetch the next page of AML user features information.
- :vartype next_link: str
- """
-
- _validation = {
- 'value': {'readonly': True},
- 'next_link': {'readonly': True},
- }
-
- _attribute_map = {
- 'value': {'key': 'value', 'type': '[AmlUserFeature]'},
- 'next_link': {'key': 'nextLink', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(ListAmlUserFeatureResult, self).__init__(**kwargs)
- self.value = None
- self.next_link = None
-
-
-class ListUsagesResult(msrest.serialization.Model):
- """The List Usages operation response.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :ivar value: The list of AML resource usages.
- :vartype value: list[~azure.mgmt.machinelearningservices.models.Usage]
- :ivar next_link: The URI to fetch the next page of AML resource usage information. Call
- ListNext() with this to fetch the next page of AML resource usage information.
- :vartype next_link: str
- """
-
- _validation = {
- 'value': {'readonly': True},
- 'next_link': {'readonly': True},
- }
-
- _attribute_map = {
- 'value': {'key': 'value', 'type': '[Usage]'},
- 'next_link': {'key': 'nextLink', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(ListUsagesResult, self).__init__(**kwargs)
- self.value = None
- self.next_link = None
-
-
-class ListWorkspaceKeysResult(msrest.serialization.Model):
- """ListWorkspaceKeysResult.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :ivar user_storage_key:
- :vartype user_storage_key: str
- :ivar user_storage_resource_id:
- :vartype user_storage_resource_id: str
- :ivar app_insights_instrumentation_key:
- :vartype app_insights_instrumentation_key: str
- :ivar container_registry_credentials:
- :vartype container_registry_credentials:
- ~azure.mgmt.machinelearningservices.models.RegistryListCredentialsResult
- :param notebook_access_keys:
- :type notebook_access_keys:
- ~azure.mgmt.machinelearningservices.models.NotebookListCredentialsResult
- """
-
- _validation = {
- 'user_storage_key': {'readonly': True},
- 'user_storage_resource_id': {'readonly': True},
- 'app_insights_instrumentation_key': {'readonly': True},
- 'container_registry_credentials': {'readonly': True},
- }
-
- _attribute_map = {
- 'user_storage_key': {'key': 'userStorageKey', 'type': 'str'},
- 'user_storage_resource_id': {'key': 'userStorageResourceId', 'type': 'str'},
- 'app_insights_instrumentation_key': {'key': 'appInsightsInstrumentationKey', 'type': 'str'},
- 'container_registry_credentials': {'key': 'containerRegistryCredentials', 'type': 'RegistryListCredentialsResult'},
- 'notebook_access_keys': {'key': 'notebookAccessKeys', 'type': 'NotebookListCredentialsResult'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(ListWorkspaceKeysResult, self).__init__(**kwargs)
- self.user_storage_key = None
- self.user_storage_resource_id = None
- self.app_insights_instrumentation_key = None
- self.container_registry_credentials = None
- self.notebook_access_keys = kwargs.get('notebook_access_keys', None)
-
-
-class ListWorkspaceQuotas(msrest.serialization.Model):
- """The List WorkspaceQuotasByVMFamily operation response.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :ivar value: The list of Workspace Quotas by VM Family.
- :vartype value: list[~azure.mgmt.machinelearningservices.models.ResourceQuota]
- :ivar next_link: The URI to fetch the next page of workspace quota information by VM Family.
- Call ListNext() with this to fetch the next page of Workspace Quota information.
- :vartype next_link: str
- """
-
- _validation = {
- 'value': {'readonly': True},
- 'next_link': {'readonly': True},
- }
-
- _attribute_map = {
- 'value': {'key': 'value', 'type': '[ResourceQuota]'},
- 'next_link': {'key': 'nextLink', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(ListWorkspaceQuotas, self).__init__(**kwargs)
- self.value = None
- self.next_link = None
-
-
-class MachineLearningServiceError(msrest.serialization.Model):
- """Wrapper for error response to follow ARM guidelines.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :ivar error: The error response.
- :vartype error: ~azure.mgmt.machinelearningservices.models.ErrorResponse
- """
-
- _validation = {
- 'error': {'readonly': True},
- }
-
- _attribute_map = {
- 'error': {'key': 'error', 'type': 'ErrorResponse'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(MachineLearningServiceError, self).__init__(**kwargs)
- self.error = None
-
-
-class NodeStateCounts(msrest.serialization.Model):
- """Counts of various compute node states on the amlCompute.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :ivar idle_node_count: Number of compute nodes in idle state.
- :vartype idle_node_count: int
- :ivar running_node_count: Number of compute nodes which are running jobs.
- :vartype running_node_count: int
- :ivar preparing_node_count: Number of compute nodes which are being prepared.
- :vartype preparing_node_count: int
- :ivar unusable_node_count: Number of compute nodes which are in unusable state.
- :vartype unusable_node_count: int
- :ivar leaving_node_count: Number of compute nodes which are leaving the amlCompute.
- :vartype leaving_node_count: int
- :ivar preempted_node_count: Number of compute nodes which are in preempted state.
- :vartype preempted_node_count: int
- """
-
- _validation = {
- 'idle_node_count': {'readonly': True},
- 'running_node_count': {'readonly': True},
- 'preparing_node_count': {'readonly': True},
- 'unusable_node_count': {'readonly': True},
- 'leaving_node_count': {'readonly': True},
- 'preempted_node_count': {'readonly': True},
- }
-
- _attribute_map = {
- 'idle_node_count': {'key': 'idleNodeCount', 'type': 'int'},
- 'running_node_count': {'key': 'runningNodeCount', 'type': 'int'},
- 'preparing_node_count': {'key': 'preparingNodeCount', 'type': 'int'},
- 'unusable_node_count': {'key': 'unusableNodeCount', 'type': 'int'},
- 'leaving_node_count': {'key': 'leavingNodeCount', 'type': 'int'},
- 'preempted_node_count': {'key': 'preemptedNodeCount', 'type': 'int'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(NodeStateCounts, self).__init__(**kwargs)
- self.idle_node_count = None
- self.running_node_count = None
- self.preparing_node_count = None
- self.unusable_node_count = None
- self.leaving_node_count = None
- self.preempted_node_count = None
-
-
-class NotebookListCredentialsResult(msrest.serialization.Model):
- """NotebookListCredentialsResult.
-
- :param primary_access_key:
- :type primary_access_key: str
- :param secondary_access_key:
- :type secondary_access_key: str
- """
-
- _attribute_map = {
- 'primary_access_key': {'key': 'primaryAccessKey', 'type': 'str'},
- 'secondary_access_key': {'key': 'secondaryAccessKey', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(NotebookListCredentialsResult, self).__init__(**kwargs)
- self.primary_access_key = kwargs.get('primary_access_key', None)
- self.secondary_access_key = kwargs.get('secondary_access_key', None)
-
-
-class NotebookPreparationError(msrest.serialization.Model):
- """NotebookPreparationError.
-
- :param error_message:
- :type error_message: str
- :param status_code:
- :type status_code: int
- """
-
- _attribute_map = {
- 'error_message': {'key': 'errorMessage', 'type': 'str'},
- 'status_code': {'key': 'statusCode', 'type': 'int'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(NotebookPreparationError, self).__init__(**kwargs)
- self.error_message = kwargs.get('error_message', None)
- self.status_code = kwargs.get('status_code', None)
-
-
-class NotebookResourceInfo(msrest.serialization.Model):
- """NotebookResourceInfo.
-
- :param fqdn:
- :type fqdn: str
- :param resource_id: the data plane resourceId that used to initialize notebook component.
- :type resource_id: str
- :param notebook_preparation_error: The error that occurs when preparing notebook.
- :type notebook_preparation_error:
- ~azure.mgmt.machinelearningservices.models.NotebookPreparationError
- """
-
- _attribute_map = {
- 'fqdn': {'key': 'fqdn', 'type': 'str'},
- 'resource_id': {'key': 'resourceId', 'type': 'str'},
- 'notebook_preparation_error': {'key': 'notebookPreparationError', 'type': 'NotebookPreparationError'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(NotebookResourceInfo, self).__init__(**kwargs)
- self.fqdn = kwargs.get('fqdn', None)
- self.resource_id = kwargs.get('resource_id', None)
- self.notebook_preparation_error = kwargs.get('notebook_preparation_error', None)
-
-
-class Operation(msrest.serialization.Model):
- """Azure Machine Learning workspace REST API operation.
-
- :param name: Operation name: {provider}/{resource}/{operation}.
- :type name: str
- :param display: Display name of operation.
- :type display: ~azure.mgmt.machinelearningservices.models.OperationDisplay
- """
-
- _attribute_map = {
- 'name': {'key': 'name', 'type': 'str'},
- 'display': {'key': 'display', 'type': 'OperationDisplay'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(Operation, self).__init__(**kwargs)
- self.name = kwargs.get('name', None)
- self.display = kwargs.get('display', None)
-
-
-class OperationDisplay(msrest.serialization.Model):
- """Display name of operation.
-
- :param provider: The resource provider name: Microsoft.MachineLearningExperimentation.
- :type provider: str
- :param resource: The resource on which the operation is performed.
- :type resource: str
- :param operation: The operation that users can perform.
- :type operation: str
- :param description: The description for 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(OperationDisplay, 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 OperationListResult(msrest.serialization.Model):
- """An array of operations supported by the resource provider.
-
- :param value: List of AML workspace operations supported by the AML workspace resource
- provider.
- :type value: list[~azure.mgmt.machinelearningservices.models.Operation]
- """
-
- _attribute_map = {
- 'value': {'key': 'value', 'type': '[Operation]'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(OperationListResult, self).__init__(**kwargs)
- self.value = kwargs.get('value', None)
-
-
-class PaginatedComputeResourcesList(msrest.serialization.Model):
- """Paginated list of Machine Learning compute objects wrapped in ARM resource envelope.
-
- :param value: An array of Machine Learning compute objects wrapped in ARM resource envelope.
- :type value: list[~azure.mgmt.machinelearningservices.models.ComputeResource]
- :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': '[ComputeResource]'},
- 'next_link': {'key': 'nextLink', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(PaginatedComputeResourcesList, self).__init__(**kwargs)
- self.value = kwargs.get('value', None)
- self.next_link = kwargs.get('next_link', None)
-
-
-class PaginatedWorkspaceConnectionsList(msrest.serialization.Model):
- """Paginated list of Workspace connection objects.
-
- :param value: An array of Workspace connection objects.
- :type value: list[~azure.mgmt.machinelearningservices.models.WorkspaceConnection]
- :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': '[WorkspaceConnection]'},
- 'next_link': {'key': 'nextLink', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(PaginatedWorkspaceConnectionsList, self).__init__(**kwargs)
- self.value = kwargs.get('value', None)
- self.next_link = kwargs.get('next_link', None)
-
-
-class Password(msrest.serialization.Model):
- """Password.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :ivar name:
- :vartype name: str
- :ivar value:
- :vartype value: str
- """
-
- _validation = {
- 'name': {'readonly': True},
- 'value': {'readonly': True},
- }
-
- _attribute_map = {
- 'name': {'key': 'name', 'type': 'str'},
- 'value': {'key': 'value', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(Password, self).__init__(**kwargs)
- self.name = None
- self.value = None
-
-
-class PrivateEndpoint(msrest.serialization.Model):
- """The Private Endpoint resource.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :ivar id: The ARM identifier for Private Endpoint.
- :vartype id: str
- """
-
- _validation = {
- 'id': {'readonly': True},
- }
-
- _attribute_map = {
- 'id': {'key': 'id', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(PrivateEndpoint, self).__init__(**kwargs)
- self.id = None
-
-
-class PrivateEndpointConnection(msrest.serialization.Model):
- """The Private Endpoint Connection resource.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :ivar id: ResourceId of the private endpoint connection.
- :vartype id: str
- :ivar name: Friendly name of the private endpoint connection.
- :vartype name: str
- :ivar type: Resource type of private endpoint connection.
- :vartype type: str
- :param private_endpoint: The resource of private end point.
- :type private_endpoint: ~azure.mgmt.machinelearningservices.models.PrivateEndpoint
- :param private_link_service_connection_state: A collection of information about the state of
- the connection between service consumer and provider.
- :type private_link_service_connection_state:
- ~azure.mgmt.machinelearningservices.models.PrivateLinkServiceConnectionState
- :ivar provisioning_state: The provisioning state of the private endpoint connection resource.
- Possible values include: "Succeeded", "Creating", "Deleting", "Failed".
- :vartype provisioning_state: str or
- ~azure.mgmt.machinelearningservices.models.PrivateEndpointConnectionProvisioningState
- """
-
- _validation = {
- 'id': {'readonly': True},
- 'name': {'readonly': True},
- 'type': {'readonly': True},
- 'provisioning_state': {'readonly': True},
- }
-
- _attribute_map = {
- 'id': {'key': 'id', 'type': 'str'},
- 'name': {'key': 'name', 'type': 'str'},
- 'type': {'key': 'type', 'type': 'str'},
- 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'},
- 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'},
- 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(PrivateEndpointConnection, self).__init__(**kwargs)
- self.id = None
- self.name = None
- self.type = None
- self.private_endpoint = kwargs.get('private_endpoint', None)
- self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None)
- self.provisioning_state = None
-
-
-class PrivateLinkResource(Resource):
- """A private link resource.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :ivar id: Specifies the resource ID.
- :vartype id: str
- :ivar name: Specifies the name of the resource.
- :vartype name: str
- :param identity: The identity of the resource.
- :type identity: ~azure.mgmt.machinelearningservices.models.Identity
- :param location: 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 sku: The sku of the workspace.
- :type sku: ~azure.mgmt.machinelearningservices.models.Sku
- :ivar group_id: The private link resource group id.
- :vartype group_id: str
- :ivar required_members: The private link resource required member names.
- :vartype required_members: list[str]
- :param required_zone_names: The private link resource Private link DNS zone name.
- :type required_zone_names: list[str]
- """
-
- _validation = {
- 'id': {'readonly': True},
- 'name': {'readonly': True},
- 'type': {'readonly': True},
- 'group_id': {'readonly': True},
- 'required_members': {'readonly': True},
- }
-
- _attribute_map = {
- 'id': {'key': 'id', 'type': 'str'},
- 'name': {'key': 'name', 'type': 'str'},
- 'identity': {'key': 'identity', 'type': 'Identity'},
- 'location': {'key': 'location', 'type': 'str'},
- 'type': {'key': 'type', 'type': 'str'},
- 'tags': {'key': 'tags', 'type': '{str}'},
- 'sku': {'key': 'sku', 'type': 'Sku'},
- 'group_id': {'key': 'properties.groupId', 'type': 'str'},
- 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'},
- 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(PrivateLinkResource, self).__init__(**kwargs)
- self.group_id = None
- self.required_members = None
- self.required_zone_names = kwargs.get('required_zone_names', None)
-
-
-class PrivateLinkResourceListResult(msrest.serialization.Model):
- """A list of private link resources.
-
- :param value: Array of private link resources.
- :type value: list[~azure.mgmt.machinelearningservices.models.PrivateLinkResource]
- """
-
- _attribute_map = {
- 'value': {'key': 'value', 'type': '[PrivateLinkResource]'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(PrivateLinkResourceListResult, self).__init__(**kwargs)
- self.value = kwargs.get('value', None)
-
-
-class PrivateLinkServiceConnectionState(msrest.serialization.Model):
- """A collection of information about the state of the connection between service consumer and provider.
-
- :param status: Indicates whether the connection has been Approved/Rejected/Removed by the owner
- of the service. Possible values include: "Pending", "Approved", "Rejected", "Disconnected",
- "Timeout".
- :type status: str or
- ~azure.mgmt.machinelearningservices.models.PrivateEndpointServiceConnectionStatus
- :param description: The reason for approval/rejection of the connection.
- :type description: str
- :param actions_required: A message indicating if changes on the service provider require any
- updates on the consumer.
- :type actions_required: str
- """
-
- _attribute_map = {
- 'status': {'key': 'status', 'type': 'str'},
- 'description': {'key': 'description', 'type': 'str'},
- 'actions_required': {'key': 'actionsRequired', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(PrivateLinkServiceConnectionState, self).__init__(**kwargs)
- self.status = kwargs.get('status', None)
- self.description = kwargs.get('description', None)
- self.actions_required = kwargs.get('actions_required', None)
-
-
-class QuotaBaseProperties(msrest.serialization.Model):
- """The properties for Quota update or retrieval.
-
- :param id: Specifies the resource ID.
- :type id: str
- :param type: Specifies the resource type.
- :type type: str
- :param limit: The maximum permitted quota of the resource.
- :type limit: long
- :param unit: An enum describing the unit of quota measurement. Possible values include:
- "Count".
- :type unit: str or ~azure.mgmt.machinelearningservices.models.QuotaUnit
- """
-
- _attribute_map = {
- 'id': {'key': 'id', 'type': 'str'},
- 'type': {'key': 'type', 'type': 'str'},
- 'limit': {'key': 'limit', 'type': 'long'},
- 'unit': {'key': 'unit', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(QuotaBaseProperties, self).__init__(**kwargs)
- self.id = kwargs.get('id', None)
- self.type = kwargs.get('type', None)
- self.limit = kwargs.get('limit', None)
- self.unit = kwargs.get('unit', None)
-
-
-class QuotaUpdateParameters(msrest.serialization.Model):
- """Quota update parameters.
-
- :param value: The list for update quota.
- :type value: list[~azure.mgmt.machinelearningservices.models.QuotaBaseProperties]
- """
-
- _attribute_map = {
- 'value': {'key': 'value', 'type': '[QuotaBaseProperties]'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(QuotaUpdateParameters, self).__init__(**kwargs)
- self.value = kwargs.get('value', None)
-
-
-class RegistryListCredentialsResult(msrest.serialization.Model):
- """RegistryListCredentialsResult.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :ivar location:
- :vartype location: str
- :ivar username:
- :vartype username: str
- :param passwords:
- :type passwords: list[~azure.mgmt.machinelearningservices.models.Password]
- """
-
- _validation = {
- 'location': {'readonly': True},
- 'username': {'readonly': True},
- }
-
- _attribute_map = {
- 'location': {'key': 'location', 'type': 'str'},
- 'username': {'key': 'username', 'type': 'str'},
- 'passwords': {'key': 'passwords', 'type': '[Password]'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(RegistryListCredentialsResult, self).__init__(**kwargs)
- self.location = None
- self.username = None
- self.passwords = kwargs.get('passwords', None)
-
-
-class ResourceId(msrest.serialization.Model):
- """Represents a resource ID. For example, for a subnet, it is the resource URL for the subnet.
-
- All required parameters must be populated in order to send to Azure.
-
- :param id: Required. The ID of the resource.
- :type id: str
- """
-
- _validation = {
- 'id': {'required': True},
- }
-
- _attribute_map = {
- 'id': {'key': 'id', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(ResourceId, self).__init__(**kwargs)
- self.id = kwargs['id']
-
-
-class ResourceName(msrest.serialization.Model):
- """The Resource Name.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :ivar value: The name of the resource.
- :vartype value: str
- :ivar localized_value: The localized name of the resource.
- :vartype localized_value: str
- """
-
- _validation = {
- 'value': {'readonly': True},
- 'localized_value': {'readonly': True},
- }
-
- _attribute_map = {
- 'value': {'key': 'value', 'type': 'str'},
- 'localized_value': {'key': 'localizedValue', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(ResourceName, self).__init__(**kwargs)
- self.value = None
- self.localized_value = None
-
-
-class ResourceQuota(msrest.serialization.Model):
- """The quota assigned to a resource.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :ivar id: Specifies the resource ID.
- :vartype id: str
- :ivar type: Specifies the resource type.
- :vartype type: str
- :ivar name: Name of the resource.
- :vartype name: ~azure.mgmt.machinelearningservices.models.ResourceName
- :ivar limit: The maximum permitted quota of the resource.
- :vartype limit: long
- :ivar unit: An enum describing the unit of quota measurement. Possible values include: "Count".
- :vartype unit: str or ~azure.mgmt.machinelearningservices.models.QuotaUnit
- """
-
- _validation = {
- 'id': {'readonly': True},
- 'type': {'readonly': True},
- 'name': {'readonly': True},
- 'limit': {'readonly': True},
- 'unit': {'readonly': True},
- }
-
- _attribute_map = {
- 'id': {'key': 'id', 'type': 'str'},
- 'type': {'key': 'type', 'type': 'str'},
- 'name': {'key': 'name', 'type': 'ResourceName'},
- 'limit': {'key': 'limit', 'type': 'long'},
- 'unit': {'key': 'unit', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(ResourceQuota, self).__init__(**kwargs)
- self.id = None
- self.type = None
- self.name = None
- self.limit = None
- self.unit = None
-
-
-class ResourceSkuLocationInfo(msrest.serialization.Model):
- """ResourceSkuLocationInfo.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :ivar location: Location of the SKU.
- :vartype location: str
- :ivar zones: List of availability zones where the SKU is supported.
- :vartype zones: list[str]
- :ivar zone_details: Details of capabilities available to a SKU in specific zones.
- :vartype zone_details: list[~azure.mgmt.machinelearningservices.models.ResourceSkuZoneDetails]
- """
-
- _validation = {
- 'location': {'readonly': True},
- 'zones': {'readonly': True},
- 'zone_details': {'readonly': True},
- }
-
- _attribute_map = {
- 'location': {'key': 'location', 'type': 'str'},
- 'zones': {'key': 'zones', 'type': '[str]'},
- 'zone_details': {'key': 'zoneDetails', 'type': '[ResourceSkuZoneDetails]'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(ResourceSkuLocationInfo, self).__init__(**kwargs)
- self.location = None
- self.zones = None
- self.zone_details = None
-
-
-class ResourceSkuZoneDetails(msrest.serialization.Model):
- """Describes The zonal capabilities of a SKU.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :ivar name: The set of zones that the SKU is available in with the specified capabilities.
- :vartype name: list[str]
- :ivar capabilities: A list of capabilities that are available for the SKU in the specified list
- of zones.
- :vartype capabilities: list[~azure.mgmt.machinelearningservices.models.SKUCapability]
- """
-
- _validation = {
- 'name': {'readonly': True},
- 'capabilities': {'readonly': True},
- }
-
- _attribute_map = {
- 'name': {'key': 'name', 'type': '[str]'},
- 'capabilities': {'key': 'capabilities', 'type': '[SKUCapability]'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(ResourceSkuZoneDetails, self).__init__(**kwargs)
- self.name = None
- self.capabilities = None
-
-
-class Restriction(msrest.serialization.Model):
- """The restriction because of which SKU cannot be used.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :ivar type: The type of restrictions. As of now only possible value for this is location.
- :vartype type: str
- :ivar values: The value of restrictions. If the restriction type is set to location. This would
- be different locations where the SKU is restricted.
- :vartype values: list[str]
- :param reason_code: The reason for the restriction. Possible values include: "NotSpecified",
- "NotAvailableForRegion", "NotAvailableForSubscription".
- :type reason_code: str or ~azure.mgmt.machinelearningservices.models.ReasonCode
- """
-
- _validation = {
- 'type': {'readonly': True},
- 'values': {'readonly': True},
- }
-
- _attribute_map = {
- 'type': {'key': 'type', 'type': 'str'},
- 'values': {'key': 'values', 'type': '[str]'},
- 'reason_code': {'key': 'reasonCode', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(Restriction, self).__init__(**kwargs)
- self.type = None
- self.values = None
- self.reason_code = kwargs.get('reason_code', None)
-
-
-class ScaleSettings(msrest.serialization.Model):
- """scale settings for AML Compute.
-
- All required parameters must be populated in order to send to Azure.
-
- :param max_node_count: Required. Max number of nodes to use.
- :type max_node_count: int
- :param min_node_count: Min number of nodes to use.
- :type min_node_count: int
- :param node_idle_time_before_scale_down: Node Idle Time before scaling down amlCompute.
- :type node_idle_time_before_scale_down: ~datetime.timedelta
- """
-
- _validation = {
- 'max_node_count': {'required': True},
- }
-
- _attribute_map = {
- 'max_node_count': {'key': 'maxNodeCount', 'type': 'int'},
- 'min_node_count': {'key': 'minNodeCount', 'type': 'int'},
- 'node_idle_time_before_scale_down': {'key': 'nodeIdleTimeBeforeScaleDown', 'type': 'duration'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(ScaleSettings, self).__init__(**kwargs)
- self.max_node_count = kwargs['max_node_count']
- self.min_node_count = kwargs.get('min_node_count', 0)
- self.node_idle_time_before_scale_down = kwargs.get('node_idle_time_before_scale_down', None)
-
-
-class ServicePrincipalCredentials(msrest.serialization.Model):
- """Service principal credentials.
-
- All required parameters must be populated in order to send to Azure.
-
- :param client_id: Required. Client Id.
- :type client_id: str
- :param client_secret: Required. Client secret.
- :type client_secret: str
- """
-
- _validation = {
- 'client_id': {'required': True},
- 'client_secret': {'required': True},
- }
-
- _attribute_map = {
- 'client_id': {'key': 'clientId', 'type': 'str'},
- 'client_secret': {'key': 'clientSecret', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(ServicePrincipalCredentials, self).__init__(**kwargs)
- self.client_id = kwargs['client_id']
- self.client_secret = kwargs['client_secret']
-
-
-class SharedPrivateLinkResource(msrest.serialization.Model):
- """SharedPrivateLinkResource.
-
- :param name: Unique name of the private link.
- :type name: str
- :param private_link_resource_id: The resource id that private link links to.
- :type private_link_resource_id: str
- :param group_id: The private link resource group id.
- :type group_id: str
- :param request_message: Request message.
- :type request_message: str
- :param status: Indicates whether the connection has been Approved/Rejected/Removed by the owner
- of the service. Possible values include: "Pending", "Approved", "Rejected", "Disconnected",
- "Timeout".
- :type status: str or
- ~azure.mgmt.machinelearningservices.models.PrivateEndpointServiceConnectionStatus
- """
-
- _attribute_map = {
- 'name': {'key': 'name', 'type': 'str'},
- 'private_link_resource_id': {'key': 'properties.privateLinkResourceId', 'type': 'str'},
- 'group_id': {'key': 'properties.groupId', 'type': 'str'},
- 'request_message': {'key': 'properties.requestMessage', 'type': 'str'},
- 'status': {'key': 'properties.status', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(SharedPrivateLinkResource, self).__init__(**kwargs)
- self.name = kwargs.get('name', None)
- self.private_link_resource_id = kwargs.get('private_link_resource_id', None)
- self.group_id = kwargs.get('group_id', None)
- self.request_message = kwargs.get('request_message', None)
- self.status = kwargs.get('status', None)
-
-
-class Sku(msrest.serialization.Model):
- """Sku of the resource.
-
- :param name: Name of the sku.
- :type name: str
- :param tier: Tier of the sku like Basic or Enterprise.
- :type tier: str
- """
-
- _attribute_map = {
- 'name': {'key': 'name', 'type': 'str'},
- 'tier': {'key': 'tier', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(Sku, self).__init__(**kwargs)
- self.name = kwargs.get('name', None)
- self.tier = kwargs.get('tier', None)
-
-
-class SKUCapability(msrest.serialization.Model):
- """Features/user capabilities associated with the sku.
-
- :param name: Capability/Feature ID.
- :type name: str
- :param value: Details about the feature/capability.
- :type value: str
- """
-
- _attribute_map = {
- 'name': {'key': 'name', 'type': 'str'},
- 'value': {'key': 'value', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(SKUCapability, self).__init__(**kwargs)
- self.name = kwargs.get('name', None)
- self.value = kwargs.get('value', None)
-
-
-class SkuListResult(msrest.serialization.Model):
- """List of skus with features.
-
- :param value:
- :type value: list[~azure.mgmt.machinelearningservices.models.WorkspaceSku]
- :param next_link: The URI to fetch the next page of Workspace Skus. Call ListNext() with this
- URI to fetch the next page of Workspace Skus.
- :type next_link: str
- """
-
- _attribute_map = {
- 'value': {'key': 'value', 'type': '[WorkspaceSku]'},
- 'next_link': {'key': 'nextLink', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(SkuListResult, self).__init__(**kwargs)
- self.value = kwargs.get('value', None)
- self.next_link = kwargs.get('next_link', None)
-
-
-class SkuSettings(msrest.serialization.Model):
- """Describes Workspace Sku details and features.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :ivar locations: The set of locations that the SKU is available. This will be supported and
- registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.).
- :vartype locations: list[str]
- :ivar location_info: A list of locations and availability zones in those locations where the
- SKU is available.
- :vartype location_info:
- list[~azure.mgmt.machinelearningservices.models.ResourceSkuLocationInfo]
- :ivar tier: Sku Tier like Basic or Enterprise.
- :vartype tier: str
- :ivar resource_type:
- :vartype resource_type: str
- :ivar name:
- :vartype name: str
- :ivar capabilities: List of features/user capabilities associated with the sku.
- :vartype capabilities: list[~azure.mgmt.machinelearningservices.models.SKUCapability]
- :param restrictions: The restrictions because of which SKU cannot be used. This is empty if
- there are no restrictions.
- :type restrictions: list[~azure.mgmt.machinelearningservices.models.Restriction]
- """
-
- _validation = {
- 'locations': {'readonly': True},
- 'location_info': {'readonly': True},
- 'tier': {'readonly': True},
- 'resource_type': {'readonly': True},
- 'name': {'readonly': True},
- 'capabilities': {'readonly': True},
- }
-
- _attribute_map = {
- 'locations': {'key': 'locations', 'type': '[str]'},
- 'location_info': {'key': 'locationInfo', 'type': '[ResourceSkuLocationInfo]'},
- 'tier': {'key': 'tier', 'type': 'str'},
- 'resource_type': {'key': 'resourceType', 'type': 'str'},
- 'name': {'key': 'name', 'type': 'str'},
- 'capabilities': {'key': 'capabilities', 'type': '[SKUCapability]'},
- 'restrictions': {'key': 'restrictions', 'type': '[Restriction]'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(SkuSettings, self).__init__(**kwargs)
- self.locations = None
- self.location_info = None
- self.tier = None
- self.resource_type = None
- self.name = None
- self.capabilities = None
- self.restrictions = kwargs.get('restrictions', None)
-
-
-class SslConfiguration(msrest.serialization.Model):
- """The ssl configuration for scoring.
-
- :param status: Enable or disable ssl for scoring. Possible values include: "Disabled",
- "Enabled".
- :type status: str or ~azure.mgmt.machinelearningservices.models.SslConfigurationStatus
- :param cert: Cert data.
- :type cert: str
- :param key: Key data.
- :type key: str
- :param cname: CNAME of the cert.
- :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 SystemService(msrest.serialization.Model):
- """A system service running on a compute.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :ivar system_service_type: The type of this system service.
- :vartype system_service_type: str
- :ivar public_ip_address: Public IP address.
- :vartype public_ip_address: str
- :ivar version: The version for this type.
- :vartype version: str
- """
-
- _validation = {
- 'system_service_type': {'readonly': True},
- 'public_ip_address': {'readonly': True},
- 'version': {'readonly': True},
- }
-
- _attribute_map = {
- 'system_service_type': {'key': 'systemServiceType', 'type': 'str'},
- 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'},
- 'version': {'key': 'version', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(SystemService, self).__init__(**kwargs)
- self.system_service_type = None
- self.public_ip_address = None
- self.version = None
-
-
-class UpdateWorkspaceQuotas(msrest.serialization.Model):
- """The properties for update Quota response.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :ivar id: Specifies the resource ID.
- :vartype id: str
- :ivar type: Specifies the resource type.
- :vartype type: str
- :param limit: The maximum permitted quota of the resource.
- :type limit: long
- :ivar unit: An enum describing the unit of quota measurement. Possible values include: "Count".
- :vartype unit: str or ~azure.mgmt.machinelearningservices.models.QuotaUnit
- :param status: Status of update workspace quota. Possible values include: "Undefined",
- "Success", "Failure", "InvalidQuotaBelowClusterMinimum",
- "InvalidQuotaExceedsSubscriptionLimit", "InvalidVMFamilyName", "OperationNotSupportedForSku",
- "OperationNotEnabledForRegion".
- :type status: str or ~azure.mgmt.machinelearningservices.models.Status
- """
-
- _validation = {
- 'id': {'readonly': True},
- 'type': {'readonly': True},
- 'unit': {'readonly': True},
- }
-
- _attribute_map = {
- 'id': {'key': 'id', 'type': 'str'},
- 'type': {'key': 'type', 'type': 'str'},
- 'limit': {'key': 'limit', 'type': 'long'},
- 'unit': {'key': 'unit', 'type': 'str'},
- 'status': {'key': 'status', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(UpdateWorkspaceQuotas, self).__init__(**kwargs)
- self.id = None
- self.type = None
- self.limit = kwargs.get('limit', None)
- self.unit = None
- self.status = kwargs.get('status', None)
-
-
-class UpdateWorkspaceQuotasResult(msrest.serialization.Model):
- """The result of update workspace quota.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :ivar value: The list of workspace quota update result.
- :vartype value: list[~azure.mgmt.machinelearningservices.models.UpdateWorkspaceQuotas]
- :ivar next_link: The URI to fetch the next page of workspace quota update result. Call
- ListNext() with this to fetch the next page of Workspace Quota update result.
- :vartype next_link: str
- """
-
- _validation = {
- 'value': {'readonly': True},
- 'next_link': {'readonly': True},
- }
-
- _attribute_map = {
- 'value': {'key': 'value', 'type': '[UpdateWorkspaceQuotas]'},
- 'next_link': {'key': 'nextLink', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(UpdateWorkspaceQuotasResult, self).__init__(**kwargs)
- self.value = None
- self.next_link = None
-
-
-class Usage(msrest.serialization.Model):
- """Describes AML Resource Usage.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :ivar id: Specifies the resource ID.
- :vartype id: str
- :ivar type: Specifies the resource type.
- :vartype type: str
- :ivar unit: An enum describing the unit of usage measurement. Possible values include: "Count".
- :vartype unit: str or ~azure.mgmt.machinelearningservices.models.UsageUnit
- :ivar current_value: The current usage of the resource.
- :vartype current_value: long
- :ivar limit: The maximum permitted usage of the resource.
- :vartype limit: long
- :ivar name: The name of the type of usage.
- :vartype name: ~azure.mgmt.machinelearningservices.models.UsageName
- """
-
- _validation = {
- 'id': {'readonly': True},
- 'type': {'readonly': True},
- 'unit': {'readonly': True},
- 'current_value': {'readonly': True},
- 'limit': {'readonly': True},
- 'name': {'readonly': True},
- }
-
- _attribute_map = {
- 'id': {'key': 'id', 'type': 'str'},
- 'type': {'key': 'type', 'type': 'str'},
- 'unit': {'key': 'unit', 'type': 'str'},
- 'current_value': {'key': 'currentValue', 'type': 'long'},
- 'limit': {'key': 'limit', 'type': 'long'},
- 'name': {'key': 'name', 'type': 'UsageName'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(Usage, self).__init__(**kwargs)
- self.id = None
- self.type = None
- self.unit = None
- self.current_value = None
- self.limit = None
- self.name = None
-
-
-class UsageName(msrest.serialization.Model):
- """The Usage Names.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :ivar value: The name of the resource.
- :vartype value: str
- :ivar localized_value: The localized name of the resource.
- :vartype localized_value: str
- """
-
- _validation = {
- 'value': {'readonly': True},
- 'localized_value': {'readonly': True},
- }
-
- _attribute_map = {
- 'value': {'key': 'value', 'type': 'str'},
- 'localized_value': {'key': 'localizedValue', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(UsageName, self).__init__(**kwargs)
- self.value = None
- self.localized_value = None
-
-
-class UserAccountCredentials(msrest.serialization.Model):
- """Settings for user account that gets created on each on the nodes of a compute.
-
- All required parameters must be populated in order to send to Azure.
-
- :param admin_user_name: Required. Name of the administrator user account which can be used to
- SSH to nodes.
- :type admin_user_name: str
- :param admin_user_ssh_public_key: SSH public key of the administrator user account.
- :type admin_user_ssh_public_key: str
- :param admin_user_password: Password of the administrator user account.
- :type admin_user_password: str
- """
-
- _validation = {
- 'admin_user_name': {'required': True},
- }
-
- _attribute_map = {
- 'admin_user_name': {'key': 'adminUserName', 'type': 'str'},
- 'admin_user_ssh_public_key': {'key': 'adminUserSshPublicKey', 'type': 'str'},
- 'admin_user_password': {'key': 'adminUserPassword', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(UserAccountCredentials, self).__init__(**kwargs)
- self.admin_user_name = kwargs['admin_user_name']
- self.admin_user_ssh_public_key = kwargs.get('admin_user_ssh_public_key', None)
- self.admin_user_password = kwargs.get('admin_user_password', None)
-
-
-class VirtualMachine(Compute):
- """A Machine Learning compute based on Azure Virtual Machines.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- All required parameters must be populated in order to send to Azure.
-
- :param compute_type: Required. The type of compute.Constant filled by server. Possible values
- include: "AKS", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", "HDInsight",
- "Databricks", "DataLakeAnalytics".
- :type compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType
- :param compute_location: Location for the underlying compute.
- :type compute_location: str
- :ivar provisioning_state: The provision state of the cluster. Valid values are Unknown,
- Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating",
- "Creating", "Deleting", "Succeeded", "Failed", "Canceled".
- :vartype provisioning_state: str or
- ~azure.mgmt.machinelearningservices.models.ProvisioningState
- :param description: The description of the Machine Learning compute.
- :type description: str
- :ivar created_on: The date and time when the compute was created.
- :vartype created_on: ~datetime.datetime
- :ivar modified_on: The date and time when the compute was last modified.
- :vartype modified_on: ~datetime.datetime
- :param resource_id: ARM resource id of the underlying compute.
- :type resource_id: str
- :ivar provisioning_errors: Errors during provisioning.
- :vartype provisioning_errors:
- list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError]
- :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought
- from outside if true, or machine learning service provisioned it if false.
- :vartype is_attached_compute: bool
- :param properties:
- :type properties: ~azure.mgmt.machinelearningservices.models.VirtualMachineProperties
- """
-
- _validation = {
- 'compute_type': {'required': True},
- 'provisioning_state': {'readonly': True},
- 'created_on': {'readonly': True},
- 'modified_on': {'readonly': True},
- 'provisioning_errors': {'readonly': True},
- 'is_attached_compute': {'readonly': True},
- }
-
- _attribute_map = {
- 'compute_type': {'key': 'computeType', 'type': 'str'},
- 'compute_location': {'key': 'computeLocation', 'type': 'str'},
- 'provisioning_state': {'key': 'provisioningState', 'type': 'str'},
- 'description': {'key': 'description', 'type': 'str'},
- 'created_on': {'key': 'createdOn', 'type': 'iso-8601'},
- 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'},
- 'resource_id': {'key': 'resourceId', 'type': 'str'},
- 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'},
- 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'},
- 'properties': {'key': 'properties', 'type': 'VirtualMachineProperties'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(VirtualMachine, self).__init__(**kwargs)
- self.compute_type = 'VirtualMachine' # type: str
- self.properties = kwargs.get('properties', None)
-
-
-class VirtualMachineProperties(msrest.serialization.Model):
- """VirtualMachineProperties.
-
- :param virtual_machine_size: Virtual Machine size.
- :type virtual_machine_size: str
- :param ssh_port: Port open for ssh connections.
- :type ssh_port: int
- :param address: Public IP address of the virtual machine.
- :type address: str
- :param administrator_account: Admin credentials for virtual machine.
- :type administrator_account:
- ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials
- """
-
- _attribute_map = {
- 'virtual_machine_size': {'key': 'virtualMachineSize', 'type': 'str'},
- 'ssh_port': {'key': 'sshPort', 'type': 'int'},
- 'address': {'key': 'address', 'type': 'str'},
- 'administrator_account': {'key': 'administratorAccount', 'type': 'VirtualMachineSshCredentials'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(VirtualMachineProperties, self).__init__(**kwargs)
- self.virtual_machine_size = kwargs.get('virtual_machine_size', None)
- self.ssh_port = kwargs.get('ssh_port', None)
- self.address = kwargs.get('address', None)
- self.administrator_account = kwargs.get('administrator_account', None)
-
-
-class VirtualMachineSecrets(ComputeSecrets):
- """Secrets related to a Machine Learning compute based on AKS.
-
- All required parameters must be populated in order to send to Azure.
-
- :param compute_type: Required. The type of compute.Constant filled by server. Possible values
- include: "AKS", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", "HDInsight",
- "Databricks", "DataLakeAnalytics".
- :type compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType
- :param administrator_account: Admin credentials for virtual machine.
- :type administrator_account:
- ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials
- """
-
- _validation = {
- 'compute_type': {'required': True},
- }
-
- _attribute_map = {
- 'compute_type': {'key': 'computeType', 'type': 'str'},
- 'administrator_account': {'key': 'administratorAccount', 'type': 'VirtualMachineSshCredentials'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(VirtualMachineSecrets, self).__init__(**kwargs)
- self.compute_type = 'VirtualMachine' # type: str
- self.administrator_account = kwargs.get('administrator_account', None)
-
-
-class VirtualMachineSize(msrest.serialization.Model):
- """Describes the properties of a VM size.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :ivar name: The name of the virtual machine size.
- :vartype name: str
- :ivar family: The family name of the virtual machine size.
- :vartype family: str
- :ivar v_cp_us: The number of vCPUs supported by the virtual machine size.
- :vartype v_cp_us: int
- :ivar gpus: The number of gPUs supported by the virtual machine size.
- :vartype gpus: int
- :ivar os_vhd_size_mb: The OS VHD disk size, in MB, allowed by the virtual machine size.
- :vartype os_vhd_size_mb: int
- :ivar max_resource_volume_mb: The resource volume size, in MB, allowed by the virtual machine
- size.
- :vartype max_resource_volume_mb: int
- :ivar memory_gb: The amount of memory, in GB, supported by the virtual machine size.
- :vartype memory_gb: float
- :ivar low_priority_capable: Specifies if the virtual machine size supports low priority VMs.
- :vartype low_priority_capable: bool
- :ivar premium_io: Specifies if the virtual machine size supports premium IO.
- :vartype premium_io: bool
- :param estimated_vm_prices: The estimated price information for using a VM.
- :type estimated_vm_prices: ~azure.mgmt.machinelearningservices.models.EstimatedVMPrices
- :param supported_compute_types: Specifies the compute types supported by the virtual machine
- size.
- :type supported_compute_types: list[str]
- """
-
- _validation = {
- 'name': {'readonly': True},
- 'family': {'readonly': True},
- 'v_cp_us': {'readonly': True},
- 'gpus': {'readonly': True},
- 'os_vhd_size_mb': {'readonly': True},
- 'max_resource_volume_mb': {'readonly': True},
- 'memory_gb': {'readonly': True},
- 'low_priority_capable': {'readonly': True},
- 'premium_io': {'readonly': True},
- }
-
- _attribute_map = {
- 'name': {'key': 'name', 'type': 'str'},
- 'family': {'key': 'family', 'type': 'str'},
- 'v_cp_us': {'key': 'vCPUs', 'type': 'int'},
- 'gpus': {'key': 'gpus', 'type': 'int'},
- 'os_vhd_size_mb': {'key': 'osVhdSizeMB', 'type': 'int'},
- 'max_resource_volume_mb': {'key': 'maxResourceVolumeMB', 'type': 'int'},
- 'memory_gb': {'key': 'memoryGB', 'type': 'float'},
- 'low_priority_capable': {'key': 'lowPriorityCapable', 'type': 'bool'},
- 'premium_io': {'key': 'premiumIO', 'type': 'bool'},
- 'estimated_vm_prices': {'key': 'estimatedVMPrices', 'type': 'EstimatedVMPrices'},
- 'supported_compute_types': {'key': 'supportedComputeTypes', 'type': '[str]'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(VirtualMachineSize, self).__init__(**kwargs)
- self.name = None
- self.family = None
- self.v_cp_us = None
- self.gpus = None
- self.os_vhd_size_mb = None
- self.max_resource_volume_mb = None
- self.memory_gb = None
- self.low_priority_capable = None
- self.premium_io = None
- self.estimated_vm_prices = kwargs.get('estimated_vm_prices', None)
- self.supported_compute_types = kwargs.get('supported_compute_types', None)
-
-
-class VirtualMachineSizeListResult(msrest.serialization.Model):
- """The List Virtual Machine size operation response.
-
- :param aml_compute: The list of virtual machine sizes supported by AmlCompute.
- :type aml_compute: list[~azure.mgmt.machinelearningservices.models.VirtualMachineSize]
- """
-
- _attribute_map = {
- 'aml_compute': {'key': 'amlCompute', 'type': '[VirtualMachineSize]'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(VirtualMachineSizeListResult, self).__init__(**kwargs)
- self.aml_compute = kwargs.get('aml_compute', None)
-
-
-class VirtualMachineSshCredentials(msrest.serialization.Model):
- """Admin credentials for virtual machine.
-
- :param username: Username of admin account.
- :type username: str
- :param password: Password of admin account.
- :type password: str
- :param public_key_data: Public key data.
- :type public_key_data: str
- :param private_key_data: Private key data.
- :type private_key_data: str
- """
-
- _attribute_map = {
- 'username': {'key': 'username', 'type': 'str'},
- 'password': {'key': 'password', 'type': 'str'},
- 'public_key_data': {'key': 'publicKeyData', 'type': 'str'},
- 'private_key_data': {'key': 'privateKeyData', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(VirtualMachineSshCredentials, self).__init__(**kwargs)
- self.username = kwargs.get('username', None)
- self.password = kwargs.get('password', None)
- self.public_key_data = kwargs.get('public_key_data', None)
- self.private_key_data = kwargs.get('private_key_data', None)
-
-
-class Workspace(Resource):
- """An object that represents a machine learning workspace.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :ivar id: Specifies the resource ID.
- :vartype id: str
- :ivar name: Specifies the name of the resource.
- :vartype name: str
- :param identity: The identity of the resource.
- :type identity: ~azure.mgmt.machinelearningservices.models.Identity
- :param location: 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 sku: The sku of the workspace.
- :type sku: ~azure.mgmt.machinelearningservices.models.Sku
- :ivar workspace_id: The immutable id associated with this workspace.
- :vartype workspace_id: str
- :param description: The description of this workspace.
- :type description: str
- :param friendly_name: The friendly name for this workspace. This name in mutable.
- :type friendly_name: str
- :ivar creation_time: The creation time of the machine learning workspace in ISO8601 format.
- :vartype creation_time: ~datetime.datetime
- :param key_vault: ARM id of the key vault associated with this workspace. This cannot be
- changed once the workspace has been created.
- :type key_vault: str
- :param application_insights: ARM id of the application insights associated with this workspace.
- This cannot be changed once the workspace has been created.
- :type application_insights: str
- :param container_registry: ARM id of the container registry associated with this workspace.
- This cannot be changed once the workspace has been created.
- :type container_registry: str
- :param storage_account: ARM id of the storage account associated with this workspace. This
- cannot be changed once the workspace has been created.
- :type storage_account: str
- :param discovery_url: Url for the discovery service to identify regional endpoints for machine
- learning experimentation services.
- :type discovery_url: str
- :ivar provisioning_state: The current deployment state of workspace resource. The
- provisioningState is to indicate states for resource provisioning. Possible values include:
- "Unknown", "Updating", "Creating", "Deleting", "Succeeded", "Failed", "Canceled".
- :vartype provisioning_state: str or
- ~azure.mgmt.machinelearningservices.models.ProvisioningState
- :param encryption: The encryption settings of Azure ML workspace.
- :type encryption: ~azure.mgmt.machinelearningservices.models.EncryptionProperty
- :param hbi_workspace: The flag to signal HBI data in the workspace and reduce diagnostic data
- collected by the service.
- :type hbi_workspace: bool
- :ivar service_provisioned_resource_group: The name of the managed resource group created by
- workspace RP in customer subscription if the workspace is CMK workspace.
- :vartype service_provisioned_resource_group: str
- :ivar private_link_count: Count of private connections in the workspace.
- :vartype private_link_count: int
- :param image_build_compute: The compute name for image build.
- :type image_build_compute: str
- :param allow_public_access_when_behind_vnet: The flag to indicate whether to allow public
- access when behind VNet.
- :type allow_public_access_when_behind_vnet: bool
- :ivar private_endpoint_connections: The list of private endpoint connections in the workspace.
- :vartype private_endpoint_connections:
- list[~azure.mgmt.machinelearningservices.models.PrivateEndpointConnection]
- :param shared_private_link_resources: The list of shared private link resources in this
- workspace.
- :type shared_private_link_resources:
- list[~azure.mgmt.machinelearningservices.models.SharedPrivateLinkResource]
- :ivar notebook_info: The notebook info of Azure ML workspace.
- :vartype notebook_info: ~azure.mgmt.machinelearningservices.models.NotebookResourceInfo
- """
-
- _validation = {
- 'id': {'readonly': True},
- 'name': {'readonly': True},
- 'type': {'readonly': True},
- 'workspace_id': {'readonly': True},
- 'creation_time': {'readonly': True},
- 'provisioning_state': {'readonly': True},
- 'service_provisioned_resource_group': {'readonly': True},
- 'private_link_count': {'readonly': True},
- 'private_endpoint_connections': {'readonly': True},
- 'notebook_info': {'readonly': True},
- }
-
- _attribute_map = {
- 'id': {'key': 'id', 'type': 'str'},
- 'name': {'key': 'name', 'type': 'str'},
- 'identity': {'key': 'identity', 'type': 'Identity'},
- 'location': {'key': 'location', 'type': 'str'},
- 'type': {'key': 'type', 'type': 'str'},
- 'tags': {'key': 'tags', 'type': '{str}'},
- 'sku': {'key': 'sku', 'type': 'Sku'},
- 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'},
- 'description': {'key': 'properties.description', 'type': 'str'},
- 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'},
- 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'},
- 'key_vault': {'key': 'properties.keyVault', 'type': 'str'},
- 'application_insights': {'key': 'properties.applicationInsights', 'type': 'str'},
- 'container_registry': {'key': 'properties.containerRegistry', 'type': 'str'},
- 'storage_account': {'key': 'properties.storageAccount', 'type': 'str'},
- 'discovery_url': {'key': 'properties.discoveryUrl', 'type': 'str'},
- 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
- 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperty'},
- 'hbi_workspace': {'key': 'properties.hbiWorkspace', 'type': 'bool'},
- 'service_provisioned_resource_group': {'key': 'properties.serviceProvisionedResourceGroup', 'type': 'str'},
- 'private_link_count': {'key': 'properties.privateLinkCount', 'type': 'int'},
- 'image_build_compute': {'key': 'properties.imageBuildCompute', 'type': 'str'},
- 'allow_public_access_when_behind_vnet': {'key': 'properties.allowPublicAccessWhenBehindVnet', 'type': 'bool'},
- 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'},
- 'shared_private_link_resources': {'key': 'properties.sharedPrivateLinkResources', 'type': '[SharedPrivateLinkResource]'},
- 'notebook_info': {'key': 'properties.notebookInfo', 'type': 'NotebookResourceInfo'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(Workspace, self).__init__(**kwargs)
- self.workspace_id = None
- self.description = kwargs.get('description', None)
- self.friendly_name = kwargs.get('friendly_name', None)
- self.creation_time = None
- self.key_vault = kwargs.get('key_vault', None)
- self.application_insights = kwargs.get('application_insights', None)
- self.container_registry = kwargs.get('container_registry', None)
- self.storage_account = kwargs.get('storage_account', None)
- self.discovery_url = kwargs.get('discovery_url', None)
- self.provisioning_state = None
- self.encryption = kwargs.get('encryption', None)
- self.hbi_workspace = kwargs.get('hbi_workspace', False)
- self.service_provisioned_resource_group = None
- self.private_link_count = None
- self.image_build_compute = kwargs.get('image_build_compute', None)
- self.allow_public_access_when_behind_vnet = kwargs.get('allow_public_access_when_behind_vnet', False)
- self.private_endpoint_connections = None
- self.shared_private_link_resources = kwargs.get('shared_private_link_resources', None)
- self.notebook_info = None
-
-
-class WorkspaceConnection(msrest.serialization.Model):
- """Workspace connection.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :ivar id: ResourceId of the workspace connection.
- :vartype id: str
- :ivar name: Friendly name of the workspace connection.
- :vartype name: str
- :ivar type: Resource type of workspace connection.
- :vartype type: str
- :param category: Category of the workspace connection.
- :type category: str
- :param target: Target of the workspace connection.
- :type target: str
- :param auth_type: Authorization type of the workspace connection.
- :type auth_type: str
- :param value: Value details of the workspace connection.
- :type value: str
- """
-
- _validation = {
- 'id': {'readonly': True},
- 'name': {'readonly': True},
- 'type': {'readonly': True},
- }
-
- _attribute_map = {
- 'id': {'key': 'id', 'type': 'str'},
- 'name': {'key': 'name', 'type': 'str'},
- 'type': {'key': 'type', 'type': 'str'},
- 'category': {'key': 'properties.category', 'type': 'str'},
- 'target': {'key': 'properties.target', 'type': 'str'},
- 'auth_type': {'key': 'properties.authType', 'type': 'str'},
- 'value': {'key': 'properties.value', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(WorkspaceConnection, self).__init__(**kwargs)
- self.id = None
- self.name = None
- self.type = None
- self.category = kwargs.get('category', None)
- self.target = kwargs.get('target', None)
- self.auth_type = kwargs.get('auth_type', None)
- self.value = kwargs.get('value', None)
-
-
-class WorkspaceConnectionDto(msrest.serialization.Model):
- """object used for creating workspace connection.
-
- :param name: Friendly name of the workspace connection.
- :type name: str
- :param category: Category of the workspace connection.
- :type category: str
- :param target: Target of the workspace connection.
- :type target: str
- :param auth_type: Authorization type of the workspace connection.
- :type auth_type: str
- :param value: Value details of the workspace connection.
- :type value: str
- """
-
- _attribute_map = {
- 'name': {'key': 'name', 'type': 'str'},
- 'category': {'key': 'properties.category', 'type': 'str'},
- 'target': {'key': 'properties.target', 'type': 'str'},
- 'auth_type': {'key': 'properties.authType', 'type': 'str'},
- 'value': {'key': 'properties.value', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(WorkspaceConnectionDto, self).__init__(**kwargs)
- self.name = kwargs.get('name', None)
- self.category = kwargs.get('category', None)
- self.target = kwargs.get('target', None)
- self.auth_type = kwargs.get('auth_type', None)
- self.value = kwargs.get('value', None)
-
-
-class WorkspaceListResult(msrest.serialization.Model):
- """The result of a request to list machine learning workspaces.
-
- :param value: The list of machine learning workspaces. Since this list may be incomplete, the
- nextLink field should be used to request the next list of machine learning workspaces.
- :type value: list[~azure.mgmt.machinelearningservices.models.Workspace]
- :param next_link: The URI that can be used to request the next list of machine learning
- workspaces.
- :type next_link: str
- """
-
- _attribute_map = {
- 'value': {'key': 'value', 'type': '[Workspace]'},
- 'next_link': {'key': 'nextLink', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(WorkspaceListResult, self).__init__(**kwargs)
- self.value = kwargs.get('value', None)
- self.next_link = kwargs.get('next_link', None)
-
-
-class WorkspaceSku(msrest.serialization.Model):
- """AML workspace sku information.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :ivar resource_type:
- :vartype resource_type: str
- :ivar skus: The list of workspace sku settings.
- :vartype skus: list[~azure.mgmt.machinelearningservices.models.SkuSettings]
- """
-
- _validation = {
- 'resource_type': {'readonly': True},
- 'skus': {'readonly': True},
- }
-
- _attribute_map = {
- 'resource_type': {'key': 'resourceType', 'type': 'str'},
- 'skus': {'key': 'skus', 'type': '[SkuSettings]'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(WorkspaceSku, self).__init__(**kwargs)
- self.resource_type = None
- self.skus = None
-
-
-class WorkspaceUpdateParameters(msrest.serialization.Model):
- """The parameters for updating a machine learning workspace.
-
- :param tags: A set of tags. The resource tags for the machine learning workspace.
- :type tags: dict[str, str]
- :param sku: The sku of the workspace.
- :type sku: ~azure.mgmt.machinelearningservices.models.Sku
- :param description: The description of this workspace.
- :type description: str
- :param friendly_name: The friendly name for this workspace.
- :type friendly_name: str
- """
-
- _attribute_map = {
- 'tags': {'key': 'tags', 'type': '{str}'},
- 'sku': {'key': 'sku', 'type': 'Sku'},
- 'description': {'key': 'properties.description', 'type': 'str'},
- 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(WorkspaceUpdateParameters, self).__init__(**kwargs)
- self.tags = kwargs.get('tags', None)
- self.sku = kwargs.get('sku', None)
- self.description = kwargs.get('description', None)
- self.friendly_name = kwargs.get('friendly_name', None)
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_models_py3.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_models_py3.py
index 8abd97a8cef0..ef1aae0bdfd6 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_models_py3.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_models_py3.py
@@ -7,7 +7,7 @@
# --------------------------------------------------------------------------
import datetime
-from typing import Dict, List, Optional, Union
+from typing import Any, Dict, List, Optional, Union
from azure.core.exceptions import HttpResponseError
import msrest.serialization
@@ -19,37 +19,38 @@ class Compute(msrest.serialization.Model):
"""Machine Learning compute object.
You probably want to use the sub-classes and not this class directly. Known
- sub-classes are: AKS, AmlCompute, ComputeInstance, DataFactory, DataLakeAnalytics, Databricks, HDInsight, VirtualMachine.
+ sub-classes are: AKS, AmlCompute, ComputeInstance, DataFactory, DataLakeAnalytics, Databricks, HDInsight, Kubernetes, SynapseSpark, VirtualMachine.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
- :param compute_type: Required. The type of compute.Constant filled by server. Possible values
- include: "AKS", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", "HDInsight",
- "Databricks", "DataLakeAnalytics".
- :type compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType
- :param compute_location: Location for the underlying compute.
- :type compute_location: str
+ :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values
+ include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine",
+ "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark".
+ :vartype compute_type: str or ~azure_machine_learning_workspaces.models.ComputeType
+ :ivar compute_location: Location for the underlying compute.
+ :vartype compute_location: str
:ivar provisioning_state: The provision state of the cluster. Valid values are Unknown,
Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating",
"Creating", "Deleting", "Succeeded", "Failed", "Canceled".
- :vartype provisioning_state: str or
- ~azure.mgmt.machinelearningservices.models.ProvisioningState
- :param description: The description of the Machine Learning compute.
- :type description: str
- :ivar created_on: The date and time when the compute was created.
+ :vartype provisioning_state: str or ~azure_machine_learning_workspaces.models.ProvisioningState
+ :ivar description: The description of the Machine Learning compute.
+ :vartype description: str
+ :ivar created_on: The time at which the compute was created.
:vartype created_on: ~datetime.datetime
- :ivar modified_on: The date and time when the compute was last modified.
+ :ivar modified_on: The time at which the compute was last modified.
:vartype modified_on: ~datetime.datetime
- :param resource_id: ARM resource id of the underlying compute.
- :type resource_id: str
+ :ivar resource_id: ARM resource id of the underlying compute.
+ :vartype resource_id: str
:ivar provisioning_errors: Errors during provisioning.
- :vartype provisioning_errors:
- list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError]
+ :vartype provisioning_errors: list[~azure_machine_learning_workspaces.models.ErrorResponse]
:ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought
from outside if true, or machine learning service provisioned it if false.
:vartype is_attached_compute: bool
+ :ivar disable_local_auth: Opt-out of local authentication and ensure customers can use only MSI
+ and AAD exclusively for authentication.
+ :vartype disable_local_auth: bool
"""
_validation = {
@@ -69,12 +70,13 @@ class Compute(msrest.serialization.Model):
'created_on': {'key': 'createdOn', 'type': 'iso-8601'},
'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'},
'resource_id': {'key': 'resourceId', 'type': 'str'},
- 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'},
+ 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'},
'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'},
+ 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'},
}
_subtype_map = {
- 'compute_type': {'AKS': 'AKS', 'AmlCompute': 'AmlCompute', 'ComputeInstance': 'ComputeInstance', 'DataFactory': 'DataFactory', 'DataLakeAnalytics': 'DataLakeAnalytics', 'Databricks': 'Databricks', 'HDInsight': 'HDInsight', 'VirtualMachine': 'VirtualMachine'}
+ 'compute_type': {'AKS': 'AKS', 'AmlCompute': 'AmlCompute', 'ComputeInstance': 'ComputeInstance', 'DataFactory': 'DataFactory', 'DataLakeAnalytics': 'DataLakeAnalytics', 'Databricks': 'Databricks', 'HDInsight': 'HDInsight', 'Kubernetes': 'Kubernetes', 'SynapseSpark': 'SynapseSpark', 'VirtualMachine': 'VirtualMachine'}
}
def __init__(
@@ -83,8 +85,20 @@ def __init__(
compute_location: Optional[str] = None,
description: Optional[str] = None,
resource_id: Optional[str] = None,
+ disable_local_auth: Optional[bool] = None,
**kwargs
):
+ """
+ :keyword compute_location: Location for the underlying compute.
+ :paramtype compute_location: str
+ :keyword description: The description of the Machine Learning compute.
+ :paramtype description: str
+ :keyword resource_id: ARM resource id of the underlying compute.
+ :paramtype resource_id: str
+ :keyword disable_local_auth: Opt-out of local authentication and ensure customers can use only
+ MSI and AAD exclusively for authentication.
+ :paramtype disable_local_auth: bool
+ """
super(Compute, self).__init__(**kwargs)
self.compute_type = None # type: Optional[str]
self.compute_location = compute_location
@@ -95,6 +109,7 @@ def __init__(
self.resource_id = resource_id
self.provisioning_errors = None
self.is_attached_compute = None
+ self.disable_local_auth = disable_local_auth
class AKS(Compute):
@@ -104,33 +119,34 @@ class AKS(Compute):
All required parameters must be populated in order to send to Azure.
- :param compute_type: Required. The type of compute.Constant filled by server. Possible values
- include: "AKS", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", "HDInsight",
- "Databricks", "DataLakeAnalytics".
- :type compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType
- :param compute_location: Location for the underlying compute.
- :type compute_location: str
+ :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values
+ include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine",
+ "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark".
+ :vartype compute_type: str or ~azure_machine_learning_workspaces.models.ComputeType
+ :ivar compute_location: Location for the underlying compute.
+ :vartype compute_location: str
:ivar provisioning_state: The provision state of the cluster. Valid values are Unknown,
Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating",
"Creating", "Deleting", "Succeeded", "Failed", "Canceled".
- :vartype provisioning_state: str or
- ~azure.mgmt.machinelearningservices.models.ProvisioningState
- :param description: The description of the Machine Learning compute.
- :type description: str
- :ivar created_on: The date and time when the compute was created.
+ :vartype provisioning_state: str or ~azure_machine_learning_workspaces.models.ProvisioningState
+ :ivar description: The description of the Machine Learning compute.
+ :vartype description: str
+ :ivar created_on: The time at which the compute was created.
:vartype created_on: ~datetime.datetime
- :ivar modified_on: The date and time when the compute was last modified.
+ :ivar modified_on: The time at which the compute was last modified.
:vartype modified_on: ~datetime.datetime
- :param resource_id: ARM resource id of the underlying compute.
- :type resource_id: str
+ :ivar resource_id: ARM resource id of the underlying compute.
+ :vartype resource_id: str
:ivar provisioning_errors: Errors during provisioning.
- :vartype provisioning_errors:
- list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError]
+ :vartype provisioning_errors: list[~azure_machine_learning_workspaces.models.ErrorResponse]
:ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought
from outside if true, or machine learning service provisioned it if false.
:vartype is_attached_compute: bool
- :param properties: AKS properties.
- :type properties: ~azure.mgmt.machinelearningservices.models.AKSProperties
+ :ivar disable_local_auth: Opt-out of local authentication and ensure customers can use only MSI
+ and AAD exclusively for authentication.
+ :vartype disable_local_auth: bool
+ :ivar properties: AKS properties.
+ :vartype properties: ~azure_machine_learning_workspaces.models.AKSProperties
"""
_validation = {
@@ -150,8 +166,9 @@ class AKS(Compute):
'created_on': {'key': 'createdOn', 'type': 'iso-8601'},
'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'},
'resource_id': {'key': 'resourceId', 'type': 'str'},
- 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'},
+ 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'},
'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'},
+ 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'},
'properties': {'key': 'properties', 'type': 'AKSProperties'},
}
@@ -161,14 +178,71 @@ def __init__(
compute_location: Optional[str] = None,
description: Optional[str] = None,
resource_id: Optional[str] = None,
+ disable_local_auth: Optional[bool] = None,
properties: Optional["AKSProperties"] = None,
**kwargs
):
- super(AKS, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, **kwargs)
+ """
+ :keyword compute_location: Location for the underlying compute.
+ :paramtype compute_location: str
+ :keyword description: The description of the Machine Learning compute.
+ :paramtype description: str
+ :keyword resource_id: ARM resource id of the underlying compute.
+ :paramtype resource_id: str
+ :keyword disable_local_auth: Opt-out of local authentication and ensure customers can use only
+ MSI and AAD exclusively for authentication.
+ :paramtype disable_local_auth: bool
+ :keyword properties: AKS properties.
+ :paramtype properties: ~azure_machine_learning_workspaces.models.AKSProperties
+ """
+ super(AKS, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, **kwargs)
self.compute_type = 'AKS' # type: str
self.properties = properties
+class AksComputeSecretsProperties(msrest.serialization.Model):
+ """Properties of AksComputeSecrets.
+
+ :ivar user_kube_config: Content of kubeconfig file that can be used to connect to the
+ Kubernetes cluster.
+ :vartype user_kube_config: str
+ :ivar admin_kube_config: Content of kubeconfig file that can be used to connect to the
+ Kubernetes cluster.
+ :vartype admin_kube_config: str
+ :ivar image_pull_secret_name: Image registry pull secret.
+ :vartype image_pull_secret_name: str
+ """
+
+ _attribute_map = {
+ 'user_kube_config': {'key': 'userKubeConfig', 'type': 'str'},
+ 'admin_kube_config': {'key': 'adminKubeConfig', 'type': 'str'},
+ 'image_pull_secret_name': {'key': 'imagePullSecretName', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ user_kube_config: Optional[str] = None,
+ admin_kube_config: Optional[str] = None,
+ image_pull_secret_name: Optional[str] = None,
+ **kwargs
+ ):
+ """
+ :keyword user_kube_config: Content of kubeconfig file that can be used to connect to the
+ Kubernetes cluster.
+ :paramtype user_kube_config: str
+ :keyword admin_kube_config: Content of kubeconfig file that can be used to connect to the
+ Kubernetes cluster.
+ :paramtype admin_kube_config: str
+ :keyword image_pull_secret_name: Image registry pull secret.
+ :paramtype image_pull_secret_name: str
+ """
+ super(AksComputeSecretsProperties, self).__init__(**kwargs)
+ self.user_kube_config = user_kube_config
+ self.admin_kube_config = admin_kube_config
+ self.image_pull_secret_name = image_pull_secret_name
+
+
class ComputeSecrets(msrest.serialization.Model):
"""Secrets related to a Machine Learning compute. Might differ for every type of compute.
@@ -177,10 +251,10 @@ class ComputeSecrets(msrest.serialization.Model):
All required parameters must be populated in order to send to Azure.
- :param compute_type: Required. The type of compute.Constant filled by server. Possible values
- include: "AKS", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", "HDInsight",
- "Databricks", "DataLakeAnalytics".
- :type compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType
+ :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values
+ include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine",
+ "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark".
+ :vartype compute_type: str or ~azure_machine_learning_workspaces.models.ComputeType
"""
_validation = {
@@ -199,27 +273,29 @@ def __init__(
self,
**kwargs
):
+ """
+ """
super(ComputeSecrets, self).__init__(**kwargs)
self.compute_type = None # type: Optional[str]
-class AksComputeSecrets(ComputeSecrets):
+class AksComputeSecrets(ComputeSecrets, AksComputeSecretsProperties):
"""Secrets related to a Machine Learning compute based on AKS.
All required parameters must be populated in order to send to Azure.
- :param compute_type: Required. The type of compute.Constant filled by server. Possible values
- include: "AKS", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", "HDInsight",
- "Databricks", "DataLakeAnalytics".
- :type compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType
- :param user_kube_config: Content of kubeconfig file that can be used to connect to the
+ :ivar user_kube_config: Content of kubeconfig file that can be used to connect to the
Kubernetes cluster.
- :type user_kube_config: str
- :param admin_kube_config: Content of kubeconfig file that can be used to connect to the
+ :vartype user_kube_config: str
+ :ivar admin_kube_config: Content of kubeconfig file that can be used to connect to the
Kubernetes cluster.
- :type admin_kube_config: str
- :param image_pull_secret_name: Image registry pull secret.
- :type image_pull_secret_name: str
+ :vartype admin_kube_config: str
+ :ivar image_pull_secret_name: Image registry pull secret.
+ :vartype image_pull_secret_name: str
+ :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values
+ include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine",
+ "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark".
+ :vartype compute_type: str or ~azure_machine_learning_workspaces.models.ComputeType
"""
_validation = {
@@ -227,10 +303,10 @@ class AksComputeSecrets(ComputeSecrets):
}
_attribute_map = {
- 'compute_type': {'key': 'computeType', 'type': 'str'},
'user_kube_config': {'key': 'userKubeConfig', 'type': 'str'},
'admin_kube_config': {'key': 'adminKubeConfig', 'type': 'str'},
'image_pull_secret_name': {'key': 'imagePullSecretName', 'type': 'str'},
+ 'compute_type': {'key': 'computeType', 'type': 'str'},
}
def __init__(
@@ -241,27 +317,38 @@ def __init__(
image_pull_secret_name: Optional[str] = None,
**kwargs
):
- super(AksComputeSecrets, self).__init__(**kwargs)
- self.compute_type = 'AKS' # type: str
+ """
+ :keyword user_kube_config: Content of kubeconfig file that can be used to connect to the
+ Kubernetes cluster.
+ :paramtype user_kube_config: str
+ :keyword admin_kube_config: Content of kubeconfig file that can be used to connect to the
+ Kubernetes cluster.
+ :paramtype admin_kube_config: str
+ :keyword image_pull_secret_name: Image registry pull secret.
+ :paramtype image_pull_secret_name: str
+ """
+ super(AksComputeSecrets, self).__init__(user_kube_config=user_kube_config, admin_kube_config=admin_kube_config, image_pull_secret_name=image_pull_secret_name, **kwargs)
self.user_kube_config = user_kube_config
self.admin_kube_config = admin_kube_config
self.image_pull_secret_name = image_pull_secret_name
+ self.compute_type = 'AKS' # type: str
+ self.compute_type = 'AKS' # type: str
class AksNetworkingConfiguration(msrest.serialization.Model):
"""Advance configuration for AKS networking.
- :param subnet_id: Virtual network subnet resource ID the compute nodes belong to.
- :type subnet_id: str
- :param service_cidr: A CIDR notation IP range from which to assign service cluster IPs. It must
+ :ivar subnet_id: Virtual network subnet resource ID the compute nodes belong to.
+ :vartype subnet_id: str
+ :ivar service_cidr: A CIDR notation IP range from which to assign service cluster IPs. It must
not overlap with any Subnet IP ranges.
- :type service_cidr: str
- :param dns_service_ip: An IP address assigned to the Kubernetes DNS service. It must be within
+ :vartype service_cidr: str
+ :ivar dns_service_ip: An IP address assigned to the Kubernetes DNS service. It must be within
the Kubernetes service address range specified in serviceCidr.
- :type dns_service_ip: str
- :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker bridge network. It
+ :vartype dns_service_ip: str
+ :ivar docker_bridge_cidr: A CIDR notation IP range assigned to the Docker bridge network. It
must not overlap with any Subnet IP ranges or the Kubernetes service address range.
- :type docker_bridge_cidr: str
+ :vartype docker_bridge_cidr: str
"""
_validation = {
@@ -286,6 +373,19 @@ def __init__(
docker_bridge_cidr: Optional[str] = None,
**kwargs
):
+ """
+ :keyword subnet_id: Virtual network subnet resource ID the compute nodes belong to.
+ :paramtype subnet_id: str
+ :keyword service_cidr: A CIDR notation IP range from which to assign service cluster IPs. It
+ must not overlap with any Subnet IP ranges.
+ :paramtype service_cidr: str
+ :keyword dns_service_ip: An IP address assigned to the Kubernetes DNS service. It must be
+ within the Kubernetes service address range specified in serviceCidr.
+ :paramtype dns_service_ip: str
+ :keyword docker_bridge_cidr: A CIDR notation IP range assigned to the Docker bridge network. It
+ must not overlap with any Subnet IP ranges or the Kubernetes service address range.
+ :paramtype docker_bridge_cidr: str
+ """
super(AksNetworkingConfiguration, self).__init__(**kwargs)
self.subnet_id = subnet_id
self.service_cidr = service_cidr
@@ -298,33 +398,44 @@ class AKSProperties(msrest.serialization.Model):
Variables are only populated by the server, and will be ignored when sending a request.
- :param cluster_fqdn: Cluster full qualified domain name.
- :type cluster_fqdn: str
+ :ivar cluster_fqdn: Cluster full qualified domain name.
+ :vartype cluster_fqdn: str
:ivar system_services: System services.
- :vartype system_services: list[~azure.mgmt.machinelearningservices.models.SystemService]
- :param agent_count: Number of agents.
- :type agent_count: int
- :param agent_vm_size: Agent virtual machine size.
- :type agent_vm_size: str
- :param ssl_configuration: SSL configuration.
- :type ssl_configuration: ~azure.mgmt.machinelearningservices.models.SslConfiguration
- :param aks_networking_configuration: AKS networking configuration for vnet.
- :type aks_networking_configuration:
- ~azure.mgmt.machinelearningservices.models.AksNetworkingConfiguration
+ :vartype system_services: list[~azure_machine_learning_workspaces.models.SystemService]
+ :ivar agent_count: Number of agents.
+ :vartype agent_count: int
+ :ivar agent_vm_size: Agent virtual machine size.
+ :vartype agent_vm_size: str
+ :ivar cluster_purpose: Intended usage of the cluster. Possible values include: "FastProd",
+ "DenseProd", "DevTest". Default value: "FastProd".
+ :vartype cluster_purpose: str or ~azure_machine_learning_workspaces.models.ClusterPurpose
+ :ivar ssl_configuration: SSL configuration.
+ :vartype ssl_configuration: ~azure_machine_learning_workspaces.models.SslConfiguration
+ :ivar aks_networking_configuration: AKS networking configuration for vnet.
+ :vartype aks_networking_configuration:
+ ~azure_machine_learning_workspaces.models.AksNetworkingConfiguration
+ :ivar load_balancer_type: Load Balancer Type. Possible values include: "PublicIp",
+ "InternalLoadBalancer". Default value: "PublicIp".
+ :vartype load_balancer_type: str or ~azure_machine_learning_workspaces.models.LoadBalancerType
+ :ivar load_balancer_subnet: Load Balancer Subnet.
+ :vartype load_balancer_subnet: str
"""
_validation = {
'system_services': {'readonly': True},
- 'agent_count': {'minimum': 1},
+ 'agent_count': {'minimum': 0},
}
_attribute_map = {
'cluster_fqdn': {'key': 'clusterFqdn', 'type': 'str'},
'system_services': {'key': 'systemServices', 'type': '[SystemService]'},
'agent_count': {'key': 'agentCount', 'type': 'int'},
- 'agent_vm_size': {'key': 'agentVMSize', 'type': 'str'},
+ 'agent_vm_size': {'key': 'agentVmSize', 'type': 'str'},
+ 'cluster_purpose': {'key': 'clusterPurpose', 'type': 'str'},
'ssl_configuration': {'key': 'sslConfiguration', 'type': 'SslConfiguration'},
'aks_networking_configuration': {'key': 'aksNetworkingConfiguration', 'type': 'AksNetworkingConfiguration'},
+ 'load_balancer_type': {'key': 'loadBalancerType', 'type': 'str'},
+ 'load_balancer_subnet': {'key': 'loadBalancerSubnet', 'type': 'str'},
}
def __init__(
@@ -333,53 +444,82 @@ def __init__(
cluster_fqdn: Optional[str] = None,
agent_count: Optional[int] = None,
agent_vm_size: Optional[str] = None,
+ cluster_purpose: Optional[Union[str, "ClusterPurpose"]] = "FastProd",
ssl_configuration: Optional["SslConfiguration"] = None,
aks_networking_configuration: Optional["AksNetworkingConfiguration"] = None,
+ load_balancer_type: Optional[Union[str, "LoadBalancerType"]] = "PublicIp",
+ load_balancer_subnet: Optional[str] = None,
**kwargs
):
+ """
+ :keyword cluster_fqdn: Cluster full qualified domain name.
+ :paramtype cluster_fqdn: str
+ :keyword agent_count: Number of agents.
+ :paramtype agent_count: int
+ :keyword agent_vm_size: Agent virtual machine size.
+ :paramtype agent_vm_size: str
+ :keyword cluster_purpose: Intended usage of the cluster. Possible values include: "FastProd",
+ "DenseProd", "DevTest". Default value: "FastProd".
+ :paramtype cluster_purpose: str or ~azure_machine_learning_workspaces.models.ClusterPurpose
+ :keyword ssl_configuration: SSL configuration.
+ :paramtype ssl_configuration: ~azure_machine_learning_workspaces.models.SslConfiguration
+ :keyword aks_networking_configuration: AKS networking configuration for vnet.
+ :paramtype aks_networking_configuration:
+ ~azure_machine_learning_workspaces.models.AksNetworkingConfiguration
+ :keyword load_balancer_type: Load Balancer Type. Possible values include: "PublicIp",
+ "InternalLoadBalancer". Default value: "PublicIp".
+ :paramtype load_balancer_type: str or
+ ~azure_machine_learning_workspaces.models.LoadBalancerType
+ :keyword load_balancer_subnet: Load Balancer Subnet.
+ :paramtype load_balancer_subnet: str
+ """
super(AKSProperties, self).__init__(**kwargs)
self.cluster_fqdn = cluster_fqdn
self.system_services = None
self.agent_count = agent_count
self.agent_vm_size = agent_vm_size
+ self.cluster_purpose = cluster_purpose
self.ssl_configuration = ssl_configuration
self.aks_networking_configuration = aks_networking_configuration
+ self.load_balancer_type = load_balancer_type
+ self.load_balancer_subnet = load_balancer_subnet
class AmlCompute(Compute):
- """An Azure Machine Learning compute.
+ """Properties(top level) of AmlCompute.
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 compute_type: Required. The type of compute.Constant filled by server. Possible values
- include: "AKS", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", "HDInsight",
- "Databricks", "DataLakeAnalytics".
- :type compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType
- :param compute_location: Location for the underlying compute.
- :type compute_location: str
+ :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values
+ include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine",
+ "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark".
+ :vartype compute_type: str or ~azure_machine_learning_workspaces.models.ComputeType
+ :ivar compute_location: Location for the underlying compute.
+ :vartype compute_location: str
:ivar provisioning_state: The provision state of the cluster. Valid values are Unknown,
Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating",
"Creating", "Deleting", "Succeeded", "Failed", "Canceled".
- :vartype provisioning_state: str or
- ~azure.mgmt.machinelearningservices.models.ProvisioningState
- :param description: The description of the Machine Learning compute.
- :type description: str
- :ivar created_on: The date and time when the compute was created.
+ :vartype provisioning_state: str or ~azure_machine_learning_workspaces.models.ProvisioningState
+ :ivar description: The description of the Machine Learning compute.
+ :vartype description: str
+ :ivar created_on: The time at which the compute was created.
:vartype created_on: ~datetime.datetime
- :ivar modified_on: The date and time when the compute was last modified.
+ :ivar modified_on: The time at which the compute was last modified.
:vartype modified_on: ~datetime.datetime
- :param resource_id: ARM resource id of the underlying compute.
- :type resource_id: str
+ :ivar resource_id: ARM resource id of the underlying compute.
+ :vartype resource_id: str
:ivar provisioning_errors: Errors during provisioning.
- :vartype provisioning_errors:
- list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError]
+ :vartype provisioning_errors: list[~azure_machine_learning_workspaces.models.ErrorResponse]
:ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought
from outside if true, or machine learning service provisioned it if false.
:vartype is_attached_compute: bool
- :param properties: AML Compute properties.
- :type properties: ~azure.mgmt.machinelearningservices.models.AmlComputeProperties
+ :ivar disable_local_auth: Opt-out of local authentication and ensure customers can use only MSI
+ and AAD exclusively for authentication.
+ :vartype disable_local_auth: bool
+ :ivar properties: Properties of AmlCompute.
+ :vartype properties: ~azure_machine_learning_workspaces.models.AmlComputeProperties
"""
_validation = {
@@ -399,8 +539,9 @@ class AmlCompute(Compute):
'created_on': {'key': 'createdOn', 'type': 'iso-8601'},
'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'},
'resource_id': {'key': 'resourceId', 'type': 'str'},
- 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'},
+ 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'},
'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'},
+ 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'},
'properties': {'key': 'properties', 'type': 'AmlComputeProperties'},
}
@@ -410,10 +551,24 @@ def __init__(
compute_location: Optional[str] = None,
description: Optional[str] = None,
resource_id: Optional[str] = None,
+ disable_local_auth: Optional[bool] = None,
properties: Optional["AmlComputeProperties"] = None,
**kwargs
):
- super(AmlCompute, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, **kwargs)
+ """
+ :keyword compute_location: Location for the underlying compute.
+ :paramtype compute_location: str
+ :keyword description: The description of the Machine Learning compute.
+ :paramtype description: str
+ :keyword resource_id: ARM resource id of the underlying compute.
+ :paramtype resource_id: str
+ :keyword disable_local_auth: Opt-out of local authentication and ensure customers can use only
+ MSI and AAD exclusively for authentication.
+ :paramtype disable_local_auth: bool
+ :keyword properties: Properties of AmlCompute.
+ :paramtype properties: ~azure_machine_learning_workspaces.models.AmlComputeProperties
+ """
+ super(AmlCompute, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, **kwargs)
self.compute_type = 'AmlCompute' # type: str
self.properties = properties
@@ -434,7 +589,7 @@ class AmlComputeNodeInformation(msrest.serialization.Model):
:ivar node_state: State of the compute node. Values are idle, running, preparing, unusable,
leaving and preempted. Possible values include: "idle", "running", "preparing", "unusable",
"leaving", "preempted".
- :vartype node_state: str or ~azure.mgmt.machinelearningservices.models.NodeState
+ :vartype node_state: str or ~azure_machine_learning_workspaces.models.NodeState
:ivar run_id: ID of the Experiment running on the node, if any else null.
:vartype run_id: str
"""
@@ -461,6 +616,8 @@ def __init__(
self,
**kwargs
):
+ """
+ """
super(AmlComputeNodeInformation, self).__init__(**kwargs)
self.node_id = None
self.private_ip_address = None
@@ -470,83 +627,36 @@ def __init__(
self.run_id = None
-class ComputeNodesInformation(msrest.serialization.Model):
- """Compute nodes information related to a Machine Learning compute. Might differ for every type of compute.
-
- You probably want to use the sub-classes and not this class directly. Known
- sub-classes are: AmlComputeNodesInformation.
-
- 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 compute_type: Required. The type of compute.Constant filled by server. Possible values
- include: "AKS", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", "HDInsight",
- "Databricks", "DataLakeAnalytics".
- :type compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType
- :ivar next_link: The continuation token.
- :vartype next_link: str
- """
-
- _validation = {
- 'compute_type': {'required': True},
- 'next_link': {'readonly': True},
- }
-
- _attribute_map = {
- 'compute_type': {'key': 'computeType', 'type': 'str'},
- 'next_link': {'key': 'nextLink', 'type': 'str'},
- }
-
- _subtype_map = {
- 'compute_type': {'AmlCompute': 'AmlComputeNodesInformation'}
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(ComputeNodesInformation, self).__init__(**kwargs)
- self.compute_type = None # type: Optional[str]
- self.next_link = None
-
-
-class AmlComputeNodesInformation(ComputeNodesInformation):
- """Compute node information related to a AmlCompute.
+class AmlComputeNodesInformation(msrest.serialization.Model):
+ """Result of AmlCompute Nodes.
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 compute_type: Required. The type of compute.Constant filled by server. Possible values
- include: "AKS", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", "HDInsight",
- "Databricks", "DataLakeAnalytics".
- :type compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType
+ :ivar nodes: The collection of returned AmlCompute nodes details.
+ :vartype nodes: list[~azure_machine_learning_workspaces.models.AmlComputeNodeInformation]
:ivar next_link: The continuation token.
:vartype next_link: str
- :ivar nodes: The collection of returned AmlCompute nodes details.
- :vartype nodes: list[~azure.mgmt.machinelearningservices.models.AmlComputeNodeInformation]
"""
_validation = {
- 'compute_type': {'required': True},
- 'next_link': {'readonly': True},
'nodes': {'readonly': True},
+ 'next_link': {'readonly': True},
}
_attribute_map = {
- 'compute_type': {'key': 'computeType', 'type': 'str'},
- 'next_link': {'key': 'nextLink', 'type': 'str'},
'nodes': {'key': 'nodes', 'type': '[AmlComputeNodeInformation]'},
+ 'next_link': {'key': 'nextLink', 'type': 'str'},
}
def __init__(
self,
**kwargs
):
+ """
+ """
super(AmlComputeNodesInformation, self).__init__(**kwargs)
- self.compute_type = 'AmlCompute' # type: str
self.nodes = None
+ self.next_link = None
class AmlComputeProperties(msrest.serialization.Model):
@@ -554,40 +664,47 @@ class AmlComputeProperties(msrest.serialization.Model):
Variables are only populated by the server, and will be ignored when sending a request.
- :param vm_size: Virtual Machine Size.
- :type vm_size: str
- :param vm_priority: Virtual Machine priority. Possible values include: "Dedicated",
+ :ivar os_type: Compute OS Type. Possible values include: "Linux", "Windows". Default value:
+ "Linux".
+ :vartype os_type: str or ~azure_machine_learning_workspaces.models.OsType
+ :ivar vm_size: Virtual Machine Size.
+ :vartype vm_size: str
+ :ivar vm_priority: Virtual Machine priority. Possible values include: "Dedicated",
"LowPriority".
- :type vm_priority: str or ~azure.mgmt.machinelearningservices.models.VmPriority
- :param scale_settings: Scale settings for AML Compute.
- :type scale_settings: ~azure.mgmt.machinelearningservices.models.ScaleSettings
- :param user_account_credentials: Credentials for an administrator user account that will be
+ :vartype vm_priority: str or ~azure_machine_learning_workspaces.models.VmPriority
+ :ivar virtual_machine_image: Virtual Machine image for AML Compute - windows only.
+ :vartype virtual_machine_image: ~azure_machine_learning_workspaces.models.VirtualMachineImage
+ :ivar isolated_network: Network is isolated or not.
+ :vartype isolated_network: bool
+ :ivar scale_settings: Scale settings for AML Compute.
+ :vartype scale_settings: ~azure_machine_learning_workspaces.models.ScaleSettings
+ :ivar user_account_credentials: Credentials for an administrator user account that will be
created on each compute node.
- :type user_account_credentials:
- ~azure.mgmt.machinelearningservices.models.UserAccountCredentials
- :param subnet: Virtual network subnet resource ID the compute nodes belong to.
- :type subnet: ~azure.mgmt.machinelearningservices.models.ResourceId
- :param remote_login_port_public_access: State of the public SSH port. Possible values are:
+ :vartype user_account_credentials:
+ ~azure_machine_learning_workspaces.models.UserAccountCredentials
+ :ivar subnet: Virtual network subnet resource ID the compute nodes belong to.
+ :vartype subnet: ~azure_machine_learning_workspaces.models.ResourceId
+ :ivar remote_login_port_public_access: State of the public SSH port. Possible values are:
Disabled - Indicates that the public ssh port is closed on all nodes of the cluster. Enabled -
Indicates that the public ssh port is open on all nodes of the cluster. NotSpecified -
Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined,
else is open all public nodes. It can be default only during cluster creation time, after
creation it will be either enabled or disabled. Possible values include: "Enabled", "Disabled",
"NotSpecified". Default value: "NotSpecified".
- :type remote_login_port_public_access: str or
- ~azure.mgmt.machinelearningservices.models.RemoteLoginPortPublicAccess
+ :vartype remote_login_port_public_access: str or
+ ~azure_machine_learning_workspaces.models.RemoteLoginPortPublicAccess
:ivar allocation_state: Allocation state of the compute. Possible values are: steady -
Indicates that the compute is not resizing. There are no changes to the number of compute nodes
in the compute in progress. A compute enters this state when it is created and when no
operations are being performed on the compute to change the number of compute nodes. resizing -
Indicates that the compute is resizing; that is, compute nodes are being added to or removed
from the compute. Possible values include: "Steady", "Resizing".
- :vartype allocation_state: str or ~azure.mgmt.machinelearningservices.models.AllocationState
+ :vartype allocation_state: str or ~azure_machine_learning_workspaces.models.AllocationState
:ivar allocation_state_transition_time: The time at which the compute entered its current
allocation state.
:vartype allocation_state_transition_time: ~datetime.datetime
:ivar errors: Collection of errors encountered by various compute nodes during node setup.
- :vartype errors: list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError]
+ :vartype errors: list[~azure_machine_learning_workspaces.models.ErrorResponse]
:ivar current_node_count: The number of compute nodes currently assigned to the compute.
:vartype current_node_count: int
:ivar target_node_count: The target number of compute nodes for the compute. If the
@@ -596,7 +713,12 @@ class AmlComputeProperties(msrest.serialization.Model):
the previous resize operation.
:vartype target_node_count: int
:ivar node_state_counts: Counts of various node states on the compute.
- :vartype node_state_counts: ~azure.mgmt.machinelearningservices.models.NodeStateCounts
+ :vartype node_state_counts: ~azure_machine_learning_workspaces.models.NodeStateCounts
+ :ivar enable_node_public_ip: Enable or disable node public IP address provisioning. Possible
+ values are: Possible values are: true - Indicates that the compute nodes will have public IPs
+ provisioned. false - Indicates that the compute nodes will have a private endpoint and no
+ public IPs.
+ :vartype enable_node_public_ip: bool
"""
_validation = {
@@ -609,34 +731,81 @@ class AmlComputeProperties(msrest.serialization.Model):
}
_attribute_map = {
+ 'os_type': {'key': 'osType', 'type': 'str'},
'vm_size': {'key': 'vmSize', 'type': 'str'},
'vm_priority': {'key': 'vmPriority', 'type': 'str'},
+ 'virtual_machine_image': {'key': 'virtualMachineImage', 'type': 'VirtualMachineImage'},
+ 'isolated_network': {'key': 'isolatedNetwork', 'type': 'bool'},
'scale_settings': {'key': 'scaleSettings', 'type': 'ScaleSettings'},
'user_account_credentials': {'key': 'userAccountCredentials', 'type': 'UserAccountCredentials'},
'subnet': {'key': 'subnet', 'type': 'ResourceId'},
'remote_login_port_public_access': {'key': 'remoteLoginPortPublicAccess', 'type': 'str'},
'allocation_state': {'key': 'allocationState', 'type': 'str'},
'allocation_state_transition_time': {'key': 'allocationStateTransitionTime', 'type': 'iso-8601'},
- 'errors': {'key': 'errors', 'type': '[MachineLearningServiceError]'},
+ 'errors': {'key': 'errors', 'type': '[ErrorResponse]'},
'current_node_count': {'key': 'currentNodeCount', 'type': 'int'},
'target_node_count': {'key': 'targetNodeCount', 'type': 'int'},
'node_state_counts': {'key': 'nodeStateCounts', 'type': 'NodeStateCounts'},
+ 'enable_node_public_ip': {'key': 'enableNodePublicIp', 'type': 'bool'},
}
def __init__(
self,
*,
+ os_type: Optional[Union[str, "OsType"]] = "Linux",
vm_size: Optional[str] = None,
vm_priority: Optional[Union[str, "VmPriority"]] = None,
+ virtual_machine_image: Optional["VirtualMachineImage"] = None,
+ isolated_network: Optional[bool] = None,
scale_settings: Optional["ScaleSettings"] = None,
user_account_credentials: Optional["UserAccountCredentials"] = None,
subnet: Optional["ResourceId"] = None,
remote_login_port_public_access: Optional[Union[str, "RemoteLoginPortPublicAccess"]] = "NotSpecified",
+ enable_node_public_ip: Optional[bool] = True,
**kwargs
):
+ """
+ :keyword os_type: Compute OS Type. Possible values include: "Linux", "Windows". Default value:
+ "Linux".
+ :paramtype os_type: str or ~azure_machine_learning_workspaces.models.OsType
+ :keyword vm_size: Virtual Machine Size.
+ :paramtype vm_size: str
+ :keyword vm_priority: Virtual Machine priority. Possible values include: "Dedicated",
+ "LowPriority".
+ :paramtype vm_priority: str or ~azure_machine_learning_workspaces.models.VmPriority
+ :keyword virtual_machine_image: Virtual Machine image for AML Compute - windows only.
+ :paramtype virtual_machine_image: ~azure_machine_learning_workspaces.models.VirtualMachineImage
+ :keyword isolated_network: Network is isolated or not.
+ :paramtype isolated_network: bool
+ :keyword scale_settings: Scale settings for AML Compute.
+ :paramtype scale_settings: ~azure_machine_learning_workspaces.models.ScaleSettings
+ :keyword user_account_credentials: Credentials for an administrator user account that will be
+ created on each compute node.
+ :paramtype user_account_credentials:
+ ~azure_machine_learning_workspaces.models.UserAccountCredentials
+ :keyword subnet: Virtual network subnet resource ID the compute nodes belong to.
+ :paramtype subnet: ~azure_machine_learning_workspaces.models.ResourceId
+ :keyword remote_login_port_public_access: State of the public SSH port. Possible values are:
+ Disabled - Indicates that the public ssh port is closed on all nodes of the cluster. Enabled -
+ Indicates that the public ssh port is open on all nodes of the cluster. NotSpecified -
+ Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined,
+ else is open all public nodes. It can be default only during cluster creation time, after
+ creation it will be either enabled or disabled. Possible values include: "Enabled", "Disabled",
+ "NotSpecified". Default value: "NotSpecified".
+ :paramtype remote_login_port_public_access: str or
+ ~azure_machine_learning_workspaces.models.RemoteLoginPortPublicAccess
+ :keyword enable_node_public_ip: Enable or disable node public IP address provisioning. Possible
+ values are: Possible values are: true - Indicates that the compute nodes will have public IPs
+ provisioned. false - Indicates that the compute nodes will have a private endpoint and no
+ public IPs.
+ :paramtype enable_node_public_ip: bool
+ """
super(AmlComputeProperties, self).__init__(**kwargs)
+ self.os_type = os_type
self.vm_size = vm_size
self.vm_priority = vm_priority
+ self.virtual_machine_image = virtual_machine_image
+ self.isolated_network = isolated_network
self.scale_settings = scale_settings
self.user_account_credentials = user_account_credentials
self.subnet = subnet
@@ -647,17 +816,18 @@ def __init__(
self.current_node_count = None
self.target_node_count = None
self.node_state_counts = None
+ self.enable_node_public_ip = enable_node_public_ip
class AmlUserFeature(msrest.serialization.Model):
"""Features enabled for a workspace.
- :param id: Specifies the feature ID.
- :type id: str
- :param display_name: Specifies the feature name.
- :type display_name: str
- :param description: Describes the feature for user experience.
- :type description: str
+ :ivar id: Specifies the feature ID.
+ :vartype id: str
+ :ivar display_name: Specifies the feature name.
+ :vartype display_name: str
+ :ivar description: Describes the feature for user experience.
+ :vartype description: str
"""
_attribute_map = {
@@ -674,97 +844,215 @@ def __init__(
description: Optional[str] = None,
**kwargs
):
+ """
+ :keyword id: Specifies the feature ID.
+ :paramtype id: str
+ :keyword display_name: Specifies the feature name.
+ :paramtype display_name: str
+ :keyword description: Describes the feature for user experience.
+ :paramtype description: str
+ """
super(AmlUserFeature, self).__init__(**kwargs)
self.id = id
self.display_name = display_name
self.description = description
-class ClusterUpdateParameters(msrest.serialization.Model):
- """AmlCompute update parameters.
+class AssignedUser(msrest.serialization.Model):
+ """A user that can be assigned to a compute instance.
+
+ All required parameters must be populated in order to send to Azure.
- :param scale_settings: Desired scale settings for the amlCompute.
- :type scale_settings: ~azure.mgmt.machinelearningservices.models.ScaleSettings
+ :ivar object_id: Required. User’s AAD Object Id.
+ :vartype object_id: str
+ :ivar tenant_id: Required. User’s AAD Tenant Id.
+ :vartype tenant_id: str
"""
+ _validation = {
+ 'object_id': {'required': True},
+ 'tenant_id': {'required': True},
+ }
+
_attribute_map = {
- 'scale_settings': {'key': 'properties.scaleSettings', 'type': 'ScaleSettings'},
+ 'object_id': {'key': 'objectId', 'type': 'str'},
+ 'tenant_id': {'key': 'tenantId', 'type': 'str'},
}
def __init__(
self,
*,
- scale_settings: Optional["ScaleSettings"] = None,
+ object_id: str,
+ tenant_id: str,
**kwargs
):
- super(ClusterUpdateParameters, self).__init__(**kwargs)
- self.scale_settings = scale_settings
+ """
+ :keyword object_id: Required. User’s AAD Object Id.
+ :paramtype object_id: str
+ :keyword tenant_id: Required. User’s AAD Tenant Id.
+ :paramtype tenant_id: str
+ """
+ super(AssignedUser, self).__init__(**kwargs)
+ self.object_id = object_id
+ self.tenant_id = tenant_id
+
+
+class AutoPauseProperties(msrest.serialization.Model):
+ """Auto pause properties.
+
+ :ivar delay_in_minutes:
+ :vartype delay_in_minutes: int
+ :ivar enabled:
+ :vartype enabled: bool
+ """
+
+ _attribute_map = {
+ 'delay_in_minutes': {'key': 'delayInMinutes', 'type': 'int'},
+ 'enabled': {'key': 'enabled', 'type': 'bool'},
+ }
+ def __init__(
+ self,
+ *,
+ delay_in_minutes: Optional[int] = None,
+ enabled: Optional[bool] = None,
+ **kwargs
+ ):
+ """
+ :keyword delay_in_minutes:
+ :paramtype delay_in_minutes: int
+ :keyword enabled:
+ :paramtype enabled: bool
+ """
+ super(AutoPauseProperties, self).__init__(**kwargs)
+ self.delay_in_minutes = delay_in_minutes
+ self.enabled = enabled
+
+
+class AutoScaleProperties(msrest.serialization.Model):
+ """Auto scale properties.
+
+ :ivar min_node_count:
+ :vartype min_node_count: int
+ :ivar enabled:
+ :vartype enabled: bool
+ :ivar max_node_count:
+ :vartype max_node_count: int
+ """
-class ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model):
- """ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties.
+ _attribute_map = {
+ 'min_node_count': {'key': 'minNodeCount', 'type': 'int'},
+ 'enabled': {'key': 'enabled', 'type': 'bool'},
+ 'max_node_count': {'key': 'maxNodeCount', 'type': 'int'},
+ }
- Variables are only populated by the server, and will be ignored when sending a request.
+ def __init__(
+ self,
+ *,
+ min_node_count: Optional[int] = None,
+ enabled: Optional[bool] = None,
+ max_node_count: Optional[int] = None,
+ **kwargs
+ ):
+ """
+ :keyword min_node_count:
+ :paramtype min_node_count: int
+ :keyword enabled:
+ :paramtype enabled: bool
+ :keyword max_node_count:
+ :paramtype max_node_count: int
+ """
+ super(AutoScaleProperties, self).__init__(**kwargs)
+ self.min_node_count = min_node_count
+ self.enabled = enabled
+ self.max_node_count = max_node_count
- :ivar principal_id: The principal id of user assigned identity.
- :vartype principal_id: str
- :ivar client_id: The client id of user assigned identity.
- :vartype client_id: str
+
+class ClusterUpdateParameters(msrest.serialization.Model):
+ """AmlCompute update parameters.
+
+ :ivar properties: Properties of ClusterUpdate.
+ :vartype properties: ~azure_machine_learning_workspaces.models.ScaleSettingsInformation
"""
- _validation = {
- 'principal_id': {'readonly': True},
- 'client_id': {'readonly': True},
+ _attribute_map = {
+ 'properties': {'key': 'properties.properties', 'type': 'ScaleSettingsInformation'},
}
+ def __init__(
+ self,
+ *,
+ properties: Optional["ScaleSettingsInformation"] = None,
+ **kwargs
+ ):
+ """
+ :keyword properties: Properties of ClusterUpdate.
+ :paramtype properties: ~azure_machine_learning_workspaces.models.ScaleSettingsInformation
+ """
+ super(ClusterUpdateParameters, self).__init__(**kwargs)
+ self.properties = properties
+
+
+class Components1D3SwueSchemasComputeresourceAllof1(msrest.serialization.Model):
+ """Components1D3SwueSchemasComputeresourceAllof1.
+
+ :ivar properties: Compute properties.
+ :vartype properties: ~azure_machine_learning_workspaces.models.Compute
+ """
+
_attribute_map = {
- 'principal_id': {'key': 'principalId', 'type': 'str'},
- 'client_id': {'key': 'clientId', 'type': 'str'},
+ 'properties': {'key': 'properties', 'type': 'Compute'},
}
def __init__(
self,
+ *,
+ properties: Optional["Compute"] = None,
**kwargs
):
- super(ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties, self).__init__(**kwargs)
- self.principal_id = None
- self.client_id = None
+ """
+ :keyword properties: Compute properties.
+ :paramtype properties: ~azure_machine_learning_workspaces.models.Compute
+ """
+ super(Components1D3SwueSchemasComputeresourceAllof1, self).__init__(**kwargs)
+ self.properties = properties
class ComputeInstance(Compute):
- """An Azure Machine Learning compute instance.
+ """Properties(top level) of ComputeInstance.
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 compute_type: Required. The type of compute.Constant filled by server. Possible values
- include: "AKS", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", "HDInsight",
- "Databricks", "DataLakeAnalytics".
- :type compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType
- :param compute_location: Location for the underlying compute.
- :type compute_location: str
+ :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values
+ include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine",
+ "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark".
+ :vartype compute_type: str or ~azure_machine_learning_workspaces.models.ComputeType
+ :ivar compute_location: Location for the underlying compute.
+ :vartype compute_location: str
:ivar provisioning_state: The provision state of the cluster. Valid values are Unknown,
Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating",
"Creating", "Deleting", "Succeeded", "Failed", "Canceled".
- :vartype provisioning_state: str or
- ~azure.mgmt.machinelearningservices.models.ProvisioningState
- :param description: The description of the Machine Learning compute.
- :type description: str
- :ivar created_on: The date and time when the compute was created.
+ :vartype provisioning_state: str or ~azure_machine_learning_workspaces.models.ProvisioningState
+ :ivar description: The description of the Machine Learning compute.
+ :vartype description: str
+ :ivar created_on: The time at which the compute was created.
:vartype created_on: ~datetime.datetime
- :ivar modified_on: The date and time when the compute was last modified.
+ :ivar modified_on: The time at which the compute was last modified.
:vartype modified_on: ~datetime.datetime
- :param resource_id: ARM resource id of the underlying compute.
- :type resource_id: str
+ :ivar resource_id: ARM resource id of the underlying compute.
+ :vartype resource_id: str
:ivar provisioning_errors: Errors during provisioning.
- :vartype provisioning_errors:
- list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError]
+ :vartype provisioning_errors: list[~azure_machine_learning_workspaces.models.ErrorResponse]
:ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought
from outside if true, or machine learning service provisioned it if false.
:vartype is_attached_compute: bool
- :param properties: Compute Instance properties.
- :type properties: ~azure.mgmt.machinelearningservices.models.ComputeInstanceProperties
+ :ivar disable_local_auth: Opt-out of local authentication and ensure customers can use only MSI
+ and AAD exclusively for authentication.
+ :vartype disable_local_auth: bool
+ :ivar properties: Properties of ComputeInstance.
+ :vartype properties: ~azure_machine_learning_workspaces.models.ComputeInstanceProperties
"""
_validation = {
@@ -784,8 +1072,9 @@ class ComputeInstance(Compute):
'created_on': {'key': 'createdOn', 'type': 'iso-8601'},
'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'},
'resource_id': {'key': 'resourceId', 'type': 'str'},
- 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'},
+ 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'},
'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'},
+ 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'},
'properties': {'key': 'properties', 'type': 'ComputeInstanceProperties'},
}
@@ -795,10 +1084,24 @@ def __init__(
compute_location: Optional[str] = None,
description: Optional[str] = None,
resource_id: Optional[str] = None,
+ disable_local_auth: Optional[bool] = None,
properties: Optional["ComputeInstanceProperties"] = None,
**kwargs
):
- super(ComputeInstance, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, **kwargs)
+ """
+ :keyword compute_location: Location for the underlying compute.
+ :paramtype compute_location: str
+ :keyword description: The description of the Machine Learning compute.
+ :paramtype description: str
+ :keyword resource_id: ARM resource id of the underlying compute.
+ :paramtype resource_id: str
+ :keyword disable_local_auth: Opt-out of local authentication and ensure customers can use only
+ MSI and AAD exclusively for authentication.
+ :paramtype disable_local_auth: bool
+ :keyword properties: Properties of ComputeInstance.
+ :paramtype properties: ~azure_machine_learning_workspaces.models.ComputeInstanceProperties
+ """
+ super(ComputeInstance, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, **kwargs)
self.compute_type = 'ComputeInstance' # type: str
self.properties = properties
@@ -806,10 +1109,10 @@ def __init__(
class ComputeInstanceApplication(msrest.serialization.Model):
"""Defines an Aml Instance application and its connectivity endpoint URI.
- :param display_name: Name of the ComputeInstance application.
- :type display_name: str
- :param endpoint_uri: Application' endpoint URI.
- :type endpoint_uri: str
+ :ivar display_name: Name of the ComputeInstance application.
+ :vartype display_name: str
+ :ivar endpoint_uri: Application' endpoint URI.
+ :vartype endpoint_uri: str
"""
_attribute_map = {
@@ -824,13 +1127,19 @@ def __init__(
endpoint_uri: Optional[str] = None,
**kwargs
):
+ """
+ :keyword display_name: Name of the ComputeInstance application.
+ :paramtype display_name: str
+ :keyword endpoint_uri: Application' endpoint URI.
+ :paramtype endpoint_uri: str
+ """
super(ComputeInstanceApplication, self).__init__(**kwargs)
self.display_name = display_name
self.endpoint_uri = endpoint_uri
class ComputeInstanceConnectivityEndpoints(msrest.serialization.Model):
- """Defines all connectivity endpoints and properties for a ComputeInstance.
+ """Defines all connectivity endpoints and properties for an ComputeInstance.
Variables are only populated by the server, and will be ignored when sending a request.
@@ -855,6 +1164,8 @@ def __init__(
self,
**kwargs
):
+ """
+ """
super(ComputeInstanceConnectivityEndpoints, self).__init__(**kwargs)
self.public_ip_address = None
self.private_ip_address = None
@@ -889,6 +1200,8 @@ def __init__(
self,
**kwargs
):
+ """
+ """
super(ComputeInstanceCreatedBy, self).__init__(**kwargs)
self.user_name = None
self.user_org_id = None
@@ -898,14 +1211,14 @@ def __init__(
class ComputeInstanceLastOperation(msrest.serialization.Model):
"""The last operation on ComputeInstance.
- :param operation_name: Name of the last operation. Possible values include: "Create", "Start",
+ :ivar operation_name: Name of the last operation. Possible values include: "Create", "Start",
"Stop", "Restart", "Reimage", "Delete".
- :type operation_name: str or ~azure.mgmt.machinelearningservices.models.OperationName
- :param operation_time: Time of the last operation.
- :type operation_time: ~datetime.datetime
- :param operation_status: Operation status. Possible values include: "InProgress", "Succeeded",
+ :vartype operation_name: str or ~azure_machine_learning_workspaces.models.OperationName
+ :ivar operation_time: Time of the last operation.
+ :vartype operation_time: ~datetime.datetime
+ :ivar operation_status: Operation status. Possible values include: "InProgress", "Succeeded",
"CreateFailed", "StartFailed", "StopFailed", "RestartFailed", "ReimageFailed", "DeleteFailed".
- :type operation_status: str or ~azure.mgmt.machinelearningservices.models.OperationStatus
+ :vartype operation_status: str or ~azure_machine_learning_workspaces.models.OperationStatus
"""
_attribute_map = {
@@ -922,6 +1235,17 @@ def __init__(
operation_status: Optional[Union[str, "OperationStatus"]] = None,
**kwargs
):
+ """
+ :keyword operation_name: Name of the last operation. Possible values include: "Create",
+ "Start", "Stop", "Restart", "Reimage", "Delete".
+ :paramtype operation_name: str or ~azure_machine_learning_workspaces.models.OperationName
+ :keyword operation_time: Time of the last operation.
+ :paramtype operation_time: ~datetime.datetime
+ :keyword operation_status: Operation status. Possible values include: "InProgress",
+ "Succeeded", "CreateFailed", "StartFailed", "StopFailed", "RestartFailed", "ReimageFailed",
+ "DeleteFailed".
+ :paramtype operation_status: str or ~azure_machine_learning_workspaces.models.OperationStatus
+ """
super(ComputeInstanceLastOperation, self).__init__(**kwargs)
self.operation_name = operation_name
self.operation_time = operation_time
@@ -933,38 +1257,46 @@ class ComputeInstanceProperties(msrest.serialization.Model):
Variables are only populated by the server, and will be ignored when sending a request.
- :param vm_size: Virtual Machine Size.
- :type vm_size: str
- :param subnet: Virtual network subnet resource ID the compute nodes belong to.
- :type subnet: ~azure.mgmt.machinelearningservices.models.ResourceId
- :param application_sharing_policy: Policy for sharing applications on this compute instance
+ :ivar vm_size: Virtual Machine Size.
+ :vartype vm_size: str
+ :ivar subnet: Virtual network subnet resource ID the compute nodes belong to.
+ :vartype subnet: ~azure_machine_learning_workspaces.models.ResourceId
+ :ivar application_sharing_policy: Policy for sharing applications on this compute instance
among users of parent workspace. If Personal, only the creator can access applications on this
compute instance. When Shared, any workspace user can access applications on this instance
depending on his/her assigned role. Possible values include: "Personal", "Shared". Default
value: "Shared".
- :type application_sharing_policy: str or
- ~azure.mgmt.machinelearningservices.models.ApplicationSharingPolicy
- :param ssh_settings: Specifies policy and settings for SSH access.
- :type ssh_settings: ~azure.mgmt.machinelearningservices.models.ComputeInstanceSshSettings
+ :vartype application_sharing_policy: str or
+ ~azure_machine_learning_workspaces.models.ApplicationSharingPolicy
+ :ivar ssh_settings: Specifies policy and settings for SSH access.
+ :vartype ssh_settings: ~azure_machine_learning_workspaces.models.ComputeInstanceSshSettings
:ivar connectivity_endpoints: Describes all connectivity endpoints available for this
ComputeInstance.
:vartype connectivity_endpoints:
- ~azure.mgmt.machinelearningservices.models.ComputeInstanceConnectivityEndpoints
+ ~azure_machine_learning_workspaces.models.ComputeInstanceConnectivityEndpoints
:ivar applications: Describes available applications and their endpoints on this
ComputeInstance.
:vartype applications:
- list[~azure.mgmt.machinelearningservices.models.ComputeInstanceApplication]
+ list[~azure_machine_learning_workspaces.models.ComputeInstanceApplication]
:ivar created_by: Describes information on user who created this ComputeInstance.
- :vartype created_by: ~azure.mgmt.machinelearningservices.models.ComputeInstanceCreatedBy
+ :vartype created_by: ~azure_machine_learning_workspaces.models.ComputeInstanceCreatedBy
:ivar errors: Collection of errors encountered on this ComputeInstance.
- :vartype errors: list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError]
+ :vartype errors: list[~azure_machine_learning_workspaces.models.ErrorResponse]
:ivar state: The current state of this ComputeInstance. Possible values include: "Creating",
"CreateFailed", "Deleting", "Running", "Restarting", "JobRunning", "SettingUp", "SetupFailed",
"Starting", "Stopped", "Stopping", "UserSettingUp", "UserSetupFailed", "Unknown", "Unusable".
- :vartype state: str or ~azure.mgmt.machinelearningservices.models.ComputeInstanceState
+ :vartype state: str or ~azure_machine_learning_workspaces.models.ComputeInstanceState
+ :ivar compute_instance_authorization_type: The Compute Instance Authorization type. Available
+ values are personal (default). Possible values include: "personal". Default value: "personal".
+ :vartype compute_instance_authorization_type: str or
+ ~azure_machine_learning_workspaces.models.ComputeInstanceAuthorizationType
+ :ivar personal_compute_instance_settings: Settings for a personal compute instance.
+ :vartype personal_compute_instance_settings:
+ ~azure_machine_learning_workspaces.models.PersonalComputeInstanceSettings
+ :ivar setup_scripts: Details of customized scripts to execute for setting up the cluster.
+ :vartype setup_scripts: ~azure_machine_learning_workspaces.models.SetupScripts
:ivar last_operation: The last operation on ComputeInstance.
- :vartype last_operation:
- ~azure.mgmt.machinelearningservices.models.ComputeInstanceLastOperation
+ :vartype last_operation: ~azure_machine_learning_workspaces.models.ComputeInstanceLastOperation
"""
_validation = {
@@ -984,8 +1316,11 @@ class ComputeInstanceProperties(msrest.serialization.Model):
'connectivity_endpoints': {'key': 'connectivityEndpoints', 'type': 'ComputeInstanceConnectivityEndpoints'},
'applications': {'key': 'applications', 'type': '[ComputeInstanceApplication]'},
'created_by': {'key': 'createdBy', 'type': 'ComputeInstanceCreatedBy'},
- 'errors': {'key': 'errors', 'type': '[MachineLearningServiceError]'},
+ 'errors': {'key': 'errors', 'type': '[ErrorResponse]'},
'state': {'key': 'state', 'type': 'str'},
+ 'compute_instance_authorization_type': {'key': 'computeInstanceAuthorizationType', 'type': 'str'},
+ 'personal_compute_instance_settings': {'key': 'personalComputeInstanceSettings', 'type': 'PersonalComputeInstanceSettings'},
+ 'setup_scripts': {'key': 'setupScripts', 'type': 'SetupScripts'},
'last_operation': {'key': 'lastOperation', 'type': 'ComputeInstanceLastOperation'},
}
@@ -996,8 +1331,36 @@ def __init__(
subnet: Optional["ResourceId"] = None,
application_sharing_policy: Optional[Union[str, "ApplicationSharingPolicy"]] = "Shared",
ssh_settings: Optional["ComputeInstanceSshSettings"] = None,
+ compute_instance_authorization_type: Optional[Union[str, "ComputeInstanceAuthorizationType"]] = "personal",
+ personal_compute_instance_settings: Optional["PersonalComputeInstanceSettings"] = None,
+ setup_scripts: Optional["SetupScripts"] = None,
**kwargs
):
+ """
+ :keyword vm_size: Virtual Machine Size.
+ :paramtype vm_size: str
+ :keyword subnet: Virtual network subnet resource ID the compute nodes belong to.
+ :paramtype subnet: ~azure_machine_learning_workspaces.models.ResourceId
+ :keyword application_sharing_policy: Policy for sharing applications on this compute instance
+ among users of parent workspace. If Personal, only the creator can access applications on this
+ compute instance. When Shared, any workspace user can access applications on this instance
+ depending on his/her assigned role. Possible values include: "Personal", "Shared". Default
+ value: "Shared".
+ :paramtype application_sharing_policy: str or
+ ~azure_machine_learning_workspaces.models.ApplicationSharingPolicy
+ :keyword ssh_settings: Specifies policy and settings for SSH access.
+ :paramtype ssh_settings: ~azure_machine_learning_workspaces.models.ComputeInstanceSshSettings
+ :keyword compute_instance_authorization_type: The Compute Instance Authorization type.
+ Available values are personal (default). Possible values include: "personal". Default value:
+ "personal".
+ :paramtype compute_instance_authorization_type: str or
+ ~azure_machine_learning_workspaces.models.ComputeInstanceAuthorizationType
+ :keyword personal_compute_instance_settings: Settings for a personal compute instance.
+ :paramtype personal_compute_instance_settings:
+ ~azure_machine_learning_workspaces.models.PersonalComputeInstanceSettings
+ :keyword setup_scripts: Details of customized scripts to execute for setting up the cluster.
+ :paramtype setup_scripts: ~azure_machine_learning_workspaces.models.SetupScripts
+ """
super(ComputeInstanceProperties, self).__init__(**kwargs)
self.vm_size = vm_size
self.subnet = subnet
@@ -1008,6 +1371,9 @@ def __init__(
self.created_by = None
self.errors = None
self.state = None
+ self.compute_instance_authorization_type = compute_instance_authorization_type
+ self.personal_compute_instance_settings = personal_compute_instance_settings
+ self.setup_scripts = setup_scripts
self.last_operation = None
@@ -1016,18 +1382,18 @@ class ComputeInstanceSshSettings(msrest.serialization.Model):
Variables are only populated by the server, and will be ignored when sending a request.
- :param ssh_public_access: State of the public SSH port. Possible values are: Disabled -
+ :ivar ssh_public_access: State of the public SSH port. Possible values are: Disabled -
Indicates that the public ssh port is closed on this instance. Enabled - Indicates that the
public ssh port is open and accessible according to the VNet/subnet policy if applicable.
Possible values include: "Enabled", "Disabled". Default value: "Disabled".
- :type ssh_public_access: str or ~azure.mgmt.machinelearningservices.models.SshPublicAccess
+ :vartype ssh_public_access: str or ~azure_machine_learning_workspaces.models.SshPublicAccess
:ivar admin_user_name: Describes the admin user name.
:vartype admin_user_name: str
:ivar ssh_port: Describes the port for connecting through SSH.
:vartype ssh_port: int
- :param admin_public_key: Specifies the SSH rsa public key file as a string. Use "ssh-keygen -t
+ :ivar admin_public_key: Specifies the SSH rsa public key file as a string. Use "ssh-keygen -t
rsa -b 2048" to generate your SSH key pairs.
- :type admin_public_key: str
+ :vartype admin_public_key: str
"""
_validation = {
@@ -1049,6 +1415,16 @@ def __init__(
admin_public_key: Optional[str] = None,
**kwargs
):
+ """
+ :keyword ssh_public_access: State of the public SSH port. Possible values are: Disabled -
+ Indicates that the public ssh port is closed on this instance. Enabled - Indicates that the
+ public ssh port is open and accessible according to the VNet/subnet policy if applicable.
+ Possible values include: "Enabled", "Disabled". Default value: "Disabled".
+ :paramtype ssh_public_access: str or ~azure_machine_learning_workspaces.models.SshPublicAccess
+ :keyword admin_public_key: Specifies the SSH rsa public key file as a string. Use "ssh-keygen
+ -t rsa -b 2048" to generate your SSH key pairs.
+ :paramtype admin_public_key: str
+ """
super(ComputeInstanceSshSettings, self).__init__(**kwargs)
self.ssh_public_access = ssh_public_access
self.admin_user_name = None
@@ -1057,24 +1433,18 @@ def __init__(
class Resource(msrest.serialization.Model):
- """Azure Resource Manager resource envelope.
+ """Common fields that are returned in the response for all Azure Resource Manager resources.
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Specifies the resource ID.
+ :ivar id: Fully qualified resource ID for the resource. Ex -
+ /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
- :ivar name: Specifies the name of the resource.
+ :ivar name: The name of the resource.
:vartype name: str
- :param identity: The identity of the resource.
- :type identity: ~azure.mgmt.machinelearningservices.models.Identity
- :param location: Specifies the location of the resource.
- :type location: str
- :ivar type: Specifies the type of the resource.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
- :param tags: A set of tags. Contains resource tags defined as key/value pairs.
- :type tags: dict[str, str]
- :param sku: The sku of the workspace.
- :type sku: ~azure.mgmt.machinelearningservices.models.Sku
"""
_validation = {
@@ -1086,84 +1456,203 @@ class Resource(msrest.serialization.Model):
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
- 'identity': {'key': 'identity', 'type': 'Identity'},
- 'location': {'key': 'location', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
- 'tags': {'key': 'tags', 'type': '{str}'},
- 'sku': {'key': 'sku', 'type': 'Sku'},
}
def __init__(
self,
- *,
- identity: Optional["Identity"] = None,
- location: Optional[str] = None,
- tags: Optional[Dict[str, str]] = None,
- sku: Optional["Sku"] = None,
**kwargs
):
+ """
+ """
super(Resource, self).__init__(**kwargs)
self.id = None
self.name = None
- self.identity = identity
- self.location = location
self.type = None
- self.tags = tags
- self.sku = sku
-class ComputeResource(Resource):
+class ComputeResource(Resource, Components1D3SwueSchemasComputeresourceAllof1):
"""Machine Learning compute object wrapped into ARM resource envelope.
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Specifies the resource ID.
+ :ivar properties: Compute properties.
+ :vartype properties: ~azure_machine_learning_workspaces.models.Compute
+ :ivar id: Fully qualified resource ID for the resource. Ex -
+ /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
- :ivar name: Specifies the name of the resource.
+ :ivar name: The name of the resource.
:vartype name: str
- :param identity: The identity of the resource.
- :type identity: ~azure.mgmt.machinelearningservices.models.Identity
- :param location: Specifies the location of the resource.
- :type location: str
- :ivar type: Specifies the type of the resource.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
- :param tags: A set of tags. Contains resource tags defined as key/value pairs.
- :type tags: dict[str, str]
- :param sku: The sku of the workspace.
- :type sku: ~azure.mgmt.machinelearningservices.models.Sku
- :param properties: Compute properties.
- :type properties: ~azure.mgmt.machinelearningservices.models.Compute
+ :ivar identity: The identity of the resource.
+ :vartype identity: ~azure_machine_learning_workspaces.models.Identity
+ :ivar location: Specifies the location of the resource.
+ :vartype location: str
+ :ivar tags: A set of tags. Contains resource tags defined as key/value pairs.
+ :vartype tags: dict[str, str]
+ :ivar sku: The sku of the workspace.
+ :vartype sku: ~azure_machine_learning_workspaces.models.Sku
+ :ivar system_data: System data.
+ :vartype system_data: ~azure_machine_learning_workspaces.models.SystemData
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
+ 'system_data': {'readonly': True},
}
_attribute_map = {
+ 'properties': {'key': 'properties', 'type': 'Compute'},
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
'identity': {'key': 'identity', 'type': 'Identity'},
'location': {'key': 'location', 'type': 'str'},
- 'type': {'key': 'type', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'sku': {'key': 'sku', 'type': 'Sku'},
- 'properties': {'key': 'properties', 'type': 'Compute'},
+ 'system_data': {'key': 'systemData', 'type': 'SystemData'},
}
def __init__(
self,
*,
+ properties: Optional["Compute"] = None,
identity: Optional["Identity"] = None,
location: Optional[str] = None,
tags: Optional[Dict[str, str]] = None,
sku: Optional["Sku"] = None,
- properties: Optional["Compute"] = None,
**kwargs
):
- super(ComputeResource, self).__init__(identity=identity, location=location, tags=tags, sku=sku, **kwargs)
+ """
+ :keyword properties: Compute properties.
+ :paramtype properties: ~azure_machine_learning_workspaces.models.Compute
+ :keyword identity: The identity of the resource.
+ :paramtype identity: ~azure_machine_learning_workspaces.models.Identity
+ :keyword location: Specifies the location of the resource.
+ :paramtype location: str
+ :keyword tags: A set of tags. Contains resource tags defined as key/value pairs.
+ :paramtype tags: dict[str, str]
+ :keyword sku: The sku of the workspace.
+ :paramtype sku: ~azure_machine_learning_workspaces.models.Sku
+ """
+ super(ComputeResource, self).__init__(properties=properties, **kwargs)
self.properties = properties
+ self.identity = identity
+ self.location = location
+ self.tags = tags
+ self.sku = sku
+ self.system_data = None
+ self.id = None
+ self.name = None
+ self.type = None
+ self.identity = identity
+ self.location = location
+ self.tags = tags
+ self.sku = sku
+ self.system_data = None
+
+
+class ContainerResourceRequirements(msrest.serialization.Model):
+ """The resource requirements for the container (cpu and memory).
+
+ :ivar cpu: The minimum amount of CPU cores to be used by the container. More info:
+ https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/.
+ :vartype cpu: float
+ :ivar cpu_limit: The maximum amount of CPU cores allowed to be used by the container. More
+ info:
+ https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/.
+ :vartype cpu_limit: float
+ :ivar memory_in_gb: The minimum amount of memory (in GB) to be used by the container. More
+ info:
+ https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/.
+ :vartype memory_in_gb: float
+ :ivar memory_in_gb_limit: The maximum amount of memory (in GB) allowed to be used by the
+ container. More info:
+ https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/.
+ :vartype memory_in_gb_limit: float
+ :ivar gpu: The number of GPU cores in the container.
+ :vartype gpu: int
+ :ivar fpga: The number of FPGA PCIE devices exposed to the container. Must be multiple of 2.
+ :vartype fpga: int
+ """
+
+ _attribute_map = {
+ 'cpu': {'key': 'cpu', 'type': 'float'},
+ 'cpu_limit': {'key': 'cpuLimit', 'type': 'float'},
+ 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'},
+ 'memory_in_gb_limit': {'key': 'memoryInGBLimit', 'type': 'float'},
+ 'gpu': {'key': 'gpu', 'type': 'int'},
+ 'fpga': {'key': 'fpga', 'type': 'int'},
+ }
+
+ def __init__(
+ self,
+ *,
+ cpu: Optional[float] = None,
+ cpu_limit: Optional[float] = None,
+ memory_in_gb: Optional[float] = None,
+ memory_in_gb_limit: Optional[float] = None,
+ gpu: Optional[int] = None,
+ fpga: Optional[int] = None,
+ **kwargs
+ ):
+ """
+ :keyword cpu: The minimum amount of CPU cores to be used by the container. More info:
+ https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/.
+ :paramtype cpu: float
+ :keyword cpu_limit: The maximum amount of CPU cores allowed to be used by the container. More
+ info:
+ https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/.
+ :paramtype cpu_limit: float
+ :keyword memory_in_gb: The minimum amount of memory (in GB) to be used by the container. More
+ info:
+ https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/.
+ :paramtype memory_in_gb: float
+ :keyword memory_in_gb_limit: The maximum amount of memory (in GB) allowed to be used by the
+ container. More info:
+ https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/.
+ :paramtype memory_in_gb_limit: float
+ :keyword gpu: The number of GPU cores in the container.
+ :paramtype gpu: int
+ :keyword fpga: The number of FPGA PCIE devices exposed to the container. Must be multiple of 2.
+ :paramtype fpga: int
+ """
+ super(ContainerResourceRequirements, self).__init__(**kwargs)
+ self.cpu = cpu
+ self.cpu_limit = cpu_limit
+ self.memory_in_gb = memory_in_gb
+ self.memory_in_gb_limit = memory_in_gb_limit
+ self.gpu = gpu
+ self.fpga = fpga
+
+
+class CosmosDbSettings(msrest.serialization.Model):
+ """CosmosDbSettings.
+
+ :ivar collections_throughput: The throughput of the collections in cosmosdb database.
+ :vartype collections_throughput: int
+ """
+
+ _attribute_map = {
+ 'collections_throughput': {'key': 'collectionsThroughput', 'type': 'int'},
+ }
+
+ def __init__(
+ self,
+ *,
+ collections_throughput: Optional[int] = None,
+ **kwargs
+ ):
+ """
+ :keyword collections_throughput: The throughput of the collections in cosmosdb database.
+ :paramtype collections_throughput: int
+ """
+ super(CosmosDbSettings, self).__init__(**kwargs)
+ self.collections_throughput = collections_throughput
class Databricks(Compute):
@@ -1173,33 +1662,34 @@ class Databricks(Compute):
All required parameters must be populated in order to send to Azure.
- :param compute_type: Required. The type of compute.Constant filled by server. Possible values
- include: "AKS", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", "HDInsight",
- "Databricks", "DataLakeAnalytics".
- :type compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType
- :param compute_location: Location for the underlying compute.
- :type compute_location: str
+ :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values
+ include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine",
+ "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark".
+ :vartype compute_type: str or ~azure_machine_learning_workspaces.models.ComputeType
+ :ivar compute_location: Location for the underlying compute.
+ :vartype compute_location: str
:ivar provisioning_state: The provision state of the cluster. Valid values are Unknown,
Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating",
"Creating", "Deleting", "Succeeded", "Failed", "Canceled".
- :vartype provisioning_state: str or
- ~azure.mgmt.machinelearningservices.models.ProvisioningState
- :param description: The description of the Machine Learning compute.
- :type description: str
- :ivar created_on: The date and time when the compute was created.
+ :vartype provisioning_state: str or ~azure_machine_learning_workspaces.models.ProvisioningState
+ :ivar description: The description of the Machine Learning compute.
+ :vartype description: str
+ :ivar created_on: The time at which the compute was created.
:vartype created_on: ~datetime.datetime
- :ivar modified_on: The date and time when the compute was last modified.
+ :ivar modified_on: The time at which the compute was last modified.
:vartype modified_on: ~datetime.datetime
- :param resource_id: ARM resource id of the underlying compute.
- :type resource_id: str
+ :ivar resource_id: ARM resource id of the underlying compute.
+ :vartype resource_id: str
:ivar provisioning_errors: Errors during provisioning.
- :vartype provisioning_errors:
- list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError]
+ :vartype provisioning_errors: list[~azure_machine_learning_workspaces.models.ErrorResponse]
:ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought
from outside if true, or machine learning service provisioned it if false.
:vartype is_attached_compute: bool
- :param properties:
- :type properties: ~azure.mgmt.machinelearningservices.models.DatabricksProperties
+ :ivar disable_local_auth: Opt-out of local authentication and ensure customers can use only MSI
+ and AAD exclusively for authentication.
+ :vartype disable_local_auth: bool
+ :ivar properties: Properties of Databricks.
+ :vartype properties: ~azure_machine_learning_workspaces.models.DatabricksProperties
"""
_validation = {
@@ -1219,8 +1709,9 @@ class Databricks(Compute):
'created_on': {'key': 'createdOn', 'type': 'iso-8601'},
'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'},
'resource_id': {'key': 'resourceId', 'type': 'str'},
- 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'},
+ 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'},
'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'},
+ 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'},
'properties': {'key': 'properties', 'type': 'DatabricksProperties'},
}
@@ -1230,25 +1721,64 @@ def __init__(
compute_location: Optional[str] = None,
description: Optional[str] = None,
resource_id: Optional[str] = None,
+ disable_local_auth: Optional[bool] = None,
properties: Optional["DatabricksProperties"] = None,
**kwargs
):
- super(Databricks, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, **kwargs)
+ """
+ :keyword compute_location: Location for the underlying compute.
+ :paramtype compute_location: str
+ :keyword description: The description of the Machine Learning compute.
+ :paramtype description: str
+ :keyword resource_id: ARM resource id of the underlying compute.
+ :paramtype resource_id: str
+ :keyword disable_local_auth: Opt-out of local authentication and ensure customers can use only
+ MSI and AAD exclusively for authentication.
+ :paramtype disable_local_auth: bool
+ :keyword properties: Properties of Databricks.
+ :paramtype properties: ~azure_machine_learning_workspaces.models.DatabricksProperties
+ """
+ super(Databricks, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, **kwargs)
self.compute_type = 'Databricks' # type: str
self.properties = properties
-class DatabricksComputeSecrets(ComputeSecrets):
+class DatabricksComputeSecretsProperties(msrest.serialization.Model):
+ """Properties of Databricks Compute Secrets.
+
+ :ivar databricks_access_token: access token for databricks account.
+ :vartype databricks_access_token: str
+ """
+
+ _attribute_map = {
+ 'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ databricks_access_token: Optional[str] = None,
+ **kwargs
+ ):
+ """
+ :keyword databricks_access_token: access token for databricks account.
+ :paramtype databricks_access_token: str
+ """
+ super(DatabricksComputeSecretsProperties, self).__init__(**kwargs)
+ self.databricks_access_token = databricks_access_token
+
+
+class DatabricksComputeSecrets(ComputeSecrets, DatabricksComputeSecretsProperties):
"""Secrets related to a Machine Learning compute based on Databricks.
All required parameters must be populated in order to send to Azure.
- :param compute_type: Required. The type of compute.Constant filled by server. Possible values
- include: "AKS", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", "HDInsight",
- "Databricks", "DataLakeAnalytics".
- :type compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType
- :param databricks_access_token: access token for databricks account.
- :type databricks_access_token: str
+ :ivar databricks_access_token: access token for databricks account.
+ :vartype databricks_access_token: str
+ :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values
+ include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine",
+ "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark".
+ :vartype compute_type: str or ~azure_machine_learning_workspaces.models.ComputeType
"""
_validation = {
@@ -1256,8 +1786,8 @@ class DatabricksComputeSecrets(ComputeSecrets):
}
_attribute_map = {
- 'compute_type': {'key': 'computeType', 'type': 'str'},
'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'},
+ 'compute_type': {'key': 'computeType', 'type': 'str'},
}
def __init__(
@@ -1266,30 +1796,46 @@ def __init__(
databricks_access_token: Optional[str] = None,
**kwargs
):
- super(DatabricksComputeSecrets, self).__init__(**kwargs)
- self.compute_type = 'Databricks' # type: str
+ """
+ :keyword databricks_access_token: access token for databricks account.
+ :paramtype databricks_access_token: str
+ """
+ super(DatabricksComputeSecrets, self).__init__(databricks_access_token=databricks_access_token, **kwargs)
self.databricks_access_token = databricks_access_token
+ self.compute_type = 'Databricks' # type: str
+ self.compute_type = 'Databricks' # type: str
class DatabricksProperties(msrest.serialization.Model):
- """DatabricksProperties.
+ """Properties of Databricks.
- :param databricks_access_token: Databricks access token.
- :type databricks_access_token: str
+ :ivar databricks_access_token: Databricks access token.
+ :vartype databricks_access_token: str
+ :ivar workspace_url: Workspace Url.
+ :vartype workspace_url: str
"""
_attribute_map = {
'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'},
+ 'workspace_url': {'key': 'workspaceUrl', 'type': 'str'},
}
def __init__(
self,
*,
databricks_access_token: Optional[str] = None,
+ workspace_url: Optional[str] = None,
**kwargs
):
+ """
+ :keyword databricks_access_token: Databricks access token.
+ :paramtype databricks_access_token: str
+ :keyword workspace_url: Workspace Url.
+ :paramtype workspace_url: str
+ """
super(DatabricksProperties, self).__init__(**kwargs)
self.databricks_access_token = databricks_access_token
+ self.workspace_url = workspace_url
class DataFactory(Compute):
@@ -1299,31 +1845,32 @@ class DataFactory(Compute):
All required parameters must be populated in order to send to Azure.
- :param compute_type: Required. The type of compute.Constant filled by server. Possible values
- include: "AKS", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", "HDInsight",
- "Databricks", "DataLakeAnalytics".
- :type compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType
- :param compute_location: Location for the underlying compute.
- :type compute_location: str
+ :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values
+ include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine",
+ "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark".
+ :vartype compute_type: str or ~azure_machine_learning_workspaces.models.ComputeType
+ :ivar compute_location: Location for the underlying compute.
+ :vartype compute_location: str
:ivar provisioning_state: The provision state of the cluster. Valid values are Unknown,
Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating",
"Creating", "Deleting", "Succeeded", "Failed", "Canceled".
- :vartype provisioning_state: str or
- ~azure.mgmt.machinelearningservices.models.ProvisioningState
- :param description: The description of the Machine Learning compute.
- :type description: str
- :ivar created_on: The date and time when the compute was created.
+ :vartype provisioning_state: str or ~azure_machine_learning_workspaces.models.ProvisioningState
+ :ivar description: The description of the Machine Learning compute.
+ :vartype description: str
+ :ivar created_on: The time at which the compute was created.
:vartype created_on: ~datetime.datetime
- :ivar modified_on: The date and time when the compute was last modified.
+ :ivar modified_on: The time at which the compute was last modified.
:vartype modified_on: ~datetime.datetime
- :param resource_id: ARM resource id of the underlying compute.
- :type resource_id: str
+ :ivar resource_id: ARM resource id of the underlying compute.
+ :vartype resource_id: str
:ivar provisioning_errors: Errors during provisioning.
- :vartype provisioning_errors:
- list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError]
+ :vartype provisioning_errors: list[~azure_machine_learning_workspaces.models.ErrorResponse]
:ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought
from outside if true, or machine learning service provisioned it if false.
:vartype is_attached_compute: bool
+ :ivar disable_local_auth: Opt-out of local authentication and ensure customers can use only MSI
+ and AAD exclusively for authentication.
+ :vartype disable_local_auth: bool
"""
_validation = {
@@ -1343,8 +1890,9 @@ class DataFactory(Compute):
'created_on': {'key': 'createdOn', 'type': 'iso-8601'},
'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'},
'resource_id': {'key': 'resourceId', 'type': 'str'},
- 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'},
+ 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'},
'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'},
+ 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'},
}
def __init__(
@@ -1353,9 +1901,21 @@ def __init__(
compute_location: Optional[str] = None,
description: Optional[str] = None,
resource_id: Optional[str] = None,
+ disable_local_auth: Optional[bool] = None,
**kwargs
):
- super(DataFactory, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, **kwargs)
+ """
+ :keyword compute_location: Location for the underlying compute.
+ :paramtype compute_location: str
+ :keyword description: The description of the Machine Learning compute.
+ :paramtype description: str
+ :keyword resource_id: ARM resource id of the underlying compute.
+ :paramtype resource_id: str
+ :keyword disable_local_auth: Opt-out of local authentication and ensure customers can use only
+ MSI and AAD exclusively for authentication.
+ :paramtype disable_local_auth: bool
+ """
+ super(DataFactory, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, **kwargs)
self.compute_type = 'DataFactory' # type: str
@@ -1366,33 +1926,34 @@ class DataLakeAnalytics(Compute):
All required parameters must be populated in order to send to Azure.
- :param compute_type: Required. The type of compute.Constant filled by server. Possible values
- include: "AKS", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", "HDInsight",
- "Databricks", "DataLakeAnalytics".
- :type compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType
- :param compute_location: Location for the underlying compute.
- :type compute_location: str
+ :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values
+ include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine",
+ "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark".
+ :vartype compute_type: str or ~azure_machine_learning_workspaces.models.ComputeType
+ :ivar compute_location: Location for the underlying compute.
+ :vartype compute_location: str
:ivar provisioning_state: The provision state of the cluster. Valid values are Unknown,
Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating",
"Creating", "Deleting", "Succeeded", "Failed", "Canceled".
- :vartype provisioning_state: str or
- ~azure.mgmt.machinelearningservices.models.ProvisioningState
- :param description: The description of the Machine Learning compute.
- :type description: str
- :ivar created_on: The date and time when the compute was created.
+ :vartype provisioning_state: str or ~azure_machine_learning_workspaces.models.ProvisioningState
+ :ivar description: The description of the Machine Learning compute.
+ :vartype description: str
+ :ivar created_on: The time at which the compute was created.
:vartype created_on: ~datetime.datetime
- :ivar modified_on: The date and time when the compute was last modified.
+ :ivar modified_on: The time at which the compute was last modified.
:vartype modified_on: ~datetime.datetime
- :param resource_id: ARM resource id of the underlying compute.
- :type resource_id: str
+ :ivar resource_id: ARM resource id of the underlying compute.
+ :vartype resource_id: str
:ivar provisioning_errors: Errors during provisioning.
- :vartype provisioning_errors:
- list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError]
+ :vartype provisioning_errors: list[~azure_machine_learning_workspaces.models.ErrorResponse]
:ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought
from outside if true, or machine learning service provisioned it if false.
:vartype is_attached_compute: bool
- :param properties:
- :type properties: ~azure.mgmt.machinelearningservices.models.DataLakeAnalyticsProperties
+ :ivar disable_local_auth: Opt-out of local authentication and ensure customers can use only MSI
+ and AAD exclusively for authentication.
+ :vartype disable_local_auth: bool
+ :ivar properties:
+ :vartype properties: ~azure_machine_learning_workspaces.models.DataLakeAnalyticsProperties
"""
_validation = {
@@ -1412,8 +1973,9 @@ class DataLakeAnalytics(Compute):
'created_on': {'key': 'createdOn', 'type': 'iso-8601'},
'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'},
'resource_id': {'key': 'resourceId', 'type': 'str'},
- 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'},
+ 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'},
'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'},
+ 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'},
'properties': {'key': 'properties', 'type': 'DataLakeAnalyticsProperties'},
}
@@ -1423,10 +1985,24 @@ def __init__(
compute_location: Optional[str] = None,
description: Optional[str] = None,
resource_id: Optional[str] = None,
+ disable_local_auth: Optional[bool] = None,
properties: Optional["DataLakeAnalyticsProperties"] = None,
**kwargs
):
- super(DataLakeAnalytics, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, **kwargs)
+ """
+ :keyword compute_location: Location for the underlying compute.
+ :paramtype compute_location: str
+ :keyword description: The description of the Machine Learning compute.
+ :paramtype description: str
+ :keyword resource_id: ARM resource id of the underlying compute.
+ :paramtype resource_id: str
+ :keyword disable_local_auth: Opt-out of local authentication and ensure customers can use only
+ MSI and AAD exclusively for authentication.
+ :paramtype disable_local_auth: bool
+ :keyword properties:
+ :paramtype properties: ~azure_machine_learning_workspaces.models.DataLakeAnalyticsProperties
+ """
+ super(DataLakeAnalytics, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, **kwargs)
self.compute_type = 'DataLakeAnalytics' # type: str
self.properties = properties
@@ -1434,8 +2010,8 @@ def __init__(
class DataLakeAnalyticsProperties(msrest.serialization.Model):
"""DataLakeAnalyticsProperties.
- :param data_lake_store_account_name: DataLake Store Account Name.
- :type data_lake_store_account_name: str
+ :ivar data_lake_store_account_name: DataLake Store Account Name.
+ :vartype data_lake_store_account_name: str
"""
_attribute_map = {
@@ -1448,110 +2024,427 @@ def __init__(
data_lake_store_account_name: Optional[str] = None,
**kwargs
):
+ """
+ :keyword data_lake_store_account_name: DataLake Store Account Name.
+ :paramtype data_lake_store_account_name: str
+ """
super(DataLakeAnalyticsProperties, self).__init__(**kwargs)
self.data_lake_store_account_name = data_lake_store_account_name
-class EncryptionProperty(msrest.serialization.Model):
- """EncryptionProperty.
-
- All required parameters must be populated in order to send to Azure.
-
- :param status: Required. Indicates whether or not the encryption is enabled for the workspace.
- Possible values include: "Enabled", "Disabled".
- :type status: str or ~azure.mgmt.machinelearningservices.models.EncryptionStatus
- :param key_vault_properties: Required. Customer Key vault properties.
- :type key_vault_properties: ~azure.mgmt.machinelearningservices.models.KeyVaultProperties
+class DiagnoseRequestProperties(msrest.serialization.Model):
+ """DiagnoseRequestProperties.
+
+ :ivar udr: Setting for diagnosing user defined routing.
+ :vartype udr: dict[str, any]
+ :ivar nsg: Setting for diagnosing network security group.
+ :vartype nsg: dict[str, any]
+ :ivar resource_lock: Setting for diagnosing resource lock.
+ :vartype resource_lock: dict[str, any]
+ :ivar dns_resolution: Setting for diagnosing dns resolution.
+ :vartype dns_resolution: dict[str, any]
+ :ivar storage_account: Setting for diagnosing dependent storage account.
+ :vartype storage_account: dict[str, any]
+ :ivar key_vault: Setting for diagnosing dependent key vault.
+ :vartype key_vault: dict[str, any]
+ :ivar container_registry: Setting for diagnosing dependent container registry.
+ :vartype container_registry: dict[str, any]
+ :ivar application_insights: Setting for diagnosing dependent application insights.
+ :vartype application_insights: dict[str, any]
+ :ivar others: Setting for diagnosing unclassified category of problems.
+ :vartype others: dict[str, any]
"""
- _validation = {
- 'status': {'required': True},
- 'key_vault_properties': {'required': True},
- }
-
_attribute_map = {
- 'status': {'key': 'status', 'type': 'str'},
- 'key_vault_properties': {'key': 'keyVaultProperties', 'type': 'KeyVaultProperties'},
+ 'udr': {'key': 'udr', 'type': '{object}'},
+ 'nsg': {'key': 'nsg', 'type': '{object}'},
+ 'resource_lock': {'key': 'resourceLock', 'type': '{object}'},
+ 'dns_resolution': {'key': 'dnsResolution', 'type': '{object}'},
+ 'storage_account': {'key': 'storageAccount', 'type': '{object}'},
+ 'key_vault': {'key': 'keyVault', 'type': '{object}'},
+ 'container_registry': {'key': 'containerRegistry', 'type': '{object}'},
+ 'application_insights': {'key': 'applicationInsights', 'type': '{object}'},
+ 'others': {'key': 'others', 'type': '{object}'},
}
def __init__(
self,
*,
- status: Union[str, "EncryptionStatus"],
- key_vault_properties: "KeyVaultProperties",
+ udr: Optional[Dict[str, Any]] = None,
+ nsg: Optional[Dict[str, Any]] = None,
+ resource_lock: Optional[Dict[str, Any]] = None,
+ dns_resolution: Optional[Dict[str, Any]] = None,
+ storage_account: Optional[Dict[str, Any]] = None,
+ key_vault: Optional[Dict[str, Any]] = None,
+ container_registry: Optional[Dict[str, Any]] = None,
+ application_insights: Optional[Dict[str, Any]] = None,
+ others: Optional[Dict[str, Any]] = None,
**kwargs
):
- super(EncryptionProperty, self).__init__(**kwargs)
- self.status = status
- self.key_vault_properties = key_vault_properties
-
+ """
+ :keyword udr: Setting for diagnosing user defined routing.
+ :paramtype udr: dict[str, any]
+ :keyword nsg: Setting for diagnosing network security group.
+ :paramtype nsg: dict[str, any]
+ :keyword resource_lock: Setting for diagnosing resource lock.
+ :paramtype resource_lock: dict[str, any]
+ :keyword dns_resolution: Setting for diagnosing dns resolution.
+ :paramtype dns_resolution: dict[str, any]
+ :keyword storage_account: Setting for diagnosing dependent storage account.
+ :paramtype storage_account: dict[str, any]
+ :keyword key_vault: Setting for diagnosing dependent key vault.
+ :paramtype key_vault: dict[str, any]
+ :keyword container_registry: Setting for diagnosing dependent container registry.
+ :paramtype container_registry: dict[str, any]
+ :keyword application_insights: Setting for diagnosing dependent application insights.
+ :paramtype application_insights: dict[str, any]
+ :keyword others: Setting for diagnosing unclassified category of problems.
+ :paramtype others: dict[str, any]
+ """
+ super(DiagnoseRequestProperties, self).__init__(**kwargs)
+ self.udr = udr
+ self.nsg = nsg
+ self.resource_lock = resource_lock
+ self.dns_resolution = dns_resolution
+ self.storage_account = storage_account
+ self.key_vault = key_vault
+ self.container_registry = container_registry
+ self.application_insights = application_insights
+ self.others = others
-class ErrorDetail(msrest.serialization.Model):
- """Error detail information.
- All required parameters must be populated in order to send to Azure.
+class DiagnoseResponseResult(msrest.serialization.Model):
+ """DiagnoseResponseResult.
- :param code: Required. Error code.
- :type code: str
- :param message: Required. Error message.
- :type message: str
+ :ivar value:
+ :vartype value: ~azure_machine_learning_workspaces.models.DiagnoseResponseResultValue
"""
- _validation = {
- 'code': {'required': True},
- 'message': {'required': True},
- }
-
_attribute_map = {
- 'code': {'key': 'code', 'type': 'str'},
- 'message': {'key': 'message', 'type': 'str'},
+ 'value': {'key': 'value', 'type': 'DiagnoseResponseResultValue'},
}
def __init__(
self,
*,
- code: str,
- message: str,
+ value: Optional["DiagnoseResponseResultValue"] = None,
**kwargs
):
- super(ErrorDetail, self).__init__(**kwargs)
- self.code = code
- self.message = message
+ """
+ :keyword value:
+ :paramtype value: ~azure_machine_learning_workspaces.models.DiagnoseResponseResultValue
+ """
+ super(DiagnoseResponseResult, self).__init__(**kwargs)
+ self.value = value
-class ErrorResponse(msrest.serialization.Model):
- """Error response information.
+class DiagnoseResponseResultValue(msrest.serialization.Model):
+ """DiagnoseResponseResultValue.
+
+ :ivar user_defined_route_results:
+ :vartype user_defined_route_results:
+ list[~azure_machine_learning_workspaces.models.DiagnoseResult]
+ :ivar network_security_rule_results:
+ :vartype network_security_rule_results:
+ list[~azure_machine_learning_workspaces.models.DiagnoseResult]
+ :ivar resource_lock_results:
+ :vartype resource_lock_results: list[~azure_machine_learning_workspaces.models.DiagnoseResult]
+ :ivar dns_resolution_results:
+ :vartype dns_resolution_results: list[~azure_machine_learning_workspaces.models.DiagnoseResult]
+ :ivar storage_account_results:
+ :vartype storage_account_results:
+ list[~azure_machine_learning_workspaces.models.DiagnoseResult]
+ :ivar key_vault_results:
+ :vartype key_vault_results: list[~azure_machine_learning_workspaces.models.DiagnoseResult]
+ :ivar container_registry_results:
+ :vartype container_registry_results:
+ list[~azure_machine_learning_workspaces.models.DiagnoseResult]
+ :ivar application_insights_results:
+ :vartype application_insights_results:
+ list[~azure_machine_learning_workspaces.models.DiagnoseResult]
+ :ivar other_results:
+ :vartype other_results: list[~azure_machine_learning_workspaces.models.DiagnoseResult]
+ """
+
+ _attribute_map = {
+ 'user_defined_route_results': {'key': 'userDefinedRouteResults', 'type': '[DiagnoseResult]'},
+ 'network_security_rule_results': {'key': 'networkSecurityRuleResults', 'type': '[DiagnoseResult]'},
+ 'resource_lock_results': {'key': 'resourceLockResults', 'type': '[DiagnoseResult]'},
+ 'dns_resolution_results': {'key': 'dnsResolutionResults', 'type': '[DiagnoseResult]'},
+ 'storage_account_results': {'key': 'storageAccountResults', 'type': '[DiagnoseResult]'},
+ 'key_vault_results': {'key': 'keyVaultResults', 'type': '[DiagnoseResult]'},
+ 'container_registry_results': {'key': 'containerRegistryResults', 'type': '[DiagnoseResult]'},
+ 'application_insights_results': {'key': 'applicationInsightsResults', 'type': '[DiagnoseResult]'},
+ 'other_results': {'key': 'otherResults', 'type': '[DiagnoseResult]'},
+ }
+
+ def __init__(
+ self,
+ *,
+ user_defined_route_results: Optional[List["DiagnoseResult"]] = None,
+ network_security_rule_results: Optional[List["DiagnoseResult"]] = None,
+ resource_lock_results: Optional[List["DiagnoseResult"]] = None,
+ dns_resolution_results: Optional[List["DiagnoseResult"]] = None,
+ storage_account_results: Optional[List["DiagnoseResult"]] = None,
+ key_vault_results: Optional[List["DiagnoseResult"]] = None,
+ container_registry_results: Optional[List["DiagnoseResult"]] = None,
+ application_insights_results: Optional[List["DiagnoseResult"]] = None,
+ other_results: Optional[List["DiagnoseResult"]] = None,
+ **kwargs
+ ):
+ """
+ :keyword user_defined_route_results:
+ :paramtype user_defined_route_results:
+ list[~azure_machine_learning_workspaces.models.DiagnoseResult]
+ :keyword network_security_rule_results:
+ :paramtype network_security_rule_results:
+ list[~azure_machine_learning_workspaces.models.DiagnoseResult]
+ :keyword resource_lock_results:
+ :paramtype resource_lock_results:
+ list[~azure_machine_learning_workspaces.models.DiagnoseResult]
+ :keyword dns_resolution_results:
+ :paramtype dns_resolution_results:
+ list[~azure_machine_learning_workspaces.models.DiagnoseResult]
+ :keyword storage_account_results:
+ :paramtype storage_account_results:
+ list[~azure_machine_learning_workspaces.models.DiagnoseResult]
+ :keyword key_vault_results:
+ :paramtype key_vault_results: list[~azure_machine_learning_workspaces.models.DiagnoseResult]
+ :keyword container_registry_results:
+ :paramtype container_registry_results:
+ list[~azure_machine_learning_workspaces.models.DiagnoseResult]
+ :keyword application_insights_results:
+ :paramtype application_insights_results:
+ list[~azure_machine_learning_workspaces.models.DiagnoseResult]
+ :keyword other_results:
+ :paramtype other_results: list[~azure_machine_learning_workspaces.models.DiagnoseResult]
+ """
+ super(DiagnoseResponseResultValue, self).__init__(**kwargs)
+ self.user_defined_route_results = user_defined_route_results
+ self.network_security_rule_results = network_security_rule_results
+ self.resource_lock_results = resource_lock_results
+ self.dns_resolution_results = dns_resolution_results
+ self.storage_account_results = storage_account_results
+ self.key_vault_results = key_vault_results
+ self.container_registry_results = container_registry_results
+ self.application_insights_results = application_insights_results
+ self.other_results = other_results
+
+
+class DiagnoseResult(msrest.serialization.Model):
+ """Result of Diagnose.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar code: Code for workspace setup error.
+ :vartype code: str
+ :ivar level: Level of workspace setup error. Possible values include: "Warning", "Error",
+ "Information".
+ :vartype level: str or ~azure_machine_learning_workspaces.models.DiagnoseResultLevel
+ :ivar message: Message of workspace setup error.
+ :vartype message: str
+ """
+
+ _validation = {
+ 'code': {'readonly': True},
+ 'level': {'readonly': True},
+ 'message': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'level': {'key': 'level', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ """
+ """
+ super(DiagnoseResult, self).__init__(**kwargs)
+ self.code = None
+ self.level = None
+ self.message = None
+
+
+class DiagnoseWorkspaceParameters(msrest.serialization.Model):
+ """Parameters to diagnose a workspace.
+
+ :ivar value: Value of Parameters.
+ :vartype value: ~azure_machine_learning_workspaces.models.DiagnoseRequestProperties
+ """
+
+ _attribute_map = {
+ 'value': {'key': 'value', 'type': 'DiagnoseRequestProperties'},
+ }
+
+ def __init__(
+ self,
+ *,
+ value: Optional["DiagnoseRequestProperties"] = None,
+ **kwargs
+ ):
+ """
+ :keyword value: Value of Parameters.
+ :paramtype value: ~azure_machine_learning_workspaces.models.DiagnoseRequestProperties
+ """
+ super(DiagnoseWorkspaceParameters, self).__init__(**kwargs)
+ self.value = value
+
+
+class EncryptionProperty(msrest.serialization.Model):
+ """EncryptionProperty.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar status: Required. Indicates whether or not the encryption is enabled for the workspace.
+ Possible values include: "Enabled", "Disabled".
+ :vartype status: str or ~azure_machine_learning_workspaces.models.EncryptionStatus
+ :ivar identity: The identity that will be used to access the key vault for encryption at rest.
+ :vartype identity: ~azure_machine_learning_workspaces.models.IdentityForCmk
+ :ivar key_vault_properties: Required. Customer Key vault properties.
+ :vartype key_vault_properties: ~azure_machine_learning_workspaces.models.KeyVaultProperties
+ """
+
+ _validation = {
+ 'status': {'required': True},
+ 'key_vault_properties': {'required': True},
+ }
+
+ _attribute_map = {
+ 'status': {'key': 'status', 'type': 'str'},
+ 'identity': {'key': 'identity', 'type': 'IdentityForCmk'},
+ 'key_vault_properties': {'key': 'keyVaultProperties', 'type': 'KeyVaultProperties'},
+ }
+
+ def __init__(
+ self,
+ *,
+ status: Union[str, "EncryptionStatus"],
+ key_vault_properties: "KeyVaultProperties",
+ identity: Optional["IdentityForCmk"] = None,
+ **kwargs
+ ):
+ """
+ :keyword status: Required. Indicates whether or not the encryption is enabled for the
+ workspace. Possible values include: "Enabled", "Disabled".
+ :paramtype status: str or ~azure_machine_learning_workspaces.models.EncryptionStatus
+ :keyword identity: The identity that will be used to access the key vault for encryption at
+ rest.
+ :paramtype identity: ~azure_machine_learning_workspaces.models.IdentityForCmk
+ :keyword key_vault_properties: Required. Customer Key vault properties.
+ :paramtype key_vault_properties: ~azure_machine_learning_workspaces.models.KeyVaultProperties
+ """
+ super(EncryptionProperty, self).__init__(**kwargs)
+ self.status = status
+ self.identity = identity
+ self.key_vault_properties = key_vault_properties
+
+
+class ErrorAdditionalInfo(msrest.serialization.Model):
+ """The resource management error additional info.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar type: The additional info type.
+ :vartype type: str
+ :ivar info: The additional info.
+ :vartype info: any
+ """
+
+ _validation = {
+ 'type': {'readonly': True},
+ 'info': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'type': {'key': 'type', 'type': 'str'},
+ 'info': {'key': 'info', 'type': 'object'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ """
+ """
+ super(ErrorAdditionalInfo, self).__init__(**kwargs)
+ self.type = None
+ self.info = None
+
+
+class ErrorDetail(msrest.serialization.Model):
+ """The error detail.
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar code: Error code.
+ :ivar code: The error code.
:vartype code: str
- :ivar message: Error message.
+ :ivar message: The error message.
:vartype message: str
- :ivar details: An array of error detail objects.
- :vartype details: list[~azure.mgmt.machinelearningservices.models.ErrorDetail]
+ :ivar target: The error target.
+ :vartype target: str
+ :ivar details: The error details.
+ :vartype details: list[~azure_machine_learning_workspaces.models.ErrorDetail]
+ :ivar additional_info: The error additional info.
+ :vartype additional_info: list[~azure_machine_learning_workspaces.models.ErrorAdditionalInfo]
"""
_validation = {
'code': {'readonly': True},
'message': {'readonly': True},
+ 'target': {'readonly': True},
'details': {'readonly': True},
+ 'additional_info': {'readonly': True},
}
_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
+ 'target': {'key': 'target', 'type': 'str'},
'details': {'key': 'details', 'type': '[ErrorDetail]'},
+ 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'},
}
def __init__(
self,
**kwargs
):
- super(ErrorResponse, self).__init__(**kwargs)
+ """
+ """
+ super(ErrorDetail, self).__init__(**kwargs)
self.code = None
self.message = None
+ self.target = None
self.details = None
+ self.additional_info = None
+
+
+class ErrorResponse(msrest.serialization.Model):
+ """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).
+
+ :ivar error: The error object.
+ :vartype error: ~azure_machine_learning_workspaces.models.ErrorDetail
+ """
+
+ _attribute_map = {
+ 'error': {'key': 'error', 'type': 'ErrorDetail'},
+ }
+
+ def __init__(
+ self,
+ *,
+ error: Optional["ErrorDetail"] = None,
+ **kwargs
+ ):
+ """
+ :keyword error: The error object.
+ :paramtype error: ~azure_machine_learning_workspaces.models.ErrorDetail
+ """
+ super(ErrorResponse, self).__init__(**kwargs)
+ self.error = error
class EstimatedVMPrice(msrest.serialization.Model):
@@ -1559,14 +2452,14 @@ class EstimatedVMPrice(msrest.serialization.Model):
All required parameters must be populated in order to send to Azure.
- :param retail_price: Required. The price charged for using the VM.
- :type retail_price: float
- :param os_type: Required. Operating system type used by the VM. Possible values include:
+ :ivar retail_price: Required. The price charged for using the VM.
+ :vartype retail_price: float
+ :ivar os_type: Required. Operating system type used by the VM. Possible values include:
"Linux", "Windows".
- :type os_type: str or ~azure.mgmt.machinelearningservices.models.VMPriceOSType
- :param vm_tier: Required. The type of the VM. Possible values include: "Standard",
+ :vartype os_type: str or ~azure_machine_learning_workspaces.models.VMPriceOSType
+ :ivar vm_tier: Required. The type of the VM. Possible values include: "Standard",
"LowPriority", "Spot".
- :type vm_tier: str or ~azure.mgmt.machinelearningservices.models.VMTier
+ :vartype vm_tier: str or ~azure_machine_learning_workspaces.models.VMTier
"""
_validation = {
@@ -1589,6 +2482,16 @@ def __init__(
vm_tier: Union[str, "VMTier"],
**kwargs
):
+ """
+ :keyword retail_price: Required. The price charged for using the VM.
+ :paramtype retail_price: float
+ :keyword os_type: Required. Operating system type used by the VM. Possible values include:
+ "Linux", "Windows".
+ :paramtype os_type: str or ~azure_machine_learning_workspaces.models.VMPriceOSType
+ :keyword vm_tier: Required. The type of the VM. Possible values include: "Standard",
+ "LowPriority", "Spot".
+ :paramtype vm_tier: str or ~azure_machine_learning_workspaces.models.VMTier
+ """
super(EstimatedVMPrice, self).__init__(**kwargs)
self.retail_price = retail_price
self.os_type = os_type
@@ -1600,15 +2503,15 @@ class EstimatedVMPrices(msrest.serialization.Model):
All required parameters must be populated in order to send to Azure.
- :param billing_currency: Required. Three lettered code specifying the currency of the VM price.
+ :ivar billing_currency: Required. Three lettered code specifying the currency of the VM price.
Example: USD. Possible values include: "USD".
- :type billing_currency: str or ~azure.mgmt.machinelearningservices.models.BillingCurrency
- :param unit_of_measure: Required. The unit of time measurement for the specified VM price.
+ :vartype billing_currency: str or ~azure_machine_learning_workspaces.models.BillingCurrency
+ :ivar unit_of_measure: Required. The unit of time measurement for the specified VM price.
Example: OneHour. Possible values include: "OneHour".
- :type unit_of_measure: str or ~azure.mgmt.machinelearningservices.models.UnitOfMeasure
- :param values: Required. The list of estimated prices for using a VM of a particular OS type,
+ :vartype unit_of_measure: str or ~azure_machine_learning_workspaces.models.UnitOfMeasure
+ :ivar values: Required. The list of estimated prices for using a VM of a particular OS type,
tier, etc.
- :type values: list[~azure.mgmt.machinelearningservices.models.EstimatedVMPrice]
+ :vartype values: list[~azure_machine_learning_workspaces.models.EstimatedVMPrice]
"""
_validation = {
@@ -1631,12 +2534,162 @@ def __init__(
values: List["EstimatedVMPrice"],
**kwargs
):
+ """
+ :keyword billing_currency: Required. Three lettered code specifying the currency of the VM
+ price. Example: USD. Possible values include: "USD".
+ :paramtype billing_currency: str or ~azure_machine_learning_workspaces.models.BillingCurrency
+ :keyword unit_of_measure: Required. The unit of time measurement for the specified VM price.
+ Example: OneHour. Possible values include: "OneHour".
+ :paramtype unit_of_measure: str or ~azure_machine_learning_workspaces.models.UnitOfMeasure
+ :keyword values: Required. The list of estimated prices for using a VM of a particular OS type,
+ tier, etc.
+ :paramtype values: list[~azure_machine_learning_workspaces.models.EstimatedVMPrice]
+ """
super(EstimatedVMPrices, self).__init__(**kwargs)
self.billing_currency = billing_currency
self.unit_of_measure = unit_of_measure
self.values = values
+class ExternalFQDNResponse(msrest.serialization.Model):
+ """ExternalFQDNResponse.
+
+ :ivar value:
+ :vartype value: list[~azure_machine_learning_workspaces.models.FQDNEndpoints]
+ """
+
+ _attribute_map = {
+ 'value': {'key': 'value', 'type': '[FQDNEndpoints]'},
+ }
+
+ def __init__(
+ self,
+ *,
+ value: Optional[List["FQDNEndpoints"]] = None,
+ **kwargs
+ ):
+ """
+ :keyword value:
+ :paramtype value: list[~azure_machine_learning_workspaces.models.FQDNEndpoints]
+ """
+ super(ExternalFQDNResponse, self).__init__(**kwargs)
+ self.value = value
+
+
+class FQDNEndpoint(msrest.serialization.Model):
+ """FQDNEndpoint.
+
+ :ivar domain_name:
+ :vartype domain_name: str
+ :ivar endpoint_details:
+ :vartype endpoint_details: list[~azure_machine_learning_workspaces.models.FQDNEndpointDetail]
+ """
+
+ _attribute_map = {
+ 'domain_name': {'key': 'domainName', 'type': 'str'},
+ 'endpoint_details': {'key': 'endpointDetails', 'type': '[FQDNEndpointDetail]'},
+ }
+
+ def __init__(
+ self,
+ *,
+ domain_name: Optional[str] = None,
+ endpoint_details: Optional[List["FQDNEndpointDetail"]] = None,
+ **kwargs
+ ):
+ """
+ :keyword domain_name:
+ :paramtype domain_name: str
+ :keyword endpoint_details:
+ :paramtype endpoint_details: list[~azure_machine_learning_workspaces.models.FQDNEndpointDetail]
+ """
+ super(FQDNEndpoint, self).__init__(**kwargs)
+ self.domain_name = domain_name
+ self.endpoint_details = endpoint_details
+
+
+class FQDNEndpointDetail(msrest.serialization.Model):
+ """FQDNEndpointDetail.
+
+ :ivar port:
+ :vartype port: int
+ """
+
+ _attribute_map = {
+ 'port': {'key': 'port', 'type': 'int'},
+ }
+
+ def __init__(
+ self,
+ *,
+ port: Optional[int] = None,
+ **kwargs
+ ):
+ """
+ :keyword port:
+ :paramtype port: int
+ """
+ super(FQDNEndpointDetail, self).__init__(**kwargs)
+ self.port = port
+
+
+class FQDNEndpoints(msrest.serialization.Model):
+ """FQDNEndpoints.
+
+ :ivar properties:
+ :vartype properties: ~azure_machine_learning_workspaces.models.FQDNEndpointsProperties
+ """
+
+ _attribute_map = {
+ 'properties': {'key': 'properties', 'type': 'FQDNEndpointsProperties'},
+ }
+
+ def __init__(
+ self,
+ *,
+ properties: Optional["FQDNEndpointsProperties"] = None,
+ **kwargs
+ ):
+ """
+ :keyword properties:
+ :paramtype properties: ~azure_machine_learning_workspaces.models.FQDNEndpointsProperties
+ """
+ super(FQDNEndpoints, self).__init__(**kwargs)
+ self.properties = properties
+
+
+class FQDNEndpointsProperties(msrest.serialization.Model):
+ """FQDNEndpointsProperties.
+
+ :ivar category:
+ :vartype category: str
+ :ivar endpoints:
+ :vartype endpoints: list[~azure_machine_learning_workspaces.models.FQDNEndpoint]
+ """
+
+ _attribute_map = {
+ 'category': {'key': 'category', 'type': 'str'},
+ 'endpoints': {'key': 'endpoints', 'type': '[FQDNEndpoint]'},
+ }
+
+ def __init__(
+ self,
+ *,
+ category: Optional[str] = None,
+ endpoints: Optional[List["FQDNEndpoint"]] = None,
+ **kwargs
+ ):
+ """
+ :keyword category:
+ :paramtype category: str
+ :keyword endpoints:
+ :paramtype endpoints: list[~azure_machine_learning_workspaces.models.FQDNEndpoint]
+ """
+ super(FQDNEndpointsProperties, self).__init__(**kwargs)
+ self.category = category
+ self.endpoints = endpoints
+
+
class HDInsight(Compute):
"""A HDInsight compute.
@@ -1644,33 +2697,34 @@ class HDInsight(Compute):
All required parameters must be populated in order to send to Azure.
- :param compute_type: Required. The type of compute.Constant filled by server. Possible values
- include: "AKS", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", "HDInsight",
- "Databricks", "DataLakeAnalytics".
- :type compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType
- :param compute_location: Location for the underlying compute.
- :type compute_location: str
+ :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values
+ include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine",
+ "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark".
+ :vartype compute_type: str or ~azure_machine_learning_workspaces.models.ComputeType
+ :ivar compute_location: Location for the underlying compute.
+ :vartype compute_location: str
:ivar provisioning_state: The provision state of the cluster. Valid values are Unknown,
Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating",
"Creating", "Deleting", "Succeeded", "Failed", "Canceled".
- :vartype provisioning_state: str or
- ~azure.mgmt.machinelearningservices.models.ProvisioningState
- :param description: The description of the Machine Learning compute.
- :type description: str
- :ivar created_on: The date and time when the compute was created.
+ :vartype provisioning_state: str or ~azure_machine_learning_workspaces.models.ProvisioningState
+ :ivar description: The description of the Machine Learning compute.
+ :vartype description: str
+ :ivar created_on: The time at which the compute was created.
:vartype created_on: ~datetime.datetime
- :ivar modified_on: The date and time when the compute was last modified.
+ :ivar modified_on: The time at which the compute was last modified.
:vartype modified_on: ~datetime.datetime
- :param resource_id: ARM resource id of the underlying compute.
- :type resource_id: str
+ :ivar resource_id: ARM resource id of the underlying compute.
+ :vartype resource_id: str
:ivar provisioning_errors: Errors during provisioning.
- :vartype provisioning_errors:
- list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError]
+ :vartype provisioning_errors: list[~azure_machine_learning_workspaces.models.ErrorResponse]
:ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought
from outside if true, or machine learning service provisioned it if false.
:vartype is_attached_compute: bool
- :param properties:
- :type properties: ~azure.mgmt.machinelearningservices.models.HDInsightProperties
+ :ivar disable_local_auth: Opt-out of local authentication and ensure customers can use only MSI
+ and AAD exclusively for authentication.
+ :vartype disable_local_auth: bool
+ :ivar properties: HDInsight compute properties.
+ :vartype properties: ~azure_machine_learning_workspaces.models.HDInsightProperties
"""
_validation = {
@@ -1690,8 +2744,9 @@ class HDInsight(Compute):
'created_on': {'key': 'createdOn', 'type': 'iso-8601'},
'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'},
'resource_id': {'key': 'resourceId', 'type': 'str'},
- 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'},
+ 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'},
'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'},
+ 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'},
'properties': {'key': 'properties', 'type': 'HDInsightProperties'},
}
@@ -1701,24 +2756,38 @@ def __init__(
compute_location: Optional[str] = None,
description: Optional[str] = None,
resource_id: Optional[str] = None,
+ disable_local_auth: Optional[bool] = None,
properties: Optional["HDInsightProperties"] = None,
**kwargs
):
- super(HDInsight, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, **kwargs)
+ """
+ :keyword compute_location: Location for the underlying compute.
+ :paramtype compute_location: str
+ :keyword description: The description of the Machine Learning compute.
+ :paramtype description: str
+ :keyword resource_id: ARM resource id of the underlying compute.
+ :paramtype resource_id: str
+ :keyword disable_local_auth: Opt-out of local authentication and ensure customers can use only
+ MSI and AAD exclusively for authentication.
+ :paramtype disable_local_auth: bool
+ :keyword properties: HDInsight compute properties.
+ :paramtype properties: ~azure_machine_learning_workspaces.models.HDInsightProperties
+ """
+ super(HDInsight, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, **kwargs)
self.compute_type = 'HDInsight' # type: str
self.properties = properties
class HDInsightProperties(msrest.serialization.Model):
- """HDInsightProperties.
+ """HDInsight compute properties.
- :param ssh_port: Port open for ssh connections on the master node of the cluster.
- :type ssh_port: int
- :param address: Public IP address of the master node of the cluster.
- :type address: str
- :param administrator_account: Admin credentials for master node of the cluster.
- :type administrator_account:
- ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials
+ :ivar ssh_port: Port open for ssh connections on the master node of the cluster.
+ :vartype ssh_port: int
+ :ivar address: Public IP address of the master node of the cluster.
+ :vartype address: str
+ :ivar administrator_account: Admin credentials for master node of the cluster.
+ :vartype administrator_account:
+ ~azure_machine_learning_workspaces.models.VirtualMachineSshCredentials
"""
_attribute_map = {
@@ -1735,6 +2804,15 @@ def __init__(
administrator_account: Optional["VirtualMachineSshCredentials"] = None,
**kwargs
):
+ """
+ :keyword ssh_port: Port open for ssh connections on the master node of the cluster.
+ :paramtype ssh_port: int
+ :keyword address: Public IP address of the master node of the cluster.
+ :paramtype address: str
+ :keyword administrator_account: Admin credentials for master node of the cluster.
+ :paramtype administrator_account:
+ ~azure_machine_learning_workspaces.models.VirtualMachineSshCredentials
+ """
super(HDInsightProperties, self).__init__(**kwargs)
self.ssh_port = ssh_port
self.address = address
@@ -1746,42 +2824,45 @@ class Identity(msrest.serialization.Model):
Variables are only populated by the server, and will be ignored when sending a request.
- All required parameters must be populated in order to send to Azure.
-
:ivar principal_id: The principal ID of resource identity.
:vartype principal_id: str
:ivar tenant_id: The tenant ID of resource.
:vartype tenant_id: str
- :param type: Required. The identity type. Possible values include: "SystemAssigned",
- "UserAssigned", "SystemAssigned,UserAssigned", "None".
- :type type: str or ~azure.mgmt.machinelearningservices.models.ResourceIdentityType
- :param user_assigned_identities: The list of user identities associated with resource. The user
- identity dictionary key references will be ARM resource ids in the form:
- '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
- :type user_assigned_identities: dict[str,
- ~azure.mgmt.machinelearningservices.models.ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties]
+ :ivar type: The identity type. Possible values include: "SystemAssigned",
+ "SystemAssigned,UserAssigned", "UserAssigned", "None".
+ :vartype type: str or ~azure_machine_learning_workspaces.models.ResourceIdentityType
+ :ivar user_assigned_identities: The user assigned identities associated with the resource.
+ :vartype user_assigned_identities: dict[str,
+ ~azure_machine_learning_workspaces.models.UserAssignedIdentity]
"""
_validation = {
'principal_id': {'readonly': True},
'tenant_id': {'readonly': True},
- 'type': {'required': True},
}
_attribute_map = {
'principal_id': {'key': 'principalId', 'type': 'str'},
'tenant_id': {'key': 'tenantId', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
- 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties}'},
+ 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentity}'},
}
def __init__(
self,
*,
- type: Union[str, "ResourceIdentityType"],
- user_assigned_identities: Optional[Dict[str, "ComponentsSgqdofSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties"]] = None,
+ type: Optional[Union[str, "ResourceIdentityType"]] = None,
+ user_assigned_identities: Optional[Dict[str, "UserAssignedIdentity"]] = None,
**kwargs
):
+ """
+ :keyword type: The identity type. Possible values include: "SystemAssigned",
+ "SystemAssigned,UserAssigned", "UserAssigned", "None".
+ :paramtype type: str or ~azure_machine_learning_workspaces.models.ResourceIdentityType
+ :keyword user_assigned_identities: The user assigned identities associated with the resource.
+ :paramtype user_assigned_identities: dict[str,
+ ~azure_machine_learning_workspaces.models.UserAssignedIdentity]
+ """
super(Identity, self).__init__(**kwargs)
self.principal_id = None
self.tenant_id = None
@@ -1789,19 +2870,110 @@ def __init__(
self.user_assigned_identities = user_assigned_identities
+class IdentityForCmk(msrest.serialization.Model):
+ """Identity that will be used to access key vault for encryption at rest.
+
+ :ivar user_assigned_identity: The ArmId of the user assigned identity that will be used to
+ access the customer managed key vault.
+ :vartype user_assigned_identity: str
+ """
+
+ _attribute_map = {
+ 'user_assigned_identity': {'key': 'userAssignedIdentity', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ user_assigned_identity: Optional[str] = None,
+ **kwargs
+ ):
+ """
+ :keyword user_assigned_identity: The ArmId of the user assigned identity that will be used to
+ access the customer managed key vault.
+ :paramtype user_assigned_identity: str
+ """
+ super(IdentityForCmk, self).__init__(**kwargs)
+ self.user_assigned_identity = user_assigned_identity
+
+
+class InstanceTypeSchema(msrest.serialization.Model):
+ """Instance type schema.
+
+ :ivar node_selector: Node Selector.
+ :vartype node_selector: dict[str, str]
+ :ivar resources: Resource requests/limits for this instance type.
+ :vartype resources: ~azure_machine_learning_workspaces.models.InstanceTypeSchemaResources
+ """
+
+ _attribute_map = {
+ 'node_selector': {'key': 'nodeSelector', 'type': '{str}'},
+ 'resources': {'key': 'resources', 'type': 'InstanceTypeSchemaResources'},
+ }
+
+ def __init__(
+ self,
+ *,
+ node_selector: Optional[Dict[str, str]] = None,
+ resources: Optional["InstanceTypeSchemaResources"] = None,
+ **kwargs
+ ):
+ """
+ :keyword node_selector: Node Selector.
+ :paramtype node_selector: dict[str, str]
+ :keyword resources: Resource requests/limits for this instance type.
+ :paramtype resources: ~azure_machine_learning_workspaces.models.InstanceTypeSchemaResources
+ """
+ super(InstanceTypeSchema, self).__init__(**kwargs)
+ self.node_selector = node_selector
+ self.resources = resources
+
+
+class InstanceTypeSchemaResources(msrest.serialization.Model):
+ """Resource requests/limits for this instance type.
+
+ :ivar requests: Resource requests for this instance type.
+ :vartype requests: dict[str, str]
+ :ivar limits: Resource limits for this instance type.
+ :vartype limits: dict[str, str]
+ """
+
+ _attribute_map = {
+ 'requests': {'key': 'requests', 'type': '{str}'},
+ 'limits': {'key': 'limits', 'type': '{str}'},
+ }
+
+ def __init__(
+ self,
+ *,
+ requests: Optional[Dict[str, str]] = None,
+ limits: Optional[Dict[str, str]] = None,
+ **kwargs
+ ):
+ """
+ :keyword requests: Resource requests for this instance type.
+ :paramtype requests: dict[str, str]
+ :keyword limits: Resource limits for this instance type.
+ :paramtype limits: dict[str, str]
+ """
+ super(InstanceTypeSchemaResources, self).__init__(**kwargs)
+ self.requests = requests
+ self.limits = limits
+
+
class KeyVaultProperties(msrest.serialization.Model):
"""KeyVaultProperties.
All required parameters must be populated in order to send to Azure.
- :param key_vault_arm_id: Required. The ArmId of the keyVault where the customer owned
- encryption key is present.
- :type key_vault_arm_id: str
- :param key_identifier: Required. Key vault uri to access the encryption key.
- :type key_identifier: str
- :param identity_client_id: For future use - The client id of the identity which will be used to
+ :ivar key_vault_arm_id: Required. The ArmId of the keyVault where the customer owned encryption
+ key is present.
+ :vartype key_vault_arm_id: str
+ :ivar key_identifier: Required. Key vault uri to access the encryption key.
+ :vartype key_identifier: str
+ :ivar identity_client_id: For future use - The client id of the identity which will be used to
access key vault.
- :type identity_client_id: str
+ :vartype identity_client_id: str
"""
_validation = {
@@ -1823,19 +2995,228 @@ def __init__(
identity_client_id: Optional[str] = None,
**kwargs
):
+ """
+ :keyword key_vault_arm_id: Required. The ArmId of the keyVault where the customer owned
+ encryption key is present.
+ :paramtype key_vault_arm_id: str
+ :keyword key_identifier: Required. Key vault uri to access the encryption key.
+ :paramtype key_identifier: str
+ :keyword identity_client_id: For future use - The client id of the identity which will be used
+ to access key vault.
+ :paramtype identity_client_id: str
+ """
super(KeyVaultProperties, self).__init__(**kwargs)
self.key_vault_arm_id = key_vault_arm_id
self.key_identifier = key_identifier
self.identity_client_id = identity_client_id
+class KubernetesSchema(msrest.serialization.Model):
+ """Kubernetes Compute Schema.
+
+ :ivar properties: Properties of Kubernetes.
+ :vartype properties: ~azure_machine_learning_workspaces.models.KubernetesProperties
+ """
+
+ _attribute_map = {
+ 'properties': {'key': 'properties', 'type': 'KubernetesProperties'},
+ }
+
+ def __init__(
+ self,
+ *,
+ properties: Optional["KubernetesProperties"] = None,
+ **kwargs
+ ):
+ """
+ :keyword properties: Properties of Kubernetes.
+ :paramtype properties: ~azure_machine_learning_workspaces.models.KubernetesProperties
+ """
+ super(KubernetesSchema, self).__init__(**kwargs)
+ self.properties = properties
+
+
+class Kubernetes(Compute, KubernetesSchema):
+ """A Machine Learning compute based on Kubernetes Compute.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar properties: Properties of Kubernetes.
+ :vartype properties: ~azure_machine_learning_workspaces.models.KubernetesProperties
+ :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values
+ include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine",
+ "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark".
+ :vartype compute_type: str or ~azure_machine_learning_workspaces.models.ComputeType
+ :ivar compute_location: Location for the underlying compute.
+ :vartype compute_location: str
+ :ivar provisioning_state: The provision state of the cluster. Valid values are Unknown,
+ Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating",
+ "Creating", "Deleting", "Succeeded", "Failed", "Canceled".
+ :vartype provisioning_state: str or ~azure_machine_learning_workspaces.models.ProvisioningState
+ :ivar description: The description of the Machine Learning compute.
+ :vartype description: str
+ :ivar created_on: The time at which the compute was created.
+ :vartype created_on: ~datetime.datetime
+ :ivar modified_on: The time at which the compute was last modified.
+ :vartype modified_on: ~datetime.datetime
+ :ivar resource_id: ARM resource id of the underlying compute.
+ :vartype resource_id: str
+ :ivar provisioning_errors: Errors during provisioning.
+ :vartype provisioning_errors: list[~azure_machine_learning_workspaces.models.ErrorResponse]
+ :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought
+ from outside if true, or machine learning service provisioned it if false.
+ :vartype is_attached_compute: bool
+ :ivar disable_local_auth: Opt-out of local authentication and ensure customers can use only MSI
+ and AAD exclusively for authentication.
+ :vartype disable_local_auth: bool
+ """
+
+ _validation = {
+ 'compute_type': {'required': True},
+ 'provisioning_state': {'readonly': True},
+ 'created_on': {'readonly': True},
+ 'modified_on': {'readonly': True},
+ 'provisioning_errors': {'readonly': True},
+ 'is_attached_compute': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'properties': {'key': 'properties', 'type': 'KubernetesProperties'},
+ 'compute_type': {'key': 'computeType', 'type': 'str'},
+ 'compute_location': {'key': 'computeLocation', 'type': 'str'},
+ 'provisioning_state': {'key': 'provisioningState', 'type': 'str'},
+ 'description': {'key': 'description', 'type': 'str'},
+ 'created_on': {'key': 'createdOn', 'type': 'iso-8601'},
+ 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'},
+ 'resource_id': {'key': 'resourceId', 'type': 'str'},
+ 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'},
+ 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'},
+ 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'},
+ }
+
+ def __init__(
+ self,
+ *,
+ properties: Optional["KubernetesProperties"] = None,
+ compute_location: Optional[str] = None,
+ description: Optional[str] = None,
+ resource_id: Optional[str] = None,
+ disable_local_auth: Optional[bool] = None,
+ **kwargs
+ ):
+ """
+ :keyword properties: Properties of Kubernetes.
+ :paramtype properties: ~azure_machine_learning_workspaces.models.KubernetesProperties
+ :keyword compute_location: Location for the underlying compute.
+ :paramtype compute_location: str
+ :keyword description: The description of the Machine Learning compute.
+ :paramtype description: str
+ :keyword resource_id: ARM resource id of the underlying compute.
+ :paramtype resource_id: str
+ :keyword disable_local_auth: Opt-out of local authentication and ensure customers can use only
+ MSI and AAD exclusively for authentication.
+ :paramtype disable_local_auth: bool
+ """
+ super(Kubernetes, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, properties=properties, **kwargs)
+ self.properties = properties
+ self.compute_type = 'Kubernetes' # type: str
+ self.compute_type = 'Kubernetes' # type: str
+ self.compute_location = compute_location
+ self.provisioning_state = None
+ self.description = description
+ self.created_on = None
+ self.modified_on = None
+ self.resource_id = resource_id
+ self.provisioning_errors = None
+ self.is_attached_compute = None
+ self.disable_local_auth = disable_local_auth
+
+
+class KubernetesProperties(msrest.serialization.Model):
+ """Kubernetes properties.
+
+ :ivar relay_connection_string: Relay connection string.
+ :vartype relay_connection_string: str
+ :ivar service_bus_connection_string: ServiceBus connection string.
+ :vartype service_bus_connection_string: str
+ :ivar extension_principal_id: Extension principal-id.
+ :vartype extension_principal_id: str
+ :ivar extension_instance_release_train: Extension instance release train.
+ :vartype extension_instance_release_train: str
+ :ivar vc_name: VC name.
+ :vartype vc_name: str
+ :ivar namespace: Compute namespace.
+ :vartype namespace: str
+ :ivar default_instance_type: Default instance type.
+ :vartype default_instance_type: str
+ :ivar instance_types: Instance Type Schema.
+ :vartype instance_types: dict[str,
+ ~azure_machine_learning_workspaces.models.InstanceTypeSchema]
+ """
+
+ _attribute_map = {
+ 'relay_connection_string': {'key': 'relayConnectionString', 'type': 'str'},
+ 'service_bus_connection_string': {'key': 'serviceBusConnectionString', 'type': 'str'},
+ 'extension_principal_id': {'key': 'extensionPrincipalId', 'type': 'str'},
+ 'extension_instance_release_train': {'key': 'extensionInstanceReleaseTrain', 'type': 'str'},
+ 'vc_name': {'key': 'vcName', 'type': 'str'},
+ 'namespace': {'key': 'namespace', 'type': 'str'},
+ 'default_instance_type': {'key': 'defaultInstanceType', 'type': 'str'},
+ 'instance_types': {'key': 'instanceTypes', 'type': '{InstanceTypeSchema}'},
+ }
+
+ def __init__(
+ self,
+ *,
+ relay_connection_string: Optional[str] = None,
+ service_bus_connection_string: Optional[str] = None,
+ extension_principal_id: Optional[str] = None,
+ extension_instance_release_train: Optional[str] = None,
+ vc_name: Optional[str] = None,
+ namespace: Optional[str] = "default",
+ default_instance_type: Optional[str] = None,
+ instance_types: Optional[Dict[str, "InstanceTypeSchema"]] = None,
+ **kwargs
+ ):
+ """
+ :keyword relay_connection_string: Relay connection string.
+ :paramtype relay_connection_string: str
+ :keyword service_bus_connection_string: ServiceBus connection string.
+ :paramtype service_bus_connection_string: str
+ :keyword extension_principal_id: Extension principal-id.
+ :paramtype extension_principal_id: str
+ :keyword extension_instance_release_train: Extension instance release train.
+ :paramtype extension_instance_release_train: str
+ :keyword vc_name: VC name.
+ :paramtype vc_name: str
+ :keyword namespace: Compute namespace.
+ :paramtype namespace: str
+ :keyword default_instance_type: Default instance type.
+ :paramtype default_instance_type: str
+ :keyword instance_types: Instance Type Schema.
+ :paramtype instance_types: dict[str,
+ ~azure_machine_learning_workspaces.models.InstanceTypeSchema]
+ """
+ super(KubernetesProperties, self).__init__(**kwargs)
+ self.relay_connection_string = relay_connection_string
+ self.service_bus_connection_string = service_bus_connection_string
+ self.extension_principal_id = extension_principal_id
+ self.extension_instance_release_train = extension_instance_release_train
+ self.vc_name = vc_name
+ self.namespace = namespace
+ self.default_instance_type = default_instance_type
+ self.instance_types = instance_types
+
+
class ListAmlUserFeatureResult(msrest.serialization.Model):
"""The List Aml user feature operation response.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar value: The list of AML user facing features.
- :vartype value: list[~azure.mgmt.machinelearningservices.models.AmlUserFeature]
+ :vartype value: list[~azure_machine_learning_workspaces.models.AmlUserFeature]
:ivar next_link: The URI to fetch the next page of AML user features information. Call
ListNext() with this to fetch the next page of AML user features information.
:vartype next_link: str
@@ -1855,18 +3236,79 @@ def __init__(
self,
**kwargs
):
+ """
+ """
super(ListAmlUserFeatureResult, self).__init__(**kwargs)
self.value = None
self.next_link = None
+class ListNotebookKeysResult(msrest.serialization.Model):
+ """ListNotebookKeysResult.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar primary_access_key:
+ :vartype primary_access_key: str
+ :ivar secondary_access_key:
+ :vartype secondary_access_key: str
+ """
+
+ _validation = {
+ 'primary_access_key': {'readonly': True},
+ 'secondary_access_key': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'primary_access_key': {'key': 'primaryAccessKey', 'type': 'str'},
+ 'secondary_access_key': {'key': 'secondaryAccessKey', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ """
+ """
+ super(ListNotebookKeysResult, self).__init__(**kwargs)
+ self.primary_access_key = None
+ self.secondary_access_key = None
+
+
+class ListStorageAccountKeysResult(msrest.serialization.Model):
+ """ListStorageAccountKeysResult.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar user_storage_key:
+ :vartype user_storage_key: str
+ """
+
+ _validation = {
+ 'user_storage_key': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'user_storage_key': {'key': 'userStorageKey', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ """
+ """
+ super(ListStorageAccountKeysResult, self).__init__(**kwargs)
+ self.user_storage_key = None
+
+
class ListUsagesResult(msrest.serialization.Model):
"""The List Usages operation response.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar value: The list of AML resource usages.
- :vartype value: list[~azure.mgmt.machinelearningservices.models.Usage]
+ :vartype value: list[~azure_machine_learning_workspaces.models.Usage]
:ivar next_link: The URI to fetch the next page of AML resource usage information. Call
ListNext() with this to fetch the next page of AML resource usage information.
:vartype next_link: str
@@ -1886,6 +3328,8 @@ def __init__(
self,
**kwargs
):
+ """
+ """
super(ListUsagesResult, self).__init__(**kwargs)
self.value = None
self.next_link = None
@@ -1904,10 +3348,9 @@ class ListWorkspaceKeysResult(msrest.serialization.Model):
:vartype app_insights_instrumentation_key: str
:ivar container_registry_credentials:
:vartype container_registry_credentials:
- ~azure.mgmt.machinelearningservices.models.RegistryListCredentialsResult
- :param notebook_access_keys:
- :type notebook_access_keys:
- ~azure.mgmt.machinelearningservices.models.NotebookListCredentialsResult
+ ~azure_machine_learning_workspaces.models.RegistryListCredentialsResult
+ :ivar notebook_access_keys:
+ :vartype notebook_access_keys: ~azure_machine_learning_workspaces.models.ListNotebookKeysResult
"""
_validation = {
@@ -1915,6 +3358,7 @@ class ListWorkspaceKeysResult(msrest.serialization.Model):
'user_storage_resource_id': {'readonly': True},
'app_insights_instrumentation_key': {'readonly': True},
'container_registry_credentials': {'readonly': True},
+ 'notebook_access_keys': {'readonly': True},
}
_attribute_map = {
@@ -1922,21 +3366,21 @@ class ListWorkspaceKeysResult(msrest.serialization.Model):
'user_storage_resource_id': {'key': 'userStorageResourceId', 'type': 'str'},
'app_insights_instrumentation_key': {'key': 'appInsightsInstrumentationKey', 'type': 'str'},
'container_registry_credentials': {'key': 'containerRegistryCredentials', 'type': 'RegistryListCredentialsResult'},
- 'notebook_access_keys': {'key': 'notebookAccessKeys', 'type': 'NotebookListCredentialsResult'},
+ 'notebook_access_keys': {'key': 'notebookAccessKeys', 'type': 'ListNotebookKeysResult'},
}
def __init__(
self,
- *,
- notebook_access_keys: Optional["NotebookListCredentialsResult"] = None,
**kwargs
):
+ """
+ """
super(ListWorkspaceKeysResult, self).__init__(**kwargs)
self.user_storage_key = None
self.user_storage_resource_id = None
self.app_insights_instrumentation_key = None
self.container_registry_credentials = None
- self.notebook_access_keys = notebook_access_keys
+ self.notebook_access_keys = None
class ListWorkspaceQuotas(msrest.serialization.Model):
@@ -1945,7 +3389,7 @@ class ListWorkspaceQuotas(msrest.serialization.Model):
Variables are only populated by the server, and will be ignored when sending a request.
:ivar value: The list of Workspace Quotas by VM Family.
- :vartype value: list[~azure.mgmt.machinelearningservices.models.ResourceQuota]
+ :vartype value: list[~azure_machine_learning_workspaces.models.ResourceQuota]
:ivar next_link: The URI to fetch the next page of workspace quota information by VM Family.
Call ListNext() with this to fetch the next page of Workspace Quota information.
:vartype next_link: str
@@ -1965,36 +3409,13 @@ def __init__(
self,
**kwargs
):
+ """
+ """
super(ListWorkspaceQuotas, self).__init__(**kwargs)
self.value = None
self.next_link = None
-class MachineLearningServiceError(msrest.serialization.Model):
- """Wrapper for error response to follow ARM guidelines.
-
- Variables are only populated by the server, and will be ignored when sending a request.
-
- :ivar error: The error response.
- :vartype error: ~azure.mgmt.machinelearningservices.models.ErrorResponse
- """
-
- _validation = {
- 'error': {'readonly': True},
- }
-
- _attribute_map = {
- 'error': {'key': 'error', 'type': 'ErrorResponse'},
- }
-
- def __init__(
- self,
- **kwargs
- ):
- super(MachineLearningServiceError, self).__init__(**kwargs)
- self.error = None
-
-
class NodeStateCounts(msrest.serialization.Model):
"""Counts of various compute node states on the amlCompute.
@@ -2036,6 +3457,8 @@ def __init__(
self,
**kwargs
):
+ """
+ """
super(NodeStateCounts, self).__init__(**kwargs)
self.idle_node_count = None
self.running_node_count = None
@@ -2045,39 +3468,75 @@ def __init__(
self.preempted_node_count = None
-class NotebookListCredentialsResult(msrest.serialization.Model):
- """NotebookListCredentialsResult.
+class NotebookAccessTokenResult(msrest.serialization.Model):
+ """NotebookAccessTokenResult.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
- :param primary_access_key:
- :type primary_access_key: str
- :param secondary_access_key:
- :type secondary_access_key: str
+ :ivar notebook_resource_id:
+ :vartype notebook_resource_id: str
+ :ivar host_name:
+ :vartype host_name: str
+ :ivar public_dns:
+ :vartype public_dns: str
+ :ivar access_token:
+ :vartype access_token: str
+ :ivar token_type:
+ :vartype token_type: str
+ :ivar expires_in:
+ :vartype expires_in: int
+ :ivar refresh_token:
+ :vartype refresh_token: str
+ :ivar scope:
+ :vartype scope: str
"""
+ _validation = {
+ 'notebook_resource_id': {'readonly': True},
+ 'host_name': {'readonly': True},
+ 'public_dns': {'readonly': True},
+ 'access_token': {'readonly': True},
+ 'token_type': {'readonly': True},
+ 'expires_in': {'readonly': True},
+ 'refresh_token': {'readonly': True},
+ 'scope': {'readonly': True},
+ }
+
_attribute_map = {
- 'primary_access_key': {'key': 'primaryAccessKey', 'type': 'str'},
- 'secondary_access_key': {'key': 'secondaryAccessKey', 'type': 'str'},
+ 'notebook_resource_id': {'key': 'notebookResourceId', 'type': 'str'},
+ 'host_name': {'key': 'hostName', 'type': 'str'},
+ 'public_dns': {'key': 'publicDns', 'type': 'str'},
+ 'access_token': {'key': 'accessToken', 'type': 'str'},
+ 'token_type': {'key': 'tokenType', 'type': 'str'},
+ 'expires_in': {'key': 'expiresIn', 'type': 'int'},
+ 'refresh_token': {'key': 'refreshToken', 'type': 'str'},
+ 'scope': {'key': 'scope', 'type': 'str'},
}
def __init__(
self,
- *,
- primary_access_key: Optional[str] = None,
- secondary_access_key: Optional[str] = None,
**kwargs
):
- super(NotebookListCredentialsResult, self).__init__(**kwargs)
- self.primary_access_key = primary_access_key
- self.secondary_access_key = secondary_access_key
+ """
+ """
+ super(NotebookAccessTokenResult, self).__init__(**kwargs)
+ self.notebook_resource_id = None
+ self.host_name = None
+ self.public_dns = None
+ self.access_token = None
+ self.token_type = None
+ self.expires_in = None
+ self.refresh_token = None
+ self.scope = None
class NotebookPreparationError(msrest.serialization.Model):
"""NotebookPreparationError.
- :param error_message:
- :type error_message: str
- :param status_code:
- :type status_code: int
+ :ivar error_message:
+ :vartype error_message: str
+ :ivar status_code:
+ :vartype status_code: int
"""
_attribute_map = {
@@ -2092,6 +3551,12 @@ def __init__(
status_code: Optional[int] = None,
**kwargs
):
+ """
+ :keyword error_message:
+ :paramtype error_message: str
+ :keyword status_code:
+ :paramtype status_code: int
+ """
super(NotebookPreparationError, self).__init__(**kwargs)
self.error_message = error_message
self.status_code = status_code
@@ -2100,13 +3565,13 @@ def __init__(
class NotebookResourceInfo(msrest.serialization.Model):
"""NotebookResourceInfo.
- :param fqdn:
- :type fqdn: str
- :param resource_id: the data plane resourceId that used to initialize notebook component.
- :type resource_id: str
- :param notebook_preparation_error: The error that occurs when preparing notebook.
- :type notebook_preparation_error:
- ~azure.mgmt.machinelearningservices.models.NotebookPreparationError
+ :ivar fqdn:
+ :vartype fqdn: str
+ :ivar resource_id: the data plane resourceId that used to initialize notebook component.
+ :vartype resource_id: str
+ :ivar notebook_preparation_error: The error that occurs when preparing notebook.
+ :vartype notebook_preparation_error:
+ ~azure_machine_learning_workspaces.models.NotebookPreparationError
"""
_attribute_map = {
@@ -2123,6 +3588,15 @@ def __init__(
notebook_preparation_error: Optional["NotebookPreparationError"] = None,
**kwargs
):
+ """
+ :keyword fqdn:
+ :paramtype fqdn: str
+ :keyword resource_id: the data plane resourceId that used to initialize notebook component.
+ :paramtype resource_id: str
+ :keyword notebook_preparation_error: The error that occurs when preparing notebook.
+ :paramtype notebook_preparation_error:
+ ~azure_machine_learning_workspaces.models.NotebookPreparationError
+ """
super(NotebookResourceInfo, self).__init__(**kwargs)
self.fqdn = fqdn
self.resource_id = resource_id
@@ -2132,10 +3606,10 @@ def __init__(
class Operation(msrest.serialization.Model):
"""Azure Machine Learning workspace REST API operation.
- :param name: Operation name: {provider}/{resource}/{operation}.
- :type name: str
- :param display: Display name of operation.
- :type display: ~azure.mgmt.machinelearningservices.models.OperationDisplay
+ :ivar name: Operation name: {provider}/{resource}/{operation}.
+ :vartype name: str
+ :ivar display: Display name of operation.
+ :vartype display: ~azure_machine_learning_workspaces.models.OperationDisplay
"""
_attribute_map = {
@@ -2150,6 +3624,12 @@ def __init__(
display: Optional["OperationDisplay"] = None,
**kwargs
):
+ """
+ :keyword name: Operation name: {provider}/{resource}/{operation}.
+ :paramtype name: str
+ :keyword display: Display name of operation.
+ :paramtype display: ~azure_machine_learning_workspaces.models.OperationDisplay
+ """
super(Operation, self).__init__(**kwargs)
self.name = name
self.display = display
@@ -2158,14 +3638,14 @@ def __init__(
class OperationDisplay(msrest.serialization.Model):
"""Display name of operation.
- :param provider: The resource provider name: Microsoft.MachineLearningExperimentation.
- :type provider: str
- :param resource: The resource on which the operation is performed.
- :type resource: str
- :param operation: The operation that users can perform.
- :type operation: str
- :param description: The description for the operation.
- :type description: str
+ :ivar provider: The resource provider name: Microsoft.MachineLearningExperimentation.
+ :vartype provider: str
+ :ivar resource: The resource on which the operation is performed.
+ :vartype resource: str
+ :ivar operation: The operation that users can perform.
+ :vartype operation: str
+ :ivar description: The description for the operation.
+ :vartype description: str
"""
_attribute_map = {
@@ -2184,6 +3664,16 @@ def __init__(
description: Optional[str] = None,
**kwargs
):
+ """
+ :keyword provider: The resource provider name: Microsoft.MachineLearningExperimentation.
+ :paramtype provider: str
+ :keyword resource: The resource on which the operation is performed.
+ :paramtype resource: str
+ :keyword operation: The operation that users can perform.
+ :paramtype operation: str
+ :keyword description: The description for the operation.
+ :paramtype description: str
+ """
super(OperationDisplay, self).__init__(**kwargs)
self.provider = provider
self.resource = resource
@@ -2194,9 +3684,8 @@ def __init__(
class OperationListResult(msrest.serialization.Model):
"""An array of operations supported by the resource provider.
- :param value: List of AML workspace operations supported by the AML workspace resource
- provider.
- :type value: list[~azure.mgmt.machinelearningservices.models.Operation]
+ :ivar value: List of AML workspace operations supported by the AML workspace resource provider.
+ :vartype value: list[~azure_machine_learning_workspaces.models.Operation]
"""
_attribute_map = {
@@ -2209,6 +3698,11 @@ def __init__(
value: Optional[List["Operation"]] = None,
**kwargs
):
+ """
+ :keyword value: List of AML workspace operations supported by the AML workspace resource
+ provider.
+ :paramtype value: list[~azure_machine_learning_workspaces.models.Operation]
+ """
super(OperationListResult, self).__init__(**kwargs)
self.value = value
@@ -2216,10 +3710,10 @@ def __init__(
class PaginatedComputeResourcesList(msrest.serialization.Model):
"""Paginated list of Machine Learning compute objects wrapped in ARM resource envelope.
- :param value: An array of Machine Learning compute objects wrapped in ARM resource envelope.
- :type value: list[~azure.mgmt.machinelearningservices.models.ComputeResource]
- :param next_link: A continuation link (absolute URI) to the next page of results in the list.
- :type next_link: str
+ :ivar value: An array of Machine Learning compute objects wrapped in ARM resource envelope.
+ :vartype value: list[~azure_machine_learning_workspaces.models.ComputeResource]
+ :ivar next_link: A continuation link (absolute URI) to the next page of results in the list.
+ :vartype next_link: str
"""
_attribute_map = {
@@ -2234,6 +3728,12 @@ def __init__(
next_link: Optional[str] = None,
**kwargs
):
+ """
+ :keyword value: An array of Machine Learning compute objects wrapped in ARM resource envelope.
+ :paramtype value: list[~azure_machine_learning_workspaces.models.ComputeResource]
+ :keyword next_link: A continuation link (absolute URI) to the next page of results in the list.
+ :paramtype next_link: str
+ """
super(PaginatedComputeResourcesList, self).__init__(**kwargs)
self.value = value
self.next_link = next_link
@@ -2242,10 +3742,10 @@ def __init__(
class PaginatedWorkspaceConnectionsList(msrest.serialization.Model):
"""Paginated list of Workspace connection objects.
- :param value: An array of Workspace connection objects.
- :type value: list[~azure.mgmt.machinelearningservices.models.WorkspaceConnection]
- :param next_link: A continuation link (absolute URI) to the next page of results in the list.
- :type next_link: str
+ :ivar value: An array of Workspace connection objects.
+ :vartype value: list[~azure_machine_learning_workspaces.models.WorkspaceConnection]
+ :ivar next_link: A continuation link (absolute URI) to the next page of results in the list.
+ :vartype next_link: str
"""
_attribute_map = {
@@ -2260,6 +3760,12 @@ def __init__(
next_link: Optional[str] = None,
**kwargs
):
+ """
+ :keyword value: An array of Workspace connection objects.
+ :paramtype value: list[~azure_machine_learning_workspaces.models.WorkspaceConnection]
+ :keyword next_link: A continuation link (absolute URI) to the next page of results in the list.
+ :paramtype next_link: str
+ """
super(PaginatedWorkspaceConnectionsList, self).__init__(**kwargs)
self.value = value
self.next_link = next_link
@@ -2290,11 +3796,38 @@ def __init__(
self,
**kwargs
):
+ """
+ """
super(Password, self).__init__(**kwargs)
self.name = None
self.value = None
+class PersonalComputeInstanceSettings(msrest.serialization.Model):
+ """Settings for a personal compute instance.
+
+ :ivar assigned_user: A user explicitly assigned to a personal compute instance.
+ :vartype assigned_user: ~azure_machine_learning_workspaces.models.AssignedUser
+ """
+
+ _attribute_map = {
+ 'assigned_user': {'key': 'assignedUser', 'type': 'AssignedUser'},
+ }
+
+ def __init__(
+ self,
+ *,
+ assigned_user: Optional["AssignedUser"] = None,
+ **kwargs
+ ):
+ """
+ :keyword assigned_user: A user explicitly assigned to a personal compute instance.
+ :paramtype assigned_user: ~azure_machine_learning_workspaces.models.AssignedUser
+ """
+ super(PersonalComputeInstanceSettings, self).__init__(**kwargs)
+ self.assigned_user = assigned_user
+
+
class PrivateEndpoint(msrest.serialization.Model):
"""The Private Endpoint resource.
@@ -2302,51 +3835,71 @@ class PrivateEndpoint(msrest.serialization.Model):
:ivar id: The ARM identifier for Private Endpoint.
:vartype id: str
+ :ivar subnet_arm_id: The ARM identifier for Subnet resource that private endpoint links to.
+ :vartype subnet_arm_id: str
"""
_validation = {
'id': {'readonly': True},
+ 'subnet_arm_id': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
+ 'subnet_arm_id': {'key': 'subnetArmId', 'type': 'str'},
}
def __init__(
self,
**kwargs
):
+ """
+ """
super(PrivateEndpoint, self).__init__(**kwargs)
self.id = None
+ self.subnet_arm_id = None
-class PrivateEndpointConnection(msrest.serialization.Model):
+class PrivateEndpointConnection(Resource):
"""The Private Endpoint Connection resource.
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: ResourceId of the private endpoint connection.
+ :ivar id: Fully qualified resource ID for the resource. Ex -
+ /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
- :ivar name: Friendly name of the private endpoint connection.
+ :ivar name: The name of the resource.
:vartype name: str
- :ivar type: Resource type of private endpoint connection.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
- :param private_endpoint: The resource of private end point.
- :type private_endpoint: ~azure.mgmt.machinelearningservices.models.PrivateEndpoint
- :param private_link_service_connection_state: A collection of information about the state of
- the connection between service consumer and provider.
- :type private_link_service_connection_state:
- ~azure.mgmt.machinelearningservices.models.PrivateLinkServiceConnectionState
+ :ivar identity: The identity of the resource.
+ :vartype identity: ~azure_machine_learning_workspaces.models.Identity
+ :ivar location: Specifies the location of the resource.
+ :vartype location: str
+ :ivar tags: A set of tags. Contains resource tags defined as key/value pairs.
+ :vartype tags: dict[str, str]
+ :ivar sku: The sku of the workspace.
+ :vartype sku: ~azure_machine_learning_workspaces.models.Sku
+ :ivar system_data: System data.
+ :vartype system_data: ~azure_machine_learning_workspaces.models.SystemData
+ :ivar private_endpoint: The resource of private end point.
+ :vartype private_endpoint: ~azure_machine_learning_workspaces.models.PrivateEndpoint
+ :ivar private_link_service_connection_state: A collection of information about the state of the
+ connection between service consumer and provider.
+ :vartype private_link_service_connection_state:
+ ~azure_machine_learning_workspaces.models.PrivateLinkServiceConnectionState
:ivar provisioning_state: The provisioning state of the private endpoint connection resource.
Possible values include: "Succeeded", "Creating", "Deleting", "Failed".
:vartype provisioning_state: str or
- ~azure.mgmt.machinelearningservices.models.PrivateEndpointConnectionProvisioningState
+ ~azure_machine_learning_workspaces.models.PrivateEndpointConnectionProvisioningState
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
+ 'system_data': {'readonly': True},
'provisioning_state': {'readonly': True},
}
@@ -2354,6 +3907,11 @@ class PrivateEndpointConnection(msrest.serialization.Model):
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
+ 'identity': {'key': 'identity', 'type': 'Identity'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'sku': {'key': 'sku', 'type': 'Sku'},
+ 'system_data': {'key': 'systemData', 'type': 'SystemData'},
'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'},
'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
@@ -2362,50 +3920,102 @@ class PrivateEndpointConnection(msrest.serialization.Model):
def __init__(
self,
*,
+ identity: Optional["Identity"] = None,
+ location: Optional[str] = None,
+ tags: Optional[Dict[str, str]] = None,
+ sku: Optional["Sku"] = None,
private_endpoint: Optional["PrivateEndpoint"] = None,
private_link_service_connection_state: Optional["PrivateLinkServiceConnectionState"] = None,
**kwargs
):
+ """
+ :keyword identity: The identity of the resource.
+ :paramtype identity: ~azure_machine_learning_workspaces.models.Identity
+ :keyword location: Specifies the location of the resource.
+ :paramtype location: str
+ :keyword tags: A set of tags. Contains resource tags defined as key/value pairs.
+ :paramtype tags: dict[str, str]
+ :keyword sku: The sku of the workspace.
+ :paramtype sku: ~azure_machine_learning_workspaces.models.Sku
+ :keyword private_endpoint: The resource of private end point.
+ :paramtype private_endpoint: ~azure_machine_learning_workspaces.models.PrivateEndpoint
+ :keyword private_link_service_connection_state: A collection of information about the state of
+ the connection between service consumer and provider.
+ :paramtype private_link_service_connection_state:
+ ~azure_machine_learning_workspaces.models.PrivateLinkServiceConnectionState
+ """
super(PrivateEndpointConnection, self).__init__(**kwargs)
- self.id = None
- self.name = None
- self.type = None
+ self.identity = identity
+ self.location = location
+ self.tags = tags
+ self.sku = sku
+ self.system_data = None
self.private_endpoint = private_endpoint
self.private_link_service_connection_state = private_link_service_connection_state
self.provisioning_state = None
+class PrivateEndpointConnectionListResult(msrest.serialization.Model):
+ """List of private endpoint connection associated with the specified workspace.
+
+ :ivar value: Array of private endpoint connections.
+ :vartype value: list[~azure_machine_learning_workspaces.models.PrivateEndpointConnection]
+ """
+
+ _attribute_map = {
+ 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'},
+ }
+
+ def __init__(
+ self,
+ *,
+ value: Optional[List["PrivateEndpointConnection"]] = None,
+ **kwargs
+ ):
+ """
+ :keyword value: Array of private endpoint connections.
+ :paramtype value: list[~azure_machine_learning_workspaces.models.PrivateEndpointConnection]
+ """
+ super(PrivateEndpointConnectionListResult, self).__init__(**kwargs)
+ self.value = value
+
+
class PrivateLinkResource(Resource):
"""A private link resource.
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Specifies the resource ID.
+ :ivar id: Fully qualified resource ID for the resource. Ex -
+ /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
- :ivar name: Specifies the name of the resource.
+ :ivar name: The name of the resource.
:vartype name: str
- :param identity: The identity of the resource.
- :type identity: ~azure.mgmt.machinelearningservices.models.Identity
- :param location: Specifies the location of the resource.
- :type location: str
- :ivar type: Specifies the type of the resource.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
- :param tags: A set of tags. Contains resource tags defined as key/value pairs.
- :type tags: dict[str, str]
- :param sku: The sku of the workspace.
- :type sku: ~azure.mgmt.machinelearningservices.models.Sku
+ :ivar identity: The identity of the resource.
+ :vartype identity: ~azure_machine_learning_workspaces.models.Identity
+ :ivar location: Specifies the location of the resource.
+ :vartype location: str
+ :ivar tags: A set of tags. Contains resource tags defined as key/value pairs.
+ :vartype tags: dict[str, str]
+ :ivar sku: The sku of the workspace.
+ :vartype sku: ~azure_machine_learning_workspaces.models.Sku
+ :ivar system_data: System data.
+ :vartype system_data: ~azure_machine_learning_workspaces.models.SystemData
:ivar group_id: The private link resource group id.
:vartype group_id: str
:ivar required_members: The private link resource required member names.
:vartype required_members: list[str]
- :param required_zone_names: The private link resource Private link DNS zone name.
- :type required_zone_names: list[str]
+ :ivar required_zone_names: The private link resource Private link DNS zone name.
+ :vartype required_zone_names: list[str]
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
+ 'system_data': {'readonly': True},
'group_id': {'readonly': True},
'required_members': {'readonly': True},
}
@@ -2413,11 +4023,12 @@ class PrivateLinkResource(Resource):
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
'identity': {'key': 'identity', 'type': 'Identity'},
'location': {'key': 'location', 'type': 'str'},
- 'type': {'key': 'type', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'sku': {'key': 'sku', 'type': 'Sku'},
+ 'system_data': {'key': 'systemData', 'type': 'SystemData'},
'group_id': {'key': 'properties.groupId', 'type': 'str'},
'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'},
'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'},
@@ -2433,7 +4044,24 @@ def __init__(
required_zone_names: Optional[List[str]] = None,
**kwargs
):
- super(PrivateLinkResource, self).__init__(identity=identity, location=location, tags=tags, sku=sku, **kwargs)
+ """
+ :keyword identity: The identity of the resource.
+ :paramtype identity: ~azure_machine_learning_workspaces.models.Identity
+ :keyword location: Specifies the location of the resource.
+ :paramtype location: str
+ :keyword tags: A set of tags. Contains resource tags defined as key/value pairs.
+ :paramtype tags: dict[str, str]
+ :keyword sku: The sku of the workspace.
+ :paramtype sku: ~azure_machine_learning_workspaces.models.Sku
+ :keyword required_zone_names: The private link resource Private link DNS zone name.
+ :paramtype required_zone_names: list[str]
+ """
+ super(PrivateLinkResource, self).__init__(**kwargs)
+ self.identity = identity
+ self.location = location
+ self.tags = tags
+ self.sku = sku
+ self.system_data = None
self.group_id = None
self.required_members = None
self.required_zone_names = required_zone_names
@@ -2442,8 +4070,8 @@ def __init__(
class PrivateLinkResourceListResult(msrest.serialization.Model):
"""A list of private link resources.
- :param value: Array of private link resources.
- :type value: list[~azure.mgmt.machinelearningservices.models.PrivateLinkResource]
+ :ivar value: Array of private link resources.
+ :vartype value: list[~azure_machine_learning_workspaces.models.PrivateLinkResource]
"""
_attribute_map = {
@@ -2456,6 +4084,10 @@ def __init__(
value: Optional[List["PrivateLinkResource"]] = None,
**kwargs
):
+ """
+ :keyword value: Array of private link resources.
+ :paramtype value: list[~azure_machine_learning_workspaces.models.PrivateLinkResource]
+ """
super(PrivateLinkResourceListResult, self).__init__(**kwargs)
self.value = value
@@ -2463,16 +4095,16 @@ def __init__(
class PrivateLinkServiceConnectionState(msrest.serialization.Model):
"""A collection of information about the state of the connection between service consumer and provider.
- :param status: Indicates whether the connection has been Approved/Rejected/Removed by the owner
+ :ivar status: Indicates whether the connection has been Approved/Rejected/Removed by the owner
of the service. Possible values include: "Pending", "Approved", "Rejected", "Disconnected",
"Timeout".
- :type status: str or
- ~azure.mgmt.machinelearningservices.models.PrivateEndpointServiceConnectionStatus
- :param description: The reason for approval/rejection of the connection.
- :type description: str
- :param actions_required: A message indicating if changes on the service provider require any
+ :vartype status: str or
+ ~azure_machine_learning_workspaces.models.PrivateEndpointServiceConnectionStatus
+ :ivar description: The reason for approval/rejection of the connection.
+ :vartype description: str
+ :ivar actions_required: A message indicating if changes on the service provider require any
updates on the consumer.
- :type actions_required: str
+ :vartype actions_required: str
"""
_attribute_map = {
@@ -2489,6 +4121,18 @@ def __init__(
actions_required: Optional[str] = None,
**kwargs
):
+ """
+ :keyword status: Indicates whether the connection has been Approved/Rejected/Removed by the
+ owner of the service. Possible values include: "Pending", "Approved", "Rejected",
+ "Disconnected", "Timeout".
+ :paramtype status: str or
+ ~azure_machine_learning_workspaces.models.PrivateEndpointServiceConnectionStatus
+ :keyword description: The reason for approval/rejection of the connection.
+ :paramtype description: str
+ :keyword actions_required: A message indicating if changes on the service provider require any
+ updates on the consumer.
+ :paramtype actions_required: str
+ """
super(PrivateLinkServiceConnectionState, self).__init__(**kwargs)
self.status = status
self.description = description
@@ -2498,15 +4142,14 @@ def __init__(
class QuotaBaseProperties(msrest.serialization.Model):
"""The properties for Quota update or retrieval.
- :param id: Specifies the resource ID.
- :type id: str
- :param type: Specifies the resource type.
- :type type: str
- :param limit: The maximum permitted quota of the resource.
- :type limit: long
- :param unit: An enum describing the unit of quota measurement. Possible values include:
- "Count".
- :type unit: str or ~azure.mgmt.machinelearningservices.models.QuotaUnit
+ :ivar id: Specifies the resource ID.
+ :vartype id: str
+ :ivar type: Specifies the resource type.
+ :vartype type: str
+ :ivar limit: The maximum permitted quota of the resource.
+ :vartype limit: long
+ :ivar unit: An enum describing the unit of quota measurement. Possible values include: "Count".
+ :vartype unit: str or ~azure_machine_learning_workspaces.models.QuotaUnit
"""
_attribute_map = {
@@ -2525,6 +4168,17 @@ def __init__(
unit: Optional[Union[str, "QuotaUnit"]] = None,
**kwargs
):
+ """
+ :keyword id: Specifies the resource ID.
+ :paramtype id: str
+ :keyword type: Specifies the resource type.
+ :paramtype type: str
+ :keyword limit: The maximum permitted quota of the resource.
+ :paramtype limit: long
+ :keyword unit: An enum describing the unit of quota measurement. Possible values include:
+ "Count".
+ :paramtype unit: str or ~azure_machine_learning_workspaces.models.QuotaUnit
+ """
super(QuotaBaseProperties, self).__init__(**kwargs)
self.id = id
self.type = type
@@ -2535,22 +4189,33 @@ def __init__(
class QuotaUpdateParameters(msrest.serialization.Model):
"""Quota update parameters.
- :param value: The list for update quota.
- :type value: list[~azure.mgmt.machinelearningservices.models.QuotaBaseProperties]
+ :ivar value: The list for update quota.
+ :vartype value: list[~azure_machine_learning_workspaces.models.QuotaBaseProperties]
+ :ivar location: Region of workspace quota to be updated.
+ :vartype location: str
"""
_attribute_map = {
'value': {'key': 'value', 'type': '[QuotaBaseProperties]'},
+ 'location': {'key': 'location', 'type': 'str'},
}
def __init__(
self,
*,
value: Optional[List["QuotaBaseProperties"]] = None,
+ location: Optional[str] = None,
**kwargs
):
+ """
+ :keyword value: The list for update quota.
+ :paramtype value: list[~azure_machine_learning_workspaces.models.QuotaBaseProperties]
+ :keyword location: Region of workspace quota to be updated.
+ :paramtype location: str
+ """
super(QuotaUpdateParameters, self).__init__(**kwargs)
self.value = value
+ self.location = location
class RegistryListCredentialsResult(msrest.serialization.Model):
@@ -2562,8 +4227,8 @@ class RegistryListCredentialsResult(msrest.serialization.Model):
:vartype location: str
:ivar username:
:vartype username: str
- :param passwords:
- :type passwords: list[~azure.mgmt.machinelearningservices.models.Password]
+ :ivar passwords:
+ :vartype passwords: list[~azure_machine_learning_workspaces.models.Password]
"""
_validation = {
@@ -2583,6 +4248,10 @@ def __init__(
passwords: Optional[List["Password"]] = None,
**kwargs
):
+ """
+ :keyword passwords:
+ :paramtype passwords: list[~azure_machine_learning_workspaces.models.Password]
+ """
super(RegistryListCredentialsResult, self).__init__(**kwargs)
self.location = None
self.username = None
@@ -2594,8 +4263,8 @@ class ResourceId(msrest.serialization.Model):
All required parameters must be populated in order to send to Azure.
- :param id: Required. The ID of the resource.
- :type id: str
+ :ivar id: Required. The ID of the resource.
+ :vartype id: str
"""
_validation = {
@@ -2612,6 +4281,10 @@ def __init__(
id: str,
**kwargs
):
+ """
+ :keyword id: Required. The ID of the resource.
+ :paramtype id: str
+ """
super(ResourceId, self).__init__(**kwargs)
self.id = id
@@ -2641,6 +4314,8 @@ def __init__(
self,
**kwargs
):
+ """
+ """
super(ResourceName, self).__init__(**kwargs)
self.value = None
self.localized_value = None
@@ -2653,18 +4328,21 @@ class ResourceQuota(msrest.serialization.Model):
:ivar id: Specifies the resource ID.
:vartype id: str
+ :ivar aml_workspace_location: Region of the AML workspace in the id.
+ :vartype aml_workspace_location: str
:ivar type: Specifies the resource type.
:vartype type: str
:ivar name: Name of the resource.
- :vartype name: ~azure.mgmt.machinelearningservices.models.ResourceName
+ :vartype name: ~azure_machine_learning_workspaces.models.ResourceName
:ivar limit: The maximum permitted quota of the resource.
:vartype limit: long
:ivar unit: An enum describing the unit of quota measurement. Possible values include: "Count".
- :vartype unit: str or ~azure.mgmt.machinelearningservices.models.QuotaUnit
+ :vartype unit: str or ~azure_machine_learning_workspaces.models.QuotaUnit
"""
_validation = {
'id': {'readonly': True},
+ 'aml_workspace_location': {'readonly': True},
'type': {'readonly': True},
'name': {'readonly': True},
'limit': {'readonly': True},
@@ -2673,6 +4351,7 @@ class ResourceQuota(msrest.serialization.Model):
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
+ 'aml_workspace_location': {'key': 'amlWorkspaceLocation', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'name': {'key': 'name', 'type': 'ResourceName'},
'limit': {'key': 'limit', 'type': 'long'},
@@ -2683,8 +4362,11 @@ def __init__(
self,
**kwargs
):
+ """
+ """
super(ResourceQuota, self).__init__(**kwargs)
self.id = None
+ self.aml_workspace_location = None
self.type = None
self.name = None
self.limit = None
@@ -2701,7 +4383,7 @@ class ResourceSkuLocationInfo(msrest.serialization.Model):
:ivar zones: List of availability zones where the SKU is supported.
:vartype zones: list[str]
:ivar zone_details: Details of capabilities available to a SKU in specific zones.
- :vartype zone_details: list[~azure.mgmt.machinelearningservices.models.ResourceSkuZoneDetails]
+ :vartype zone_details: list[~azure_machine_learning_workspaces.models.ResourceSkuZoneDetails]
"""
_validation = {
@@ -2720,6 +4402,8 @@ def __init__(
self,
**kwargs
):
+ """
+ """
super(ResourceSkuLocationInfo, self).__init__(**kwargs)
self.location = None
self.zones = None
@@ -2735,7 +4419,7 @@ class ResourceSkuZoneDetails(msrest.serialization.Model):
:vartype name: list[str]
:ivar capabilities: A list of capabilities that are available for the SKU in the specified list
of zones.
- :vartype capabilities: list[~azure.mgmt.machinelearningservices.models.SKUCapability]
+ :vartype capabilities: list[~azure_machine_learning_workspaces.models.SKUCapability]
"""
_validation = {
@@ -2752,6 +4436,8 @@ def __init__(
self,
**kwargs
):
+ """
+ """
super(ResourceSkuZoneDetails, self).__init__(**kwargs)
self.name = None
self.capabilities = None
@@ -2767,9 +4453,9 @@ class Restriction(msrest.serialization.Model):
:ivar values: The value of restrictions. If the restriction type is set to location. This would
be different locations where the SKU is restricted.
:vartype values: list[str]
- :param reason_code: The reason for the restriction. Possible values include: "NotSpecified",
+ :ivar reason_code: The reason for the restriction. Possible values include: "NotSpecified",
"NotAvailableForRegion", "NotAvailableForSubscription".
- :type reason_code: str or ~azure.mgmt.machinelearningservices.models.ReasonCode
+ :vartype reason_code: str or ~azure_machine_learning_workspaces.models.ReasonCode
"""
_validation = {
@@ -2789,6 +4475,11 @@ def __init__(
reason_code: Optional[Union[str, "ReasonCode"]] = None,
**kwargs
):
+ """
+ :keyword reason_code: The reason for the restriction. Possible values include: "NotSpecified",
+ "NotAvailableForRegion", "NotAvailableForSubscription".
+ :paramtype reason_code: str or ~azure_machine_learning_workspaces.models.ReasonCode
+ """
super(Restriction, self).__init__(**kwargs)
self.type = None
self.values = None
@@ -2800,12 +4491,13 @@ class ScaleSettings(msrest.serialization.Model):
All required parameters must be populated in order to send to Azure.
- :param max_node_count: Required. Max number of nodes to use.
- :type max_node_count: int
- :param min_node_count: Min number of nodes to use.
- :type min_node_count: int
- :param node_idle_time_before_scale_down: Node Idle Time before scaling down amlCompute.
- :type node_idle_time_before_scale_down: ~datetime.timedelta
+ :ivar max_node_count: Required. Max number of nodes to use.
+ :vartype max_node_count: int
+ :ivar min_node_count: Min number of nodes to use.
+ :vartype min_node_count: int
+ :ivar node_idle_time_before_scale_down: Node Idle Time before scaling down amlCompute. This
+ string needs to be in the RFC Format.
+ :vartype node_idle_time_before_scale_down: ~datetime.timedelta
"""
_validation = {
@@ -2826,21 +4518,158 @@ def __init__(
node_idle_time_before_scale_down: Optional[datetime.timedelta] = None,
**kwargs
):
+ """
+ :keyword max_node_count: Required. Max number of nodes to use.
+ :paramtype max_node_count: int
+ :keyword min_node_count: Min number of nodes to use.
+ :paramtype min_node_count: int
+ :keyword node_idle_time_before_scale_down: Node Idle Time before scaling down amlCompute. This
+ string needs to be in the RFC Format.
+ :paramtype node_idle_time_before_scale_down: ~datetime.timedelta
+ """
super(ScaleSettings, self).__init__(**kwargs)
self.max_node_count = max_node_count
self.min_node_count = min_node_count
self.node_idle_time_before_scale_down = node_idle_time_before_scale_down
+class ScaleSettingsInformation(msrest.serialization.Model):
+ """Desired scale settings for the amlCompute.
+
+ :ivar scale_settings: scale settings for AML Compute.
+ :vartype scale_settings: ~azure_machine_learning_workspaces.models.ScaleSettings
+ """
+
+ _attribute_map = {
+ 'scale_settings': {'key': 'scaleSettings', 'type': 'ScaleSettings'},
+ }
+
+ def __init__(
+ self,
+ *,
+ scale_settings: Optional["ScaleSettings"] = None,
+ **kwargs
+ ):
+ """
+ :keyword scale_settings: scale settings for AML Compute.
+ :paramtype scale_settings: ~azure_machine_learning_workspaces.models.ScaleSettings
+ """
+ super(ScaleSettingsInformation, self).__init__(**kwargs)
+ self.scale_settings = scale_settings
+
+
+class ScriptReference(msrest.serialization.Model):
+ """Script reference.
+
+ :ivar script_source: The storage source of the script: inline, workspace.
+ :vartype script_source: str
+ :ivar script_data: The location of scripts in the mounted volume.
+ :vartype script_data: str
+ :ivar script_arguments: Optional command line arguments passed to the script to run.
+ :vartype script_arguments: str
+ :ivar timeout: Optional time period passed to timeout command.
+ :vartype timeout: str
+ """
+
+ _attribute_map = {
+ 'script_source': {'key': 'scriptSource', 'type': 'str'},
+ 'script_data': {'key': 'scriptData', 'type': 'str'},
+ 'script_arguments': {'key': 'scriptArguments', 'type': 'str'},
+ 'timeout': {'key': 'timeout', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ script_source: Optional[str] = None,
+ script_data: Optional[str] = None,
+ script_arguments: Optional[str] = None,
+ timeout: Optional[str] = None,
+ **kwargs
+ ):
+ """
+ :keyword script_source: The storage source of the script: inline, workspace.
+ :paramtype script_source: str
+ :keyword script_data: The location of scripts in the mounted volume.
+ :paramtype script_data: str
+ :keyword script_arguments: Optional command line arguments passed to the script to run.
+ :paramtype script_arguments: str
+ :keyword timeout: Optional time period passed to timeout command.
+ :paramtype timeout: str
+ """
+ super(ScriptReference, self).__init__(**kwargs)
+ self.script_source = script_source
+ self.script_data = script_data
+ self.script_arguments = script_arguments
+ self.timeout = timeout
+
+
+class ScriptsToExecute(msrest.serialization.Model):
+ """Customized setup scripts.
+
+ :ivar startup_script: Script that's run every time the machine starts.
+ :vartype startup_script: ~azure_machine_learning_workspaces.models.ScriptReference
+ :ivar creation_script: Script that's run only once during provision of the compute.
+ :vartype creation_script: ~azure_machine_learning_workspaces.models.ScriptReference
+ """
+
+ _attribute_map = {
+ 'startup_script': {'key': 'startupScript', 'type': 'ScriptReference'},
+ 'creation_script': {'key': 'creationScript', 'type': 'ScriptReference'},
+ }
+
+ def __init__(
+ self,
+ *,
+ startup_script: Optional["ScriptReference"] = None,
+ creation_script: Optional["ScriptReference"] = None,
+ **kwargs
+ ):
+ """
+ :keyword startup_script: Script that's run every time the machine starts.
+ :paramtype startup_script: ~azure_machine_learning_workspaces.models.ScriptReference
+ :keyword creation_script: Script that's run only once during provision of the compute.
+ :paramtype creation_script: ~azure_machine_learning_workspaces.models.ScriptReference
+ """
+ super(ScriptsToExecute, self).__init__(**kwargs)
+ self.startup_script = startup_script
+ self.creation_script = creation_script
+
+
+class ServiceManagedResourcesSettings(msrest.serialization.Model):
+ """ServiceManagedResourcesSettings.
+
+ :ivar cosmos_db: The settings for the service managed cosmosdb account.
+ :vartype cosmos_db: ~azure_machine_learning_workspaces.models.CosmosDbSettings
+ """
+
+ _attribute_map = {
+ 'cosmos_db': {'key': 'cosmosDb', 'type': 'CosmosDbSettings'},
+ }
+
+ def __init__(
+ self,
+ *,
+ cosmos_db: Optional["CosmosDbSettings"] = None,
+ **kwargs
+ ):
+ """
+ :keyword cosmos_db: The settings for the service managed cosmosdb account.
+ :paramtype cosmos_db: ~azure_machine_learning_workspaces.models.CosmosDbSettings
+ """
+ super(ServiceManagedResourcesSettings, self).__init__(**kwargs)
+ self.cosmos_db = cosmos_db
+
+
class ServicePrincipalCredentials(msrest.serialization.Model):
"""Service principal credentials.
All required parameters must be populated in order to send to Azure.
- :param client_id: Required. Client Id.
- :type client_id: str
- :param client_secret: Required. Client secret.
- :type client_secret: str
+ :ivar client_id: Required. Client Id.
+ :vartype client_id: str
+ :ivar client_secret: Required. Client secret.
+ :vartype client_secret: str
"""
_validation = {
@@ -2860,27 +4689,58 @@ def __init__(
client_secret: str,
**kwargs
):
+ """
+ :keyword client_id: Required. Client Id.
+ :paramtype client_id: str
+ :keyword client_secret: Required. Client secret.
+ :paramtype client_secret: str
+ """
super(ServicePrincipalCredentials, self).__init__(**kwargs)
self.client_id = client_id
self.client_secret = client_secret
+class SetupScripts(msrest.serialization.Model):
+ """Details of customized scripts to execute for setting up the cluster.
+
+ :ivar scripts: Customized setup scripts.
+ :vartype scripts: ~azure_machine_learning_workspaces.models.ScriptsToExecute
+ """
+
+ _attribute_map = {
+ 'scripts': {'key': 'scripts', 'type': 'ScriptsToExecute'},
+ }
+
+ def __init__(
+ self,
+ *,
+ scripts: Optional["ScriptsToExecute"] = None,
+ **kwargs
+ ):
+ """
+ :keyword scripts: Customized setup scripts.
+ :paramtype scripts: ~azure_machine_learning_workspaces.models.ScriptsToExecute
+ """
+ super(SetupScripts, self).__init__(**kwargs)
+ self.scripts = scripts
+
+
class SharedPrivateLinkResource(msrest.serialization.Model):
"""SharedPrivateLinkResource.
- :param name: Unique name of the private link.
- :type name: str
- :param private_link_resource_id: The resource id that private link links to.
- :type private_link_resource_id: str
- :param group_id: The private link resource group id.
- :type group_id: str
- :param request_message: Request message.
- :type request_message: str
- :param status: Indicates whether the connection has been Approved/Rejected/Removed by the owner
+ :ivar name: Unique name of the private link.
+ :vartype name: str
+ :ivar private_link_resource_id: The resource id that private link links to.
+ :vartype private_link_resource_id: str
+ :ivar group_id: The private link resource group id.
+ :vartype group_id: str
+ :ivar request_message: Request message.
+ :vartype request_message: str
+ :ivar status: Indicates whether the connection has been Approved/Rejected/Removed by the owner
of the service. Possible values include: "Pending", "Approved", "Rejected", "Disconnected",
"Timeout".
- :type status: str or
- ~azure.mgmt.machinelearningservices.models.PrivateEndpointServiceConnectionStatus
+ :vartype status: str or
+ ~azure_machine_learning_workspaces.models.PrivateEndpointServiceConnectionStatus
"""
_attribute_map = {
@@ -2901,6 +4761,21 @@ def __init__(
status: Optional[Union[str, "PrivateEndpointServiceConnectionStatus"]] = None,
**kwargs
):
+ """
+ :keyword name: Unique name of the private link.
+ :paramtype name: str
+ :keyword private_link_resource_id: The resource id that private link links to.
+ :paramtype private_link_resource_id: str
+ :keyword group_id: The private link resource group id.
+ :paramtype group_id: str
+ :keyword request_message: Request message.
+ :paramtype request_message: str
+ :keyword status: Indicates whether the connection has been Approved/Rejected/Removed by the
+ owner of the service. Possible values include: "Pending", "Approved", "Rejected",
+ "Disconnected", "Timeout".
+ :paramtype status: str or
+ ~azure_machine_learning_workspaces.models.PrivateEndpointServiceConnectionStatus
+ """
super(SharedPrivateLinkResource, self).__init__(**kwargs)
self.name = name
self.private_link_resource_id = private_link_resource_id
@@ -2912,10 +4787,10 @@ def __init__(
class Sku(msrest.serialization.Model):
"""Sku of the resource.
- :param name: Name of the sku.
- :type name: str
- :param tier: Tier of the sku like Basic or Enterprise.
- :type tier: str
+ :ivar name: Name of the sku.
+ :vartype name: str
+ :ivar tier: Tier of the sku like Basic or Enterprise.
+ :vartype tier: str
"""
_attribute_map = {
@@ -2930,6 +4805,12 @@ def __init__(
tier: Optional[str] = None,
**kwargs
):
+ """
+ :keyword name: Name of the sku.
+ :paramtype name: str
+ :keyword tier: Tier of the sku like Basic or Enterprise.
+ :paramtype tier: str
+ """
super(Sku, self).__init__(**kwargs)
self.name = name
self.tier = tier
@@ -2938,10 +4819,10 @@ def __init__(
class SKUCapability(msrest.serialization.Model):
"""Features/user capabilities associated with the sku.
- :param name: Capability/Feature ID.
- :type name: str
- :param value: Details about the feature/capability.
- :type value: str
+ :ivar name: Capability/Feature ID.
+ :vartype name: str
+ :ivar value: Details about the feature/capability.
+ :vartype value: str
"""
_attribute_map = {
@@ -2956,6 +4837,12 @@ def __init__(
value: Optional[str] = None,
**kwargs
):
+ """
+ :keyword name: Capability/Feature ID.
+ :paramtype name: str
+ :keyword value: Details about the feature/capability.
+ :paramtype value: str
+ """
super(SKUCapability, self).__init__(**kwargs)
self.name = name
self.value = value
@@ -2964,11 +4851,11 @@ def __init__(
class SkuListResult(msrest.serialization.Model):
"""List of skus with features.
- :param value:
- :type value: list[~azure.mgmt.machinelearningservices.models.WorkspaceSku]
- :param next_link: The URI to fetch the next page of Workspace Skus. Call ListNext() with this
+ :ivar value:
+ :vartype value: list[~azure_machine_learning_workspaces.models.WorkspaceSku]
+ :ivar next_link: The URI to fetch the next page of Workspace Skus. Call ListNext() with this
URI to fetch the next page of Workspace Skus.
- :type next_link: str
+ :vartype next_link: str
"""
_attribute_map = {
@@ -2983,106 +4870,319 @@ def __init__(
next_link: Optional[str] = None,
**kwargs
):
+ """
+ :keyword value:
+ :paramtype value: list[~azure_machine_learning_workspaces.models.WorkspaceSku]
+ :keyword next_link: The URI to fetch the next page of Workspace Skus. Call ListNext() with this
+ URI to fetch the next page of Workspace Skus.
+ :paramtype next_link: str
+ """
super(SkuListResult, self).__init__(**kwargs)
self.value = value
self.next_link = next_link
-class SkuSettings(msrest.serialization.Model):
- """Describes Workspace Sku details and features.
+class SslConfiguration(msrest.serialization.Model):
+ """The ssl configuration for scoring.
+
+ :ivar status: Enable or disable ssl for scoring. Possible values include: "Disabled",
+ "Enabled", "Auto".
+ :vartype status: str or ~azure_machine_learning_workspaces.models.SslConfigurationStatus
+ :ivar cert: Cert data.
+ :vartype cert: str
+ :ivar key: Key data.
+ :vartype key: str
+ :ivar cname: CNAME of the cert.
+ :vartype cname: str
+ :ivar leaf_domain_label: Leaf domain label of public endpoint.
+ :vartype leaf_domain_label: str
+ :ivar overwrite_existing_domain: Indicates whether to overwrite existing domain label.
+ :vartype overwrite_existing_domain: bool
+ """
+
+ _attribute_map = {
+ 'status': {'key': 'status', 'type': 'str'},
+ 'cert': {'key': 'cert', 'type': 'str'},
+ 'key': {'key': 'key', 'type': 'str'},
+ 'cname': {'key': 'cname', 'type': 'str'},
+ 'leaf_domain_label': {'key': 'leafDomainLabel', 'type': 'str'},
+ 'overwrite_existing_domain': {'key': 'overwriteExistingDomain', 'type': 'bool'},
+ }
+
+ def __init__(
+ self,
+ *,
+ status: Optional[Union[str, "SslConfigurationStatus"]] = None,
+ cert: Optional[str] = None,
+ key: Optional[str] = None,
+ cname: Optional[str] = None,
+ leaf_domain_label: Optional[str] = None,
+ overwrite_existing_domain: Optional[bool] = None,
+ **kwargs
+ ):
+ """
+ :keyword status: Enable or disable ssl for scoring. Possible values include: "Disabled",
+ "Enabled", "Auto".
+ :paramtype status: str or ~azure_machine_learning_workspaces.models.SslConfigurationStatus
+ :keyword cert: Cert data.
+ :paramtype cert: str
+ :keyword key: Key data.
+ :paramtype key: str
+ :keyword cname: CNAME of the cert.
+ :paramtype cname: str
+ :keyword leaf_domain_label: Leaf domain label of public endpoint.
+ :paramtype leaf_domain_label: str
+ :keyword overwrite_existing_domain: Indicates whether to overwrite existing domain label.
+ :paramtype overwrite_existing_domain: bool
+ """
+ super(SslConfiguration, self).__init__(**kwargs)
+ self.status = status
+ self.cert = cert
+ self.key = key
+ self.cname = cname
+ self.leaf_domain_label = leaf_domain_label
+ self.overwrite_existing_domain = overwrite_existing_domain
+
+
+class SynapseSpark(Compute):
+ """A SynapseSpark compute.
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar locations: The set of locations that the SKU is available. This will be supported and
- registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.).
- :vartype locations: list[str]
- :ivar location_info: A list of locations and availability zones in those locations where the
- SKU is available.
- :vartype location_info:
- list[~azure.mgmt.machinelearningservices.models.ResourceSkuLocationInfo]
- :ivar tier: Sku Tier like Basic or Enterprise.
- :vartype tier: str
- :ivar resource_type:
- :vartype resource_type: str
- :ivar name:
- :vartype name: str
- :ivar capabilities: List of features/user capabilities associated with the sku.
- :vartype capabilities: list[~azure.mgmt.machinelearningservices.models.SKUCapability]
- :param restrictions: The restrictions because of which SKU cannot be used. This is empty if
- there are no restrictions.
- :type restrictions: list[~azure.mgmt.machinelearningservices.models.Restriction]
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values
+ include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine",
+ "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark".
+ :vartype compute_type: str or ~azure_machine_learning_workspaces.models.ComputeType
+ :ivar compute_location: Location for the underlying compute.
+ :vartype compute_location: str
+ :ivar provisioning_state: The provision state of the cluster. Valid values are Unknown,
+ Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating",
+ "Creating", "Deleting", "Succeeded", "Failed", "Canceled".
+ :vartype provisioning_state: str or ~azure_machine_learning_workspaces.models.ProvisioningState
+ :ivar description: The description of the Machine Learning compute.
+ :vartype description: str
+ :ivar created_on: The time at which the compute was created.
+ :vartype created_on: ~datetime.datetime
+ :ivar modified_on: The time at which the compute was last modified.
+ :vartype modified_on: ~datetime.datetime
+ :ivar resource_id: ARM resource id of the underlying compute.
+ :vartype resource_id: str
+ :ivar provisioning_errors: Errors during provisioning.
+ :vartype provisioning_errors: list[~azure_machine_learning_workspaces.models.ErrorResponse]
+ :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought
+ from outside if true, or machine learning service provisioned it if false.
+ :vartype is_attached_compute: bool
+ :ivar disable_local_auth: Opt-out of local authentication and ensure customers can use only MSI
+ and AAD exclusively for authentication.
+ :vartype disable_local_auth: bool
+ :ivar properties:
+ :vartype properties: ~azure_machine_learning_workspaces.models.SynapseSparkProperties
"""
_validation = {
- 'locations': {'readonly': True},
- 'location_info': {'readonly': True},
- 'tier': {'readonly': True},
- 'resource_type': {'readonly': True},
- 'name': {'readonly': True},
- 'capabilities': {'readonly': True},
+ 'compute_type': {'required': True},
+ 'provisioning_state': {'readonly': True},
+ 'created_on': {'readonly': True},
+ 'modified_on': {'readonly': True},
+ 'provisioning_errors': {'readonly': True},
+ 'is_attached_compute': {'readonly': True},
}
_attribute_map = {
- 'locations': {'key': 'locations', 'type': '[str]'},
- 'location_info': {'key': 'locationInfo', 'type': '[ResourceSkuLocationInfo]'},
- 'tier': {'key': 'tier', 'type': 'str'},
- 'resource_type': {'key': 'resourceType', 'type': 'str'},
- 'name': {'key': 'name', 'type': 'str'},
- 'capabilities': {'key': 'capabilities', 'type': '[SKUCapability]'},
- 'restrictions': {'key': 'restrictions', 'type': '[Restriction]'},
+ 'compute_type': {'key': 'computeType', 'type': 'str'},
+ 'compute_location': {'key': 'computeLocation', 'type': 'str'},
+ 'provisioning_state': {'key': 'provisioningState', 'type': 'str'},
+ 'description': {'key': 'description', 'type': 'str'},
+ 'created_on': {'key': 'createdOn', 'type': 'iso-8601'},
+ 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'},
+ 'resource_id': {'key': 'resourceId', 'type': 'str'},
+ 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'},
+ 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'},
+ 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'},
+ 'properties': {'key': 'properties', 'type': 'SynapseSparkProperties'},
}
def __init__(
self,
*,
- restrictions: Optional[List["Restriction"]] = None,
+ compute_location: Optional[str] = None,
+ description: Optional[str] = None,
+ resource_id: Optional[str] = None,
+ disable_local_auth: Optional[bool] = None,
+ properties: Optional["SynapseSparkProperties"] = None,
**kwargs
):
- super(SkuSettings, self).__init__(**kwargs)
- self.locations = None
- self.location_info = None
- self.tier = None
- self.resource_type = None
- self.name = None
- self.capabilities = None
- self.restrictions = restrictions
+ """
+ :keyword compute_location: Location for the underlying compute.
+ :paramtype compute_location: str
+ :keyword description: The description of the Machine Learning compute.
+ :paramtype description: str
+ :keyword resource_id: ARM resource id of the underlying compute.
+ :paramtype resource_id: str
+ :keyword disable_local_auth: Opt-out of local authentication and ensure customers can use only
+ MSI and AAD exclusively for authentication.
+ :paramtype disable_local_auth: bool
+ :keyword properties:
+ :paramtype properties: ~azure_machine_learning_workspaces.models.SynapseSparkProperties
+ """
+ super(SynapseSpark, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, **kwargs)
+ self.compute_type = 'SynapseSpark' # type: str
+ self.properties = properties
-class SslConfiguration(msrest.serialization.Model):
- """The ssl configuration for scoring.
+class SynapseSparkProperties(msrest.serialization.Model):
+ """SynapseSparkProperties.
+
+ :ivar auto_scale_properties: Auto scale properties.
+ :vartype auto_scale_properties: ~azure_machine_learning_workspaces.models.AutoScaleProperties
+ :ivar auto_pause_properties: Auto pause properties.
+ :vartype auto_pause_properties: ~azure_machine_learning_workspaces.models.AutoPauseProperties
+ :ivar spark_version: Spark version.
+ :vartype spark_version: str
+ :ivar node_count: The number of compute nodes currently assigned to the compute.
+ :vartype node_count: int
+ :ivar node_size: Node size.
+ :vartype node_size: str
+ :ivar node_size_family: Node size family.
+ :vartype node_size_family: str
+ :ivar subscription_id: Azure subscription identifier.
+ :vartype subscription_id: str
+ :ivar resource_group: Name of the resource group in which workspace is located.
+ :vartype resource_group: str
+ :ivar workspace_name: Name of Azure Machine Learning workspace.
+ :vartype workspace_name: str
+ :ivar pool_name: Pool name.
+ :vartype pool_name: str
+ """
+
+ _attribute_map = {
+ 'auto_scale_properties': {'key': 'autoScaleProperties', 'type': 'AutoScaleProperties'},
+ 'auto_pause_properties': {'key': 'autoPauseProperties', 'type': 'AutoPauseProperties'},
+ 'spark_version': {'key': 'sparkVersion', 'type': 'str'},
+ 'node_count': {'key': 'nodeCount', 'type': 'int'},
+ 'node_size': {'key': 'nodeSize', 'type': 'str'},
+ 'node_size_family': {'key': 'nodeSizeFamily', 'type': 'str'},
+ 'subscription_id': {'key': 'subscriptionId', 'type': 'str'},
+ 'resource_group': {'key': 'resourceGroup', 'type': 'str'},
+ 'workspace_name': {'key': 'workspaceName', 'type': 'str'},
+ 'pool_name': {'key': 'poolName', 'type': 'str'},
+ }
- :param status: Enable or disable ssl for scoring. Possible values include: "Disabled",
- "Enabled".
- :type status: str or ~azure.mgmt.machinelearningservices.models.SslConfigurationStatus
- :param cert: Cert data.
- :type cert: str
- :param key: Key data.
- :type key: str
- :param cname: CNAME of the cert.
- :type cname: str
+ def __init__(
+ self,
+ *,
+ auto_scale_properties: Optional["AutoScaleProperties"] = None,
+ auto_pause_properties: Optional["AutoPauseProperties"] = None,
+ spark_version: Optional[str] = None,
+ node_count: Optional[int] = None,
+ node_size: Optional[str] = None,
+ node_size_family: Optional[str] = None,
+ subscription_id: Optional[str] = None,
+ resource_group: Optional[str] = None,
+ workspace_name: Optional[str] = None,
+ pool_name: Optional[str] = None,
+ **kwargs
+ ):
+ """
+ :keyword auto_scale_properties: Auto scale properties.
+ :paramtype auto_scale_properties: ~azure_machine_learning_workspaces.models.AutoScaleProperties
+ :keyword auto_pause_properties: Auto pause properties.
+ :paramtype auto_pause_properties: ~azure_machine_learning_workspaces.models.AutoPauseProperties
+ :keyword spark_version: Spark version.
+ :paramtype spark_version: str
+ :keyword node_count: The number of compute nodes currently assigned to the compute.
+ :paramtype node_count: int
+ :keyword node_size: Node size.
+ :paramtype node_size: str
+ :keyword node_size_family: Node size family.
+ :paramtype node_size_family: str
+ :keyword subscription_id: Azure subscription identifier.
+ :paramtype subscription_id: str
+ :keyword resource_group: Name of the resource group in which workspace is located.
+ :paramtype resource_group: str
+ :keyword workspace_name: Name of Azure Machine Learning workspace.
+ :paramtype workspace_name: str
+ :keyword pool_name: Pool name.
+ :paramtype pool_name: str
+ """
+ super(SynapseSparkProperties, self).__init__(**kwargs)
+ self.auto_scale_properties = auto_scale_properties
+ self.auto_pause_properties = auto_pause_properties
+ self.spark_version = spark_version
+ self.node_count = node_count
+ self.node_size = node_size
+ self.node_size_family = node_size_family
+ self.subscription_id = subscription_id
+ self.resource_group = resource_group
+ self.workspace_name = workspace_name
+ self.pool_name = pool_name
+
+
+class SystemData(msrest.serialization.Model):
+ """Metadata pertaining to creation and last modification of the resource.
+
+ :ivar created_by: The identity that created the resource.
+ :vartype created_by: str
+ :ivar created_by_type: The type of identity that created the resource. Possible values include:
+ "User", "Application", "ManagedIdentity", "Key".
+ :vartype created_by_type: str or ~azure_machine_learning_workspaces.models.CreatedByType
+ :ivar created_at: The timestamp of resource creation (UTC).
+ :vartype created_at: ~datetime.datetime
+ :ivar last_modified_by: The identity that last modified the resource.
+ :vartype last_modified_by: str
+ :ivar last_modified_by_type: The type of identity that last modified the resource. Possible
+ values include: "User", "Application", "ManagedIdentity", "Key".
+ :vartype last_modified_by_type: str or ~azure_machine_learning_workspaces.models.CreatedByType
+ :ivar last_modified_at: The timestamp of resource last modification (UTC).
+ :vartype last_modified_at: ~datetime.datetime
"""
_attribute_map = {
- 'status': {'key': 'status', 'type': 'str'},
- 'cert': {'key': 'cert', 'type': 'str'},
- 'key': {'key': 'key', 'type': 'str'},
- 'cname': {'key': 'cname', 'type': 'str'},
+ 'created_by': {'key': 'createdBy', 'type': 'str'},
+ 'created_by_type': {'key': 'createdByType', 'type': 'str'},
+ 'created_at': {'key': 'createdAt', 'type': 'iso-8601'},
+ 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'},
+ 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'},
+ 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'},
}
def __init__(
self,
*,
- status: Optional[Union[str, "SslConfigurationStatus"]] = None,
- cert: Optional[str] = None,
- key: Optional[str] = None,
- cname: Optional[str] = None,
+ created_by: Optional[str] = None,
+ created_by_type: Optional[Union[str, "CreatedByType"]] = None,
+ created_at: Optional[datetime.datetime] = None,
+ last_modified_by: Optional[str] = None,
+ last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None,
+ last_modified_at: Optional[datetime.datetime] = None,
**kwargs
):
- super(SslConfiguration, self).__init__(**kwargs)
- self.status = status
- self.cert = cert
- self.key = key
- self.cname = cname
+ """
+ :keyword created_by: The identity that created the resource.
+ :paramtype created_by: str
+ :keyword created_by_type: The type of identity that created the resource. Possible values
+ include: "User", "Application", "ManagedIdentity", "Key".
+ :paramtype created_by_type: str or ~azure_machine_learning_workspaces.models.CreatedByType
+ :keyword created_at: The timestamp of resource creation (UTC).
+ :paramtype created_at: ~datetime.datetime
+ :keyword last_modified_by: The identity that last modified the resource.
+ :paramtype last_modified_by: str
+ :keyword last_modified_by_type: The type of identity that last modified the resource. Possible
+ values include: "User", "Application", "ManagedIdentity", "Key".
+ :paramtype last_modified_by_type: str or
+ ~azure_machine_learning_workspaces.models.CreatedByType
+ :keyword last_modified_at: The timestamp of resource last modification (UTC).
+ :paramtype last_modified_at: ~datetime.datetime
+ """
+ super(SystemData, self).__init__(**kwargs)
+ self.created_by = created_by
+ self.created_by_type = created_by_type
+ self.created_at = created_at
+ self.last_modified_by = last_modified_by
+ self.last_modified_by_type = last_modified_by_type
+ self.last_modified_at = last_modified_at
class SystemService(msrest.serialization.Model):
@@ -3114,6 +5214,8 @@ def __init__(
self,
**kwargs
):
+ """
+ """
super(SystemService, self).__init__(**kwargs)
self.system_service_type = None
self.public_ip_address = None
@@ -3129,15 +5231,15 @@ class UpdateWorkspaceQuotas(msrest.serialization.Model):
:vartype id: str
:ivar type: Specifies the resource type.
:vartype type: str
- :param limit: The maximum permitted quota of the resource.
- :type limit: long
+ :ivar limit: The maximum permitted quota of the resource.
+ :vartype limit: long
:ivar unit: An enum describing the unit of quota measurement. Possible values include: "Count".
- :vartype unit: str or ~azure.mgmt.machinelearningservices.models.QuotaUnit
- :param status: Status of update workspace quota. Possible values include: "Undefined",
+ :vartype unit: str or ~azure_machine_learning_workspaces.models.QuotaUnit
+ :ivar status: Status of update workspace quota. Possible values include: "Undefined",
"Success", "Failure", "InvalidQuotaBelowClusterMinimum",
"InvalidQuotaExceedsSubscriptionLimit", "InvalidVMFamilyName", "OperationNotSupportedForSku",
"OperationNotEnabledForRegion".
- :type status: str or ~azure.mgmt.machinelearningservices.models.Status
+ :vartype status: str or ~azure_machine_learning_workspaces.models.Status
"""
_validation = {
@@ -3161,6 +5263,15 @@ def __init__(
status: Optional[Union[str, "Status"]] = None,
**kwargs
):
+ """
+ :keyword limit: The maximum permitted quota of the resource.
+ :paramtype limit: long
+ :keyword status: Status of update workspace quota. Possible values include: "Undefined",
+ "Success", "Failure", "InvalidQuotaBelowClusterMinimum",
+ "InvalidQuotaExceedsSubscriptionLimit", "InvalidVMFamilyName", "OperationNotSupportedForSku",
+ "OperationNotEnabledForRegion".
+ :paramtype status: str or ~azure_machine_learning_workspaces.models.Status
+ """
super(UpdateWorkspaceQuotas, self).__init__(**kwargs)
self.id = None
self.type = None
@@ -3175,7 +5286,7 @@ class UpdateWorkspaceQuotasResult(msrest.serialization.Model):
Variables are only populated by the server, and will be ignored when sending a request.
:ivar value: The list of workspace quota update result.
- :vartype value: list[~azure.mgmt.machinelearningservices.models.UpdateWorkspaceQuotas]
+ :vartype value: list[~azure_machine_learning_workspaces.models.UpdateWorkspaceQuotas]
:ivar next_link: The URI to fetch the next page of workspace quota update result. Call
ListNext() with this to fetch the next page of Workspace Quota update result.
:vartype next_link: str
@@ -3195,6 +5306,8 @@ def __init__(
self,
**kwargs
):
+ """
+ """
super(UpdateWorkspaceQuotasResult, self).__init__(**kwargs)
self.value = None
self.next_link = None
@@ -3207,20 +5320,23 @@ class Usage(msrest.serialization.Model):
:ivar id: Specifies the resource ID.
:vartype id: str
+ :ivar aml_workspace_location: Region of the AML workspace in the id.
+ :vartype aml_workspace_location: str
:ivar type: Specifies the resource type.
:vartype type: str
:ivar unit: An enum describing the unit of usage measurement. Possible values include: "Count".
- :vartype unit: str or ~azure.mgmt.machinelearningservices.models.UsageUnit
+ :vartype unit: str or ~azure_machine_learning_workspaces.models.UsageUnit
:ivar current_value: The current usage of the resource.
:vartype current_value: long
:ivar limit: The maximum permitted usage of the resource.
:vartype limit: long
:ivar name: The name of the type of usage.
- :vartype name: ~azure.mgmt.machinelearningservices.models.UsageName
+ :vartype name: ~azure_machine_learning_workspaces.models.UsageName
"""
_validation = {
'id': {'readonly': True},
+ 'aml_workspace_location': {'readonly': True},
'type': {'readonly': True},
'unit': {'readonly': True},
'current_value': {'readonly': True},
@@ -3230,6 +5346,7 @@ class Usage(msrest.serialization.Model):
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
+ 'aml_workspace_location': {'key': 'amlWorkspaceLocation', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'unit': {'key': 'unit', 'type': 'str'},
'current_value': {'key': 'currentValue', 'type': 'long'},
@@ -3241,8 +5358,11 @@ def __init__(
self,
**kwargs
):
+ """
+ """
super(Usage, self).__init__(**kwargs)
self.id = None
+ self.aml_workspace_location = None
self.type = None
self.unit = None
self.current_value = None
@@ -3275,6 +5395,8 @@ def __init__(
self,
**kwargs
):
+ """
+ """
super(UsageName, self).__init__(**kwargs)
self.value = None
self.localized_value = None
@@ -3285,13 +5407,13 @@ class UserAccountCredentials(msrest.serialization.Model):
All required parameters must be populated in order to send to Azure.
- :param admin_user_name: Required. Name of the administrator user account which can be used to
+ :ivar admin_user_name: Required. Name of the administrator user account which can be used to
SSH to nodes.
- :type admin_user_name: str
- :param admin_user_ssh_public_key: SSH public key of the administrator user account.
- :type admin_user_ssh_public_key: str
- :param admin_user_password: Password of the administrator user account.
- :type admin_user_password: str
+ :vartype admin_user_name: str
+ :ivar admin_user_ssh_public_key: SSH public key of the administrator user account.
+ :vartype admin_user_ssh_public_key: str
+ :ivar admin_user_password: Password of the administrator user account.
+ :vartype admin_user_password: str
"""
_validation = {
@@ -3312,12 +5434,58 @@ def __init__(
admin_user_password: Optional[str] = None,
**kwargs
):
+ """
+ :keyword admin_user_name: Required. Name of the administrator user account which can be used to
+ SSH to nodes.
+ :paramtype admin_user_name: str
+ :keyword admin_user_ssh_public_key: SSH public key of the administrator user account.
+ :paramtype admin_user_ssh_public_key: str
+ :keyword admin_user_password: Password of the administrator user account.
+ :paramtype admin_user_password: str
+ """
super(UserAccountCredentials, self).__init__(**kwargs)
self.admin_user_name = admin_user_name
self.admin_user_ssh_public_key = admin_user_ssh_public_key
self.admin_user_password = admin_user_password
+class UserAssignedIdentity(msrest.serialization.Model):
+ """User Assigned Identity.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar principal_id: The principal ID of the user assigned identity.
+ :vartype principal_id: str
+ :ivar tenant_id: The tenant ID of the user assigned identity.
+ :vartype tenant_id: str
+ :ivar client_id: The clientId(aka appId) of the user assigned identity.
+ :vartype client_id: str
+ """
+
+ _validation = {
+ 'principal_id': {'readonly': True},
+ 'tenant_id': {'readonly': True},
+ 'client_id': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'principal_id': {'key': 'principalId', 'type': 'str'},
+ 'tenant_id': {'key': 'tenantId', 'type': 'str'},
+ 'client_id': {'key': 'clientId', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ **kwargs
+ ):
+ """
+ """
+ super(UserAssignedIdentity, self).__init__(**kwargs)
+ self.principal_id = None
+ self.tenant_id = None
+ self.client_id = None
+
+
class VirtualMachine(Compute):
"""A Machine Learning compute based on Azure Virtual Machines.
@@ -3325,33 +5493,34 @@ class VirtualMachine(Compute):
All required parameters must be populated in order to send to Azure.
- :param compute_type: Required. The type of compute.Constant filled by server. Possible values
- include: "AKS", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", "HDInsight",
- "Databricks", "DataLakeAnalytics".
- :type compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType
- :param compute_location: Location for the underlying compute.
- :type compute_location: str
+ :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values
+ include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine",
+ "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark".
+ :vartype compute_type: str or ~azure_machine_learning_workspaces.models.ComputeType
+ :ivar compute_location: Location for the underlying compute.
+ :vartype compute_location: str
:ivar provisioning_state: The provision state of the cluster. Valid values are Unknown,
Updating, Provisioning, Succeeded, and Failed. Possible values include: "Unknown", "Updating",
"Creating", "Deleting", "Succeeded", "Failed", "Canceled".
- :vartype provisioning_state: str or
- ~azure.mgmt.machinelearningservices.models.ProvisioningState
- :param description: The description of the Machine Learning compute.
- :type description: str
- :ivar created_on: The date and time when the compute was created.
+ :vartype provisioning_state: str or ~azure_machine_learning_workspaces.models.ProvisioningState
+ :ivar description: The description of the Machine Learning compute.
+ :vartype description: str
+ :ivar created_on: The time at which the compute was created.
:vartype created_on: ~datetime.datetime
- :ivar modified_on: The date and time when the compute was last modified.
+ :ivar modified_on: The time at which the compute was last modified.
:vartype modified_on: ~datetime.datetime
- :param resource_id: ARM resource id of the underlying compute.
- :type resource_id: str
+ :ivar resource_id: ARM resource id of the underlying compute.
+ :vartype resource_id: str
:ivar provisioning_errors: Errors during provisioning.
- :vartype provisioning_errors:
- list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError]
+ :vartype provisioning_errors: list[~azure_machine_learning_workspaces.models.ErrorResponse]
:ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought
from outside if true, or machine learning service provisioned it if false.
:vartype is_attached_compute: bool
- :param properties:
- :type properties: ~azure.mgmt.machinelearningservices.models.VirtualMachineProperties
+ :ivar disable_local_auth: Opt-out of local authentication and ensure customers can use only MSI
+ and AAD exclusively for authentication.
+ :vartype disable_local_auth: bool
+ :ivar properties:
+ :vartype properties: ~azure_machine_learning_workspaces.models.VirtualMachineProperties
"""
_validation = {
@@ -3371,8 +5540,9 @@ class VirtualMachine(Compute):
'created_on': {'key': 'createdOn', 'type': 'iso-8601'},
'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'},
'resource_id': {'key': 'resourceId', 'type': 'str'},
- 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'},
+ 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'},
'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'},
+ 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'},
'properties': {'key': 'properties', 'type': 'VirtualMachineProperties'},
}
@@ -3382,26 +5552,74 @@ def __init__(
compute_location: Optional[str] = None,
description: Optional[str] = None,
resource_id: Optional[str] = None,
+ disable_local_auth: Optional[bool] = None,
properties: Optional["VirtualMachineProperties"] = None,
**kwargs
):
- super(VirtualMachine, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, **kwargs)
+ """
+ :keyword compute_location: Location for the underlying compute.
+ :paramtype compute_location: str
+ :keyword description: The description of the Machine Learning compute.
+ :paramtype description: str
+ :keyword resource_id: ARM resource id of the underlying compute.
+ :paramtype resource_id: str
+ :keyword disable_local_auth: Opt-out of local authentication and ensure customers can use only
+ MSI and AAD exclusively for authentication.
+ :paramtype disable_local_auth: bool
+ :keyword properties:
+ :paramtype properties: ~azure_machine_learning_workspaces.models.VirtualMachineProperties
+ """
+ super(VirtualMachine, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, **kwargs)
self.compute_type = 'VirtualMachine' # type: str
self.properties = properties
+class VirtualMachineImage(msrest.serialization.Model):
+ """Virtual Machine image for Windows AML Compute.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Required. Virtual Machine image path.
+ :vartype id: str
+ """
+
+ _validation = {
+ 'id': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ }
+
+ def __init__(
+ self,
+ *,
+ id: str,
+ **kwargs
+ ):
+ """
+ :keyword id: Required. Virtual Machine image path.
+ :paramtype id: str
+ """
+ super(VirtualMachineImage, self).__init__(**kwargs)
+ self.id = id
+
+
class VirtualMachineProperties(msrest.serialization.Model):
"""VirtualMachineProperties.
- :param virtual_machine_size: Virtual Machine size.
- :type virtual_machine_size: str
- :param ssh_port: Port open for ssh connections.
- :type ssh_port: int
- :param address: Public IP address of the virtual machine.
- :type address: str
- :param administrator_account: Admin credentials for virtual machine.
- :type administrator_account:
- ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials
+ :ivar virtual_machine_size: Virtual Machine size.
+ :vartype virtual_machine_size: str
+ :ivar ssh_port: Port open for ssh connections.
+ :vartype ssh_port: int
+ :ivar address: Public IP address of the virtual machine.
+ :vartype address: str
+ :ivar administrator_account: Admin credentials for virtual machine.
+ :vartype administrator_account:
+ ~azure_machine_learning_workspaces.models.VirtualMachineSshCredentials
+ :ivar is_notebook_instance_compute: Indicates whether this compute will be used for running
+ notebooks.
+ :vartype is_notebook_instance_compute: bool
"""
_attribute_map = {
@@ -3409,6 +5627,7 @@ class VirtualMachineProperties(msrest.serialization.Model):
'ssh_port': {'key': 'sshPort', 'type': 'int'},
'address': {'key': 'address', 'type': 'str'},
'administrator_account': {'key': 'administratorAccount', 'type': 'VirtualMachineSshCredentials'},
+ 'is_notebook_instance_compute': {'key': 'isNotebookInstanceCompute', 'type': 'bool'},
}
def __init__(
@@ -3418,13 +5637,29 @@ def __init__(
ssh_port: Optional[int] = None,
address: Optional[str] = None,
administrator_account: Optional["VirtualMachineSshCredentials"] = None,
+ is_notebook_instance_compute: Optional[bool] = None,
**kwargs
):
+ """
+ :keyword virtual_machine_size: Virtual Machine size.
+ :paramtype virtual_machine_size: str
+ :keyword ssh_port: Port open for ssh connections.
+ :paramtype ssh_port: int
+ :keyword address: Public IP address of the virtual machine.
+ :paramtype address: str
+ :keyword administrator_account: Admin credentials for virtual machine.
+ :paramtype administrator_account:
+ ~azure_machine_learning_workspaces.models.VirtualMachineSshCredentials
+ :keyword is_notebook_instance_compute: Indicates whether this compute will be used for running
+ notebooks.
+ :paramtype is_notebook_instance_compute: bool
+ """
super(VirtualMachineProperties, self).__init__(**kwargs)
self.virtual_machine_size = virtual_machine_size
self.ssh_port = ssh_port
self.address = address
self.administrator_account = administrator_account
+ self.is_notebook_instance_compute = is_notebook_instance_compute
class VirtualMachineSecrets(ComputeSecrets):
@@ -3432,13 +5667,13 @@ class VirtualMachineSecrets(ComputeSecrets):
All required parameters must be populated in order to send to Azure.
- :param compute_type: Required. The type of compute.Constant filled by server. Possible values
- include: "AKS", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", "HDInsight",
- "Databricks", "DataLakeAnalytics".
- :type compute_type: str or ~azure.mgmt.machinelearningservices.models.ComputeType
- :param administrator_account: Admin credentials for virtual machine.
- :type administrator_account:
- ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials
+ :ivar compute_type: Required. The type of compute.Constant filled by server. Possible values
+ include: "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine",
+ "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark".
+ :vartype compute_type: str or ~azure_machine_learning_workspaces.models.ComputeType
+ :ivar administrator_account: Admin credentials for virtual machine.
+ :vartype administrator_account:
+ ~azure_machine_learning_workspaces.models.VirtualMachineSshCredentials
"""
_validation = {
@@ -3456,6 +5691,11 @@ def __init__(
administrator_account: Optional["VirtualMachineSshCredentials"] = None,
**kwargs
):
+ """
+ :keyword administrator_account: Admin credentials for virtual machine.
+ :paramtype administrator_account:
+ ~azure_machine_learning_workspaces.models.VirtualMachineSshCredentials
+ """
super(VirtualMachineSecrets, self).__init__(**kwargs)
self.compute_type = 'VirtualMachine' # type: str
self.administrator_account = administrator_account
@@ -3485,11 +5725,11 @@ class VirtualMachineSize(msrest.serialization.Model):
:vartype low_priority_capable: bool
:ivar premium_io: Specifies if the virtual machine size supports premium IO.
:vartype premium_io: bool
- :param estimated_vm_prices: The estimated price information for using a VM.
- :type estimated_vm_prices: ~azure.mgmt.machinelearningservices.models.EstimatedVMPrices
- :param supported_compute_types: Specifies the compute types supported by the virtual machine
+ :ivar estimated_vm_prices: The estimated price information for using a VM.
+ :vartype estimated_vm_prices: ~azure_machine_learning_workspaces.models.EstimatedVMPrices
+ :ivar supported_compute_types: Specifies the compute types supported by the virtual machine
size.
- :type supported_compute_types: list[str]
+ :vartype supported_compute_types: list[str]
"""
_validation = {
@@ -3525,6 +5765,13 @@ def __init__(
supported_compute_types: Optional[List[str]] = None,
**kwargs
):
+ """
+ :keyword estimated_vm_prices: The estimated price information for using a VM.
+ :paramtype estimated_vm_prices: ~azure_machine_learning_workspaces.models.EstimatedVMPrices
+ :keyword supported_compute_types: Specifies the compute types supported by the virtual machine
+ size.
+ :paramtype supported_compute_types: list[str]
+ """
super(VirtualMachineSize, self).__init__(**kwargs)
self.name = None
self.family = None
@@ -3542,35 +5789,39 @@ def __init__(
class VirtualMachineSizeListResult(msrest.serialization.Model):
"""The List Virtual Machine size operation response.
- :param aml_compute: The list of virtual machine sizes supported by AmlCompute.
- :type aml_compute: list[~azure.mgmt.machinelearningservices.models.VirtualMachineSize]
+ :ivar value: The list of virtual machine sizes supported by AmlCompute.
+ :vartype value: list[~azure_machine_learning_workspaces.models.VirtualMachineSize]
"""
_attribute_map = {
- 'aml_compute': {'key': 'amlCompute', 'type': '[VirtualMachineSize]'},
+ 'value': {'key': 'value', 'type': '[VirtualMachineSize]'},
}
def __init__(
self,
*,
- aml_compute: Optional[List["VirtualMachineSize"]] = None,
+ value: Optional[List["VirtualMachineSize"]] = None,
**kwargs
):
+ """
+ :keyword value: The list of virtual machine sizes supported by AmlCompute.
+ :paramtype value: list[~azure_machine_learning_workspaces.models.VirtualMachineSize]
+ """
super(VirtualMachineSizeListResult, self).__init__(**kwargs)
- self.aml_compute = aml_compute
+ self.value = value
class VirtualMachineSshCredentials(msrest.serialization.Model):
"""Admin credentials for virtual machine.
- :param username: Username of admin account.
- :type username: str
- :param password: Password of admin account.
- :type password: str
- :param public_key_data: Public key data.
- :type public_key_data: str
- :param private_key_data: Private key data.
- :type private_key_data: str
+ :ivar username: Username of admin account.
+ :vartype username: str
+ :ivar password: Password of admin account.
+ :vartype password: str
+ :ivar public_key_data: Public key data.
+ :vartype public_key_data: str
+ :ivar private_key_data: Private key data.
+ :vartype private_key_data: str
"""
_attribute_map = {
@@ -3589,6 +5840,16 @@ def __init__(
private_key_data: Optional[str] = None,
**kwargs
):
+ """
+ :keyword username: Username of admin account.
+ :paramtype username: str
+ :keyword password: Password of admin account.
+ :paramtype password: str
+ :keyword public_key_data: Public key data.
+ :paramtype public_key_data: str
+ :keyword private_key_data: Private key data.
+ :paramtype private_key_data: str
+ """
super(VirtualMachineSshCredentials, self).__init__(**kwargs)
self.username = username
self.password = password
@@ -3601,99 +5862,121 @@ class Workspace(Resource):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Specifies the resource ID.
+ :ivar id: Fully qualified resource ID for the resource. Ex -
+ /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
- :ivar name: Specifies the name of the resource.
+ :ivar name: The name of the resource.
:vartype name: str
- :param identity: The identity of the resource.
- :type identity: ~azure.mgmt.machinelearningservices.models.Identity
- :param location: Specifies the location of the resource.
- :type location: str
- :ivar type: Specifies the type of the resource.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
- :param tags: A set of tags. Contains resource tags defined as key/value pairs.
- :type tags: dict[str, str]
- :param sku: The sku of the workspace.
- :type sku: ~azure.mgmt.machinelearningservices.models.Sku
+ :ivar identity: The identity of the resource.
+ :vartype identity: ~azure_machine_learning_workspaces.models.Identity
+ :ivar location: Specifies the location of the resource.
+ :vartype location: str
+ :ivar tags: A set of tags. Contains resource tags defined as key/value pairs.
+ :vartype tags: dict[str, str]
+ :ivar sku: The sku of the workspace.
+ :vartype sku: ~azure_machine_learning_workspaces.models.Sku
+ :ivar system_data: System data.
+ :vartype system_data: ~azure_machine_learning_workspaces.models.SystemData
:ivar workspace_id: The immutable id associated with this workspace.
:vartype workspace_id: str
- :param description: The description of this workspace.
- :type description: str
- :param friendly_name: The friendly name for this workspace. This name in mutable.
- :type friendly_name: str
- :ivar creation_time: The creation time of the machine learning workspace in ISO8601 format.
- :vartype creation_time: ~datetime.datetime
- :param key_vault: ARM id of the key vault associated with this workspace. This cannot be
- changed once the workspace has been created.
- :type key_vault: str
- :param application_insights: ARM id of the application insights associated with this workspace.
- This cannot be changed once the workspace has been created.
- :type application_insights: str
- :param container_registry: ARM id of the container registry associated with this workspace.
+ :ivar description: The description of this workspace.
+ :vartype description: str
+ :ivar friendly_name: The friendly name for this workspace. This name in mutable.
+ :vartype friendly_name: str
+ :ivar key_vault: ARM id of the key vault associated with this workspace. This cannot be changed
+ once the workspace has been created.
+ :vartype key_vault: str
+ :ivar application_insights: ARM id of the application insights associated with this workspace.
This cannot be changed once the workspace has been created.
- :type container_registry: str
- :param storage_account: ARM id of the storage account associated with this workspace. This
+ :vartype application_insights: str
+ :ivar container_registry: ARM id of the container registry associated with this workspace. This
cannot be changed once the workspace has been created.
- :type storage_account: str
- :param discovery_url: Url for the discovery service to identify regional endpoints for machine
+ :vartype container_registry: str
+ :ivar storage_account: ARM id of the storage account associated with this workspace. This
+ cannot be changed once the workspace has been created.
+ :vartype storage_account: str
+ :ivar discovery_url: Url for the discovery service to identify regional endpoints for machine
learning experimentation services.
- :type discovery_url: str
+ :vartype discovery_url: str
:ivar provisioning_state: The current deployment state of workspace resource. The
provisioningState is to indicate states for resource provisioning. Possible values include:
"Unknown", "Updating", "Creating", "Deleting", "Succeeded", "Failed", "Canceled".
- :vartype provisioning_state: str or
- ~azure.mgmt.machinelearningservices.models.ProvisioningState
- :param encryption: The encryption settings of Azure ML workspace.
- :type encryption: ~azure.mgmt.machinelearningservices.models.EncryptionProperty
- :param hbi_workspace: The flag to signal HBI data in the workspace and reduce diagnostic data
+ :vartype provisioning_state: str or ~azure_machine_learning_workspaces.models.ProvisioningState
+ :ivar encryption: The encryption settings of Azure ML workspace.
+ :vartype encryption: ~azure_machine_learning_workspaces.models.EncryptionProperty
+ :ivar hbi_workspace: The flag to signal HBI data in the workspace and reduce diagnostic data
collected by the service.
- :type hbi_workspace: bool
+ :vartype hbi_workspace: bool
:ivar service_provisioned_resource_group: The name of the managed resource group created by
workspace RP in customer subscription if the workspace is CMK workspace.
:vartype service_provisioned_resource_group: str
:ivar private_link_count: Count of private connections in the workspace.
:vartype private_link_count: int
- :param image_build_compute: The compute name for image build.
- :type image_build_compute: str
- :param allow_public_access_when_behind_vnet: The flag to indicate whether to allow public
- access when behind VNet.
- :type allow_public_access_when_behind_vnet: bool
+ :ivar image_build_compute: The compute name for image build.
+ :vartype image_build_compute: str
+ :ivar allow_public_access_when_behind_vnet: The flag to indicate whether to allow public access
+ when behind VNet.
+ :vartype allow_public_access_when_behind_vnet: bool
+ :ivar public_network_access: Whether requests from Public Network are allowed. Possible values
+ include: "Enabled", "Disabled".
+ :vartype public_network_access: str or
+ ~azure_machine_learning_workspaces.models.PublicNetworkAccess
:ivar private_endpoint_connections: The list of private endpoint connections in the workspace.
:vartype private_endpoint_connections:
- list[~azure.mgmt.machinelearningservices.models.PrivateEndpointConnection]
- :param shared_private_link_resources: The list of shared private link resources in this
+ list[~azure_machine_learning_workspaces.models.PrivateEndpointConnection]
+ :ivar shared_private_link_resources: The list of shared private link resources in this
workspace.
- :type shared_private_link_resources:
- list[~azure.mgmt.machinelearningservices.models.SharedPrivateLinkResource]
+ :vartype shared_private_link_resources:
+ list[~azure_machine_learning_workspaces.models.SharedPrivateLinkResource]
:ivar notebook_info: The notebook info of Azure ML workspace.
- :vartype notebook_info: ~azure.mgmt.machinelearningservices.models.NotebookResourceInfo
+ :vartype notebook_info: ~azure_machine_learning_workspaces.models.NotebookResourceInfo
+ :ivar service_managed_resources_settings: The service managed resource settings.
+ :vartype service_managed_resources_settings:
+ ~azure_machine_learning_workspaces.models.ServiceManagedResourcesSettings
+ :ivar primary_user_assigned_identity: The user assigned identity resource id that represents
+ the workspace identity.
+ :vartype primary_user_assigned_identity: str
+ :ivar tenant_id: The tenant id associated with this workspace.
+ :vartype tenant_id: str
+ :ivar storage_hns_enabled: If the storage associated with the workspace has hierarchical
+ namespace(HNS) enabled.
+ :vartype storage_hns_enabled: bool
+ :ivar ml_flow_tracking_uri: The URI associated with this workspace that machine learning flow
+ must point at to set up tracking.
+ :vartype ml_flow_tracking_uri: str
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
+ 'system_data': {'readonly': True},
'workspace_id': {'readonly': True},
- 'creation_time': {'readonly': True},
'provisioning_state': {'readonly': True},
'service_provisioned_resource_group': {'readonly': True},
'private_link_count': {'readonly': True},
'private_endpoint_connections': {'readonly': True},
'notebook_info': {'readonly': True},
+ 'tenant_id': {'readonly': True},
+ 'storage_hns_enabled': {'readonly': True},
+ 'ml_flow_tracking_uri': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
'identity': {'key': 'identity', 'type': 'Identity'},
'location': {'key': 'location', 'type': 'str'},
- 'type': {'key': 'type', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'sku': {'key': 'sku', 'type': 'Sku'},
+ 'system_data': {'key': 'systemData', 'type': 'SystemData'},
'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'},
'description': {'key': 'properties.description', 'type': 'str'},
'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'},
- 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'},
'key_vault': {'key': 'properties.keyVault', 'type': 'str'},
'application_insights': {'key': 'properties.applicationInsights', 'type': 'str'},
'container_registry': {'key': 'properties.containerRegistry', 'type': 'str'},
@@ -3706,9 +5989,15 @@ class Workspace(Resource):
'private_link_count': {'key': 'properties.privateLinkCount', 'type': 'int'},
'image_build_compute': {'key': 'properties.imageBuildCompute', 'type': 'str'},
'allow_public_access_when_behind_vnet': {'key': 'properties.allowPublicAccessWhenBehindVnet', 'type': 'bool'},
+ 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'},
'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'},
'shared_private_link_resources': {'key': 'properties.sharedPrivateLinkResources', 'type': '[SharedPrivateLinkResource]'},
'notebook_info': {'key': 'properties.notebookInfo', 'type': 'NotebookResourceInfo'},
+ 'service_managed_resources_settings': {'key': 'properties.serviceManagedResourcesSettings', 'type': 'ServiceManagedResourcesSettings'},
+ 'primary_user_assigned_identity': {'key': 'properties.primaryUserAssignedIdentity', 'type': 'str'},
+ 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'},
+ 'storage_hns_enabled': {'key': 'properties.storageHnsEnabled', 'type': 'bool'},
+ 'ml_flow_tracking_uri': {'key': 'properties.mlFlowTrackingUri', 'type': 'str'},
}
def __init__(
@@ -3729,14 +6018,74 @@ def __init__(
hbi_workspace: Optional[bool] = False,
image_build_compute: Optional[str] = None,
allow_public_access_when_behind_vnet: Optional[bool] = False,
+ public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None,
shared_private_link_resources: Optional[List["SharedPrivateLinkResource"]] = None,
+ service_managed_resources_settings: Optional["ServiceManagedResourcesSettings"] = None,
+ primary_user_assigned_identity: Optional[str] = None,
**kwargs
):
- super(Workspace, self).__init__(identity=identity, location=location, tags=tags, sku=sku, **kwargs)
+ """
+ :keyword identity: The identity of the resource.
+ :paramtype identity: ~azure_machine_learning_workspaces.models.Identity
+ :keyword location: Specifies the location of the resource.
+ :paramtype location: str
+ :keyword tags: A set of tags. Contains resource tags defined as key/value pairs.
+ :paramtype tags: dict[str, str]
+ :keyword sku: The sku of the workspace.
+ :paramtype sku: ~azure_machine_learning_workspaces.models.Sku
+ :keyword description: The description of this workspace.
+ :paramtype description: str
+ :keyword friendly_name: The friendly name for this workspace. This name in mutable.
+ :paramtype friendly_name: str
+ :keyword key_vault: ARM id of the key vault associated with this workspace. This cannot be
+ changed once the workspace has been created.
+ :paramtype key_vault: str
+ :keyword application_insights: ARM id of the application insights associated with this
+ workspace. This cannot be changed once the workspace has been created.
+ :paramtype application_insights: str
+ :keyword container_registry: ARM id of the container registry associated with this workspace.
+ This cannot be changed once the workspace has been created.
+ :paramtype container_registry: str
+ :keyword storage_account: ARM id of the storage account associated with this workspace. This
+ cannot be changed once the workspace has been created.
+ :paramtype storage_account: str
+ :keyword discovery_url: Url for the discovery service to identify regional endpoints for
+ machine learning experimentation services.
+ :paramtype discovery_url: str
+ :keyword encryption: The encryption settings of Azure ML workspace.
+ :paramtype encryption: ~azure_machine_learning_workspaces.models.EncryptionProperty
+ :keyword hbi_workspace: The flag to signal HBI data in the workspace and reduce diagnostic data
+ collected by the service.
+ :paramtype hbi_workspace: bool
+ :keyword image_build_compute: The compute name for image build.
+ :paramtype image_build_compute: str
+ :keyword allow_public_access_when_behind_vnet: The flag to indicate whether to allow public
+ access when behind VNet.
+ :paramtype allow_public_access_when_behind_vnet: bool
+ :keyword public_network_access: Whether requests from Public Network are allowed. Possible
+ values include: "Enabled", "Disabled".
+ :paramtype public_network_access: str or
+ ~azure_machine_learning_workspaces.models.PublicNetworkAccess
+ :keyword shared_private_link_resources: The list of shared private link resources in this
+ workspace.
+ :paramtype shared_private_link_resources:
+ list[~azure_machine_learning_workspaces.models.SharedPrivateLinkResource]
+ :keyword service_managed_resources_settings: The service managed resource settings.
+ :paramtype service_managed_resources_settings:
+ ~azure_machine_learning_workspaces.models.ServiceManagedResourcesSettings
+ :keyword primary_user_assigned_identity: The user assigned identity resource id that represents
+ the workspace identity.
+ :paramtype primary_user_assigned_identity: str
+ """
+ super(Workspace, self).__init__(**kwargs)
+ self.identity = identity
+ self.location = location
+ self.tags = tags
+ self.sku = sku
+ self.system_data = None
self.workspace_id = None
self.description = description
self.friendly_name = friendly_name
- self.creation_time = None
self.key_vault = key_vault
self.application_insights = application_insights
self.container_registry = container_registry
@@ -3749,9 +6098,15 @@ def __init__(
self.private_link_count = None
self.image_build_compute = image_build_compute
self.allow_public_access_when_behind_vnet = allow_public_access_when_behind_vnet
+ self.public_network_access = public_network_access
self.private_endpoint_connections = None
self.shared_private_link_resources = shared_private_link_resources
self.notebook_info = None
+ self.service_managed_resources_settings = service_managed_resources_settings
+ self.primary_user_assigned_identity = primary_user_assigned_identity
+ self.tenant_id = None
+ self.storage_hns_enabled = None
+ self.ml_flow_tracking_uri = None
class WorkspaceConnection(msrest.serialization.Model):
@@ -3765,14 +6120,16 @@ class WorkspaceConnection(msrest.serialization.Model):
:vartype name: str
:ivar type: Resource type of workspace connection.
:vartype type: str
- :param category: Category of the workspace connection.
- :type category: str
- :param target: Target of the workspace connection.
- :type target: str
- :param auth_type: Authorization type of the workspace connection.
- :type auth_type: str
- :param value: Value details of the workspace connection.
- :type value: str
+ :ivar category: Category of the workspace connection.
+ :vartype category: str
+ :ivar target: Target of the workspace connection.
+ :vartype target: str
+ :ivar auth_type: Authorization type of the workspace connection.
+ :vartype auth_type: str
+ :ivar value: Value details of the workspace connection.
+ :vartype value: str
+ :ivar value_format: format for the workspace connection value. Possible values include: "JSON".
+ :vartype value_format: str or ~azure_machine_learning_workspaces.models.ValueFormat
"""
_validation = {
@@ -3789,6 +6146,7 @@ class WorkspaceConnection(msrest.serialization.Model):
'target': {'key': 'properties.target', 'type': 'str'},
'auth_type': {'key': 'properties.authType', 'type': 'str'},
'value': {'key': 'properties.value', 'type': 'str'},
+ 'value_format': {'key': 'properties.valueFormat', 'type': 'str'},
}
def __init__(
@@ -3798,8 +6156,22 @@ def __init__(
target: Optional[str] = None,
auth_type: Optional[str] = None,
value: Optional[str] = None,
+ value_format: Optional[Union[str, "ValueFormat"]] = None,
**kwargs
):
+ """
+ :keyword category: Category of the workspace connection.
+ :paramtype category: str
+ :keyword target: Target of the workspace connection.
+ :paramtype target: str
+ :keyword auth_type: Authorization type of the workspace connection.
+ :paramtype auth_type: str
+ :keyword value: Value details of the workspace connection.
+ :paramtype value: str
+ :keyword value_format: format for the workspace connection value. Possible values include:
+ "JSON".
+ :paramtype value_format: str or ~azure_machine_learning_workspaces.models.ValueFormat
+ """
super(WorkspaceConnection, self).__init__(**kwargs)
self.id = None
self.name = None
@@ -3808,58 +6180,18 @@ def __init__(
self.target = target
self.auth_type = auth_type
self.value = value
-
-
-class WorkspaceConnectionDto(msrest.serialization.Model):
- """object used for creating workspace connection.
-
- :param name: Friendly name of the workspace connection.
- :type name: str
- :param category: Category of the workspace connection.
- :type category: str
- :param target: Target of the workspace connection.
- :type target: str
- :param auth_type: Authorization type of the workspace connection.
- :type auth_type: str
- :param value: Value details of the workspace connection.
- :type value: str
- """
-
- _attribute_map = {
- 'name': {'key': 'name', 'type': 'str'},
- 'category': {'key': 'properties.category', 'type': 'str'},
- 'target': {'key': 'properties.target', 'type': 'str'},
- 'auth_type': {'key': 'properties.authType', 'type': 'str'},
- 'value': {'key': 'properties.value', 'type': 'str'},
- }
-
- def __init__(
- self,
- *,
- name: Optional[str] = None,
- category: Optional[str] = None,
- target: Optional[str] = None,
- auth_type: Optional[str] = None,
- value: Optional[str] = None,
- **kwargs
- ):
- super(WorkspaceConnectionDto, self).__init__(**kwargs)
- self.name = name
- self.category = category
- self.target = target
- self.auth_type = auth_type
- self.value = value
+ self.value_format = value_format
class WorkspaceListResult(msrest.serialization.Model):
"""The result of a request to list machine learning workspaces.
- :param value: The list of machine learning workspaces. Since this list may be incomplete, the
+ :ivar value: The list of machine learning workspaces. Since this list may be incomplete, the
nextLink field should be used to request the next list of machine learning workspaces.
- :type value: list[~azure.mgmt.machinelearningservices.models.Workspace]
- :param next_link: The URI that can be used to request the next list of machine learning
+ :vartype value: list[~azure_machine_learning_workspaces.models.Workspace]
+ :ivar next_link: The URI that can be used to request the next list of machine learning
workspaces.
- :type next_link: str
+ :vartype next_link: str
"""
_attribute_map = {
@@ -3874,59 +6206,120 @@ def __init__(
next_link: Optional[str] = None,
**kwargs
):
+ """
+ :keyword value: The list of machine learning workspaces. Since this list may be incomplete, the
+ nextLink field should be used to request the next list of machine learning workspaces.
+ :paramtype value: list[~azure_machine_learning_workspaces.models.Workspace]
+ :keyword next_link: The URI that can be used to request the next list of machine learning
+ workspaces.
+ :paramtype next_link: str
+ """
super(WorkspaceListResult, self).__init__(**kwargs)
self.value = value
self.next_link = next_link
class WorkspaceSku(msrest.serialization.Model):
- """AML workspace sku information.
+ """Describes Workspace Sku details and features.
Variables are only populated by the server, and will be ignored when sending a request.
+ :ivar locations: The set of locations that the SKU is available. This will be supported and
+ registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.).
+ :vartype locations: list[str]
+ :ivar location_info: A list of locations and availability zones in those locations where the
+ SKU is available.
+ :vartype location_info: list[~azure_machine_learning_workspaces.models.ResourceSkuLocationInfo]
+ :ivar tier: Sku Tier like Basic or Enterprise.
+ :vartype tier: str
:ivar resource_type:
:vartype resource_type: str
- :ivar skus: The list of workspace sku settings.
- :vartype skus: list[~azure.mgmt.machinelearningservices.models.SkuSettings]
+ :ivar name:
+ :vartype name: str
+ :ivar capabilities: List of features/user capabilities associated with the sku.
+ :vartype capabilities: list[~azure_machine_learning_workspaces.models.SKUCapability]
+ :ivar restrictions: The restrictions because of which SKU cannot be used. This is empty if
+ there are no restrictions.
+ :vartype restrictions: list[~azure_machine_learning_workspaces.models.Restriction]
"""
_validation = {
+ 'locations': {'readonly': True},
+ 'location_info': {'readonly': True},
+ 'tier': {'readonly': True},
'resource_type': {'readonly': True},
- 'skus': {'readonly': True},
+ 'name': {'readonly': True},
+ 'capabilities': {'readonly': True},
}
_attribute_map = {
+ 'locations': {'key': 'locations', 'type': '[str]'},
+ 'location_info': {'key': 'locationInfo', 'type': '[ResourceSkuLocationInfo]'},
+ 'tier': {'key': 'tier', 'type': 'str'},
'resource_type': {'key': 'resourceType', 'type': 'str'},
- 'skus': {'key': 'skus', 'type': '[SkuSettings]'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'capabilities': {'key': 'capabilities', 'type': '[SKUCapability]'},
+ 'restrictions': {'key': 'restrictions', 'type': '[Restriction]'},
}
def __init__(
self,
+ *,
+ restrictions: Optional[List["Restriction"]] = None,
**kwargs
):
+ """
+ :keyword restrictions: The restrictions because of which SKU cannot be used. This is empty if
+ there are no restrictions.
+ :paramtype restrictions: list[~azure_machine_learning_workspaces.models.Restriction]
+ """
super(WorkspaceSku, self).__init__(**kwargs)
+ self.locations = None
+ self.location_info = None
+ self.tier = None
self.resource_type = None
- self.skus = None
+ self.name = None
+ self.capabilities = None
+ self.restrictions = restrictions
class WorkspaceUpdateParameters(msrest.serialization.Model):
"""The parameters for updating a machine learning workspace.
- :param tags: A set of tags. The resource tags for the machine learning workspace.
- :type tags: dict[str, str]
- :param sku: The sku of the workspace.
- :type sku: ~azure.mgmt.machinelearningservices.models.Sku
- :param description: The description of this workspace.
- :type description: str
- :param friendly_name: The friendly name for this workspace.
- :type friendly_name: str
+ :ivar tags: A set of tags. The resource tags for the machine learning workspace.
+ :vartype tags: dict[str, str]
+ :ivar sku: The sku of the workspace.
+ :vartype sku: ~azure_machine_learning_workspaces.models.Sku
+ :ivar identity: The identity of the resource.
+ :vartype identity: ~azure_machine_learning_workspaces.models.Identity
+ :ivar description: The description of this workspace.
+ :vartype description: str
+ :ivar friendly_name: The friendly name for this workspace.
+ :vartype friendly_name: str
+ :ivar image_build_compute: The compute name for image build.
+ :vartype image_build_compute: str
+ :ivar service_managed_resources_settings: The service managed resource settings.
+ :vartype service_managed_resources_settings:
+ ~azure_machine_learning_workspaces.models.ServiceManagedResourcesSettings
+ :ivar primary_user_assigned_identity: The user assigned identity resource id that represents
+ the workspace identity.
+ :vartype primary_user_assigned_identity: str
+ :ivar public_network_access: Whether requests from Public Network are allowed. Possible values
+ include: "Enabled", "Disabled".
+ :vartype public_network_access: str or
+ ~azure_machine_learning_workspaces.models.PublicNetworkAccess
"""
_attribute_map = {
'tags': {'key': 'tags', 'type': '{str}'},
'sku': {'key': 'sku', 'type': 'Sku'},
+ 'identity': {'key': 'identity', 'type': 'Identity'},
'description': {'key': 'properties.description', 'type': 'str'},
'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'},
+ 'image_build_compute': {'key': 'properties.imageBuildCompute', 'type': 'str'},
+ 'service_managed_resources_settings': {'key': 'properties.serviceManagedResourcesSettings', 'type': 'ServiceManagedResourcesSettings'},
+ 'primary_user_assigned_identity': {'key': 'properties.primaryUserAssignedIdentity', 'type': 'str'},
+ 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'},
}
def __init__(
@@ -3934,12 +6327,46 @@ def __init__(
*,
tags: Optional[Dict[str, str]] = None,
sku: Optional["Sku"] = None,
+ identity: Optional["Identity"] = None,
description: Optional[str] = None,
friendly_name: Optional[str] = None,
+ image_build_compute: Optional[str] = None,
+ service_managed_resources_settings: Optional["ServiceManagedResourcesSettings"] = None,
+ primary_user_assigned_identity: Optional[str] = None,
+ public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None,
**kwargs
):
+ """
+ :keyword tags: A set of tags. The resource tags for the machine learning workspace.
+ :paramtype tags: dict[str, str]
+ :keyword sku: The sku of the workspace.
+ :paramtype sku: ~azure_machine_learning_workspaces.models.Sku
+ :keyword identity: The identity of the resource.
+ :paramtype identity: ~azure_machine_learning_workspaces.models.Identity
+ :keyword description: The description of this workspace.
+ :paramtype description: str
+ :keyword friendly_name: The friendly name for this workspace.
+ :paramtype friendly_name: str
+ :keyword image_build_compute: The compute name for image build.
+ :paramtype image_build_compute: str
+ :keyword service_managed_resources_settings: The service managed resource settings.
+ :paramtype service_managed_resources_settings:
+ ~azure_machine_learning_workspaces.models.ServiceManagedResourcesSettings
+ :keyword primary_user_assigned_identity: The user assigned identity resource id that represents
+ the workspace identity.
+ :paramtype primary_user_assigned_identity: str
+ :keyword public_network_access: Whether requests from Public Network are allowed. Possible
+ values include: "Enabled", "Disabled".
+ :paramtype public_network_access: str or
+ ~azure_machine_learning_workspaces.models.PublicNetworkAccess
+ """
super(WorkspaceUpdateParameters, self).__init__(**kwargs)
self.tags = tags
self.sku = sku
+ self.identity = identity
self.description = description
self.friendly_name = friendly_name
+ self.image_build_compute = image_build_compute
+ self.service_managed_resources_settings = service_managed_resources_settings
+ self.primary_user_assigned_identity = primary_user_assigned_identity
+ self.public_network_access = public_network_access
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/__init__.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/__init__.py
index 516999b100d8..44c7bf6aeeb9 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/__init__.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/__init__.py
@@ -8,28 +8,26 @@
from ._operations import Operations
from ._workspaces_operations import WorkspacesOperations
-from ._workspace_features_operations import WorkspaceFeaturesOperations
-from ._notebooks_operations import NotebooksOperations
from ._usages_operations import UsagesOperations
from ._virtual_machine_sizes_operations import VirtualMachineSizesOperations
from ._quotas_operations import QuotasOperations
-from ._workspace_connections_operations import WorkspaceConnectionsOperations
-from ._machine_learning_compute_operations import MachineLearningComputeOperations
-from ._azure_machine_learning_workspaces_operations import AzureMachineLearningWorkspacesOperationsMixin
+from ._compute_operations import ComputeOperations
from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations
from ._private_link_resources_operations import PrivateLinkResourcesOperations
+from ._workspace_connections_operations import WorkspaceConnectionsOperations
+from ._workspace_features_operations import WorkspaceFeaturesOperations
+from ._workspace_skus_operations import WorkspaceSkusOperations
__all__ = [
'Operations',
'WorkspacesOperations',
- 'WorkspaceFeaturesOperations',
- 'NotebooksOperations',
'UsagesOperations',
'VirtualMachineSizesOperations',
'QuotasOperations',
- 'WorkspaceConnectionsOperations',
- 'MachineLearningComputeOperations',
- 'AzureMachineLearningWorkspacesOperationsMixin',
+ 'ComputeOperations',
'PrivateEndpointConnectionsOperations',
'PrivateLinkResourcesOperations',
+ 'WorkspaceConnectionsOperations',
+ 'WorkspaceFeaturesOperations',
+ 'WorkspaceSkusOperations',
]
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_azure_machine_learning_workspaces_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_azure_machine_learning_workspaces_operations.py
deleted file mode 100644
index b39b1e769d9a..000000000000
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_azure_machine_learning_workspaces_operations.py
+++ /dev/null
@@ -1,94 +0,0 @@
-# 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.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, Iterable, Optional, TypeVar
-
- T = TypeVar('T')
- ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
-
-class AzureMachineLearningWorkspacesOperationsMixin(object):
-
- def list_skus(
- self,
- **kwargs # type: Any
- ):
- # type: (...) -> Iterable["_models.SkuListResult"]
- """Lists all skus with associated features.
-
- :keyword callable cls: A custom type or function that will be passed the direct response
- :return: An iterator like instance of either SkuListResult or the result of cls(response)
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.SkuListResult]
- :raises: ~azure.core.exceptions.HttpResponseError
- """
- cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuListResult"]
- error_map = {
- 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
- }
- error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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_skus.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')
-
- 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('SkuListResult', 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]:
- error = self._deserialize(_models.MachineLearningServiceError, response)
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- return pipeline_response
-
- return ItemPaged(
- get_next, extract_data
- )
- list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces/skus'} # type: ignore
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_compute_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_compute_operations.py
new file mode 100644
index 000000000000..479501e95e6d
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_compute_operations.py
@@ -0,0 +1,1397 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+import functools
+from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union
+import warnings
+
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.paging import ItemPaged
+from azure.core.pipeline import PipelineResponse
+from azure.core.pipeline.transport import HttpResponse
+from azure.core.polling import LROPoller, NoPolling, PollingMethod
+from azure.core.rest import HttpRequest
+from azure.core.tracing.decorator import distributed_trace
+from azure.mgmt.core.exceptions import ARMErrorFormat
+from azure.mgmt.core.polling.arm_polling import ARMPolling
+from msrest import Serializer
+
+from .. import models as _models
+from .._vendor import _convert_request, _format_url_section
+T = TypeVar('T')
+JSONType = Any
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+
+_SERIALIZER = Serializer()
+_SERIALIZER.client_side_validation = False
+
+def build_list_request(
+ subscription_id: str,
+ resource_group_name: str,
+ workspace_name: str,
+ *,
+ skip: Optional[str] = None,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
+ "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+ if skip is not None:
+ query_parameters['$skip'] = _SERIALIZER.query("skip", skip, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="GET",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
+
+
+def build_get_request(
+ subscription_id: str,
+ resource_group_name: str,
+ workspace_name: str,
+ compute_name: str,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
+ "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'),
+ "computeName": _SERIALIZER.url("compute_name", compute_name, 'str'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="GET",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
+
+
+def build_create_or_update_request_initial(
+ subscription_id: str,
+ resource_group_name: str,
+ workspace_name: str,
+ compute_name: str,
+ *,
+ json: JSONType = None,
+ content: Any = None,
+ **kwargs: Any
+) -> HttpRequest:
+ content_type = kwargs.pop('content_type', None) # type: Optional[str]
+
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
+ "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'),
+ "computeName": _SERIALIZER.url("compute_name", compute_name, 'str'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ if content_type is not None:
+ header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="PUT",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ json=json,
+ content=content,
+ **kwargs
+ )
+
+
+def build_update_request_initial(
+ subscription_id: str,
+ resource_group_name: str,
+ workspace_name: str,
+ compute_name: str,
+ *,
+ json: JSONType = None,
+ content: Any = None,
+ **kwargs: Any
+) -> HttpRequest:
+ content_type = kwargs.pop('content_type', None) # type: Optional[str]
+
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
+ "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'),
+ "computeName": _SERIALIZER.url("compute_name", compute_name, 'str'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ if content_type is not None:
+ header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="PATCH",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ json=json,
+ content=content,
+ **kwargs
+ )
+
+
+def build_delete_request_initial(
+ subscription_id: str,
+ resource_group_name: str,
+ workspace_name: str,
+ compute_name: str,
+ *,
+ underlying_resource_action: Union[str, "_models.UnderlyingResourceAction"],
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
+ "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'),
+ "computeName": _SERIALIZER.url("compute_name", compute_name, 'str'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+ query_parameters['underlyingResourceAction'] = _SERIALIZER.query("underlying_resource_action", underlying_resource_action, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="DELETE",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
+
+
+def build_list_nodes_request(
+ subscription_id: str,
+ resource_group_name: str,
+ workspace_name: str,
+ compute_name: str,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listNodes')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
+ "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'),
+ "computeName": _SERIALIZER.url("compute_name", compute_name, 'str'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="POST",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
+
+
+def build_list_keys_request(
+ subscription_id: str,
+ resource_group_name: str,
+ workspace_name: str,
+ compute_name: str,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listKeys')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
+ "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'),
+ "computeName": _SERIALIZER.url("compute_name", compute_name, 'str'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="POST",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
+
+
+def build_start_request_initial(
+ subscription_id: str,
+ resource_group_name: str,
+ workspace_name: str,
+ compute_name: str,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/start')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
+ "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'),
+ "computeName": _SERIALIZER.url("compute_name", compute_name, 'str'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="POST",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
+
+
+def build_stop_request_initial(
+ subscription_id: str,
+ resource_group_name: str,
+ workspace_name: str,
+ compute_name: str,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/stop')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
+ "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'),
+ "computeName": _SERIALIZER.url("compute_name", compute_name, 'str'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="POST",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
+
+
+def build_restart_request_initial(
+ subscription_id: str,
+ resource_group_name: str,
+ workspace_name: str,
+ compute_name: str,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/restart')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
+ "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'),
+ "computeName": _SERIALIZER.url("compute_name", compute_name, 'str'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="POST",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
+
+class ComputeOperations(object):
+ """ComputeOperations operations.
+
+ You should not instantiate this class directly. Instead, you should create a Client instance that
+ instantiates it for you and attaches it as an attribute.
+
+ :ivar models: Alias to model classes used in this operation group.
+ :type models: ~azure_machine_learning_workspaces.models
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ """
+
+ models = _models
+
+ def __init__(self, client, config, serializer, deserializer):
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self._config = config
+
+ @distributed_trace
+ def list(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ skip: Optional[str] = None,
+ **kwargs: Any
+ ) -> Iterable["_models.PaginatedComputeResourcesList"]:
+ """Gets computes in specified workspace.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param workspace_name: Name of Azure Machine Learning workspace.
+ :type workspace_name: str
+ :param skip: Continuation token for pagination.
+ :type skip: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either PaginatedComputeResourcesList or the result of
+ cls(response)
+ :rtype:
+ ~azure.core.paging.ItemPaged[~azure_machine_learning_workspaces.models.PaginatedComputeResourcesList]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.PaginatedComputeResourcesList"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ def prepare_request(next_link=None):
+ if not next_link:
+
+ request = build_list_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ skip=skip,
+ template_url=self.list.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
+ else:
+
+ request = build_list_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ skip=skip,
+ template_url=next_link,
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
+ return request
+
+ def extract_data(pipeline_response):
+ deserialized = self._deserialize("PaginatedComputeResourcesList", pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem)
+ return deserialized.next_link or None, iter(list_of_elem)
+
+ def get_next(next_link=None):
+ request = prepare_request(next_link)
+
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+
+ return ItemPaged(
+ get_next, extract_data
+ )
+ list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes'} # type: ignore
+
+ @distributed_trace
+ def get(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ compute_name: str,
+ **kwargs: Any
+ ) -> "_models.ComputeResource":
+ """Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are
+ not returned - use 'keys' nested resource to get them.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param workspace_name: Name of Azure Machine Learning workspace.
+ :type workspace_name: str
+ :param compute_name: Name of the Azure Machine Learning compute.
+ :type compute_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: ComputeResource, or the result of cls(response)
+ :rtype: ~azure_machine_learning_workspaces.models.ComputeResource
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.ComputeResource"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+
+ request = build_get_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ compute_name=compute_name,
+ template_url=self.get.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('ComputeResource', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore
+
+
+ def _create_or_update_initial(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ compute_name: str,
+ parameters: "_models.ComputeResource",
+ **kwargs: Any
+ ) -> "_models.ComputeResource":
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.ComputeResource"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+ content_type = kwargs.pop('content_type', "application/json") # type: Optional[str]
+
+ _json = self._serialize.body(parameters, 'ComputeResource')
+
+ request = build_create_or_update_request_initial(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ compute_name=compute_name,
+ content_type=content_type,
+ json=_json,
+ template_url=self._create_or_update_initial.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 201]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 200:
+ deserialized = self._deserialize('ComputeResource', pipeline_response)
+
+ if response.status_code == 201:
+ response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation'))
+
+ deserialized = self._deserialize('ComputeResource', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers)
+
+ return deserialized
+
+ _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore
+
+
+ @distributed_trace
+ def begin_create_or_update(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ compute_name: str,
+ parameters: "_models.ComputeResource",
+ **kwargs: Any
+ ) -> LROPoller["_models.ComputeResource"]:
+ """Creates or updates compute. This call will overwrite a compute if it exists. This is a
+ nonrecoverable operation. If your intent is to create a new compute, do a GET first to verify
+ that it does not exist yet.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param workspace_name: Name of Azure Machine Learning workspace.
+ :type workspace_name: str
+ :param compute_name: Name of the Azure Machine Learning compute.
+ :type compute_name: str
+ :param parameters: Payload with Machine Learning compute definition.
+ :type parameters: ~azure_machine_learning_workspaces.models.ComputeResource
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
+ operation to not poll, or pass in your own initialized polling object for a personal polling
+ strategy.
+ :paramtype polling: bool or ~azure.core.polling.PollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of LROPoller that returns either ComputeResource or the result of
+ cls(response)
+ :rtype:
+ ~azure.core.polling.LROPoller[~azure_machine_learning_workspaces.models.ComputeResource]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ content_type = kwargs.pop('content_type', "application/json") # type: Optional[str]
+ polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod]
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.ComputeResource"]
+ lro_delay = kwargs.pop(
+ 'polling_interval',
+ self._config.polling_interval
+ )
+ cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
+ if cont_token is None:
+ raw_result = self._create_or_update_initial(
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ compute_name=compute_name,
+ parameters=parameters,
+ content_type=content_type,
+ cls=lambda x,y,z: x,
+ **kwargs
+ )
+ kwargs.pop('error_map', None)
+
+ def get_long_running_output(pipeline_response):
+ response = pipeline_response.http_response
+ deserialized = self._deserialize('ComputeResource', pipeline_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+ return deserialized
+
+
+ if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ if cont_token:
+ return LROPoller.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output
+ )
+ else:
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
+
+ begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore
+
+ def _update_initial(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ compute_name: str,
+ parameters: "_models.ClusterUpdateParameters",
+ **kwargs: Any
+ ) -> "_models.ComputeResource":
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.ComputeResource"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+ content_type = kwargs.pop('content_type', "application/json") # type: Optional[str]
+
+ _json = self._serialize.body(parameters, 'ClusterUpdateParameters')
+
+ request = build_update_request_initial(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ compute_name=compute_name,
+ content_type=content_type,
+ json=_json,
+ template_url=self._update_initial.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('ComputeResource', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+
+ _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore
+
+
+ @distributed_trace
+ def begin_update(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ compute_name: str,
+ parameters: "_models.ClusterUpdateParameters",
+ **kwargs: Any
+ ) -> LROPoller["_models.ComputeResource"]:
+ """Updates properties of a compute. This call will overwrite a compute if it exists. This is a
+ nonrecoverable operation.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param workspace_name: Name of Azure Machine Learning workspace.
+ :type workspace_name: str
+ :param compute_name: Name of the Azure Machine Learning compute.
+ :type compute_name: str
+ :param parameters: Additional parameters for cluster update.
+ :type parameters: ~azure_machine_learning_workspaces.models.ClusterUpdateParameters
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
+ operation to not poll, or pass in your own initialized polling object for a personal polling
+ strategy.
+ :paramtype polling: bool or ~azure.core.polling.PollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of LROPoller that returns either ComputeResource or the result of
+ cls(response)
+ :rtype:
+ ~azure.core.polling.LROPoller[~azure_machine_learning_workspaces.models.ComputeResource]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ content_type = kwargs.pop('content_type', "application/json") # type: Optional[str]
+ polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod]
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.ComputeResource"]
+ lro_delay = kwargs.pop(
+ 'polling_interval',
+ self._config.polling_interval
+ )
+ cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
+ if cont_token is None:
+ raw_result = self._update_initial(
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ compute_name=compute_name,
+ parameters=parameters,
+ content_type=content_type,
+ cls=lambda x,y,z: x,
+ **kwargs
+ )
+ kwargs.pop('error_map', None)
+
+ def get_long_running_output(pipeline_response):
+ response = pipeline_response.http_response
+ deserialized = self._deserialize('ComputeResource', pipeline_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+ return deserialized
+
+
+ if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ if cont_token:
+ return LROPoller.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output
+ )
+ else:
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
+
+ begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore
+
+ def _delete_initial(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ compute_name: str,
+ underlying_resource_action: Union[str, "_models.UnderlyingResourceAction"],
+ **kwargs: Any
+ ) -> None:
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+
+ request = build_delete_request_initial(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ compute_name=compute_name,
+ underlying_resource_action=underlying_resource_action,
+ template_url=self._delete_initial.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 202]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation'))
+ response_headers['Location']=self._deserialize('str', response.headers.get('Location'))
+
+
+ if cls:
+ return cls(pipeline_response, None, response_headers)
+
+ _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore
+
+
+ @distributed_trace
+ def begin_delete(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ compute_name: str,
+ underlying_resource_action: Union[str, "_models.UnderlyingResourceAction"],
+ **kwargs: Any
+ ) -> LROPoller[None]:
+ """Deletes specified Machine Learning compute.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param workspace_name: Name of Azure Machine Learning workspace.
+ :type workspace_name: str
+ :param compute_name: Name of the Azure Machine Learning compute.
+ :type compute_name: str
+ :param underlying_resource_action: Delete the underlying compute if 'Delete', or detach the
+ underlying compute from workspace if 'Detach'.
+ :type underlying_resource_action: str or
+ ~azure_machine_learning_workspaces.models.UnderlyingResourceAction
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
+ operation to not poll, or pass in your own initialized polling object for a personal polling
+ strategy.
+ :paramtype polling: bool or ~azure.core.polling.PollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of LROPoller that returns either None or the result of cls(response)
+ :rtype: ~azure.core.polling.LROPoller[None]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod]
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ lro_delay = kwargs.pop(
+ 'polling_interval',
+ self._config.polling_interval
+ )
+ cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
+ if cont_token is None:
+ raw_result = self._delete_initial(
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ compute_name=compute_name,
+ underlying_resource_action=underlying_resource_action,
+ cls=lambda x,y,z: x,
+ **kwargs
+ )
+ kwargs.pop('error_map', None)
+
+ def get_long_running_output(pipeline_response):
+ if cls:
+ return cls(pipeline_response, None, {})
+
+
+ if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ if cont_token:
+ return LROPoller.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output
+ )
+ else:
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
+
+ begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore
+
+ @distributed_trace
+ def list_nodes(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ compute_name: str,
+ **kwargs: Any
+ ) -> Iterable["_models.AmlComputeNodesInformation"]:
+ """Get the details (e.g IP address, port etc) of all the compute nodes in the compute.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param workspace_name: Name of Azure Machine Learning workspace.
+ :type workspace_name: str
+ :param compute_name: Name of the Azure Machine Learning compute.
+ :type compute_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either AmlComputeNodesInformation or the result of
+ cls(response)
+ :rtype:
+ ~azure.core.paging.ItemPaged[~azure_machine_learning_workspaces.models.AmlComputeNodesInformation]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.AmlComputeNodesInformation"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ def prepare_request(next_link=None):
+ if not next_link:
+
+ request = build_list_nodes_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ compute_name=compute_name,
+ template_url=self.list_nodes.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
+ else:
+
+ request = build_list_nodes_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ compute_name=compute_name,
+ template_url=next_link,
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
+ return request
+
+ def extract_data(pipeline_response):
+ deserialized = self._deserialize("AmlComputeNodesInformation", pipeline_response)
+ list_of_elem = deserialized.nodes
+ if cls:
+ list_of_elem = cls(list_of_elem)
+ return deserialized.next_link or None, iter(list_of_elem)
+
+ def get_next(next_link=None):
+ request = prepare_request(next_link)
+
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+
+ return ItemPaged(
+ get_next, extract_data
+ )
+ list_nodes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listNodes'} # type: ignore
+
+ @distributed_trace
+ def list_keys(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ compute_name: str,
+ **kwargs: Any
+ ) -> "_models.ComputeSecrets":
+ """Gets secrets related to Machine Learning compute (storage keys, service credentials, etc).
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param workspace_name: Name of Azure Machine Learning workspace.
+ :type workspace_name: str
+ :param compute_name: Name of the Azure Machine Learning compute.
+ :type compute_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: ComputeSecrets, or the result of cls(response)
+ :rtype: ~azure_machine_learning_workspaces.models.ComputeSecrets
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.ComputeSecrets"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+
+ request = build_list_keys_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ compute_name=compute_name,
+ template_url=self.list_keys.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('ComputeSecrets', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+
+ list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listKeys'} # type: ignore
+
+
+ def _start_initial(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ compute_name: str,
+ **kwargs: Any
+ ) -> None:
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+
+ request = build_start_request_initial(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ compute_name=compute_name,
+ template_url=self._start_initial.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [202]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ if cls:
+ return cls(pipeline_response, None, {})
+
+ _start_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/start'} # type: ignore
+
+
+ @distributed_trace
+ def begin_start(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ compute_name: str,
+ **kwargs: Any
+ ) -> LROPoller[None]:
+ """Posts a start action to a compute instance.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param workspace_name: Name of Azure Machine Learning workspace.
+ :type workspace_name: str
+ :param compute_name: Name of the Azure Machine Learning compute.
+ :type compute_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
+ operation to not poll, or pass in your own initialized polling object for a personal polling
+ strategy.
+ :paramtype polling: bool or ~azure.core.polling.PollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of LROPoller that returns either None or the result of cls(response)
+ :rtype: ~azure.core.polling.LROPoller[None]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod]
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ lro_delay = kwargs.pop(
+ 'polling_interval',
+ self._config.polling_interval
+ )
+ cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
+ if cont_token is None:
+ raw_result = self._start_initial(
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ compute_name=compute_name,
+ cls=lambda x,y,z: x,
+ **kwargs
+ )
+ kwargs.pop('error_map', None)
+
+ def get_long_running_output(pipeline_response):
+ if cls:
+ return cls(pipeline_response, None, {})
+
+
+ if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ if cont_token:
+ return LROPoller.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output
+ )
+ else:
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
+
+ begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/start'} # type: ignore
+
+ def _stop_initial(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ compute_name: str,
+ **kwargs: Any
+ ) -> None:
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+
+ request = build_stop_request_initial(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ compute_name=compute_name,
+ template_url=self._stop_initial.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [202]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ if cls:
+ return cls(pipeline_response, None, {})
+
+ _stop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/stop'} # type: ignore
+
+
+ @distributed_trace
+ def begin_stop(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ compute_name: str,
+ **kwargs: Any
+ ) -> LROPoller[None]:
+ """Posts a stop action to a compute instance.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param workspace_name: Name of Azure Machine Learning workspace.
+ :type workspace_name: str
+ :param compute_name: Name of the Azure Machine Learning compute.
+ :type compute_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
+ operation to not poll, or pass in your own initialized polling object for a personal polling
+ strategy.
+ :paramtype polling: bool or ~azure.core.polling.PollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of LROPoller that returns either None or the result of cls(response)
+ :rtype: ~azure.core.polling.LROPoller[None]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod]
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ lro_delay = kwargs.pop(
+ 'polling_interval',
+ self._config.polling_interval
+ )
+ cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
+ if cont_token is None:
+ raw_result = self._stop_initial(
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ compute_name=compute_name,
+ cls=lambda x,y,z: x,
+ **kwargs
+ )
+ kwargs.pop('error_map', None)
+
+ def get_long_running_output(pipeline_response):
+ if cls:
+ return cls(pipeline_response, None, {})
+
+
+ if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ if cont_token:
+ return LROPoller.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output
+ )
+ else:
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
+
+ begin_stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/stop'} # type: ignore
+
+ def _restart_initial(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ compute_name: str,
+ **kwargs: Any
+ ) -> None:
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+
+ request = build_restart_request_initial(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ compute_name=compute_name,
+ template_url=self._restart_initial.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [202]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ if cls:
+ return cls(pipeline_response, None, {})
+
+ _restart_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/restart'} # type: ignore
+
+
+ @distributed_trace
+ def begin_restart(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ compute_name: str,
+ **kwargs: Any
+ ) -> LROPoller[None]:
+ """Posts a restart action to a compute instance.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param workspace_name: Name of Azure Machine Learning workspace.
+ :type workspace_name: str
+ :param compute_name: Name of the Azure Machine Learning compute.
+ :type compute_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
+ operation to not poll, or pass in your own initialized polling object for a personal polling
+ strategy.
+ :paramtype polling: bool or ~azure.core.polling.PollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of LROPoller that returns either None or the result of cls(response)
+ :rtype: ~azure.core.polling.LROPoller[None]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod]
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ lro_delay = kwargs.pop(
+ 'polling_interval',
+ self._config.polling_interval
+ )
+ cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
+ if cont_token is None:
+ raw_result = self._restart_initial(
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ compute_name=compute_name,
+ cls=lambda x,y,z: x,
+ **kwargs
+ )
+ kwargs.pop('error_map', None)
+
+ def get_long_running_output(pipeline_response):
+ if cls:
+ return cls(pipeline_response, None, {})
+
+
+ if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ if cont_token:
+ return LROPoller.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output
+ )
+ else:
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
+
+ begin_restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/restart'} # type: ignore
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_machine_learning_compute_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_machine_learning_compute_operations.py
deleted file mode 100644
index 10261d10df59..000000000000
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_machine_learning_compute_operations.py
+++ /dev/null
@@ -1,912 +0,0 @@
-# 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 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.machinelearningservices.models
- :param client: Client for service requests.
- :param config: Configuration of service client.
- :param serializer: An object model serializer.
- :param deserializer: An object model deserializer.
- """
-
- models = _models
-
- def __init__(self, client, config, serializer, deserializer):
- self._client = client
- self._serialize = serializer
- self._deserialize = deserializer
- self._config = config
-
- def list_by_workspace(
- self,
- resource_group_name, # type: str
- workspace_name, # type: str
- skiptoken=None, # type: Optional[str]
- **kwargs # type: Any
- ):
- # type: (...) -> Iterable["_models.PaginatedComputeResourcesList"]
- """Gets computes in specified workspace.
-
- :param resource_group_name: Name of the resource group in which workspace is located.
- :type resource_group_name: str
- :param workspace_name: Name of Azure Machine Learning workspace.
- :type workspace_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 PaginatedComputeResourcesList or the result of cls(response)
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.PaginatedComputeResourcesList]
- :raises: ~azure.core.exceptions.HttpResponseError
- """
- cls = kwargs.pop('cls', None) # type: ClsType["_models.PaginatedComputeResourcesList"]
- error_map = {
- 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
- }
- error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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_workspace.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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, '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('PaginatedComputeResourcesList', pipeline_response)
- list_of_elem = deserialized.value
- if cls:
- list_of_elem = cls(list_of_elem)
- return deserialized.next_link or None, iter(list_of_elem)
-
- def get_next(next_link=None):
- request = prepare_request(next_link)
-
- pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
- response = pipeline_response.http_response
-
- if response.status_code not in [200]:
- error = self._deserialize(_models.MachineLearningServiceError, response)
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- return pipeline_response
-
- return ItemPaged(
- get_next, extract_data
- )
- list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes'} # type: ignore
-
- def get(
- self,
- resource_group_name, # type: str
- workspace_name, # type: str
- compute_name, # type: str
- **kwargs # type: Any
- ):
- # type: (...) -> "_models.ComputeResource"
- """Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are
- not returned - use 'keys' nested resource to get them.
-
- :param resource_group_name: Name of the resource group in which workspace is located.
- :type resource_group_name: str
- :param workspace_name: Name of Azure Machine Learning workspace.
- :type workspace_name: str
- :param compute_name: Name of the Azure Machine Learning compute.
- :type compute_name: str
- :keyword callable cls: A custom type or function that will be passed the direct response
- :return: ComputeResource, or the result of cls(response)
- :rtype: ~azure.mgmt.machinelearningservices.models.ComputeResource
- :raises: ~azure.core.exceptions.HttpResponseError
- """
- cls = kwargs.pop('cls', None) # type: ClsType["_models.ComputeResource"]
- error_map = {
- 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
- }
- error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'computeName': self._serialize.url("compute_name", compute_name, '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')
-
- # 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(_models.MachineLearningServiceError, response)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- deserialized = self._deserialize('ComputeResource', pipeline_response)
-
- if cls:
- return cls(pipeline_response, deserialized, {})
-
- return deserialized
- get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore
-
- def _create_or_update_initial(
- self,
- resource_group_name, # type: str
- workspace_name, # type: str
- compute_name, # type: str
- parameters, # type: "_models.ComputeResource"
- **kwargs # type: Any
- ):
- # type: (...) -> "_models.ComputeResource"
- cls = kwargs.pop('cls', None) # type: ClsType["_models.ComputeResource"]
- error_map = {
- 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
- }
- error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'computeName': self._serialize.url("compute_name", compute_name, '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')
-
- # 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, 'ComputeResource')
- 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(_models.MachineLearningServiceError, response)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 200:
- deserialized = self._deserialize('ComputeResource', pipeline_response)
-
- if response.status_code == 201:
- response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation'))
- deserialized = self._deserialize('ComputeResource', pipeline_response)
-
- if cls:
- return cls(pipeline_response, deserialized, response_headers)
-
- return deserialized
- _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore
-
- def begin_create_or_update(
- self,
- resource_group_name, # type: str
- workspace_name, # type: str
- compute_name, # type: str
- parameters, # type: "_models.ComputeResource"
- **kwargs # type: Any
- ):
- # type: (...) -> LROPoller["_models.ComputeResource"]
- """Creates or updates compute. This call will overwrite a compute if it exists. This is a
- nonrecoverable operation. If your intent is to create a new compute, do a GET first to verify
- that it does not exist yet.
-
- :param resource_group_name: Name of the resource group in which workspace is located.
- :type resource_group_name: str
- :param workspace_name: Name of Azure Machine Learning workspace.
- :type workspace_name: str
- :param compute_name: Name of the Azure Machine Learning compute.
- :type compute_name: str
- :param parameters: Payload with Machine Learning compute definition.
- :type parameters: ~azure.mgmt.machinelearningservices.models.ComputeResource
- :keyword callable cls: A custom type or function that will be passed the direct response
- :keyword str continuation_token: A continuation token to restart a poller from a saved state.
- :keyword polling: True for ARMPolling, False for no polling, or a
- polling object for personal polling strategy
- :paramtype polling: bool or ~azure.core.polling.PollingMethod
- :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
- :return: An instance of LROPoller that returns either ComputeResource or the result of cls(response)
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.machinelearningservices.models.ComputeResource]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod]
- cls = kwargs.pop('cls', None) # type: ClsType["_models.ComputeResource"]
- lro_delay = kwargs.pop(
- 'polling_interval',
- self._config.polling_interval
- )
- cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
- if cont_token is None:
- raw_result = self._create_or_update_initial(
- resource_group_name=resource_group_name,
- workspace_name=workspace_name,
- compute_name=compute_name,
- parameters=parameters,
- 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('ComputeResource', 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'computeName': self._serialize.url("compute_name", compute_name, 'str'),
- }
-
- 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.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore
-
- def _update_initial(
- self,
- resource_group_name, # type: str
- workspace_name, # type: str
- compute_name, # type: str
- parameters, # type: "_models.ClusterUpdateParameters"
- **kwargs # type: Any
- ):
- # type: (...) -> "_models.ComputeResource"
- cls = kwargs.pop('cls', None) # type: ClsType["_models.ComputeResource"]
- error_map = {
- 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
- }
- error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- content_type = kwargs.pop("content_type", "application/json")
- accept = "application/json"
-
- # Construct URL
- url = self._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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'computeName': self._serialize.url("compute_name", compute_name, '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')
-
- # 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, 'ClusterUpdateParameters')
- 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(_models.MachineLearningServiceError, response)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- deserialized = self._deserialize('ComputeResource', pipeline_response)
-
- if cls:
- return cls(pipeline_response, deserialized, {})
-
- return deserialized
- _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore
-
- def begin_update(
- self,
- resource_group_name, # type: str
- workspace_name, # type: str
- compute_name, # type: str
- parameters, # type: "_models.ClusterUpdateParameters"
- **kwargs # type: Any
- ):
- # type: (...) -> LROPoller["_models.ComputeResource"]
- """Updates properties of a compute. This call will overwrite a compute if it exists. This is a
- nonrecoverable operation.
-
- :param resource_group_name: Name of the resource group in which workspace is located.
- :type resource_group_name: str
- :param workspace_name: Name of Azure Machine Learning workspace.
- :type workspace_name: str
- :param compute_name: Name of the Azure Machine Learning compute.
- :type compute_name: str
- :param parameters: Additional parameters for cluster update.
- :type parameters: ~azure.mgmt.machinelearningservices.models.ClusterUpdateParameters
- :keyword callable cls: A custom type or function that will be passed the direct response
- :keyword str continuation_token: A continuation token to restart a poller from a saved state.
- :keyword polling: True for ARMPolling, False for no polling, or a
- polling object for personal polling strategy
- :paramtype polling: bool or ~azure.core.polling.PollingMethod
- :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
- :return: An instance of LROPoller that returns either ComputeResource or the result of cls(response)
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.machinelearningservices.models.ComputeResource]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod]
- cls = kwargs.pop('cls', None) # type: ClsType["_models.ComputeResource"]
- lro_delay = kwargs.pop(
- 'polling_interval',
- self._config.polling_interval
- )
- cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
- if cont_token is None:
- raw_result = self._update_initial(
- resource_group_name=resource_group_name,
- workspace_name=workspace_name,
- compute_name=compute_name,
- parameters=parameters,
- 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('ComputeResource', 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'computeName': self._serialize.url("compute_name", compute_name, 'str'),
- }
-
- 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.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore
-
- def _delete_initial(
- self,
- resource_group_name, # type: str
- workspace_name, # type: str
- compute_name, # type: str
- underlying_resource_action, # type: Union[str, "_models.UnderlyingResourceAction"]
- **kwargs # type: Any
- ):
- # type: (...) -> None
- cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {
- 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
- }
- error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'computeName': self._serialize.url("compute_name", compute_name, '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')
- query_parameters['underlyingResourceAction'] = self._serialize.query("underlying_resource_action", underlying_resource_action, 'str')
-
- # 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 [200, 202]:
- map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = self._deserialize(_models.MachineLearningServiceError, response)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- response_headers = {}
- if response.status_code == 202:
- response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation'))
- response_headers['Location']=self._deserialize('str', response.headers.get('Location'))
-
- if cls:
- return cls(pipeline_response, None, response_headers)
-
- _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore
-
- def begin_delete(
- self,
- resource_group_name, # type: str
- workspace_name, # type: str
- compute_name, # type: str
- underlying_resource_action, # type: Union[str, "_models.UnderlyingResourceAction"]
- **kwargs # type: Any
- ):
- # type: (...) -> LROPoller[None]
- """Deletes specified Machine Learning compute.
-
- :param resource_group_name: Name of the resource group in which workspace is located.
- :type resource_group_name: str
- :param workspace_name: Name of Azure Machine Learning workspace.
- :type workspace_name: str
- :param compute_name: Name of the Azure Machine Learning compute.
- :type compute_name: str
- :param underlying_resource_action: Delete the underlying compute if 'Delete', or detach the
- underlying compute from workspace if 'Detach'.
- :type underlying_resource_action: str or ~azure.mgmt.machinelearningservices.models.UnderlyingResourceAction
- :keyword callable cls: A custom type or function that will be passed the direct response
- :keyword str continuation_token: A continuation token to restart a poller from a saved state.
- :keyword polling: True for ARMPolling, False for no polling, or a
- polling object for 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,
- workspace_name=workspace_name,
- compute_name=compute_name,
- underlying_resource_action=underlying_resource_action,
- cls=lambda x,y,z: x,
- **kwargs
- )
-
- kwargs.pop('error_map', None)
- 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'computeName': self._serialize.url("compute_name", compute_name, 'str'),
- }
-
- 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.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} # type: ignore
-
- def list_nodes(
- self,
- resource_group_name, # type: str
- workspace_name, # type: str
- compute_name, # type: str
- **kwargs # type: Any
- ):
- # type: (...) -> "_models.AmlComputeNodesInformation"
- """Get the details (e.g IP address, port etc) of all the compute nodes in the compute.
-
- :param resource_group_name: Name of the resource group in which workspace is located.
- :type resource_group_name: str
- :param workspace_name: Name of Azure Machine Learning workspace.
- :type workspace_name: str
- :param compute_name: Name of the Azure Machine Learning compute.
- :type compute_name: str
- :keyword callable cls: A custom type or function that will be passed the direct response
- :return: AmlComputeNodesInformation, or the result of cls(response)
- :rtype: ~azure.mgmt.machinelearningservices.models.AmlComputeNodesInformation
- :raises: ~azure.core.exceptions.HttpResponseError
- """
- cls = kwargs.pop('cls', None) # type: ClsType["_models.AmlComputeNodesInformation"]
- error_map = {
- 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
- }
- error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- accept = "application/json"
-
- # Construct URL
- url = self.list_nodes.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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'computeName': self._serialize.url("compute_name", compute_name, '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')
-
- # 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)
- error = self._deserialize(_models.MachineLearningServiceError, response)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- deserialized = self._deserialize('AmlComputeNodesInformation', pipeline_response)
-
- if cls:
- return cls(pipeline_response, deserialized, {})
-
- return deserialized
- list_nodes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listNodes'} # type: ignore
-
- def list_keys(
- self,
- resource_group_name, # type: str
- workspace_name, # type: str
- compute_name, # type: str
- **kwargs # type: Any
- ):
- # type: (...) -> "_models.ComputeSecrets"
- """Gets secrets related to Machine Learning compute (storage keys, service credentials, etc).
-
- :param resource_group_name: Name of the resource group in which workspace is located.
- :type resource_group_name: str
- :param workspace_name: Name of Azure Machine Learning workspace.
- :type workspace_name: str
- :param compute_name: Name of the Azure Machine Learning compute.
- :type compute_name: str
- :keyword callable cls: A custom type or function that will be passed the direct response
- :return: ComputeSecrets, or the result of cls(response)
- :rtype: ~azure.mgmt.machinelearningservices.models.ComputeSecrets
- :raises: ~azure.core.exceptions.HttpResponseError
- """
- cls = kwargs.pop('cls', None) # type: ClsType["_models.ComputeSecrets"]
- error_map = {
- 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
- }
- error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'computeName': self._serialize.url("compute_name", compute_name, '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')
-
- # 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)
- error = self._deserialize(_models.MachineLearningServiceError, response)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- deserialized = self._deserialize('ComputeSecrets', pipeline_response)
-
- if cls:
- return cls(pipeline_response, deserialized, {})
-
- return deserialized
- list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listKeys'} # type: ignore
-
- def start(
- self,
- resource_group_name, # type: str
- workspace_name, # type: str
- compute_name, # type: str
- **kwargs # type: Any
- ):
- # type: (...) -> None
- """Posts a start action to a compute instance.
-
- :param resource_group_name: Name of the resource group in which workspace is located.
- :type resource_group_name: str
- :param workspace_name: Name of Azure Machine Learning workspace.
- :type workspace_name: str
- :param compute_name: Name of the Azure Machine Learning compute.
- :type compute_name: str
- :keyword callable cls: A custom type or function that will be passed the direct response
- :return: None, or the result of cls(response)
- :rtype: None
- :raises: ~azure.core.exceptions.HttpResponseError
- """
- cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {
- 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
- }
- error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- accept = "application/json"
-
- # Construct URL
- url = self.start.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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'computeName': self._serialize.url("compute_name", compute_name, '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')
-
- # 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)
- error = self._deserialize(_models.MachineLearningServiceError, response)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if cls:
- return cls(pipeline_response, None, {})
-
- start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/start'} # type: ignore
-
- def stop(
- self,
- resource_group_name, # type: str
- workspace_name, # type: str
- compute_name, # type: str
- **kwargs # type: Any
- ):
- # type: (...) -> None
- """Posts a stop action to a compute instance.
-
- :param resource_group_name: Name of the resource group in which workspace is located.
- :type resource_group_name: str
- :param workspace_name: Name of Azure Machine Learning workspace.
- :type workspace_name: str
- :param compute_name: Name of the Azure Machine Learning compute.
- :type compute_name: str
- :keyword callable cls: A custom type or function that will be passed the direct response
- :return: None, or the result of cls(response)
- :rtype: None
- :raises: ~azure.core.exceptions.HttpResponseError
- """
- cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {
- 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
- }
- error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- accept = "application/json"
-
- # Construct URL
- url = self.stop.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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'computeName': self._serialize.url("compute_name", compute_name, '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')
-
- # 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)
- error = self._deserialize(_models.MachineLearningServiceError, response)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if cls:
- return cls(pipeline_response, None, {})
-
- stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/stop'} # type: ignore
-
- def restart(
- self,
- resource_group_name, # type: str
- workspace_name, # type: str
- compute_name, # type: str
- **kwargs # type: Any
- ):
- # type: (...) -> None
- """Posts a restart action to a compute instance.
-
- :param resource_group_name: Name of the resource group in which workspace is located.
- :type resource_group_name: str
- :param workspace_name: Name of Azure Machine Learning workspace.
- :type workspace_name: str
- :param compute_name: Name of the Azure Machine Learning compute.
- :type compute_name: str
- :keyword callable cls: A custom type or function that will be passed the direct response
- :return: None, or the result of cls(response)
- :rtype: None
- :raises: ~azure.core.exceptions.HttpResponseError
- """
- cls = kwargs.pop('cls', None) # type: ClsType[None]
- error_map = {
- 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
- }
- error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- accept = "application/json"
-
- # Construct URL
- url = self.restart.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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'computeName': self._serialize.url("compute_name", compute_name, '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')
-
- # 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)
- error = self._deserialize(_models.MachineLearningServiceError, response)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- if cls:
- return cls(pipeline_response, None, {})
-
- restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/restart'} # type: ignore
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_notebooks_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_notebooks_operations.py
deleted file mode 100644
index 35f06ab915b0..000000000000
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_notebooks_operations.py
+++ /dev/null
@@ -1,166 +0,0 @@
-# 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.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, Optional, TypeVar, Union
-
- T = TypeVar('T')
- ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
-
-class NotebooksOperations(object):
- """NotebooksOperations operations.
-
- You should not instantiate this class directly. Instead, you should create a Client instance that
- instantiates it for you and attaches it as an attribute.
-
- :ivar models: Alias to model classes used in this operation group.
- :type models: ~azure.mgmt.machinelearningservices.models
- :param client: Client for service requests.
- :param config: Configuration of service client.
- :param serializer: An object model serializer.
- :param deserializer: An object model deserializer.
- """
-
- models = _models
-
- def __init__(self, client, config, serializer, deserializer):
- self._client = client
- self._serialize = serializer
- self._deserialize = deserializer
- self._config = config
-
- def _prepare_initial(
- self,
- resource_group_name, # type: str
- workspace_name, # type: str
- **kwargs # type: Any
- ):
- # type: (...) -> Optional["_models.NotebookResourceInfo"]
- cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.NotebookResourceInfo"]]
- error_map = {
- 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
- }
- error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- accept = "application/json"
-
- # Construct URL
- url = self._prepare_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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, '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')
-
- # 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)
- error = self._deserialize(_models.MachineLearningServiceError, response)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- deserialized = None
- if response.status_code == 200:
- deserialized = self._deserialize('NotebookResourceInfo', pipeline_response)
-
- if cls:
- return cls(pipeline_response, deserialized, {})
-
- return deserialized
- _prepare_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook'} # type: ignore
-
- def begin_prepare(
- self,
- resource_group_name, # type: str
- workspace_name, # type: str
- **kwargs # type: Any
- ):
- # type: (...) -> LROPoller["_models.NotebookResourceInfo"]
- """prepare.
-
- :param resource_group_name: Name of the resource group in which workspace is located.
- :type resource_group_name: str
- :param workspace_name: Name of Azure Machine Learning workspace.
- :type workspace_name: str
- :keyword callable cls: A custom type or function that will be passed the direct response
- :keyword str continuation_token: A continuation token to restart a poller from a saved state.
- :keyword polling: True for ARMPolling, False for no polling, or a
- polling object for personal polling strategy
- :paramtype polling: bool or ~azure.core.polling.PollingMethod
- :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
- :return: An instance of LROPoller that returns either NotebookResourceInfo or the result of cls(response)
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.machinelearningservices.models.NotebookResourceInfo]
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod]
- cls = kwargs.pop('cls', None) # type: ClsType["_models.NotebookResourceInfo"]
- lro_delay = kwargs.pop(
- 'polling_interval',
- self._config.polling_interval
- )
- cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
- if cont_token is None:
- raw_result = self._prepare_initial(
- resource_group_name=resource_group_name,
- workspace_name=workspace_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('NotebookResourceInfo', 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- }
-
- if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, 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_prepare.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook'} # type: ignore
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_operations.py
index ee7327b7cc20..8a287073de71 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_operations.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_operations.py
@@ -5,23 +5,50 @@
# 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 functools
+from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar
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.pipeline.transport import HttpResponse
+from azure.core.rest import HttpRequest
+from azure.core.tracing.decorator import distributed_trace
from azure.mgmt.core.exceptions import ARMErrorFormat
+from msrest import Serializer
from .. import models as _models
-
-if TYPE_CHECKING:
- # pylint: disable=unused-import,ungrouped-imports
- from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar
-
- T = TypeVar('T')
- ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+from .._vendor import _convert_request
+T = TypeVar('T')
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+
+_SERIALIZER = Serializer()
+_SERIALIZER.client_side_validation = False
+
+def build_list_request(
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/providers/Microsoft.MachineLearningServices/operations')
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="GET",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
class Operations(object):
"""Operations operations.
@@ -30,7 +57,7 @@ class Operations(object):
instantiates it for you and attaches it as an attribute.
:ivar models: Alias to model classes used in this operation group.
- :type models: ~azure.mgmt.machinelearningservices.models
+ :type models: ~azure_machine_learning_workspaces.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
@@ -45,16 +72,17 @@ def __init__(self, client, config, serializer, deserializer):
self._deserialize = deserializer
self._config = config
+ @distributed_trace
def list(
self,
- **kwargs # type: Any
- ):
- # type: (...) -> Iterable["_models.OperationListResult"]
+ **kwargs: Any
+ ) -> Iterable["_models.OperationListResult"]:
"""Lists all of the available Azure Machine Learning Workspaces REST API operations.
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either OperationListResult or the result of cls(response)
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.OperationListResult]
+ :rtype:
+ ~azure.core.paging.ItemPaged[~azure_machine_learning_workspaces.models.OperationListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"]
@@ -62,30 +90,27 @@ def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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.metadata['url'] # type: ignore
- # Construct parameters
- query_parameters = {} # type: Dict[str, Any]
- query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
+
+ request = build_list_request(
+ template_url=self.list.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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)
+
+ request = build_list_request(
+ template_url=next_link,
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
return request
def extract_data(pipeline_response):
- deserialized = self._deserialize('OperationListResult', pipeline_response)
+ deserialized = self._deserialize("OperationListResult", pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
@@ -98,12 +123,13 @@ def get_next(next_link=None):
response = pipeline_response.http_response
if response.status_code not in [200]:
- error = self._deserialize(_models.MachineLearningServiceError, response)
map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
return pipeline_response
+
return ItemPaged(
get_next, extract_data
)
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_private_endpoint_connections_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_private_endpoint_connections_operations.py
index 33fa5932b552..cdf47a1a2f7a 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_private_endpoint_connections_operations.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_private_endpoint_connections_operations.py
@@ -5,24 +5,181 @@
# 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 functools
+from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar
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.core.pipeline.transport import HttpResponse
+from azure.core.rest import HttpRequest
+from azure.core.tracing.decorator import distributed_trace
from azure.mgmt.core.exceptions import ARMErrorFormat
-from azure.mgmt.core.polling.arm_polling import ARMPolling
+from msrest import Serializer
from .. import models as _models
-
-if TYPE_CHECKING:
- # pylint: disable=unused-import,ungrouped-imports
- from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union
-
- T = TypeVar('T')
- ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+from .._vendor import _convert_request, _format_url_section
+T = TypeVar('T')
+JSONType = Any
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+
+_SERIALIZER = Serializer()
+_SERIALIZER.client_side_validation = False
+
+def build_list_request(
+ resource_group_name: str,
+ workspace_name: str,
+ subscription_id: str,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections')
+ path_format_arguments = {
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
+ "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'),
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="GET",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
+
+
+def build_get_request(
+ subscription_id: str,
+ resource_group_name: str,
+ workspace_name: str,
+ private_endpoint_connection_name: str,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
+ "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'),
+ "privateEndpointConnectionName": _SERIALIZER.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="GET",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
+
+
+def build_create_or_update_request(
+ subscription_id: str,
+ resource_group_name: str,
+ workspace_name: str,
+ private_endpoint_connection_name: str,
+ *,
+ json: JSONType = None,
+ content: Any = None,
+ **kwargs: Any
+) -> HttpRequest:
+ content_type = kwargs.pop('content_type', None) # type: Optional[str]
+
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
+ "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'),
+ "privateEndpointConnectionName": _SERIALIZER.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ if content_type is not None:
+ header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="PUT",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ json=json,
+ content=content,
+ **kwargs
+ )
+
+
+def build_delete_request(
+ subscription_id: str,
+ resource_group_name: str,
+ workspace_name: str,
+ private_endpoint_connection_name: str,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
+ "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'),
+ "privateEndpointConnectionName": _SERIALIZER.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="DELETE",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
class PrivateEndpointConnectionsOperations(object):
"""PrivateEndpointConnectionsOperations operations.
@@ -31,7 +188,7 @@ class PrivateEndpointConnectionsOperations(object):
instantiates it for you and attaches it as an attribute.
:ivar models: Alias to model classes used in this operation group.
- :type models: ~azure.mgmt.machinelearningservices.models
+ :type models: ~azure_machine_learning_workspaces.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
@@ -46,17 +203,93 @@ def __init__(self, client, config, serializer, deserializer):
self._deserialize = deserializer
self._config = config
+ @distributed_trace
+ def list(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs: Any
+ ) -> Iterable["_models.PrivateEndpointConnectionListResult"]:
+ """List all the private endpoint connections associated with the workspace.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param workspace_name: Name of Azure Machine Learning workspace.
+ :type workspace_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result
+ of cls(response)
+ :rtype:
+ ~azure.core.paging.ItemPaged[~azure_machine_learning_workspaces.models.PrivateEndpointConnectionListResult]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ def prepare_request(next_link=None):
+ if not next_link:
+
+ request = build_list_request(
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ subscription_id=self._config.subscription_id,
+ template_url=self.list.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
+ else:
+
+ request = build_list_request(
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ subscription_id=self._config.subscription_id,
+ template_url=next_link,
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
+ return request
+
+ def extract_data(pipeline_response):
+ deserialized = self._deserialize("PrivateEndpointConnectionListResult", pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem)
+ return None, iter(list_of_elem)
+
+ def get_next(next_link=None):
+ request = prepare_request(next_link)
+
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+
+ return ItemPaged(
+ get_next, extract_data
+ )
+ list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections'} # type: ignore
+
+ @distributed_trace
def get(
self,
- resource_group_name, # type: str
- workspace_name, # type: str
- private_endpoint_connection_name, # type: str
- **kwargs # type: Any
- ):
- # type: (...) -> "_models.PrivateEndpointConnection"
+ resource_group_name: str,
+ workspace_name: str,
+ private_endpoint_connection_name: str,
+ **kwargs: Any
+ ) -> "_models.PrivateEndpointConnection":
"""Gets the specified private endpoint connection associated with the workspace.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
@@ -65,7 +298,7 @@ def get(
:type private_endpoint_connection_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: PrivateEndpointConnection, or the result of cls(response)
- :rtype: ~azure.mgmt.machinelearningservices.models.PrivateEndpointConnection
+ :rtype: ~azure_machine_learning_workspaces.models.PrivateEndpointConnection
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"]
@@ -73,34 +306,24 @@ def get(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, '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')
-
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = build_get_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ private_endpoint_connection_name=private_endpoint_connection_name,
+ template_url=self.get.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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(_models.MachineLearningServiceError, response)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response)
@@ -109,20 +332,22 @@ def get(
return cls(pipeline_response, deserialized, {})
return deserialized
+
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore
- def put(
+
+ @distributed_trace
+ def create_or_update(
self,
- resource_group_name, # type: str
- workspace_name, # type: str
- private_endpoint_connection_name, # type: str
- properties, # type: "_models.PrivateEndpointConnection"
- **kwargs # type: Any
- ):
- # type: (...) -> "_models.PrivateEndpointConnection"
+ resource_group_name: str,
+ workspace_name: str,
+ private_endpoint_connection_name: str,
+ properties: "_models.PrivateEndpointConnection",
+ **kwargs: Any
+ ) -> "_models.PrivateEndpointConnection":
"""Update the state of specified private endpoint connection associated with the workspace.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
@@ -130,10 +355,10 @@ def put(
with the workspace.
:type private_endpoint_connection_name: str
:param properties: The private endpoint connection properties.
- :type properties: ~azure.mgmt.machinelearningservices.models.PrivateEndpointConnection
+ :type properties: ~azure_machine_learning_workspaces.models.PrivateEndpointConnection
:keyword callable cls: A custom type or function that will be passed the direct response
:return: PrivateEndpointConnection, or the result of cls(response)
- :rtype: ~azure.mgmt.machinelearningservices.models.PrivateEndpointConnection
+ :rtype: ~azure_machine_learning_workspaces.models.PrivateEndpointConnection
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"]
@@ -141,39 +366,29 @@ def put(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- content_type = kwargs.pop("content_type", "application/json")
- accept = "application/json"
-
- # Construct URL
- url = self.put.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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, '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')
+ content_type = kwargs.pop('content_type', "application/json") # type: Optional[str]
+
+ _json = self._serialize.body(properties, 'PrivateEndpointConnection')
- # 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')
+ request = build_create_or_update_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ private_endpoint_connection_name=private_endpoint_connection_name,
+ content_type=content_type,
+ json=_json,
+ template_url=self.create_or_update.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- body_content_kwargs = {} # type: Dict[str, Any]
- body_content = self._serialize.body(properties, 'PrivateEndpointConnection')
- 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]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = self._deserialize(_models.MachineLearningServiceError, response)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response)
@@ -182,123 +397,59 @@ def put(
return cls(pipeline_response, deserialized, {})
return deserialized
- put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore
- def _delete_initial(
+ create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore
+
+
+ @distributed_trace
+ def delete(
self,
- resource_group_name, # type: str
- workspace_name, # type: str
- private_endpoint_connection_name, # type: str
- **kwargs # type: Any
- ):
- # type: (...) -> None
+ resource_group_name: str,
+ workspace_name: str,
+ private_endpoint_connection_name: str,
+ **kwargs: Any
+ ) -> None:
+ """Deletes the specified private endpoint connection associated with the workspace.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param workspace_name: Name of Azure Machine Learning workspace.
+ :type workspace_name: str
+ :param private_endpoint_connection_name: The name of the private endpoint connection associated
+ with the workspace.
+ :type private_endpoint_connection_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: None, or the result of cls(response)
+ :rtype: None
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
cls = kwargs.pop('cls', None) # type: ClsType[None]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, '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')
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = build_delete_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ private_endpoint_connection_name=private_endpoint_connection_name,
+ template_url=self.delete.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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 [200, 202, 204]:
+ if response.status_code not in [200, 204]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = self._deserialize(_models.MachineLearningServiceError, response)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
if cls:
return cls(pipeline_response, None, {})
- _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore
-
- def begin_delete(
- self,
- resource_group_name, # type: str
- workspace_name, # type: str
- private_endpoint_connection_name, # type: str
- **kwargs # type: Any
- ):
- # type: (...) -> LROPoller[None]
- """Deletes the specified private endpoint connection associated with the workspace.
-
- :param resource_group_name: Name of the resource group in which workspace is located.
- :type resource_group_name: str
- :param workspace_name: Name of Azure Machine Learning workspace.
- :type workspace_name: str
- :param private_endpoint_connection_name: The name of the private endpoint connection associated
- with the workspace.
- :type private_endpoint_connection_name: str
- :keyword callable cls: A custom type or function that will be passed the direct response
- :keyword str continuation_token: A continuation token to restart a poller from a saved state.
- :keyword polling: True for ARMPolling, False for no polling, or a
- polling object for 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,
- workspace_name=workspace_name,
- private_endpoint_connection_name=private_endpoint_connection_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):
- 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'),
- }
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore
- 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.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_private_link_resources_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_private_link_resources_operations.py
index 89f73bf100c5..1ca993fd9081 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_private_link_resources_operations.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_private_link_resources_operations.py
@@ -5,22 +5,59 @@
# 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 functools
+from typing import Any, Callable, Dict, Generic, Optional, TypeVar
import warnings
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pipeline import PipelineResponse
-from azure.core.pipeline.transport import HttpRequest, HttpResponse
+from azure.core.pipeline.transport import HttpResponse
+from azure.core.rest import HttpRequest
+from azure.core.tracing.decorator import distributed_trace
from azure.mgmt.core.exceptions import ARMErrorFormat
+from msrest import Serializer
from .. import models as _models
-
-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]]
+from .._vendor import _convert_request, _format_url_section
+T = TypeVar('T')
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+
+_SERIALIZER = Serializer()
+_SERIALIZER.client_side_validation = False
+
+def build_list_request(
+ subscription_id: str,
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateLinkResources')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
+ "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="GET",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
class PrivateLinkResourcesOperations(object):
"""PrivateLinkResourcesOperations operations.
@@ -29,7 +66,7 @@ class PrivateLinkResourcesOperations(object):
instantiates it for you and attaches it as an attribute.
:ivar models: Alias to model classes used in this operation group.
- :type models: ~azure.mgmt.machinelearningservices.models
+ :type models: ~azure_machine_learning_workspaces.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
@@ -44,22 +81,22 @@ def __init__(self, client, config, serializer, deserializer):
self._deserialize = deserializer
self._config = config
- def list_by_workspace(
+ @distributed_trace
+ def list(
self,
- resource_group_name, # type: str
- workspace_name, # type: str
- **kwargs # type: Any
- ):
- # type: (...) -> "_models.PrivateLinkResourceListResult"
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs: Any
+ ) -> "_models.PrivateLinkResourceListResult":
"""Gets the private link resources that need to be created for a workspace.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: PrivateLinkResourceListResult, or the result of cls(response)
- :rtype: ~azure.mgmt.machinelearningservices.models.PrivateLinkResourceListResult
+ :rtype: ~azure_machine_learning_workspaces.models.PrivateLinkResourceListResult
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"]
@@ -67,27 +104,17 @@ def list_by_workspace(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- accept = "application/json"
-
- # Construct URL
- url = self.list_by_workspace.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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, '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')
+
+ request = build_list_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ template_url=self.list.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- # 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
@@ -101,4 +128,6 @@ def list_by_workspace(
return cls(pipeline_response, deserialized, {})
return deserialized
- list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateLinkResources'} # type: ignore
+
+ list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateLinkResources'} # type: ignore
+
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_quotas_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_quotas_operations.py
index 2e50f583b164..d095e595c7a6 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_quotas_operations.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_quotas_operations.py
@@ -5,23 +5,101 @@
# 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 functools
+from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar
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.pipeline.transport import HttpResponse
+from azure.core.rest import HttpRequest
+from azure.core.tracing.decorator import distributed_trace
from azure.mgmt.core.exceptions import ARMErrorFormat
+from msrest import Serializer
from .. import models as _models
-
-if TYPE_CHECKING:
- # pylint: disable=unused-import,ungrouped-imports
- from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar
-
- T = TypeVar('T')
- ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+from .._vendor import _convert_request, _format_url_section
+T = TypeVar('T')
+JSONType = Any
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+
+_SERIALIZER = Serializer()
+_SERIALIZER.client_side_validation = False
+
+def build_update_request(
+ location: str,
+ subscription_id: str,
+ *,
+ json: JSONType = None,
+ content: Any = None,
+ **kwargs: Any
+) -> HttpRequest:
+ content_type = kwargs.pop('content_type', None) # type: Optional[str]
+
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/updateQuotas')
+ path_format_arguments = {
+ "location": _SERIALIZER.url("location", location, 'str', pattern=r'^[-\w\._]+$'),
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ if content_type is not None:
+ header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="POST",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ json=json,
+ content=content,
+ **kwargs
+ )
+
+
+def build_list_request(
+ subscription_id: str,
+ location: str,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/quotas')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ "location": _SERIALIZER.url("location", location, 'str', pattern=r'^[-\w\._]+$'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="GET",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
class QuotasOperations(object):
"""QuotasOperations operations.
@@ -30,7 +108,7 @@ class QuotasOperations(object):
instantiates it for you and attaches it as an attribute.
:ivar models: Alias to model classes used in this operation group.
- :type models: ~azure.mgmt.machinelearningservices.models
+ :type models: ~azure_machine_learning_workspaces.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
@@ -45,22 +123,22 @@ def __init__(self, client, config, serializer, deserializer):
self._deserialize = deserializer
self._config = config
+ @distributed_trace
def update(
self,
- location, # type: str
- parameters, # type: "_models.QuotaUpdateParameters"
- **kwargs # type: Any
- ):
- # type: (...) -> "_models.UpdateWorkspaceQuotasResult"
+ location: str,
+ parameters: "_models.QuotaUpdateParameters",
+ **kwargs: Any
+ ) -> "_models.UpdateWorkspaceQuotasResult":
"""Update quota for each VM family in workspace.
:param location: The location for update quota is queried.
:type location: str
:param parameters: Quota update parameters.
- :type parameters: ~azure.mgmt.machinelearningservices.models.QuotaUpdateParameters
+ :type parameters: ~azure_machine_learning_workspaces.models.QuotaUpdateParameters
:keyword callable cls: A custom type or function that will be passed the direct response
:return: UpdateWorkspaceQuotasResult, or the result of cls(response)
- :rtype: ~azure.mgmt.machinelearningservices.models.UpdateWorkspaceQuotasResult
+ :rtype: ~azure_machine_learning_workspaces.models.UpdateWorkspaceQuotasResult
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.UpdateWorkspaceQuotasResult"]
@@ -68,37 +146,27 @@ def update(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- content_type = kwargs.pop("content_type", "application/json")
- accept = "application/json"
-
- # Construct URL
- url = self.update.metadata['url'] # type: ignore
- path_format_arguments = {
- 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'),
- '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')
+ content_type = kwargs.pop('content_type', "application/json") # type: Optional[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')
+ _json = self._serialize.body(parameters, 'QuotaUpdateParameters')
+
+ request = build_update_request(
+ location=location,
+ subscription_id=self._config.subscription_id,
+ content_type=content_type,
+ json=_json,
+ template_url=self.update.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- body_content_kwargs = {} # type: Dict[str, Any]
- body_content = self._serialize.body(parameters, 'QuotaUpdateParameters')
- body_content_kwargs['content'] = body_content
- request = self._client.post(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(_models.MachineLearningServiceError, response)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
deserialized = self._deserialize('UpdateWorkspaceQuotasResult', pipeline_response)
@@ -107,21 +175,24 @@ def update(
return cls(pipeline_response, deserialized, {})
return deserialized
+
update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/updateQuotas'} # type: ignore
+
+ @distributed_trace
def list(
self,
- location, # type: str
- **kwargs # type: Any
- ):
- # type: (...) -> Iterable["_models.ListWorkspaceQuotas"]
+ location: str,
+ **kwargs: Any
+ ) -> Iterable["_models.ListWorkspaceQuotas"]:
"""Gets the currently assigned Workspace Quotas based on VMFamily.
:param location: The location for which resource usage is queried.
:type location: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either ListWorkspaceQuotas or the result of cls(response)
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.ListWorkspaceQuotas]
+ :rtype:
+ ~azure.core.paging.ItemPaged[~azure_machine_learning_workspaces.models.ListWorkspaceQuotas]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.ListWorkspaceQuotas"]
@@ -129,35 +200,31 @@ def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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.metadata['url'] # type: ignore
- path_format_arguments = {
- 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
- 'location': self._serialize.url("location", location, 'str', 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')
-
- request = self._client.get(url, query_parameters, header_parameters)
+
+ request = build_list_request(
+ subscription_id=self._config.subscription_id,
+ location=location,
+ template_url=self.list.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
else:
- url = next_link
- query_parameters = {} # type: Dict[str, Any]
- request = self._client.get(url, query_parameters, header_parameters)
+
+ request = build_list_request(
+ subscription_id=self._config.subscription_id,
+ location=location,
+ template_url=next_link,
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
return request
def extract_data(pipeline_response):
- deserialized = self._deserialize('ListWorkspaceQuotas', pipeline_response)
+ deserialized = self._deserialize("ListWorkspaceQuotas", pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
@@ -171,11 +238,13 @@ def get_next(next_link=None):
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)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
return pipeline_response
+
return ItemPaged(
get_next, extract_data
)
- list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/Quotas'} # type: ignore
+ list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/quotas'} # type: ignore
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_usages_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_usages_operations.py
index a300468995d3..e461401517a4 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_usages_operations.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_usages_operations.py
@@ -5,23 +5,58 @@
# 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 functools
+from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar
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.pipeline.transport import HttpResponse
+from azure.core.rest import HttpRequest
+from azure.core.tracing.decorator import distributed_trace
from azure.mgmt.core.exceptions import ARMErrorFormat
+from msrest import Serializer
from .. import models as _models
-
-if TYPE_CHECKING:
- # pylint: disable=unused-import,ungrouped-imports
- from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar
-
- T = TypeVar('T')
- ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+from .._vendor import _convert_request, _format_url_section
+T = TypeVar('T')
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+
+_SERIALIZER = Serializer()
+_SERIALIZER.client_side_validation = False
+
+def build_list_request(
+ subscription_id: str,
+ location: str,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/usages')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ "location": _SERIALIZER.url("location", location, 'str', pattern=r'^[-\w\._]+$'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="GET",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
class UsagesOperations(object):
"""UsagesOperations operations.
@@ -30,7 +65,7 @@ class UsagesOperations(object):
instantiates it for you and attaches it as an attribute.
:ivar models: Alias to model classes used in this operation group.
- :type models: ~azure.mgmt.machinelearningservices.models
+ :type models: ~azure_machine_learning_workspaces.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
@@ -45,12 +80,12 @@ def __init__(self, client, config, serializer, deserializer):
self._deserialize = deserializer
self._config = config
+ @distributed_trace
def list(
self,
- location, # type: str
- **kwargs # type: Any
- ):
- # type: (...) -> Iterable["_models.ListUsagesResult"]
+ location: str,
+ **kwargs: Any
+ ) -> Iterable["_models.ListUsagesResult"]:
"""Gets the current usage information as well as limits for AML resources for given subscription
and location.
@@ -58,7 +93,8 @@ def list(
:type location: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either ListUsagesResult or the result of cls(response)
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.ListUsagesResult]
+ :rtype:
+ ~azure.core.paging.ItemPaged[~azure_machine_learning_workspaces.models.ListUsagesResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.ListUsagesResult"]
@@ -66,35 +102,31 @@ def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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.metadata['url'] # type: ignore
- path_format_arguments = {
- 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
- 'location': self._serialize.url("location", location, 'str', 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')
-
- request = self._client.get(url, query_parameters, header_parameters)
+
+ request = build_list_request(
+ subscription_id=self._config.subscription_id,
+ location=location,
+ template_url=self.list.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
else:
- url = next_link
- query_parameters = {} # type: Dict[str, Any]
- request = self._client.get(url, query_parameters, header_parameters)
+
+ request = build_list_request(
+ subscription_id=self._config.subscription_id,
+ location=location,
+ template_url=next_link,
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
return request
def extract_data(pipeline_response):
- deserialized = self._deserialize('ListUsagesResult', pipeline_response)
+ deserialized = self._deserialize("ListUsagesResult", pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
@@ -112,6 +144,7 @@ def get_next(next_link=None):
return pipeline_response
+
return ItemPaged(
get_next, extract_data
)
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_virtual_machine_sizes_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_virtual_machine_sizes_operations.py
index 44557ed77254..cd7350961734 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_virtual_machine_sizes_operations.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_virtual_machine_sizes_operations.py
@@ -5,22 +5,57 @@
# 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 functools
+from typing import Any, Callable, Dict, Generic, Optional, TypeVar
import warnings
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pipeline import PipelineResponse
-from azure.core.pipeline.transport import HttpRequest, HttpResponse
+from azure.core.pipeline.transport import HttpResponse
+from azure.core.rest import HttpRequest
+from azure.core.tracing.decorator import distributed_trace
from azure.mgmt.core.exceptions import ARMErrorFormat
+from msrest import Serializer
from .. import models as _models
-
-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]]
+from .._vendor import _convert_request, _format_url_section
+T = TypeVar('T')
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+
+_SERIALIZER = Serializer()
+_SERIALIZER.client_side_validation = False
+
+def build_list_request(
+ location: str,
+ subscription_id: str,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/vmSizes')
+ path_format_arguments = {
+ "location": _SERIALIZER.url("location", location, 'str', pattern=r'^[-\w\._]+$'),
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="GET",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
class VirtualMachineSizesOperations(object):
"""VirtualMachineSizesOperations operations.
@@ -29,7 +64,7 @@ class VirtualMachineSizesOperations(object):
instantiates it for you and attaches it as an attribute.
:ivar models: Alias to model classes used in this operation group.
- :type models: ~azure.mgmt.machinelearningservices.models
+ :type models: ~azure_machine_learning_workspaces.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
@@ -44,25 +79,19 @@ def __init__(self, client, config, serializer, deserializer):
self._deserialize = deserializer
self._config = config
+ @distributed_trace
def list(
self,
- location, # type: str
- compute_type=None, # type: Optional[str]
- recommended=None, # type: Optional[bool]
- **kwargs # type: Any
- ):
- # type: (...) -> "_models.VirtualMachineSizeListResult"
+ location: str,
+ **kwargs: Any
+ ) -> "_models.VirtualMachineSizeListResult":
"""Returns supported VM Sizes in a location.
:param location: The location upon which virtual-machine-sizes is queried.
:type location: str
- :param compute_type: Type of compute to filter by.
- :type compute_type: str
- :param recommended: Specifies whether to return recommended vm sizes or all vm sizes.
- :type recommended: bool
:keyword callable cls: A custom type or function that will be passed the direct response
:return: VirtualMachineSizeListResult, or the result of cls(response)
- :rtype: ~azure.mgmt.machinelearningservices.models.VirtualMachineSizeListResult
+ :rtype: ~azure_machine_learning_workspaces.models.VirtualMachineSizeListResult
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineSizeListResult"]
@@ -70,30 +99,16 @@ def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- accept = "application/json"
-
- # Construct URL
- url = self.list.metadata['url'] # type: ignore
- path_format_arguments = {
- 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'),
- '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 compute_type is not None:
- query_parameters['compute-type'] = self._serialize.query("compute_type", compute_type, 'str')
- if recommended is not None:
- query_parameters['recommended'] = self._serialize.query("recommended", recommended, 'bool')
+
+ request = build_list_request(
+ location=location,
+ subscription_id=self._config.subscription_id,
+ template_url=self.list.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- # 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
@@ -107,4 +122,6 @@ def list(
return cls(pipeline_response, deserialized, {})
return deserialized
+
list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/vmSizes'} # type: ignore
+
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspace_connections_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspace_connections_operations.py
index 71e2c3c11b36..ec5258edd03d 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspace_connections_operations.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspace_connections_operations.py
@@ -5,23 +5,188 @@
# 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 functools
+from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar
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.pipeline.transport import HttpResponse
+from azure.core.rest import HttpRequest
+from azure.core.tracing.decorator import distributed_trace
from azure.mgmt.core.exceptions import ARMErrorFormat
+from msrest import Serializer
from .. import models as _models
-
-if TYPE_CHECKING:
- # pylint: disable=unused-import,ungrouped-imports
- from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar
-
- T = TypeVar('T')
- ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+from .._vendor import _convert_request, _format_url_section
+T = TypeVar('T')
+JSONType = Any
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+
+_SERIALIZER = Serializer()
+_SERIALIZER.client_side_validation = False
+
+def build_list_request(
+ subscription_id: str,
+ resource_group_name: str,
+ workspace_name: str,
+ *,
+ target: Optional[str] = None,
+ category: Optional[str] = None,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
+ "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+ if target is not None:
+ query_parameters['target'] = _SERIALIZER.query("target", target, 'str')
+ if category is not None:
+ query_parameters['category'] = _SERIALIZER.query("category", category, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="GET",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
+
+
+def build_create_request(
+ subscription_id: str,
+ resource_group_name: str,
+ workspace_name: str,
+ connection_name: str,
+ *,
+ json: JSONType = None,
+ content: Any = None,
+ **kwargs: Any
+) -> HttpRequest:
+ content_type = kwargs.pop('content_type', None) # type: Optional[str]
+
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
+ "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'),
+ "connectionName": _SERIALIZER.url("connection_name", connection_name, 'str'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ if content_type is not None:
+ header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="PUT",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ json=json,
+ content=content,
+ **kwargs
+ )
+
+
+def build_get_request(
+ subscription_id: str,
+ resource_group_name: str,
+ workspace_name: str,
+ connection_name: str,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
+ "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'),
+ "connectionName": _SERIALIZER.url("connection_name", connection_name, 'str'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="GET",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
+
+
+def build_delete_request(
+ subscription_id: str,
+ resource_group_name: str,
+ workspace_name: str,
+ connection_name: str,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
+ "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'),
+ "connectionName": _SERIALIZER.url("connection_name", connection_name, 'str'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="DELETE",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
class WorkspaceConnectionsOperations(object):
"""WorkspaceConnectionsOperations operations.
@@ -30,7 +195,7 @@ class WorkspaceConnectionsOperations(object):
instantiates it for you and attaches it as an attribute.
:ivar models: Alias to model classes used in this operation group.
- :type models: ~azure.mgmt.machinelearningservices.models
+ :type models: ~azure_machine_learning_workspaces.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
@@ -45,18 +210,18 @@ def __init__(self, client, config, serializer, deserializer):
self._deserialize = deserializer
self._config = config
+ @distributed_trace
def list(
self,
- resource_group_name, # type: str
- workspace_name, # type: str
- target=None, # type: Optional[str]
- category=None, # type: Optional[str]
- **kwargs # type: Any
- ):
- # type: (...) -> Iterable["_models.PaginatedWorkspaceConnectionsList"]
+ resource_group_name: str,
+ workspace_name: str,
+ target: Optional[str] = None,
+ category: Optional[str] = None,
+ **kwargs: Any
+ ) -> Iterable["_models.PaginatedWorkspaceConnectionsList"]:
"""List all connections under a AML workspace.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
@@ -65,8 +230,10 @@ def list(
:param category: Category of the workspace connection.
:type category: str
:keyword callable cls: A custom type or function that will be passed the direct response
- :return: An iterator like instance of either PaginatedWorkspaceConnectionsList or the result of cls(response)
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.PaginatedWorkspaceConnectionsList]
+ :return: An iterator like instance of either PaginatedWorkspaceConnectionsList or the result of
+ cls(response)
+ :rtype:
+ ~azure.core.paging.ItemPaged[~azure_machine_learning_workspaces.models.PaginatedWorkspaceConnectionsList]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.PaginatedWorkspaceConnectionsList"]
@@ -74,40 +241,37 @@ def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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.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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, '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 target is not None:
- query_parameters['target'] = self._serialize.query("target", target, 'str')
- if category is not None:
- query_parameters['category'] = self._serialize.query("category", category, 'str')
-
- request = self._client.get(url, query_parameters, header_parameters)
+
+ request = build_list_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ target=target,
+ category=category,
+ template_url=self.list.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
else:
- url = next_link
- query_parameters = {} # type: Dict[str, Any]
- request = self._client.get(url, query_parameters, header_parameters)
+
+ request = build_list_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ target=target,
+ category=category,
+ template_url=next_link,
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
return request
def extract_data(pipeline_response):
- deserialized = self._deserialize('PaginatedWorkspaceConnectionsList', pipeline_response)
+ deserialized = self._deserialize("PaginatedWorkspaceConnectionsList", pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
@@ -120,39 +284,40 @@ def get_next(next_link=None):
response = pipeline_response.http_response
if response.status_code not in [200]:
- error = self._deserialize(_models.MachineLearningServiceError, response)
map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
return pipeline_response
+
return ItemPaged(
get_next, extract_data
)
list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections'} # type: ignore
+ @distributed_trace
def create(
self,
- resource_group_name, # type: str
- workspace_name, # type: str
- connection_name, # type: str
- parameters, # type: "_models.WorkspaceConnectionDto"
- **kwargs # type: Any
- ):
- # type: (...) -> "_models.WorkspaceConnection"
+ resource_group_name: str,
+ workspace_name: str,
+ connection_name: str,
+ parameters: "_models.WorkspaceConnection",
+ **kwargs: Any
+ ) -> "_models.WorkspaceConnection":
"""Add a new workspace connection.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
:param connection_name: Friendly name of the workspace connection.
:type connection_name: str
:param parameters: The object for creating or updating a new workspace connection.
- :type parameters: ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionDto
+ :type parameters: ~azure_machine_learning_workspaces.models.WorkspaceConnection
:keyword callable cls: A custom type or function that will be passed the direct response
:return: WorkspaceConnection, or the result of cls(response)
- :rtype: ~azure.mgmt.machinelearningservices.models.WorkspaceConnection
+ :rtype: ~azure_machine_learning_workspaces.models.WorkspaceConnection
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkspaceConnection"]
@@ -160,39 +325,29 @@ def create(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- content_type = kwargs.pop("content_type", "application/json")
- accept = "application/json"
-
- # Construct URL
- url = self.create.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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'connectionName': self._serialize.url("connection_name", connection_name, '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')
+ content_type = kwargs.pop('content_type', "application/json") # type: Optional[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')
+ _json = self._serialize.body(parameters, 'WorkspaceConnection')
+
+ request = build_create_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ connection_name=connection_name,
+ content_type=content_type,
+ json=_json,
+ template_url=self.create.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- body_content_kwargs = {} # type: Dict[str, Any]
- body_content = self._serialize.body(parameters, 'WorkspaceConnectionDto')
- 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]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = self._deserialize(_models.MachineLearningServiceError, response)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
deserialized = self._deserialize('WorkspaceConnection', pipeline_response)
@@ -201,19 +356,21 @@ def create(
return cls(pipeline_response, deserialized, {})
return deserialized
+
create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}'} # type: ignore
+
+ @distributed_trace
def get(
self,
- resource_group_name, # type: str
- workspace_name, # type: str
- connection_name, # type: str
- **kwargs # type: Any
- ):
- # type: (...) -> "_models.WorkspaceConnection"
+ resource_group_name: str,
+ workspace_name: str,
+ connection_name: str,
+ **kwargs: Any
+ ) -> "_models.WorkspaceConnection":
"""Get the detail of a workspace connection.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
@@ -221,7 +378,7 @@ def get(
:type connection_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: WorkspaceConnection, or the result of cls(response)
- :rtype: ~azure.mgmt.machinelearningservices.models.WorkspaceConnection
+ :rtype: ~azure_machine_learning_workspaces.models.WorkspaceConnection
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkspaceConnection"]
@@ -229,34 +386,24 @@ def get(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'connectionName': self._serialize.url("connection_name", connection_name, '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')
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = build_get_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ connection_name=connection_name,
+ template_url=self.get.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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(_models.MachineLearningServiceError, response)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
deserialized = self._deserialize('WorkspaceConnection', pipeline_response)
@@ -265,19 +412,21 @@ def get(
return cls(pipeline_response, deserialized, {})
return deserialized
+
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}'} # type: ignore
+
+ @distributed_trace
def delete(
self,
- resource_group_name, # type: str
- workspace_name, # type: str
- connection_name, # type: str
- **kwargs # type: Any
- ):
- # type: (...) -> None
+ resource_group_name: str,
+ workspace_name: str,
+ connection_name: str,
+ **kwargs: Any
+ ) -> None:
"""Delete a workspace connection.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
@@ -293,37 +442,28 @@ def delete(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- accept = "application/json"
-
- # Construct URL
- url = self.delete.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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- 'connectionName': self._serialize.url("connection_name", connection_name, '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')
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = build_delete_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ connection_name=connection_name,
+ template_url=self.delete.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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 [200, 204]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = self._deserialize(_models.MachineLearningServiceError, response)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
if cls:
return cls(pipeline_response, None, {})
delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}'} # type: ignore
+
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspace_features_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspace_features_operations.py
index ae71b091b5f7..8144e1ba3f72 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspace_features_operations.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspace_features_operations.py
@@ -5,23 +5,60 @@
# 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 functools
+from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar
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.pipeline.transport import HttpResponse
+from azure.core.rest import HttpRequest
+from azure.core.tracing.decorator import distributed_trace
from azure.mgmt.core.exceptions import ARMErrorFormat
+from msrest import Serializer
from .. import models as _models
-
-if TYPE_CHECKING:
- # pylint: disable=unused-import,ungrouped-imports
- from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar
-
- T = TypeVar('T')
- ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+from .._vendor import _convert_request, _format_url_section
+T = TypeVar('T')
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+
+_SERIALIZER = Serializer()
+_SERIALIZER.client_side_validation = False
+
+def build_list_request(
+ subscription_id: str,
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/features')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
+ "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="GET",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
class WorkspaceFeaturesOperations(object):
"""WorkspaceFeaturesOperations operations.
@@ -30,7 +67,7 @@ class WorkspaceFeaturesOperations(object):
instantiates it for you and attaches it as an attribute.
:ivar models: Alias to model classes used in this operation group.
- :type models: ~azure.mgmt.machinelearningservices.models
+ :type models: ~azure_machine_learning_workspaces.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
@@ -45,22 +82,24 @@ def __init__(self, client, config, serializer, deserializer):
self._deserialize = deserializer
self._config = config
+ @distributed_trace
def list(
self,
- resource_group_name, # type: str
- workspace_name, # type: str
- **kwargs # type: Any
- ):
- # type: (...) -> Iterable["_models.ListAmlUserFeatureResult"]
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs: Any
+ ) -> Iterable["_models.ListAmlUserFeatureResult"]:
"""Lists all enabled features for a workspace.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
- :return: An iterator like instance of either ListAmlUserFeatureResult or the result of cls(response)
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.ListAmlUserFeatureResult]
+ :return: An iterator like instance of either ListAmlUserFeatureResult or the result of
+ cls(response)
+ :rtype:
+ ~azure.core.paging.ItemPaged[~azure_machine_learning_workspaces.models.ListAmlUserFeatureResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.ListAmlUserFeatureResult"]
@@ -68,36 +107,33 @@ def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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.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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, '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')
-
- request = self._client.get(url, query_parameters, header_parameters)
+
+ request = build_list_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ template_url=self.list.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
else:
- url = next_link
- query_parameters = {} # type: Dict[str, Any]
- request = self._client.get(url, query_parameters, header_parameters)
+
+ request = build_list_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ template_url=next_link,
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
return request
def extract_data(pipeline_response):
- deserialized = self._deserialize('ListAmlUserFeatureResult', pipeline_response)
+ deserialized = self._deserialize("ListAmlUserFeatureResult", pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
@@ -110,12 +146,13 @@ def get_next(next_link=None):
response = pipeline_response.http_response
if response.status_code not in [200]:
- error = self._deserialize(_models.MachineLearningServiceError, response)
map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
return pipeline_response
+
return ItemPaged(
get_next, extract_data
)
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspace_skus_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspace_skus_operations.py
new file mode 100644
index 000000000000..54ef8e556d67
--- /dev/null
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspace_skus_operations.py
@@ -0,0 +1,143 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is regenerated.
+# --------------------------------------------------------------------------
+import functools
+from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar
+import warnings
+
+from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
+from azure.core.paging import ItemPaged
+from azure.core.pipeline import PipelineResponse
+from azure.core.pipeline.transport import HttpResponse
+from azure.core.rest import HttpRequest
+from azure.core.tracing.decorator import distributed_trace
+from azure.mgmt.core.exceptions import ARMErrorFormat
+from msrest import Serializer
+
+from .. import models as _models
+from .._vendor import _convert_request, _format_url_section
+T = TypeVar('T')
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+
+_SERIALIZER = Serializer()
+_SERIALIZER.client_side_validation = False
+
+def build_list_request(
+ subscription_id: str,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces/skus')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="GET",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
+
+class WorkspaceSkusOperations(object):
+ """WorkspaceSkusOperations 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_machine_learning_workspaces.models
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ """
+
+ models = _models
+
+ def __init__(self, client, config, serializer, deserializer):
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self._config = config
+
+ @distributed_trace
+ def list(
+ self,
+ **kwargs: Any
+ ) -> Iterable["_models.SkuListResult"]:
+ """Lists all skus with associated features.
+
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: An iterator like instance of either SkuListResult or the result of cls(response)
+ :rtype: ~azure.core.paging.ItemPaged[~azure_machine_learning_workspaces.models.SkuListResult]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuListResult"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+ def prepare_request(next_link=None):
+ if not next_link:
+
+ request = build_list_request(
+ subscription_id=self._config.subscription_id,
+ template_url=self.list.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
+ else:
+
+ request = build_list_request(
+ subscription_id=self._config.subscription_id,
+ template_url=next_link,
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
+ return request
+
+ def extract_data(pipeline_response):
+ deserialized = self._deserialize("SkuListResult", pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem)
+ return deserialized.next_link or None, iter(list_of_elem)
+
+ def get_next(next_link=None):
+ request = prepare_request(next_link)
+
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+
+ return ItemPaged(
+ get_next, extract_data
+ )
+ list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces/skus'} # type: ignore
diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspaces_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspaces_operations.py
index c1aa91f9fc11..1620c7689cff 100644
--- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspaces_operations.py
+++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspaces_operations.py
@@ -5,25 +5,547 @@
# 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 functools
+from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union
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.pipeline.transport import HttpResponse
from azure.core.polling import LROPoller, NoPolling, PollingMethod
+from azure.core.rest import HttpRequest
+from azure.core.tracing.decorator import distributed_trace
from azure.mgmt.core.exceptions import ARMErrorFormat
from azure.mgmt.core.polling.arm_polling import ARMPolling
+from msrest import Serializer
from .. import models as _models
-
-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]]
+from .._vendor import _convert_request, _format_url_section
+T = TypeVar('T')
+JSONType = Any
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+
+_SERIALIZER = Serializer()
+_SERIALIZER.client_side_validation = False
+
+def build_get_request(
+ subscription_id: str,
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
+ "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="GET",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
+
+
+def build_create_or_update_request_initial(
+ subscription_id: str,
+ resource_group_name: str,
+ workspace_name: str,
+ *,
+ json: JSONType = None,
+ content: Any = None,
+ **kwargs: Any
+) -> HttpRequest:
+ content_type = kwargs.pop('content_type', None) # type: Optional[str]
+
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
+ "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ if content_type is not None:
+ header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="PUT",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ json=json,
+ content=content,
+ **kwargs
+ )
+
+
+def build_delete_request_initial(
+ subscription_id: str,
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
+ "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="DELETE",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
+
+
+def build_update_request(
+ subscription_id: str,
+ resource_group_name: str,
+ workspace_name: str,
+ *,
+ json: JSONType = None,
+ content: Any = None,
+ **kwargs: Any
+) -> HttpRequest:
+ content_type = kwargs.pop('content_type', None) # type: Optional[str]
+
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
+ "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ if content_type is not None:
+ header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="PATCH",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ json=json,
+ content=content,
+ **kwargs
+ )
+
+
+def build_list_by_resource_group_request(
+ subscription_id: str,
+ resource_group_name: str,
+ *,
+ skip: Optional[str] = None,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+ if skip is not None:
+ query_parameters['$skip'] = _SERIALIZER.query("skip", skip, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="GET",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
+
+
+def build_diagnose_request_initial(
+ subscription_id: str,
+ resource_group_name: str,
+ workspace_name: str,
+ *,
+ json: JSONType = None,
+ content: Any = None,
+ **kwargs: Any
+) -> HttpRequest:
+ content_type = kwargs.pop('content_type', None) # type: Optional[str]
+
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/diagnose')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
+ "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ if content_type is not None:
+ header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str')
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="POST",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ json=json,
+ content=content,
+ **kwargs
+ )
+
+
+def build_list_keys_request(
+ subscription_id: str,
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listKeys')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
+ "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="POST",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
+
+
+def build_resync_keys_request_initial(
+ subscription_id: str,
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
+ "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="POST",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
+
+
+def build_list_by_subscription_request(
+ subscription_id: str,
+ *,
+ skip: Optional[str] = None,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+ if skip is not None:
+ query_parameters['$skip'] = _SERIALIZER.query("skip", skip, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="GET",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
+
+
+def build_list_notebook_access_token_request(
+ subscription_id: str,
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookAccessToken')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
+ "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="POST",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
+
+
+def build_prepare_notebook_request_initial(
+ subscription_id: str,
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
+ "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="POST",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
+
+
+def build_list_storage_account_keys_request(
+ subscription_id: str,
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listStorageAccountKeys')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
+ "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="POST",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
+
+
+def build_list_notebook_keys_request(
+ subscription_id: str,
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookKeys')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
+ "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="POST",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
+
+
+def build_list_outbound_network_dependencies_endpoints_request(
+ subscription_id: str,
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs: Any
+) -> HttpRequest:
+ api_version = "2021-07-01"
+ accept = "application/json"
+ # Construct URL
+ url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints')
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1),
+ "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1),
+ "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'),
+ }
+
+ url = _format_url_section(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any]
+ query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str')
+
+ # Construct headers
+ header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any]
+ header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str')
+
+ return HttpRequest(
+ method="GET",
+ url=url,
+ params=query_parameters,
+ headers=header_parameters,
+ **kwargs
+ )
class WorkspacesOperations(object):
"""WorkspacesOperations operations.
@@ -32,7 +554,7 @@ class WorkspacesOperations(object):
instantiates it for you and attaches it as an attribute.
:ivar models: Alias to model classes used in this operation group.
- :type models: ~azure.mgmt.machinelearningservices.models
+ :type models: ~azure_machine_learning_workspaces.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
@@ -47,22 +569,22 @@ def __init__(self, client, config, serializer, deserializer):
self._deserialize = deserializer
self._config = config
+ @distributed_trace
def get(
self,
- resource_group_name, # type: str
- workspace_name, # type: str
- **kwargs # type: Any
- ):
- # type: (...) -> "_models.Workspace"
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs: Any
+ ) -> "_models.Workspace":
"""Gets the properties of the specified machine learning workspace.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: Workspace, or the result of cls(response)
- :rtype: ~azure.mgmt.machinelearningservices.models.Workspace
+ :rtype: ~azure_machine_learning_workspaces.models.Workspace
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.Workspace"]
@@ -70,33 +592,23 @@ def get(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, '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')
-
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = build_get_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ template_url=self.get.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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(_models.MachineLearningServiceError, response)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
deserialized = self._deserialize('Workspace', pipeline_response)
@@ -105,95 +617,87 @@ def get(
return cls(pipeline_response, deserialized, {})
return deserialized
+
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} # type: ignore
+
def _create_or_update_initial(
self,
- resource_group_name, # type: str
- workspace_name, # type: str
- parameters, # type: "_models.Workspace"
- **kwargs # type: Any
- ):
- # type: (...) -> Optional["_models.Workspace"]
+ resource_group_name: str,
+ workspace_name: str,
+ parameters: "_models.Workspace",
+ **kwargs: Any
+ ) -> Optional["_models.Workspace"]:
cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Workspace"]]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, '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')
+ content_type = kwargs.pop('content_type', "application/json") # type: Optional[str]
+
+ _json = self._serialize.body(parameters, 'Workspace')
- # 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')
+ request = build_create_or_update_request_initial(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ content_type=content_type,
+ json=_json,
+ template_url=self._create_or_update_initial.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- body_content_kwargs = {} # type: Dict[str, Any]
- body_content = self._serialize.body(parameters, 'Workspace')
- 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, 202]:
+ if response.status_code not in [200, 202]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = self._deserialize(_models.MachineLearningServiceError, response)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('Workspace', pipeline_response)
- if response.status_code == 201:
- deserialized = self._deserialize('Workspace', pipeline_response)
-
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
+
_create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} # type: ignore
+
+ @distributed_trace
def begin_create_or_update(
self,
- resource_group_name, # type: str
- workspace_name, # type: str
- parameters, # type: "_models.Workspace"
- **kwargs # type: Any
- ):
- # type: (...) -> LROPoller["_models.Workspace"]
+ resource_group_name: str,
+ workspace_name: str,
+ parameters: "_models.Workspace",
+ **kwargs: Any
+ ) -> LROPoller["_models.Workspace"]:
"""Creates or updates a workspace with the specified parameters.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
:param parameters: The parameters for creating or updating a machine learning workspace.
- :type parameters: ~azure.mgmt.machinelearningservices.models.Workspace
+ :type parameters: ~azure_machine_learning_workspaces.models.Workspace
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
- :keyword polling: True for ARMPolling, False for no polling, or a
- polling object for personal polling strategy
+ :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
+ operation to not poll, or pass in your own initialized polling object for a personal polling
+ strategy.
:paramtype polling: bool or ~azure.core.polling.PollingMethod
- :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
:return: An instance of LROPoller that returns either Workspace or the result of cls(response)
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.machinelearningservices.models.Workspace]
- :raises ~azure.core.exceptions.HttpResponseError:
+ :rtype: ~azure.core.polling.LROPoller[~azure_machine_learning_workspaces.models.Workspace]
+ :raises: ~azure.core.exceptions.HttpResponseError
"""
- polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod]
+ content_type = kwargs.pop('content_type', "application/json") # type: Optional[str]
+ polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType["_models.Workspace"]
lro_delay = kwargs.pop(
'polling_interval',
@@ -205,27 +709,21 @@ def begin_create_or_update(
resource_group_name=resource_group_name,
workspace_name=workspace_name,
parameters=parameters,
+ content_type=content_type,
cls=lambda x,y,z: x,
**kwargs
)
-
kwargs.pop('error_map', None)
- kwargs.pop('content_type', None)
def get_long_running_output(pipeline_response):
+ response = pipeline_response.http_response
deserialized = self._deserialize('Workspace', pipeline_response)
-
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
- 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- }
- if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
+ if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
@@ -237,78 +735,70 @@ def get_long_running_output(pipeline_response):
)
else:
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
+
begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} # type: ignore
def _delete_initial(
self,
- resource_group_name, # type: str
- workspace_name, # type: str
- **kwargs # type: Any
- ):
- # type: (...) -> None
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs: Any
+ ) -> None:
cls = kwargs.pop('cls', None) # type: ClsType[None]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, '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')
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = build_delete_request_initial(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ template_url=self._delete_initial.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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 [200, 202, 204]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = self._deserialize(_models.MachineLearningServiceError, response)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
if cls:
return cls(pipeline_response, None, {})
_delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} # type: ignore
+
+ @distributed_trace
def begin_delete(
self,
- resource_group_name, # type: str
- workspace_name, # type: str
- **kwargs # type: Any
- ):
- # type: (...) -> LROPoller[None]
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs: Any
+ ) -> LROPoller[None]:
"""Deletes a machine learning workspace.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
- :keyword polling: True for ARMPolling, False for no polling, or a
- polling object for personal polling strategy
+ :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
+ operation to not poll, or pass in your own initialized polling object for a personal polling
+ strategy.
:paramtype polling: bool or ~azure.core.polling.PollingMethod
- :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
+ :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:
+ :raises: ~azure.core.exceptions.HttpResponseError
"""
- polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod]
+ polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType[None]
lro_delay = kwargs.pop(
'polling_interval',
@@ -322,21 +812,14 @@ def begin_delete(
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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'),
- }
- if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
+ if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
elif polling is False: polling_method = NoPolling()
else: polling_method = polling
if cont_token:
@@ -348,27 +831,28 @@ def get_long_running_output(pipeline_response):
)
else:
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
+
begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} # type: ignore
+ @distributed_trace
def update(
self,
- resource_group_name, # type: str
- workspace_name, # type: str
- parameters, # type: "_models.WorkspaceUpdateParameters"
- **kwargs # type: Any
- ):
- # type: (...) -> "_models.Workspace"
+ resource_group_name: str,
+ workspace_name: str,
+ parameters: "_models.WorkspaceUpdateParameters",
+ **kwargs: Any
+ ) -> "_models.Workspace":
"""Updates a machine learning workspace with the specified parameters.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
:param parameters: The parameters for updating a machine learning workspace.
- :type parameters: ~azure.mgmt.machinelearningservices.models.WorkspaceUpdateParameters
+ :type parameters: ~azure_machine_learning_workspaces.models.WorkspaceUpdateParameters
:keyword callable cls: A custom type or function that will be passed the direct response
:return: Workspace, or the result of cls(response)
- :rtype: ~azure.mgmt.machinelearningservices.models.Workspace
+ :rtype: ~azure_machine_learning_workspaces.models.Workspace
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.Workspace"]
@@ -376,38 +860,28 @@ def update(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, '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')
+ content_type = kwargs.pop('content_type', "application/json") # type: Optional[str]
+
+ _json = self._serialize.body(parameters, 'WorkspaceUpdateParameters')
- # 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')
+ request = build_update_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ content_type=content_type,
+ json=_json,
+ template_url=self.update.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- body_content_kwargs = {} # type: Dict[str, Any]
- body_content = self._serialize.body(parameters, 'WorkspaceUpdateParameters')
- 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(_models.MachineLearningServiceError, response)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
deserialized = self._deserialize('Workspace', pipeline_response)
@@ -416,24 +890,27 @@ def update(
return cls(pipeline_response, deserialized, {})
return deserialized
+
update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} # type: ignore
+
+ @distributed_trace
def list_by_resource_group(
self,
- resource_group_name, # type: str
- skiptoken=None, # type: Optional[str]
- **kwargs # type: Any
- ):
- # type: (...) -> Iterable["_models.WorkspaceListResult"]
+ resource_group_name: str,
+ skip: Optional[str] = None,
+ **kwargs: Any
+ ) -> Iterable["_models.WorkspaceListResult"]:
"""Lists all the available machine learning workspaces under the specified resource group.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
- :param skiptoken: Continuation token for pagination.
- :type skiptoken: str
+ :param skip: Continuation token for pagination.
+ :type skip: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either WorkspaceListResult or the result of cls(response)
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.WorkspaceListResult]
+ :rtype:
+ ~azure.core.paging.ItemPaged[~azure_machine_learning_workspaces.models.WorkspaceListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkspaceListResult"]
@@ -441,37 +918,33 @@ def list_by_resource_group(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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'),
- }
- 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)
+
+ request = build_list_by_resource_group_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ skip=skip,
+ template_url=self.list_by_resource_group.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
else:
- url = next_link
- query_parameters = {} # type: Dict[str, Any]
- request = self._client.get(url, query_parameters, header_parameters)
+
+ request = build_list_by_resource_group_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ skip=skip,
+ template_url=next_link,
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
return request
def extract_data(pipeline_response):
- deserialized = self._deserialize('WorkspaceListResult', pipeline_response)
+ deserialized = self._deserialize("WorkspaceListResult", pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
@@ -484,34 +957,165 @@ def get_next(next_link=None):
response = pipeline_response.http_response
if response.status_code not in [200]:
- error = self._deserialize(_models.MachineLearningServiceError, response)
map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
return pipeline_response
+
return ItemPaged(
get_next, extract_data
)
list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces'} # type: ignore
+ def _diagnose_initial(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ parameters: Optional["_models.DiagnoseWorkspaceParameters"] = None,
+ **kwargs: Any
+ ) -> Optional["_models.DiagnoseResponseResult"]:
+ cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.DiagnoseResponseResult"]]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+ content_type = kwargs.pop('content_type', "application/json") # type: Optional[str]
+
+ if parameters is not None:
+ _json = self._serialize.body(parameters, 'DiagnoseWorkspaceParameters')
+ else:
+ _json = None
+
+ request = build_diagnose_request_initial(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ content_type=content_type,
+ json=_json,
+ template_url=self._diagnose_initial.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 202]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = None
+ response_headers = {}
+ if response.status_code == 200:
+ deserialized = self._deserialize('DiagnoseResponseResult', pipeline_response)
+
+ if response.status_code == 202:
+ response_headers['Location']=self._deserialize('str', response.headers.get('Location'))
+ response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After'))
+
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers)
+
+ return deserialized
+
+ _diagnose_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/diagnose'} # type: ignore
+
+
+ @distributed_trace
+ def begin_diagnose(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ parameters: Optional["_models.DiagnoseWorkspaceParameters"] = None,
+ **kwargs: Any
+ ) -> LROPoller["_models.DiagnoseResponseResult"]:
+ """Diagnose workspace setup issue.
+
+ Diagnose workspace setup issue.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param workspace_name: Name of Azure Machine Learning workspace.
+ :type workspace_name: str
+ :param parameters: The parameter of diagnosing workspace health.
+ :type parameters: ~azure_machine_learning_workspaces.models.DiagnoseWorkspaceParameters
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
+ operation to not poll, or pass in your own initialized polling object for a personal polling
+ strategy.
+ :paramtype polling: bool or ~azure.core.polling.PollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of LROPoller that returns either DiagnoseResponseResult or the result of
+ cls(response)
+ :rtype:
+ ~azure.core.polling.LROPoller[~azure_machine_learning_workspaces.models.DiagnoseResponseResult]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ content_type = kwargs.pop('content_type', "application/json") # type: Optional[str]
+ polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod]
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnoseResponseResult"]
+ lro_delay = kwargs.pop(
+ 'polling_interval',
+ self._config.polling_interval
+ )
+ cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
+ if cont_token is None:
+ raw_result = self._diagnose_initial(
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ parameters=parameters,
+ content_type=content_type,
+ cls=lambda x,y,z: x,
+ **kwargs
+ )
+ kwargs.pop('error_map', None)
+
+ def get_long_running_output(pipeline_response):
+ response = pipeline_response.http_response
+ deserialized = self._deserialize('DiagnoseResponseResult', pipeline_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+ return deserialized
+
+
+ if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ if cont_token:
+ return LROPoller.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output
+ )
+ else:
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
+
+ begin_diagnose.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/diagnose'} # type: ignore
+
+ @distributed_trace
def list_keys(
self,
- resource_group_name, # type: str
- workspace_name, # type: str
- **kwargs # type: Any
- ):
- # type: (...) -> "_models.ListWorkspaceKeysResult"
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs: Any
+ ) -> "_models.ListWorkspaceKeysResult":
"""Lists all the keys associated with this workspace. This includes keys for the storage account,
app insights and password for container registry.
- :param resource_group_name: Name of the resource group in which workspace is located.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:type workspace_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: ListWorkspaceKeysResult, or the result of cls(response)
- :rtype: ~azure.mgmt.machinelearningservices.models.ListWorkspaceKeysResult
+ :rtype: ~azure_machine_learning_workspaces.models.ListWorkspaceKeysResult
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.ListWorkspaceKeysResult"]
@@ -519,33 +1123,23 @@ def list_keys(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, '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')
-
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = build_list_keys_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ template_url=self.list_keys.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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)
- error = self._deserialize(_models.MachineLearningServiceError, response)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
deserialized = self._deserialize('ListWorkspaceKeysResult', pipeline_response)
@@ -554,79 +1148,121 @@ def list_keys(
return cls(pipeline_response, deserialized, {})
return deserialized
+
list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listKeys'} # type: ignore
- def resync_keys(
- self,
- resource_group_name, # type: str
- workspace_name, # type: str
- **kwargs # type: Any
- ):
- # type: (...) -> None
- """Resync all the keys associated with this workspace. This includes keys for the storage account,
- app insights and password for container registry.
- :param resource_group_name: Name of the resource group in which workspace is located.
- :type resource_group_name: str
- :param workspace_name: Name of Azure Machine Learning workspace.
- :type workspace_name: str
- :keyword callable cls: A custom type or function that will be passed the direct response
- :return: None, or the result of cls(response)
- :rtype: None
- :raises: ~azure.core.exceptions.HttpResponseError
- """
+ def _resync_keys_initial(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs: Any
+ ) -> None:
cls = kwargs.pop('cls', None) # type: ClsType[None]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- accept = "application/json"
-
- # Construct URL
- url = self.resync_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'),
- 'workspaceName': self._serialize.url("workspace_name", workspace_name, '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')
-
- # Construct headers
- header_parameters = {} # type: Dict[str, Any]
- header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
+
+ request = build_resync_keys_request_initial(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ template_url=self._resync_keys_initial.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
- 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]:
+ if response.status_code not in [200, 202]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
- error = self._deserialize(_models.MachineLearningServiceError, response)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
if cls:
return cls(pipeline_response, None, {})
- resync_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys'} # type: ignore
+ _resync_keys_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys'} # type: ignore
+
+
+ @distributed_trace
+ def begin_resync_keys(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs: Any
+ ) -> LROPoller[None]:
+ """Resync all the keys associated with this workspace. This includes keys for the storage account,
+ app insights and password for container registry.
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param workspace_name: Name of Azure Machine Learning workspace.
+ :type workspace_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
+ operation to not poll, or pass in your own initialized polling object for a personal polling
+ strategy.
+ :paramtype polling: bool or ~azure.core.polling.PollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of LROPoller that returns either None or the result of cls(response)
+ :rtype: ~azure.core.polling.LROPoller[None]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod]
+ cls = kwargs.pop('cls', None) # type: ClsType[None]
+ lro_delay = kwargs.pop(
+ 'polling_interval',
+ self._config.polling_interval
+ )
+ cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
+ if cont_token is None:
+ raw_result = self._resync_keys_initial(
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ cls=lambda x,y,z: x,
+ **kwargs
+ )
+ kwargs.pop('error_map', None)
+
+ def get_long_running_output(pipeline_response):
+ if cls:
+ return cls(pipeline_response, None, {})
+
+
+ if polling is True: polling_method = ARMPolling(lro_delay, **kwargs)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ if cont_token:
+ return LROPoller.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output
+ )
+ else:
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
+
+ begin_resync_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys'} # type: ignore
+
+ @distributed_trace
def list_by_subscription(
self,
- skiptoken=None, # type: Optional[str]
- **kwargs # type: Any
- ):
- # type: (...) -> Iterable["_models.WorkspaceListResult"]
+ skip: Optional[str] = None,
+ **kwargs: Any
+ ) -> Iterable["_models.WorkspaceListResult"]:
"""Lists all the available machine learning workspaces under the specified subscription.
- :param skiptoken: Continuation token for pagination.
- :type skiptoken: str
+ :param skip: Continuation token for pagination.
+ :type skip: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either WorkspaceListResult or the result of cls(response)
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.machinelearningservices.models.WorkspaceListResult]
+ :rtype:
+ ~azure.core.paging.ItemPaged[~azure_machine_learning_workspaces.models.WorkspaceListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkspaceListResult"]
@@ -634,36 +1270,31 @@ def list_by_subscription(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
- api_version = "2020-08-01"
- 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.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)
+
+ request = build_list_by_subscription_request(
+ subscription_id=self._config.subscription_id,
+ skip=skip,
+ template_url=self.list_by_subscription.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
else:
- url = next_link
- query_parameters = {} # type: Dict[str, Any]
- request = self._client.get(url, query_parameters, header_parameters)
+
+ request = build_list_by_subscription_request(
+ subscription_id=self._config.subscription_id,
+ skip=skip,
+ template_url=next_link,
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+ request.method = "GET"
return request
def extract_data(pipeline_response):
- deserialized = self._deserialize('WorkspaceListResult', pipeline_response)
+ deserialized = self._deserialize("WorkspaceListResult", pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
@@ -676,13 +1307,333 @@ def get_next(next_link=None):
response = pipeline_response.http_response
if response.status_code not in [200]:
- error = self._deserialize(_models.MachineLearningServiceError, response)
map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
return pipeline_response
+
return ItemPaged(
get_next, extract_data
)
list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces'} # type: ignore
+
+ @distributed_trace
+ def list_notebook_access_token(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs: Any
+ ) -> "_models.NotebookAccessTokenResult":
+ """return notebook access token and refresh token.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param workspace_name: Name of Azure Machine Learning workspace.
+ :type workspace_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: NotebookAccessTokenResult, or the result of cls(response)
+ :rtype: ~azure_machine_learning_workspaces.models.NotebookAccessTokenResult
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.NotebookAccessTokenResult"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+
+ request = build_list_notebook_access_token_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ template_url=self.list_notebook_access_token.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('NotebookAccessTokenResult', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+
+ list_notebook_access_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookAccessToken'} # type: ignore
+
+
+ def _prepare_notebook_initial(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs: Any
+ ) -> Optional["_models.NotebookResourceInfo"]:
+ cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.NotebookResourceInfo"]]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+
+ request = build_prepare_notebook_request_initial(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ template_url=self._prepare_notebook_initial.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 202]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('NotebookResourceInfo', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+
+ _prepare_notebook_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook'} # type: ignore
+
+
+ @distributed_trace
+ def begin_prepare_notebook(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs: Any
+ ) -> LROPoller["_models.NotebookResourceInfo"]:
+ """Prepare a notebook.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param workspace_name: Name of Azure Machine Learning workspace.
+ :type workspace_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :keyword str continuation_token: A continuation token to restart a poller from a saved state.
+ :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
+ operation to not poll, or pass in your own initialized polling object for a personal polling
+ strategy.
+ :paramtype polling: bool or ~azure.core.polling.PollingMethod
+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
+ Retry-After header is present.
+ :return: An instance of LROPoller that returns either NotebookResourceInfo or the result of
+ cls(response)
+ :rtype:
+ ~azure.core.polling.LROPoller[~azure_machine_learning_workspaces.models.NotebookResourceInfo]
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod]
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.NotebookResourceInfo"]
+ lro_delay = kwargs.pop(
+ 'polling_interval',
+ self._config.polling_interval
+ )
+ cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
+ if cont_token is None:
+ raw_result = self._prepare_notebook_initial(
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ cls=lambda x,y,z: x,
+ **kwargs
+ )
+ kwargs.pop('error_map', None)
+
+ def get_long_running_output(pipeline_response):
+ response = pipeline_response.http_response
+ deserialized = self._deserialize('NotebookResourceInfo', pipeline_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+ return deserialized
+
+
+ if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs)
+ elif polling is False: polling_method = NoPolling()
+ else: polling_method = polling
+ if cont_token:
+ return LROPoller.from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output
+ )
+ else:
+ return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
+
+ begin_prepare_notebook.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook'} # type: ignore
+
+ @distributed_trace
+ def list_storage_account_keys(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs: Any
+ ) -> "_models.ListStorageAccountKeysResult":
+ """List storage account keys of a workspace.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param workspace_name: Name of Azure Machine Learning workspace.
+ :type workspace_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: ListStorageAccountKeysResult, or the result of cls(response)
+ :rtype: ~azure_machine_learning_workspaces.models.ListStorageAccountKeysResult
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.ListStorageAccountKeysResult"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+
+ request = build_list_storage_account_keys_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ template_url=self.list_storage_account_keys.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('ListStorageAccountKeysResult', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+
+ list_storage_account_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listStorageAccountKeys'} # type: ignore
+
+
+ @distributed_trace
+ def list_notebook_keys(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs: Any
+ ) -> "_models.ListNotebookKeysResult":
+ """List keys of a notebook.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param workspace_name: Name of Azure Machine Learning workspace.
+ :type workspace_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: ListNotebookKeysResult, or the result of cls(response)
+ :rtype: ~azure_machine_learning_workspaces.models.ListNotebookKeysResult
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.ListNotebookKeysResult"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+
+ request = build_list_notebook_keys_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ template_url=self.list_notebook_keys.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('ListNotebookKeysResult', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+
+ list_notebook_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookKeys'} # type: ignore
+
+
+ @distributed_trace
+ def list_outbound_network_dependencies_endpoints(
+ self,
+ resource_group_name: str,
+ workspace_name: str,
+ **kwargs: Any
+ ) -> "_models.ExternalFQDNResponse":
+ """Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs)
+ programmatically.
+
+ Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs)
+ programmatically.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ :type resource_group_name: str
+ :param workspace_name: Name of Azure Machine Learning workspace.
+ :type workspace_name: str
+ :keyword callable cls: A custom type or function that will be passed the direct response
+ :return: ExternalFQDNResponse, or the result of cls(response)
+ :rtype: ~azure_machine_learning_workspaces.models.ExternalFQDNResponse
+ :raises: ~azure.core.exceptions.HttpResponseError
+ """
+ cls = kwargs.pop('cls', None) # type: ClsType["_models.ExternalFQDNResponse"]
+ error_map = {
+ 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
+ }
+ error_map.update(kwargs.pop('error_map', {}))
+
+
+ request = build_list_outbound_network_dependencies_endpoints_request(
+ subscription_id=self._config.subscription_id,
+ resource_group_name=resource_group_name,
+ workspace_name=workspace_name,
+ template_url=self.list_outbound_network_dependencies_endpoints.metadata['url'],
+ )
+ request = _convert_request(request)
+ request.url = self._client.format_url(request.url)
+
+ pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize('ExternalFQDNResponse', pipeline_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {})
+
+ return deserialized
+
+ list_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints'} # type: ignore
+