From c037c482685a9c8b83eb94c5a89d63d4578195d4 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 30 May 2018 12:06:26 -0700 Subject: [PATCH 1/7] [AutoPR machinelearningservices/resource-manager] Add specs for machine learning services provider (#2647) * Generated from 731ac51ce42e58287fca8952ffcf77df67abfcd6 Merge branch 'master' into mlservicesSwagger * Generated from 9462becb5c9421c2eb5f52eaa7aead8a5487d059 Address more comments --- .../mgmt/machinelearningservices/__init__.py | 18 + .../azure_machine_learning_workspaces.py | 91 +++ .../models/__init__.py | 117 ++++ .../machinelearningservices/models/aks.py | 68 +++ .../models/aks_compute_secrets.py | 48 ++ .../models/aks_compute_secrets_py3.py | 48 ++ .../models/aks_properties.py | 50 ++ .../models/aks_properties_py3.py | 50 ++ .../machinelearningservices/models/aks_py3.py | 68 +++ ...azure_machine_learning_workspaces_enums.py | 36 ++ .../models/batch_ai.py | 69 +++ .../models/batch_ai_properties.py | 37 ++ .../models/batch_ai_properties_py3.py | 37 ++ .../models/batch_ai_py3.py | 69 +++ .../machinelearningservices/models/compute.py | 77 +++ .../models/compute_py3.py | 77 +++ .../models/compute_resource.py | 56 ++ .../models/compute_resource_paged.py | 27 + .../models/compute_resource_py3.py | 56 ++ .../models/compute_secrets.py | 42 ++ .../models/compute_secrets_py3.py | 42 ++ .../models/data_factory.py | 64 ++ .../models/data_factory_py3.py | 64 ++ .../models/error_detail.py | 39 ++ .../models/error_detail_py3.py | 39 ++ .../models/error_response.py | 44 ++ .../models/error_response_py3.py | 44 ++ .../models/identity.py | 45 ++ .../models/identity_py3.py | 45 ++ .../models/list_workspace_keys_result.py | 51 ++ .../models/list_workspace_keys_result_py3.py | 51 ++ .../models/machine_learning_service_error.py | 41 ++ .../machine_learning_service_error_py3.py | 41 ++ .../models/operation.py | 32 + .../models/operation_display.py | 41 ++ .../models/operation_display_py3.py | 41 ++ .../models/operation_paged.py | 27 + .../models/operation_py3.py | 32 + .../models/password.py | 40 ++ .../models/password_py3.py | 40 ++ .../registry_list_credentials_result.py | 44 ++ .../registry_list_credentials_result_py3.py | 44 ++ .../models/resource.py | 58 ++ .../models/resource_py3.py | 58 ++ .../models/scale_settings.py | 36 ++ .../models/scale_settings_py3.py | 36 ++ .../models/service_principal_credentials.py | 39 ++ .../service_principal_credentials_py3.py | 39 ++ .../models/ssl_configuration.py | 41 ++ .../models/ssl_configuration_py3.py | 41 ++ .../models/system_service.py | 45 ++ .../models/system_service_py3.py | 45 ++ .../models/virtual_machine.py | 69 +++ .../models/virtual_machine_properties.py | 33 ++ .../models/virtual_machine_properties_py3.py | 33 ++ .../models/virtual_machine_py3.py | 69 +++ .../models/virtual_machine_secrets.py | 39 ++ .../models/virtual_machine_secrets_py3.py | 39 ++ .../models/virtual_machine_ssh_credentials.py | 40 ++ .../virtual_machine_ssh_credentials_py3.py | 40 ++ .../models/workspace.py | 108 ++++ .../models/workspace_paged.py | 27 + .../models/workspace_py3.py | 108 ++++ .../models/workspace_update_parameters.py | 36 ++ .../models/workspace_update_parameters_py3.py | 36 ++ .../operations/__init__.py | 20 + .../machine_learning_compute_operations.py | 461 +++++++++++++++ .../operations/operations.py | 98 +++ .../operations/workspaces_operations.py | 557 ++++++++++++++++++ .../mgmt/machinelearningservices/version.py | 13 + 70 files changed, 4356 insertions(+) create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/__init__.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/azure_machine_learning_workspaces.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/__init__.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_compute_secrets.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_compute_secrets_py3.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_properties.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_properties_py3.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_py3.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/azure_machine_learning_workspaces_enums.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai_properties.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai_properties_py3.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai_py3.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_py3.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_resource.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_resource_paged.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_resource_py3.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_secrets.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_secrets_py3.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_factory.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_factory_py3.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/error_detail.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/error_detail_py3.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/error_response.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/error_response_py3.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/identity.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/identity_py3.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/list_workspace_keys_result.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/list_workspace_keys_result_py3.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/machine_learning_service_error.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/machine_learning_service_error_py3.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/operation.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/operation_display.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/operation_display_py3.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/operation_paged.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/operation_py3.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/password.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/password_py3.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/registry_list_credentials_result.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/registry_list_credentials_result_py3.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/resource.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/resource_py3.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/scale_settings.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/scale_settings_py3.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/service_principal_credentials.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/service_principal_credentials_py3.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/ssl_configuration.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/ssl_configuration_py3.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/system_service.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/system_service_py3.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_properties.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_properties_py3.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_py3.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_secrets.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_secrets_py3.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_ssh_credentials.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_ssh_credentials_py3.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace_paged.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace_py3.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace_update_parameters.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace_update_parameters_py3.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/__init__.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/machine_learning_compute_operations.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/operations.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/workspaces_operations.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/version.py diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/__init__.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/__init__.py new file mode 100644 index 000000000000..3d99419d58fb --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_machine_learning_workspaces import AzureMachineLearningWorkspaces +from .version import VERSION + +__all__ = ['AzureMachineLearningWorkspaces'] + +__version__ = VERSION + diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/azure_machine_learning_workspaces.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/azure_machine_learning_workspaces.py new file mode 100644 index 000000000000..7d5724562c62 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/azure_machine_learning_workspaces.py @@ -0,0 +1,91 @@ +# 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 msrest.service_client import SDKClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.operations import Operations +from .operations.workspaces_operations import WorkspacesOperations +from .operations.machine_learning_compute_operations import MachineLearningComputeOperations +from . import models + + +class AzureMachineLearningWorkspacesConfiguration(AzureConfiguration): + """Configuration for AzureMachineLearningWorkspaces + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription identifier. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(AzureMachineLearningWorkspacesConfiguration, self).__init__(base_url) + + self.add_user_agent('azure-mgmt-machinelearningservices/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class AzureMachineLearningWorkspaces(SDKClient): + """These APIs allow end users to operate on Azure Machine Learning Workspace resources. + + :ivar config: Configuration for client. + :vartype config: AzureMachineLearningWorkspacesConfiguration + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.machinelearningservices.operations.Operations + :ivar workspaces: Workspaces operations + :vartype workspaces: azure.mgmt.machinelearningservices.operations.WorkspacesOperations + :ivar machine_learning_compute: MachineLearningCompute operations + :vartype machine_learning_compute: azure.mgmt.machinelearningservices.operations.MachineLearningComputeOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription identifier. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = AzureMachineLearningWorkspacesConfiguration(credentials, subscription_id, base_url) + super(AzureMachineLearningWorkspaces, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2018-03-01-preview' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.workspaces = WorkspacesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.machine_learning_compute = MachineLearningComputeOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/__init__.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/__init__.py new file mode 100644 index 000000000000..fc6dfadba291 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/__init__.py @@ -0,0 +1,117 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +try: + from .operation_display_py3 import OperationDisplay + from .operation_py3 import Operation + from .workspace_py3 import Workspace + from .workspace_update_parameters_py3 import WorkspaceUpdateParameters + from .identity_py3 import Identity + from .resource_py3 import Resource + from .password_py3 import Password + from .registry_list_credentials_result_py3 import RegistryListCredentialsResult + from .list_workspace_keys_result_py3 import ListWorkspaceKeysResult + from .error_detail_py3 import ErrorDetail + from .error_response_py3 import ErrorResponse + from .machine_learning_service_error_py3 import MachineLearningServiceError, MachineLearningServiceErrorException + from .compute_py3 import Compute + from .compute_resource_py3 import ComputeResource + from .system_service_py3 import SystemService + from .ssl_configuration_py3 import SslConfiguration + from .aks_properties_py3 import AKSProperties + from .aks_py3 import AKS + from .scale_settings_py3 import ScaleSettings + from .batch_ai_properties_py3 import BatchAIProperties + from .batch_ai_py3 import BatchAI + from .virtual_machine_ssh_credentials_py3 import VirtualMachineSshCredentials + from .virtual_machine_properties_py3 import VirtualMachineProperties + from .virtual_machine_py3 import VirtualMachine + from .data_factory_py3 import DataFactory + from .service_principal_credentials_py3 import ServicePrincipalCredentials + from .compute_secrets_py3 import ComputeSecrets + from .aks_compute_secrets_py3 import AksComputeSecrets + from .virtual_machine_secrets_py3 import VirtualMachineSecrets +except (SyntaxError, ImportError): + from .operation_display import OperationDisplay + from .operation import Operation + from .workspace import Workspace + from .workspace_update_parameters import WorkspaceUpdateParameters + from .identity import Identity + from .resource import Resource + from .password import Password + from .registry_list_credentials_result import RegistryListCredentialsResult + from .list_workspace_keys_result import ListWorkspaceKeysResult + from .error_detail import ErrorDetail + from .error_response import ErrorResponse + from .machine_learning_service_error import MachineLearningServiceError, MachineLearningServiceErrorException + from .compute import Compute + from .compute_resource import ComputeResource + from .system_service import SystemService + from .ssl_configuration import SslConfiguration + from .aks_properties import AKSProperties + from .aks import AKS + from .scale_settings import ScaleSettings + from .batch_ai_properties import BatchAIProperties + from .batch_ai import BatchAI + from .virtual_machine_ssh_credentials import VirtualMachineSshCredentials + from .virtual_machine_properties import VirtualMachineProperties + from .virtual_machine import VirtualMachine + from .data_factory import DataFactory + from .service_principal_credentials import ServicePrincipalCredentials + from .compute_secrets import ComputeSecrets + from .aks_compute_secrets import AksComputeSecrets + from .virtual_machine_secrets import VirtualMachineSecrets +from .operation_paged import OperationPaged +from .workspace_paged import WorkspacePaged +from .compute_resource_paged import ComputeResourcePaged +from .azure_machine_learning_workspaces_enums import ( + ProvisioningState, + ResourceIdentityType, + ComputeType, +) + +__all__ = [ + 'OperationDisplay', + 'Operation', + 'Workspace', + 'WorkspaceUpdateParameters', + 'Identity', + 'Resource', + 'Password', + 'RegistryListCredentialsResult', + 'ListWorkspaceKeysResult', + 'ErrorDetail', + 'ErrorResponse', + 'MachineLearningServiceError', 'MachineLearningServiceErrorException', + 'Compute', + 'ComputeResource', + 'SystemService', + 'SslConfiguration', + 'AKSProperties', + 'AKS', + 'ScaleSettings', + 'BatchAIProperties', + 'BatchAI', + 'VirtualMachineSshCredentials', + 'VirtualMachineProperties', + 'VirtualMachine', + 'DataFactory', + 'ServicePrincipalCredentials', + 'ComputeSecrets', + 'AksComputeSecrets', + 'VirtualMachineSecrets', + 'OperationPaged', + 'WorkspacePaged', + 'ComputeResourcePaged', + 'ProvisioningState', + 'ResourceIdentityType', + 'ComputeType', +] diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks.py new file mode 100644 index 000000000000..94f17e58b2ac --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks.py @@ -0,0 +1,68 @@ +# 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 .compute import Compute + + +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. + + :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 + :ivar modified_on: The date and time when the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param properties: AKS properties + :type properties: ~azure.mgmt.machinelearningservices.models.AKSProperties + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + '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]'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AKSProperties'}, + } + + def __init__(self, **kwargs): + super(AKS, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.compute_type = 'AKS' diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_compute_secrets.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_compute_secrets.py new file mode 100644 index 000000000000..bd1ae7a7f5ba --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_compute_secrets.py @@ -0,0 +1,48 @@ +# 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 .compute_secrets import ComputeSecrets + + +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. Constant filled by server. + :type compute_type: str + :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.user_kube_config = kwargs.get('user_kube_config', None) + self.admin_kube_config = kwargs.get('admin_kube_config', None) + self.image_pull_secret_name = kwargs.get('image_pull_secret_name', None) + self.compute_type = 'AKS' diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_compute_secrets_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_compute_secrets_py3.py new file mode 100644 index 000000000000..d7c3d2a707ec --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_compute_secrets_py3.py @@ -0,0 +1,48 @@ +# 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 .compute_secrets_py3 import ComputeSecrets + + +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. Constant filled by server. + :type compute_type: str + :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, *, user_kube_config: str=None, admin_kube_config: str=None, image_pull_secret_name: str=None, **kwargs) -> None: + super(AksComputeSecrets, 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 + self.compute_type = 'AKS' diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_properties.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_properties.py new file mode 100644 index 000000000000..d1907b9a241c --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_properties.py @@ -0,0 +1,50 @@ +# 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 msrest.serialization import Model + + +class AKSProperties(Model): + """AKS properties. + + :param cluster_fqdn: Cluster full qualified domain name + :type cluster_fqdn: str + :param system_services: System services + :type 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 + """ + + _validation = { + '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'}, + } + + def __init__(self, **kwargs): + super(AKSProperties, self).__init__(**kwargs) + self.cluster_fqdn = kwargs.get('cluster_fqdn', None) + self.system_services = kwargs.get('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) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_properties_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_properties_py3.py new file mode 100644 index 000000000000..35cb7ba606b7 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_properties_py3.py @@ -0,0 +1,50 @@ +# 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 msrest.serialization import Model + + +class AKSProperties(Model): + """AKS properties. + + :param cluster_fqdn: Cluster full qualified domain name + :type cluster_fqdn: str + :param system_services: System services + :type 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 + """ + + _validation = { + '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'}, + } + + def __init__(self, *, cluster_fqdn: str=None, system_services=None, agent_count: int=None, agent_vm_size: str=None, ssl_configuration=None, **kwargs) -> None: + super(AKSProperties, self).__init__(**kwargs) + self.cluster_fqdn = cluster_fqdn + self.system_services = system_services + self.agent_count = agent_count + self.agent_vm_size = agent_vm_size + self.ssl_configuration = ssl_configuration diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_py3.py new file mode 100644 index 000000000000..c8d8b22b78f8 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_py3.py @@ -0,0 +1,68 @@ +# 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 .compute_py3 import Compute + + +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. + + :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 + :ivar modified_on: The date and time when the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param properties: AKS properties + :type properties: ~azure.mgmt.machinelearningservices.models.AKSProperties + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + '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]'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AKSProperties'}, + } + + def __init__(self, *, description: str=None, resource_id: str=None, properties=None, **kwargs) -> None: + super(AKS, self).__init__(description=description, resource_id=resource_id, **kwargs) + self.properties = properties + self.compute_type = 'AKS' diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/azure_machine_learning_workspaces_enums.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/azure_machine_learning_workspaces_enums.py new file mode 100644 index 000000000000..89532c08ee6b --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/azure_machine_learning_workspaces_enums.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class ProvisioningState(str, Enum): + + unknown = "Unknown" + updating = "Updating" + creating = "Creating" + deleting = "Deleting" + succeeded = "Succeeded" + failed = "Failed" + canceled = "Canceled" + + +class ResourceIdentityType(str, Enum): + + system_assigned = "SystemAssigned" + + +class ComputeType(str, Enum): + + aks = "AKS" + batch_ai = "BatchAI" + data_factory = "DataFactory" + virtual_machine = "VirtualMachine" diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai.py new file mode 100644 index 000000000000..d3e8d226d815 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai.py @@ -0,0 +1,69 @@ +# 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 .compute import Compute + + +class BatchAI(Compute): + """A Machine Learning compute based on Azure BatchAI. + + 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 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 + :ivar modified_on: The date and time when the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param properties: BatchAI properties + :type properties: + ~azure.mgmt.machinelearningservices.models.BatchAIProperties + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + '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]'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'BatchAIProperties'}, + } + + def __init__(self, **kwargs): + super(BatchAI, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.compute_type = 'BatchAI' diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai_properties.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai_properties.py new file mode 100644 index 000000000000..37abd1794e4b --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai_properties.py @@ -0,0 +1,37 @@ +# 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 msrest.serialization import Model + + +class BatchAIProperties(Model): + """BatchAI properties. + + :param vm_size: Virtual Machine Size + :type vm_size: str + :param vm_priority: Virtual Machine priority + :type vm_priority: str + :param scale_settings: Scale settings for BatchAI + :type scale_settings: + ~azure.mgmt.machinelearningservices.models.ScaleSettings + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'vm_priority': {'key': 'vmPriority', 'type': 'str'}, + 'scale_settings': {'key': 'scaleSettings', 'type': 'ScaleSettings'}, + } + + def __init__(self, **kwargs): + super(BatchAIProperties, 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) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai_properties_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai_properties_py3.py new file mode 100644 index 000000000000..16ad2e10f6f4 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai_properties_py3.py @@ -0,0 +1,37 @@ +# 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 msrest.serialization import Model + + +class BatchAIProperties(Model): + """BatchAI properties. + + :param vm_size: Virtual Machine Size + :type vm_size: str + :param vm_priority: Virtual Machine priority + :type vm_priority: str + :param scale_settings: Scale settings for BatchAI + :type scale_settings: + ~azure.mgmt.machinelearningservices.models.ScaleSettings + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'vm_priority': {'key': 'vmPriority', 'type': 'str'}, + 'scale_settings': {'key': 'scaleSettings', 'type': 'ScaleSettings'}, + } + + def __init__(self, *, vm_size: str=None, vm_priority: str=None, scale_settings=None, **kwargs) -> None: + super(BatchAIProperties, self).__init__(**kwargs) + self.vm_size = vm_size + self.vm_priority = vm_priority + self.scale_settings = scale_settings diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai_py3.py new file mode 100644 index 000000000000..684e0e0b342c --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai_py3.py @@ -0,0 +1,69 @@ +# 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 .compute_py3 import Compute + + +class BatchAI(Compute): + """A Machine Learning compute based on Azure BatchAI. + + 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 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 + :ivar modified_on: The date and time when the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param properties: BatchAI properties + :type properties: + ~azure.mgmt.machinelearningservices.models.BatchAIProperties + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + '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]'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'BatchAIProperties'}, + } + + def __init__(self, *, description: str=None, resource_id: str=None, properties=None, **kwargs) -> None: + super(BatchAI, self).__init__(description=description, resource_id=resource_id, **kwargs) + self.properties = properties + self.compute_type = 'BatchAI' diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute.py new file mode 100644 index 000000000000..2c162e62daec --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute.py @@ -0,0 +1,77 @@ +# 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 msrest.serialization import Model + + +class Compute(Model): + """Machine Learning compute object. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AKS, BatchAI, VirtualMachine, DataFactory + + 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 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 + :ivar modified_on: The date and time when the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :param compute_type: Required. Constant filled by server. + :type compute_type: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + '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]'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + } + + _subtype_map = { + 'compute_type': {'AKS': 'AKS', 'BatchAI': 'BatchAI', 'VirtualMachine': 'VirtualMachine', 'DataFactory': 'DataFactory'} + } + + def __init__(self, **kwargs): + super(Compute, self).__init__(**kwargs) + 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.compute_type = None diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_py3.py new file mode 100644 index 000000000000..8664bd9c46f9 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_py3.py @@ -0,0 +1,77 @@ +# 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 msrest.serialization import Model + + +class Compute(Model): + """Machine Learning compute object. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AKS, BatchAI, VirtualMachine, DataFactory + + 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 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 + :ivar modified_on: The date and time when the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :param compute_type: Required. Constant filled by server. + :type compute_type: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + '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]'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + } + + _subtype_map = { + 'compute_type': {'AKS': 'AKS', 'BatchAI': 'BatchAI', 'VirtualMachine': 'VirtualMachine', 'DataFactory': 'DataFactory'} + } + + def __init__(self, *, description: str=None, resource_id: str=None, **kwargs) -> None: + super(Compute, self).__init__(**kwargs) + 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.compute_type = None diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_resource.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_resource.py new file mode 100644 index 000000000000..4f9e25c30670 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_resource.py @@ -0,0 +1,56 @@ +# 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 .resource import Resource + + +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 + :ivar identity: The identity of the resource. + :vartype 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: Contains resource tags defined as key/value pairs. + :type tags: dict[str, str] + :param properties: Compute properties + :type properties: ~azure.mgmt.machinelearningservices.models.Compute + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'identity': {'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}'}, + 'properties': {'key': 'properties', 'type': 'Compute'}, + } + + def __init__(self, **kwargs): + super(ComputeResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_resource_paged.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_resource_paged.py new file mode 100644 index 000000000000..1666107af00a --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_resource_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class ComputeResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`ComputeResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ComputeResource]'} + } + + def __init__(self, *args, **kwargs): + + super(ComputeResourcePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_resource_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_resource_py3.py new file mode 100644 index 000000000000..a5f7e8679a20 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_resource_py3.py @@ -0,0 +1,56 @@ +# 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 .resource_py3 import Resource + + +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 + :ivar identity: The identity of the resource. + :vartype 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: Contains resource tags defined as key/value pairs. + :type tags: dict[str, str] + :param properties: Compute properties + :type properties: ~azure.mgmt.machinelearningservices.models.Compute + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'identity': {'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}'}, + 'properties': {'key': 'properties', 'type': 'Compute'}, + } + + def __init__(self, *, location: str=None, tags=None, properties=None, **kwargs) -> None: + super(ComputeResource, self).__init__(location=location, tags=tags, **kwargs) + self.properties = properties diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_secrets.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_secrets.py new file mode 100644 index 000000000000..be25425af2df --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_secrets.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class ComputeSecrets(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, VirtualMachineSecrets + + All required parameters must be populated in order to send to Azure. + + :param compute_type: Required. Constant filled by server. + :type compute_type: str + """ + + _validation = { + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'compute_type': {'key': 'computeType', 'type': 'str'}, + } + + _subtype_map = { + 'compute_type': {'AKS': 'AksComputeSecrets', 'VirtualMachine': 'VirtualMachineSecrets'} + } + + def __init__(self, **kwargs): + super(ComputeSecrets, self).__init__(**kwargs) + self.compute_type = None diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_secrets_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_secrets_py3.py new file mode 100644 index 000000000000..b3428cbc8e0a --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_secrets_py3.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class ComputeSecrets(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, VirtualMachineSecrets + + All required parameters must be populated in order to send to Azure. + + :param compute_type: Required. Constant filled by server. + :type compute_type: str + """ + + _validation = { + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'compute_type': {'key': 'computeType', 'type': 'str'}, + } + + _subtype_map = { + 'compute_type': {'AKS': 'AksComputeSecrets', 'VirtualMachine': 'VirtualMachineSecrets'} + } + + def __init__(self, **kwargs) -> None: + super(ComputeSecrets, self).__init__(**kwargs) + self.compute_type = None diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_factory.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_factory.py new file mode 100644 index 000000000000..1df12a8a9c3d --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_factory.py @@ -0,0 +1,64 @@ +# 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 .compute import Compute + + +class DataFactory(Compute): + """A DataFactory compute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar 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 + :ivar modified_on: The date and time when the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :param compute_type: Required. Constant filled by server. + :type compute_type: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + '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]'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataFactory, self).__init__(**kwargs) + self.compute_type = 'DataFactory' diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_factory_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_factory_py3.py new file mode 100644 index 000000000000..8340934ea2fd --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_factory_py3.py @@ -0,0 +1,64 @@ +# 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 .compute_py3 import Compute + + +class DataFactory(Compute): + """A DataFactory compute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar 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 + :ivar modified_on: The date and time when the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :param compute_type: Required. Constant filled by server. + :type compute_type: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + '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]'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + } + + def __init__(self, *, description: str=None, resource_id: str=None, **kwargs) -> None: + super(DataFactory, self).__init__(description=description, resource_id=resource_id, **kwargs) + self.compute_type = 'DataFactory' diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/error_detail.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/error_detail.py new file mode 100644 index 000000000000..fa22ca734577 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/error_detail.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class ErrorDetail(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.get('code', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/error_detail_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/error_detail_py3.py new file mode 100644 index 000000000000..aa5cb5c69036 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/error_detail_py3.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class ErrorDetail(Model): + """Error detail information. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Error code. + :type code: str + :param message: Required. Error message. + :type message: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str, message: str, **kwargs) -> None: + super(ErrorDetail, self).__init__(**kwargs) + self.code = code + self.message = message diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/error_response.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/error_response.py new file mode 100644 index 000000000000..1eaa8f685877 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/error_response.py @@ -0,0 +1,44 @@ +# 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 msrest.serialization import Model + + +class ErrorResponse(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.machinelearningservices.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.get('code', None) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/error_response_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/error_response_py3.py new file mode 100644 index 000000000000..2fc3a331d42c --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/error_response_py3.py @@ -0,0 +1,44 @@ +# 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 msrest.serialization import Model + + +class ErrorResponse(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.machinelearningservices.models.ErrorDetail] + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + } + + def __init__(self, *, code: str, message: str, details=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.code = code + self.message = message + self.details = details diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/identity.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/identity.py new file mode 100644 index 000000000000..12ba2d30a988 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/identity.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class Identity(Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :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: The identity type. Possible values include: 'SystemAssigned' + :type type: str or + ~azure.mgmt.machinelearningservices.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + } + + def __init__(self, **kwargs): + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/identity_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/identity_py3.py new file mode 100644 index 000000000000..4316665f65dd --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/identity_py3.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class Identity(Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :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: The identity type. Possible values include: 'SystemAssigned' + :type type: str or + ~azure.mgmt.machinelearningservices.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + } + + def __init__(self, *, type=None, **kwargs) -> None: + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/list_workspace_keys_result.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/list_workspace_keys_result.py new file mode 100644 index 000000000000..c6a8f043c146 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/list_workspace_keys_result.py @@ -0,0 +1,51 @@ +# 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 msrest.serialization import Model + + +class ListWorkspaceKeysResult(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 + """ + + _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'}, + } + + 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 diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/list_workspace_keys_result_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/list_workspace_keys_result_py3.py new file mode 100644 index 000000000000..ceca0ea0bbca --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/list_workspace_keys_result_py3.py @@ -0,0 +1,51 @@ +# 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 msrest.serialization import Model + + +class ListWorkspaceKeysResult(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 + """ + + _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'}, + } + + def __init__(self, **kwargs) -> None: + 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 diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/machine_learning_service_error.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/machine_learning_service_error.py new file mode 100644 index 000000000000..b6e52d4d43b0 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/machine_learning_service_error.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class MachineLearningServiceError(Model): + """Wrapper for error response to follow ARM guidelines. + + :param error: The error response. + :type error: ~azure.mgmt.machinelearningservices.models.ErrorResponse + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponse'}, + } + + def __init__(self, **kwargs): + super(MachineLearningServiceError, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class MachineLearningServiceErrorException(HttpOperationError): + """Server responsed with exception of type: 'MachineLearningServiceError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(MachineLearningServiceErrorException, self).__init__(deserialize, response, 'MachineLearningServiceError', *args) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/machine_learning_service_error_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/machine_learning_service_error_py3.py new file mode 100644 index 000000000000..c8465eced88a --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/machine_learning_service_error_py3.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class MachineLearningServiceError(Model): + """Wrapper for error response to follow ARM guidelines. + + :param error: The error response. + :type error: ~azure.mgmt.machinelearningservices.models.ErrorResponse + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponse'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(MachineLearningServiceError, self).__init__(**kwargs) + self.error = error + + +class MachineLearningServiceErrorException(HttpOperationError): + """Server responsed with exception of type: 'MachineLearningServiceError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(MachineLearningServiceErrorException, self).__init__(deserialize, response, 'MachineLearningServiceError', *args) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/operation.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/operation.py new file mode 100644 index 000000000000..f6e5478affed --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/operation.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class Operation(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) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/operation_display.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/operation_display.py new file mode 100644 index 000000000000..1b1b069e31fc --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/operation_display.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class OperationDisplay(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) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/operation_display_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/operation_display_py3.py new file mode 100644 index 000000000000..402b7d0b2a8e --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/operation_display_py3.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class OperationDisplay(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, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/operation_paged.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/operation_paged.py new file mode 100644 index 000000000000..5909c1c82a08 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/operation_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/operation_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/operation_py3.py new file mode 100644 index 000000000000..2cc1283e7a7f --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/operation_py3.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class Operation(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, *, name: str=None, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/password.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/password.py new file mode 100644 index 000000000000..f6fc73d9bd2a --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/password.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class Password(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 diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/password_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/password_py3.py new file mode 100644 index 000000000000..51b7087d65a1 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/password_py3.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class Password(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) -> None: + super(Password, self).__init__(**kwargs) + self.name = None + self.value = None diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/registry_list_credentials_result.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/registry_list_credentials_result.py new file mode 100644 index 000000000000..6e0ae5190590 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/registry_list_credentials_result.py @@ -0,0 +1,44 @@ +# 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 msrest.serialization import Model + + +class RegistryListCredentialsResult(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) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/registry_list_credentials_result_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/registry_list_credentials_result_py3.py new file mode 100644 index 000000000000..b13127ec77c0 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/registry_list_credentials_result_py3.py @@ -0,0 +1,44 @@ +# 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 msrest.serialization import Model + + +class RegistryListCredentialsResult(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, *, passwords=None, **kwargs) -> None: + super(RegistryListCredentialsResult, self).__init__(**kwargs) + self.location = None + self.username = None + self.passwords = passwords diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/resource.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/resource.py new file mode 100644 index 000000000000..de3f8c6102ac --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/resource.py @@ -0,0 +1,58 @@ +# 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 msrest.serialization import Model + + +class Resource(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 + :ivar identity: The identity of the resource. + :vartype 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: Contains resource tags defined as key/value pairs. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'identity': {'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}'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.identity = None + self.location = kwargs.get('location', None) + self.type = None + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/resource_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/resource_py3.py new file mode 100644 index 000000000000..ae99189d6f1e --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/resource_py3.py @@ -0,0 +1,58 @@ +# 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 msrest.serialization import Model + + +class Resource(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 + :ivar identity: The identity of the resource. + :vartype 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: Contains resource tags defined as key/value pairs. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'identity': {'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}'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.identity = None + self.location = location + self.type = None + self.tags = tags diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/scale_settings.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/scale_settings.py new file mode 100644 index 000000000000..22b7378a8dca --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/scale_settings.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class ScaleSettings(Model): + """scale settings for BatchAI Compute. + + :param max_node_count: 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 auto_scale_enabled: Enable or disable auto scale + :type auto_scale_enabled: bool + """ + + _attribute_map = { + 'max_node_count': {'key': 'maxNodeCount', 'type': 'int'}, + 'min_node_count': {'key': 'minNodeCount', 'type': 'int'}, + 'auto_scale_enabled': {'key': 'autoScaleEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ScaleSettings, self).__init__(**kwargs) + self.max_node_count = kwargs.get('max_node_count', None) + self.min_node_count = kwargs.get('min_node_count', None) + self.auto_scale_enabled = kwargs.get('auto_scale_enabled', None) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/scale_settings_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/scale_settings_py3.py new file mode 100644 index 000000000000..6a31a9d0d260 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/scale_settings_py3.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class ScaleSettings(Model): + """scale settings for BatchAI Compute. + + :param max_node_count: 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 auto_scale_enabled: Enable or disable auto scale + :type auto_scale_enabled: bool + """ + + _attribute_map = { + 'max_node_count': {'key': 'maxNodeCount', 'type': 'int'}, + 'min_node_count': {'key': 'minNodeCount', 'type': 'int'}, + 'auto_scale_enabled': {'key': 'autoScaleEnabled', 'type': 'bool'}, + } + + def __init__(self, *, max_node_count: int=None, min_node_count: int=None, auto_scale_enabled: bool=None, **kwargs) -> None: + super(ScaleSettings, self).__init__(**kwargs) + self.max_node_count = max_node_count + self.min_node_count = min_node_count + self.auto_scale_enabled = auto_scale_enabled diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/service_principal_credentials.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/service_principal_credentials.py new file mode 100644 index 000000000000..0d9604a1f99a --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/service_principal_credentials.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class ServicePrincipalCredentials(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.get('client_id', None) + self.client_secret = kwargs.get('client_secret', None) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/service_principal_credentials_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/service_principal_credentials_py3.py new file mode 100644 index 000000000000..63c03e32c0e2 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/service_principal_credentials_py3.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class ServicePrincipalCredentials(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, *, client_id: str, client_secret: str, **kwargs) -> None: + super(ServicePrincipalCredentials, self).__init__(**kwargs) + self.client_id = client_id + self.client_secret = client_secret diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/ssl_configuration.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/ssl_configuration.py new file mode 100644 index 000000000000..0a718453e156 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/ssl_configuration.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class SslConfiguration(Model): + """The ssl configugation for scoring. + + :param status: Enable or disable ssl for scoring. Possible values include: + 'Disabled', 'Enabled' + :type status: str or ~azure.mgmt.machinelearningservices.models.enum + :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) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/ssl_configuration_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/ssl_configuration_py3.py new file mode 100644 index 000000000000..cd035222b7d3 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/ssl_configuration_py3.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class SslConfiguration(Model): + """The ssl configugation for scoring. + + :param status: Enable or disable ssl for scoring. Possible values include: + 'Disabled', 'Enabled' + :type status: str or ~azure.mgmt.machinelearningservices.models.enum + :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, *, status=None, cert: str=None, key: str=None, cname: str=None, **kwargs) -> None: + super(SslConfiguration, self).__init__(**kwargs) + self.status = status + self.cert = cert + self.key = key + self.cname = cname diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/system_service.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/system_service.py new file mode 100644 index 000000000000..1cb0ce3fd726 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/system_service.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class SystemService(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 diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/system_service_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/system_service_py3.py new file mode 100644 index 000000000000..7896c46543f8 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/system_service_py3.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class SystemService(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) -> None: + super(SystemService, self).__init__(**kwargs) + self.system_service_type = None + self.public_ip_address = None + self.version = None diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine.py new file mode 100644 index 000000000000..00b966c24a95 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine.py @@ -0,0 +1,69 @@ +# 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 .compute import Compute + + +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. + + :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 + :ivar modified_on: The date and time when the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param properties: + :type properties: + ~azure.mgmt.machinelearningservices.models.VirtualMachineProperties + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + '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]'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'VirtualMachineProperties'}, + } + + def __init__(self, **kwargs): + super(VirtualMachine, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.compute_type = 'VirtualMachine' diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_properties.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_properties.py new file mode 100644 index 000000000000..bc5f51df2d9b --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_properties.py @@ -0,0 +1,33 @@ +# 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 msrest.serialization import Model + + +class VirtualMachineProperties(Model): + """VirtualMachineProperties. + + :param virtual_machine_size: Virtual Machine size + :type virtual_machine_size: 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'}, + '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.administrator_account = kwargs.get('administrator_account', None) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_properties_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_properties_py3.py new file mode 100644 index 000000000000..d651ffda03ce --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_properties_py3.py @@ -0,0 +1,33 @@ +# 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 msrest.serialization import Model + + +class VirtualMachineProperties(Model): + """VirtualMachineProperties. + + :param virtual_machine_size: Virtual Machine size + :type virtual_machine_size: 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'}, + 'administrator_account': {'key': 'administratorAccount', 'type': 'VirtualMachineSshCredentials'}, + } + + def __init__(self, *, virtual_machine_size: str=None, administrator_account=None, **kwargs) -> None: + super(VirtualMachineProperties, self).__init__(**kwargs) + self.virtual_machine_size = virtual_machine_size + self.administrator_account = administrator_account diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_py3.py new file mode 100644 index 000000000000..681b2fd2c26f --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_py3.py @@ -0,0 +1,69 @@ +# 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 .compute_py3 import Compute + + +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. + + :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 + :ivar modified_on: The date and time when the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param properties: + :type properties: + ~azure.mgmt.machinelearningservices.models.VirtualMachineProperties + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + '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]'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'VirtualMachineProperties'}, + } + + def __init__(self, *, description: str=None, resource_id: str=None, properties=None, **kwargs) -> None: + super(VirtualMachine, self).__init__(description=description, resource_id=resource_id, **kwargs) + self.properties = properties + self.compute_type = 'VirtualMachine' diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_secrets.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_secrets.py new file mode 100644 index 000000000000..c7add28fc6ae --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_secrets.py @@ -0,0 +1,39 @@ +# 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 .compute_secrets import ComputeSecrets + + +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. Constant filled by server. + :type compute_type: str + :param administrator_account: Admin creadentials 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.administrator_account = kwargs.get('administrator_account', None) + self.compute_type = 'VirtualMachine' diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_secrets_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_secrets_py3.py new file mode 100644 index 000000000000..4b336f3486d7 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_secrets_py3.py @@ -0,0 +1,39 @@ +# 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 .compute_secrets_py3 import ComputeSecrets + + +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. Constant filled by server. + :type compute_type: str + :param administrator_account: Admin creadentials 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, *, administrator_account=None, **kwargs) -> None: + super(VirtualMachineSecrets, self).__init__(**kwargs) + self.administrator_account = administrator_account + self.compute_type = 'VirtualMachine' diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_ssh_credentials.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_ssh_credentials.py new file mode 100644 index 000000000000..af8de2146197 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_ssh_credentials.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class VirtualMachineSshCredentials(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) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_ssh_credentials_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_ssh_credentials_py3.py new file mode 100644 index 000000000000..4791516564df --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_ssh_credentials_py3.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class VirtualMachineSshCredentials(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, *, username: str=None, password: str=None, public_key_data: str=None, private_key_data: str=None, **kwargs) -> None: + super(VirtualMachineSshCredentials, self).__init__(**kwargs) + self.username = username + self.password = password + self.public_key_data = public_key_data + self.private_key_data = private_key_data diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace.py new file mode 100644 index 000000000000..b8a2845ffeff --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace.py @@ -0,0 +1,108 @@ +# 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 .resource import Resource + + +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 + :ivar identity: The identity of the resource. + :vartype 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: Contains resource tags defined as key/value pairs. + :type tags: dict[str, str] + :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 + :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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'identity': {'readonly': True}, + 'type': {'readonly': True}, + 'workspace_id': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'provisioning_state': {'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}'}, + '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'}, + } + + 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 diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace_paged.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace_paged.py new file mode 100644 index 000000000000..de17db93f2c3 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class WorkspacePaged(Paged): + """ + A paging container for iterating over a list of :class:`Workspace ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Workspace]'} + } + + def __init__(self, *args, **kwargs): + + super(WorkspacePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace_py3.py new file mode 100644 index 000000000000..ddad88bd1195 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace_py3.py @@ -0,0 +1,108 @@ +# 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 .resource_py3 import Resource + + +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 + :ivar identity: The identity of the resource. + :vartype 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: Contains resource tags defined as key/value pairs. + :type tags: dict[str, str] + :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 + :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 + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'identity': {'readonly': True}, + 'type': {'readonly': True}, + 'workspace_id': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'provisioning_state': {'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}'}, + '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'}, + } + + def __init__(self, *, location: str=None, tags=None, description: str=None, friendly_name: str=None, key_vault: str=None, application_insights: str=None, container_registry: str=None, storage_account: str=None, discovery_url: str=None, **kwargs) -> None: + super(Workspace, self).__init__(location=location, tags=tags, **kwargs) + 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 + self.storage_account = storage_account + self.discovery_url = discovery_url + self.provisioning_state = None diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace_update_parameters.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace_update_parameters.py new file mode 100644 index 000000000000..0fac3f7648f4 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace_update_parameters.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class WorkspaceUpdateParameters(Model): + """The parameters for updating a machine learning workspace. + + :param tags: The resource tags for the machine learning workspace. + :type tags: dict[str, str] + :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}'}, + '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.description = kwargs.get('description', None) + self.friendly_name = kwargs.get('friendly_name', None) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace_update_parameters_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace_update_parameters_py3.py new file mode 100644 index 000000000000..ad44f269cf6a --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace_update_parameters_py3.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class WorkspaceUpdateParameters(Model): + """The parameters for updating a machine learning workspace. + + :param tags: The resource tags for the machine learning workspace. + :type tags: dict[str, str] + :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}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + } + + def __init__(self, *, tags=None, description: str=None, friendly_name: str=None, **kwargs) -> None: + super(WorkspaceUpdateParameters, self).__init__(**kwargs) + self.tags = tags + self.description = description + self.friendly_name = friendly_name diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/__init__.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/__init__.py new file mode 100644 index 000000000000..97f27ec5c277 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/__init__.py @@ -0,0 +1,20 @@ +# 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 .operations import Operations +from .workspaces_operations import WorkspacesOperations +from .machine_learning_compute_operations import MachineLearningComputeOperations + +__all__ = [ + 'Operations', + 'WorkspacesOperations', + 'MachineLearningComputeOperations', +] diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/machine_learning_compute_operations.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/machine_learning_compute_operations.py new file mode 100644 index 000000000000..f12c1d119ccd --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/machine_learning_compute_operations.py @@ -0,0 +1,461 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class MachineLearningComputeOperations(object): + """MachineLearningComputeOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of Azure Machine Learning resource provider API. Constant value: "2018-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-03-01-preview" + + self.config = config + + def list_by_workspace( + self, resource_group_name, workspace_name, skiptoken=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ComputeResource + :rtype: + ~azure.mgmt.machinelearningservices.models.ComputeResourcePaged[~azure.mgmt.machinelearningservices.models.ComputeResource] + :raises: + :class:`MachineLearningServiceErrorException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_workspace.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if skiptoken is not None: + query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.MachineLearningServiceErrorException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.ComputeResourcePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ComputeResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes'} + + def get( + self, resource_group_name, workspace_name, compute_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ComputeResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.machinelearningservices.models.ComputeResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`MachineLearningServiceErrorException` + """ + # Construct URL + url = self.get.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.MachineLearningServiceErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ComputeResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} + + + def _create_or_update_initial( + self, resource_group_name, workspace_name, compute_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ComputeResource') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.MachineLearningServiceErrorException(self._deserialize, response) + + deserialized = None + header_dict = {} + + if response.status_code == 200: + deserialized = self._deserialize('ComputeResource', response) + header_dict = { + 'Azure-AsyncOperation': 'str', + } + if response.status_code == 201: + deserialized = self._deserialize('ComputeResource', response) + header_dict = { + 'Azure-AsyncOperation': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, workspace_name, compute_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns ComputeResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.machinelearningservices.models.ComputeResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.machinelearningservices.models.ComputeResource]] + :raises: + :class:`MachineLearningServiceErrorException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + header_dict = { + 'Azure-AsyncOperation': 'str', + } + deserialized = self._deserialize('ComputeResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} + + + def _delete_initial( + self, resource_group_name, workspace_name, compute_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.MachineLearningServiceErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + header_dict = { + 'Azure-AsyncOperation': 'str', + 'Location': 'str', + } + client_raw_response.add_headers(header_dict) + return client_raw_response + + def delete( + self, resource_group_name, workspace_name, compute_name, custom_headers=None, raw=False, polling=True, **operation_config): + """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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`MachineLearningServiceErrorException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'Azure-AsyncOperation': 'str', + 'Location': 'str', + }) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} + + def get_keys( + self, resource_group_name, workspace_name, compute_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ComputeSecrets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.machinelearningservices.models.ComputeSecrets or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`MachineLearningServiceErrorException` + """ + # Construct URL + url = self.get_keys.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.MachineLearningServiceErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ComputeSecrets', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listKeys'} diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/operations.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/operations.py new file mode 100644 index 000000000000..af4a92381ced --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/operations.py @@ -0,0 +1,98 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class Operations(object): + """Operations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of Azure Machine Learning resource provider API. Constant value: "2018-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-03-01-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available Azure Machine Learning Workspaces REST API + operations. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.machinelearningservices.models.OperationPaged[~azure.mgmt.machinelearningservices.models.Operation] + :raises: + :class:`MachineLearningServiceErrorException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.MachineLearningServiceErrorException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.MachineLearningServices/operations'} diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/workspaces_operations.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/workspaces_operations.py new file mode 100644 index 000000000000..4fa56210b279 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/workspaces_operations.py @@ -0,0 +1,557 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class WorkspacesOperations(object): + """WorkspacesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of Azure Machine Learning resource provider API. Constant value: "2018-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-03-01-preview" + + self.config = config + + def get( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """Gets the properties of the specified machine learning 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Workspace or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.machinelearningservices.models.Workspace or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`MachineLearningServiceErrorException` + """ + # Construct URL + url = self.get.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.MachineLearningServiceErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Workspace', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} + + def create_or_update( + self, resource_group_name, workspace_name, parameters, custom_headers=None, raw=False, **operation_config): + """Creates or updates a workspace with the specified parameters. + + :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 parameters: The parameters for creating or updating a machine + learning workspace. + :type parameters: ~azure.mgmt.machinelearningservices.models.Workspace + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Workspace or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.machinelearningservices.models.Workspace or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`MachineLearningServiceErrorException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'Workspace') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.MachineLearningServiceErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Workspace', response) + if response.status_code == 201: + deserialized = self._deserialize('Workspace', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} + + def delete( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """Deletes a machine learning 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`MachineLearningServiceErrorException` + """ + # Construct URL + url = self.delete.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.MachineLearningServiceErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} + + def update( + self, resource_group_name, workspace_name, parameters, custom_headers=None, raw=False, **operation_config): + """Updates a machine learning workspace with the specified parameters. + + :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 parameters: The parameters for updating a machine learning + workspace. + :type parameters: + ~azure.mgmt.machinelearningservices.models.WorkspaceUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Workspace or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.machinelearningservices.models.Workspace or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`MachineLearningServiceErrorException` + """ + # Construct URL + url = self.update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'WorkspaceUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.MachineLearningServiceErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Workspace', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} + + def list_by_resource_group( + self, resource_group_name, skiptoken=None, custom_headers=None, raw=False, **operation_config): + """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. + :type resource_group_name: str + :param skiptoken: Continuation token for pagination. + :type skiptoken: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Workspace + :rtype: + ~azure.mgmt.machinelearningservices.models.WorkspacePaged[~azure.mgmt.machinelearningservices.models.Workspace] + :raises: + :class:`MachineLearningServiceErrorException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if skiptoken is not None: + query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.MachineLearningServiceErrorException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.WorkspacePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.WorkspacePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces'} + + def list_keys( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """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. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ListWorkspaceKeysResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.machinelearningservices.models.ListWorkspaceKeysResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`MachineLearningServiceErrorException` + """ + # Construct URL + url = self.list_keys.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.MachineLearningServiceErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ListWorkspaceKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listKeys'} + + def resync_keys( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`MachineLearningServiceErrorException` + """ + # Construct URL + url = self.resync_keys.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.MachineLearningServiceErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + resync_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys'} + + def list_by_subscription( + self, skiptoken=None, custom_headers=None, raw=False, **operation_config): + """Lists all the available machine learning workspaces under the specified + subscription. + + :param skiptoken: Continuation token for pagination. + :type skiptoken: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Workspace + :rtype: + ~azure.mgmt.machinelearningservices.models.WorkspacePaged[~azure.mgmt.machinelearningservices.models.Workspace] + :raises: + :class:`MachineLearningServiceErrorException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if skiptoken is not None: + query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.MachineLearningServiceErrorException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.WorkspacePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.WorkspacePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces'} diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/version.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/version.py new file mode 100644 index 000000000000..e0ec669828cb --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" + From 3112003e04e612f8799b471b3aecc736c736726e Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 17 Sep 2018 10:54:52 -0700 Subject: [PATCH 2/7] [AutoPR machinelearningservices/resource-manager] Masable/update workspace (#3350) * Generated from 9f1d75e435775ac514aa5ce12141019926af3e9e Fix whitespace * Packaging update of azure-mgmt-machinelearningservices * Generated from 59b6b1027480b882d9517f5ec36ec2b16fcc6f89 Correctly update casing of all usages of batchaiWorkspace --- .../HISTORY.rst | 9 ++ .../MANIFEST.in | 2 + azure-mgmt-machinelearningservices/README.rst | 49 +++++++++++ .../azure/__init__.py | 1 + .../azure/mgmt/__init__.py | 1 + .../models/workspace.py | 5 ++ .../models/workspace_py3.py | 7 +- .../machine_learning_compute_operations.py | 30 +++---- .../operations/operations.py | 7 +- .../operations/workspaces_operations.py | 48 +++++------ .../azure_bdist_wheel.py | 54 ++++++++++++ .../sdk_packaging.toml | 6 ++ azure-mgmt-machinelearningservices/setup.cfg | 3 + azure-mgmt-machinelearningservices/setup.py | 86 +++++++++++++++++++ 14 files changed, 261 insertions(+), 47 deletions(-) create mode 100644 azure-mgmt-machinelearningservices/HISTORY.rst create mode 100644 azure-mgmt-machinelearningservices/MANIFEST.in create mode 100644 azure-mgmt-machinelearningservices/README.rst create mode 100644 azure-mgmt-machinelearningservices/azure/__init__.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/__init__.py create mode 100644 azure-mgmt-machinelearningservices/azure_bdist_wheel.py create mode 100644 azure-mgmt-machinelearningservices/sdk_packaging.toml create mode 100644 azure-mgmt-machinelearningservices/setup.cfg create mode 100644 azure-mgmt-machinelearningservices/setup.py diff --git a/azure-mgmt-machinelearningservices/HISTORY.rst b/azure-mgmt-machinelearningservices/HISTORY.rst new file mode 100644 index 000000000000..8924d5d6c445 --- /dev/null +++ b/azure-mgmt-machinelearningservices/HISTORY.rst @@ -0,0 +1,9 @@ +.. :changelog: + +Release History +=============== + +0.1.0 (1970-01-01) +++++++++++++++++++ + +* Initial Release diff --git a/azure-mgmt-machinelearningservices/MANIFEST.in b/azure-mgmt-machinelearningservices/MANIFEST.in new file mode 100644 index 000000000000..9ecaeb15de50 --- /dev/null +++ b/azure-mgmt-machinelearningservices/MANIFEST.in @@ -0,0 +1,2 @@ +include *.rst +include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-machinelearningservices/README.rst b/azure-mgmt-machinelearningservices/README.rst new file mode 100644 index 000000000000..45de4e6b43dd --- /dev/null +++ b/azure-mgmt-machinelearningservices/README.rst @@ -0,0 +1,49 @@ +Microsoft Azure SDK for Python +============================== + +This is the Microsoft Azure MyService Management Client Library. + +Azure Resource Manager (ARM) is the next generation of management APIs that +replace the old Azure Service Management (ASM). + +This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. + +For the older Azure Service Management (ASM) libraries, see +`azure-servicemanagement-legacy `__ library. + +For a more complete set of Azure libraries, see the `azure `__ bundle package. + + +Compatibility +============= + +**IMPORTANT**: If you have an earlier version of the azure package +(version < 1.0), you should uninstall it before installing this package. + +You can check the version using pip: + +.. code:: shell + + pip freeze + +If you see azure==0.11.0 (or any version below 1.0), uninstall it first: + +.. code:: shell + + pip uninstall azure + + +Usage +===== + +For code examples, see `MyService Management +`__ +on docs.microsoft.com. + + +Provide Feedback +================ + +If you encounter any bugs or have suggestions, please file an issue in the +`Issues `__ +section of the project. diff --git a/azure-mgmt-machinelearningservices/azure/__init__.py b/azure-mgmt-machinelearningservices/azure/__init__.py new file mode 100644 index 000000000000..de40ea7ca058 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/__init__.py b/azure-mgmt-machinelearningservices/azure/mgmt/__init__.py new file mode 100644 index 000000000000..de40ea7ca058 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace.py index b8a2845ffeff..b6825cde06df 100644 --- a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace.py +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace.py @@ -40,6 +40,9 @@ class Workspace(Resource): :ivar creation_time: The creation time of the machine learning workspace in ISO8601 format. :vartype creation_time: datetime + :param batchai_workspace: ARM id of the Batch AI workspace associated with + this workspace. This cannot be changed once the workspace has been created + :type batchai_workspace: str :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 @@ -86,6 +89,7 @@ class Workspace(Resource): 'description': {'key': 'properties.description', 'type': 'str'}, 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'batchai_workspace': {'key': 'properties.batchaiWorkspace', 'type': 'str'}, 'key_vault': {'key': 'properties.keyVault', 'type': 'str'}, 'application_insights': {'key': 'properties.applicationInsights', 'type': 'str'}, 'container_registry': {'key': 'properties.containerRegistry', 'type': 'str'}, @@ -100,6 +104,7 @@ def __init__(self, **kwargs): self.description = kwargs.get('description', None) self.friendly_name = kwargs.get('friendly_name', None) self.creation_time = None + self.batchai_workspace = kwargs.get('batchai_workspace', 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) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace_py3.py index ddad88bd1195..66c8edfd9657 100644 --- a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace_py3.py +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace_py3.py @@ -40,6 +40,9 @@ class Workspace(Resource): :ivar creation_time: The creation time of the machine learning workspace in ISO8601 format. :vartype creation_time: datetime + :param batchai_workspace: ARM id of the Batch AI workspace associated with + this workspace. This cannot be changed once the workspace has been created + :type batchai_workspace: str :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 @@ -86,6 +89,7 @@ class Workspace(Resource): 'description': {'key': 'properties.description', 'type': 'str'}, 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'batchai_workspace': {'key': 'properties.batchaiWorkspace', 'type': 'str'}, 'key_vault': {'key': 'properties.keyVault', 'type': 'str'}, 'application_insights': {'key': 'properties.applicationInsights', 'type': 'str'}, 'container_registry': {'key': 'properties.containerRegistry', 'type': 'str'}, @@ -94,12 +98,13 @@ class Workspace(Resource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, *, location: str=None, tags=None, description: str=None, friendly_name: str=None, key_vault: str=None, application_insights: str=None, container_registry: str=None, storage_account: str=None, discovery_url: str=None, **kwargs) -> None: + def __init__(self, *, location: str=None, tags=None, description: str=None, friendly_name: str=None, batchai_workspace: str=None, key_vault: str=None, application_insights: str=None, container_registry: str=None, storage_account: str=None, discovery_url: str=None, **kwargs) -> None: super(Workspace, self).__init__(location=location, tags=tags, **kwargs) self.workspace_id = None self.description = description self.friendly_name = friendly_name self.creation_time = None + self.batchai_workspace = batchai_workspace self.key_vault = key_vault self.application_insights = application_insights self.container_registry = container_registry diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/machine_learning_compute_operations.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/machine_learning_compute_operations.py index f12c1d119ccd..58fc32ed64cd 100644 --- a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/machine_learning_compute_operations.py +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/machine_learning_compute_operations.py @@ -84,7 +84,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -93,9 +93,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.MachineLearningServiceErrorException(self._deserialize, response) @@ -153,7 +152,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -162,8 +161,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.MachineLearningServiceErrorException(self._deserialize, response) @@ -199,6 +198,7 @@ def _create_or_update_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -211,9 +211,8 @@ def _create_or_update_initial( body_content = self._serialize.body(parameters, 'ComputeResource') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: raise models.MachineLearningServiceErrorException(self._deserialize, response) @@ -320,7 +319,6 @@ def _delete_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -329,8 +327,8 @@ def _delete_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: raise models.MachineLearningServiceErrorException(self._deserialize, response) @@ -433,7 +431,7 @@ def get_keys( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -442,8 +440,8 @@ def get_keys( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.MachineLearningServiceErrorException(self._deserialize, response) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/operations.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/operations.py index af4a92381ced..d3de28914e7b 100644 --- a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/operations.py +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/operations.py @@ -68,7 +68,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -77,9 +77,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.MachineLearningServiceErrorException(self._deserialize, response) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/workspaces_operations.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/workspaces_operations.py index 4fa56210b279..eae707efcb11 100644 --- a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/workspaces_operations.py +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/workspaces_operations.py @@ -71,7 +71,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -80,8 +80,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.MachineLearningServiceErrorException(self._deserialize, response) @@ -136,6 +136,7 @@ def create_or_update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -148,9 +149,8 @@ def create_or_update( body_content = self._serialize.body(parameters, 'Workspace') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: raise models.MachineLearningServiceErrorException(self._deserialize, response) @@ -203,7 +203,6 @@ def delete( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -212,8 +211,8 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: raise models.MachineLearningServiceErrorException(self._deserialize, response) @@ -262,6 +261,7 @@ def update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -274,9 +274,8 @@ def update( body_content = self._serialize.body(parameters, 'WorkspaceUpdateParameters') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.MachineLearningServiceErrorException(self._deserialize, response) @@ -337,7 +336,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -346,9 +345,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.MachineLearningServiceErrorException(self._deserialize, response) @@ -404,7 +402,7 @@ def list_keys( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -413,8 +411,8 @@ def list_keys( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.MachineLearningServiceErrorException(self._deserialize, response) @@ -467,7 +465,6 @@ def resync_keys( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -476,8 +473,8 @@ def resync_keys( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.MachineLearningServiceErrorException(self._deserialize, response) @@ -527,7 +524,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -536,9 +533,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.MachineLearningServiceErrorException(self._deserialize, response) diff --git a/azure-mgmt-machinelearningservices/azure_bdist_wheel.py b/azure-mgmt-machinelearningservices/azure_bdist_wheel.py new file mode 100644 index 000000000000..8a81d1b61775 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure_bdist_wheel.py @@ -0,0 +1,54 @@ +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +from distutils import log as logger +import os.path + +from wheel.bdist_wheel import bdist_wheel +class azure_bdist_wheel(bdist_wheel): + """The purpose of this class is to build wheel a little differently than the sdist, + without requiring to build the wheel from the sdist (i.e. you can build the wheel + directly from source). + """ + + description = "Create an Azure wheel distribution" + + user_options = bdist_wheel.user_options + \ + [('azure-namespace-package=', None, + "Name of the deepest nspkg used")] + + def initialize_options(self): + bdist_wheel.initialize_options(self) + self.azure_namespace_package = None + + def finalize_options(self): + bdist_wheel.finalize_options(self) + if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): + raise ValueError("azure_namespace_package must finish by -nspkg") + + def run(self): + if not self.distribution.install_requires: + self.distribution.install_requires = [] + self.distribution.install_requires.append( + "{}>=2.0.0".format(self.azure_namespace_package)) + bdist_wheel.run(self) + + def write_record(self, bdist_dir, distinfo_dir): + if self.azure_namespace_package: + # Split and remove last part, assuming it's "nspkg" + subparts = self.azure_namespace_package.split('-')[0:-1] + folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] + for azure_sub_package in folder_with_init: + init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') + if os.path.isfile(init_file): + logger.info("manually remove {} while building the wheel".format(init_file)) + os.remove(init_file) + else: + raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) + bdist_wheel.write_record(self, bdist_dir, distinfo_dir) +cmdclass = { + 'bdist_wheel': azure_bdist_wheel, +} diff --git a/azure-mgmt-machinelearningservices/sdk_packaging.toml b/azure-mgmt-machinelearningservices/sdk_packaging.toml new file mode 100644 index 000000000000..42a8f90bd7e2 --- /dev/null +++ b/azure-mgmt-machinelearningservices/sdk_packaging.toml @@ -0,0 +1,6 @@ +[packaging] +package_name = "azure-mgmt-machinelearningservices" +package_pprint_name = "MyService Management" +package_doc_id = "" +is_stable = false +is_arm = true diff --git a/azure-mgmt-machinelearningservices/setup.cfg b/azure-mgmt-machinelearningservices/setup.cfg new file mode 100644 index 000000000000..856f4164982c --- /dev/null +++ b/azure-mgmt-machinelearningservices/setup.cfg @@ -0,0 +1,3 @@ +[bdist_wheel] +universal=1 +azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/azure-mgmt-machinelearningservices/setup.py b/azure-mgmt-machinelearningservices/setup.py new file mode 100644 index 000000000000..1d9d1aef5068 --- /dev/null +++ b/azure-mgmt-machinelearningservices/setup.py @@ -0,0 +1,86 @@ +#!/usr/bin/env python + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import re +import os.path +from io import open +from setuptools import find_packages, setup +try: + from azure_bdist_wheel import cmdclass +except ImportError: + from distutils import log as logger + logger.warn("Wheel is not available, disabling bdist_wheel hook") + cmdclass = {} + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-mgmt-machinelearningservices" +PACKAGE_PPRINT_NAME = "MyService Management" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + try: + ver = azure.__version__ + raise Exception( + 'This package is incompatible with azure=={}. '.format(ver) + + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.rst', encoding='utf-8') as f: + readme = f.read() +with open('HISTORY.rst', encoding='utf-8') as f: + history = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + history, + license='MIT License', + author='Microsoft Corporation', + author_email='azpysdkhelp@microsoft.com', + url='https://github.com/Azure/azure-sdk-for-python', + classifiers=[ + 'Development Status :: 4 - Beta', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'License :: OSI Approved :: MIT License', + ], + zip_safe=False, + packages=find_packages(exclude=["tests"]), + install_requires=[ + 'msrest>=0.5.0', + 'msrestazure>=0.4.32,<2.0.0', + 'azure-common~=1.1', + ], + cmdclass=cmdclass +) From 4e9607ccbc1f24617339833da6e8000097051b38 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 19 Sep 2018 13:39:14 -0700 Subject: [PATCH 3/7] [AutoPR machinelearningservices/resource-manager] update machine learning compute portion of the machine learning services swagger (#3333) * Generated from 5271be59e1385aa17e3cc8b4e0ee8e1a1c9d7415 update examples * Packaging update of azure-mgmt-machinelearningservices * Generated from 4591722b279f1148b3c6b3e2307a07f4843b4929 added long-running op update accordingly * Generated from b8420a388d27fe9089e179f0d9b6bd126f43ad60 remote wrong readOnly * Generated from b8420a388d27fe9089e179f0d9b6bd126f43ad60 remote wrong readOnly --- .../models/__init__.py | 6 + .../machinelearningservices/models/aks.py | 3 + .../machinelearningservices/models/aks_py3.py | 7 +- ...azure_machine_learning_workspaces_enums.py | 1 + .../models/batch_ai.py | 3 + .../models/batch_ai_py3.py | 7 +- .../machinelearningservices/models/compute.py | 8 +- .../models/compute_py3.py | 10 +- .../models/data_factory.py | 3 + .../models/data_factory_py3.py | 7 +- .../models/hd_insight.py | 72 ++++++++++++ .../models/hd_insight_properties.py | 39 +++++++ .../models/hd_insight_properties_py3.py | 39 +++++++ .../models/hd_insight_py3.py | 72 ++++++++++++ .../models/virtual_machine.py | 3 + .../models/virtual_machine_properties.py | 8 ++ .../models/virtual_machine_properties_py3.py | 10 +- .../models/virtual_machine_py3.py | 7 +- .../machine_learning_compute_operations.py | 106 ++++++++++++++++-- 19 files changed, 390 insertions(+), 21 deletions(-) create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/hd_insight.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/hd_insight_properties.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/hd_insight_properties_py3.py create mode 100644 azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/hd_insight_py3.py diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/__init__.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/__init__.py index fc6dfadba291..e03d0d68a8a8 100644 --- a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/__init__.py +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/__init__.py @@ -34,6 +34,8 @@ from .virtual_machine_ssh_credentials_py3 import VirtualMachineSshCredentials from .virtual_machine_properties_py3 import VirtualMachineProperties from .virtual_machine_py3 import VirtualMachine + from .hd_insight_properties_py3 import HDInsightProperties + from .hd_insight_py3 import HDInsight from .data_factory_py3 import DataFactory from .service_principal_credentials_py3 import ServicePrincipalCredentials from .compute_secrets_py3 import ComputeSecrets @@ -64,6 +66,8 @@ from .virtual_machine_ssh_credentials import VirtualMachineSshCredentials from .virtual_machine_properties import VirtualMachineProperties from .virtual_machine import VirtualMachine + from .hd_insight_properties import HDInsightProperties + from .hd_insight import HDInsight from .data_factory import DataFactory from .service_principal_credentials import ServicePrincipalCredentials from .compute_secrets import ComputeSecrets @@ -103,6 +107,8 @@ 'VirtualMachineSshCredentials', 'VirtualMachineProperties', 'VirtualMachine', + 'HDInsightProperties', + 'HDInsight', 'DataFactory', 'ServicePrincipalCredentials', 'ComputeSecrets', diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks.py index 94f17e58b2ac..e5d56bfa1a0b 100644 --- a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks.py +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks.py @@ -20,6 +20,8 @@ class AKS(Compute): All required parameters must be populated in order to send to Azure. + :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', @@ -52,6 +54,7 @@ class AKS(Compute): } _attribute_map = { + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_py3.py index c8d8b22b78f8..063a0677bdc1 100644 --- a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_py3.py +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_py3.py @@ -20,6 +20,8 @@ class AKS(Compute): All required parameters must be populated in order to send to Azure. + :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', @@ -52,6 +54,7 @@ class AKS(Compute): } _attribute_map = { + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, @@ -62,7 +65,7 @@ class AKS(Compute): 'properties': {'key': 'properties', 'type': 'AKSProperties'}, } - def __init__(self, *, description: str=None, resource_id: str=None, properties=None, **kwargs) -> None: - super(AKS, self).__init__(description=description, resource_id=resource_id, **kwargs) + def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, properties=None, **kwargs) -> None: + super(AKS, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, **kwargs) self.properties = properties self.compute_type = 'AKS' diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/azure_machine_learning_workspaces_enums.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/azure_machine_learning_workspaces_enums.py index 89532c08ee6b..b36d430ec8dd 100644 --- a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/azure_machine_learning_workspaces_enums.py +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/azure_machine_learning_workspaces_enums.py @@ -34,3 +34,4 @@ class ComputeType(str, Enum): batch_ai = "BatchAI" data_factory = "DataFactory" virtual_machine = "VirtualMachine" + hd_insight = "HDInsight" diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai.py index d3e8d226d815..87462f377eca 100644 --- a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai.py +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai.py @@ -20,6 +20,8 @@ class BatchAI(Compute): All required parameters must be populated in order to send to Azure. + :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', @@ -53,6 +55,7 @@ class BatchAI(Compute): } _attribute_map = { + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai_py3.py index 684e0e0b342c..796a26605720 100644 --- a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai_py3.py +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai_py3.py @@ -20,6 +20,8 @@ class BatchAI(Compute): All required parameters must be populated in order to send to Azure. + :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', @@ -53,6 +55,7 @@ class BatchAI(Compute): } _attribute_map = { + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, @@ -63,7 +66,7 @@ class BatchAI(Compute): 'properties': {'key': 'properties', 'type': 'BatchAIProperties'}, } - def __init__(self, *, description: str=None, resource_id: str=None, properties=None, **kwargs) -> None: - super(BatchAI, self).__init__(description=description, resource_id=resource_id, **kwargs) + def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, properties=None, **kwargs) -> None: + super(BatchAI, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, **kwargs) self.properties = properties self.compute_type = 'BatchAI' diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute.py index 2c162e62daec..036834066c20 100644 --- a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute.py +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute.py @@ -16,13 +16,15 @@ class Compute(Model): """Machine Learning compute object. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AKS, BatchAI, VirtualMachine, DataFactory + sub-classes are: AKS, BatchAI, VirtualMachine, HDInsight, DataFactory 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_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', @@ -53,6 +55,7 @@ class Compute(Model): } _attribute_map = { + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, @@ -63,11 +66,12 @@ class Compute(Model): } _subtype_map = { - 'compute_type': {'AKS': 'AKS', 'BatchAI': 'BatchAI', 'VirtualMachine': 'VirtualMachine', 'DataFactory': 'DataFactory'} + 'compute_type': {'AKS': 'AKS', 'BatchAI': 'BatchAI', 'VirtualMachine': 'VirtualMachine', 'HDInsight': 'HDInsight', 'DataFactory': 'DataFactory'} } def __init__(self, **kwargs): super(Compute, self).__init__(**kwargs) + self.compute_location = kwargs.get('compute_location', None) self.provisioning_state = None self.description = kwargs.get('description', None) self.created_on = None diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_py3.py index 8664bd9c46f9..1e4bd15aa95a 100644 --- a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_py3.py +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_py3.py @@ -16,13 +16,15 @@ class Compute(Model): """Machine Learning compute object. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AKS, BatchAI, VirtualMachine, DataFactory + sub-classes are: AKS, BatchAI, VirtualMachine, HDInsight, DataFactory 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_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', @@ -53,6 +55,7 @@ class Compute(Model): } _attribute_map = { + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, @@ -63,11 +66,12 @@ class Compute(Model): } _subtype_map = { - 'compute_type': {'AKS': 'AKS', 'BatchAI': 'BatchAI', 'VirtualMachine': 'VirtualMachine', 'DataFactory': 'DataFactory'} + 'compute_type': {'AKS': 'AKS', 'BatchAI': 'BatchAI', 'VirtualMachine': 'VirtualMachine', 'HDInsight': 'HDInsight', 'DataFactory': 'DataFactory'} } - def __init__(self, *, description: str=None, resource_id: str=None, **kwargs) -> None: + def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, **kwargs) -> None: super(Compute, self).__init__(**kwargs) + self.compute_location = compute_location self.provisioning_state = None self.description = description self.created_on = None diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_factory.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_factory.py index 1df12a8a9c3d..0733acb2664c 100644 --- a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_factory.py +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_factory.py @@ -20,6 +20,8 @@ class DataFactory(Compute): All required parameters must be populated in order to send to Azure. + :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', @@ -50,6 +52,7 @@ class DataFactory(Compute): } _attribute_map = { + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_factory_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_factory_py3.py index 8340934ea2fd..7c3501b24c10 100644 --- a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_factory_py3.py +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_factory_py3.py @@ -20,6 +20,8 @@ class DataFactory(Compute): All required parameters must be populated in order to send to Azure. + :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', @@ -50,6 +52,7 @@ class DataFactory(Compute): } _attribute_map = { + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, @@ -59,6 +62,6 @@ class DataFactory(Compute): 'compute_type': {'key': 'computeType', 'type': 'str'}, } - def __init__(self, *, description: str=None, resource_id: str=None, **kwargs) -> None: - super(DataFactory, self).__init__(description=description, resource_id=resource_id, **kwargs) + def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, **kwargs) -> None: + super(DataFactory, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, **kwargs) self.compute_type = 'DataFactory' diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/hd_insight.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/hd_insight.py new file mode 100644 index 000000000000..36e32adee0fe --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/hd_insight.py @@ -0,0 +1,72 @@ +# 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 .compute import Compute + + +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_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 + :ivar modified_on: The date and time when the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param properties: + :type properties: + ~azure.mgmt.machinelearningservices.models.HDInsightProperties + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + '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]'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'HDInsightProperties'}, + } + + def __init__(self, **kwargs): + super(HDInsight, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.compute_type = 'HDInsight' diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/hd_insight_properties.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/hd_insight_properties.py new file mode 100644 index 000000000000..d463d743423c --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/hd_insight_properties.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class HDInsightProperties(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) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/hd_insight_properties_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/hd_insight_properties_py3.py new file mode 100644 index 000000000000..261b347410f0 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/hd_insight_properties_py3.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class HDInsightProperties(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, *, ssh_port: int=None, address: str=None, administrator_account=None, **kwargs) -> None: + super(HDInsightProperties, self).__init__(**kwargs) + self.ssh_port = ssh_port + self.address = address + self.administrator_account = administrator_account diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/hd_insight_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/hd_insight_py3.py new file mode 100644 index 000000000000..e4341660c48e --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/hd_insight_py3.py @@ -0,0 +1,72 @@ +# 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 .compute_py3 import Compute + + +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_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 + :ivar modified_on: The date and time when the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param properties: + :type properties: + ~azure.mgmt.machinelearningservices.models.HDInsightProperties + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + '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]'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'HDInsightProperties'}, + } + + def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, properties=None, **kwargs) -> None: + super(HDInsight, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, **kwargs) + self.properties = properties + self.compute_type = 'HDInsight' diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine.py index 00b966c24a95..b28ea14b0cb7 100644 --- a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine.py +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine.py @@ -20,6 +20,8 @@ class VirtualMachine(Compute): All required parameters must be populated in order to send to Azure. + :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', @@ -53,6 +55,7 @@ class VirtualMachine(Compute): } _attribute_map = { + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_properties.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_properties.py index bc5f51df2d9b..caaffa670ad1 100644 --- a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_properties.py +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_properties.py @@ -17,6 +17,10 @@ class VirtualMachineProperties(Model): :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 @@ -24,10 +28,14 @@ class VirtualMachineProperties(Model): _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) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_properties_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_properties_py3.py index d651ffda03ce..bd21b20d593d 100644 --- a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_properties_py3.py +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_properties_py3.py @@ -17,6 +17,10 @@ class VirtualMachineProperties(Model): :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 @@ -24,10 +28,14 @@ class VirtualMachineProperties(Model): _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, *, virtual_machine_size: str=None, administrator_account=None, **kwargs) -> None: + def __init__(self, *, virtual_machine_size: str=None, ssh_port: int=None, address: str=None, administrator_account=None, **kwargs) -> None: 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 diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_py3.py index 681b2fd2c26f..eb9108b0d7df 100644 --- a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_py3.py +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_py3.py @@ -20,6 +20,8 @@ class VirtualMachine(Compute): All required parameters must be populated in order to send to Azure. + :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', @@ -53,6 +55,7 @@ class VirtualMachine(Compute): } _attribute_map = { + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, @@ -63,7 +66,7 @@ class VirtualMachine(Compute): 'properties': {'key': 'properties', 'type': 'VirtualMachineProperties'}, } - def __init__(self, *, description: str=None, resource_id: str=None, properties=None, **kwargs) -> None: - super(VirtualMachine, self).__init__(description=description, resource_id=resource_id, **kwargs) + def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, properties=None, **kwargs) -> None: + super(VirtualMachine, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, **kwargs) self.properties = properties self.compute_type = 'VirtualMachine' diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/machine_learning_compute_operations.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/machine_learning_compute_operations.py index 58fc32ed64cd..af0af15ccc9e 100644 --- a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/machine_learning_compute_operations.py +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/machine_learning_compute_operations.py @@ -110,7 +110,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes'} + list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes'} def get( self, resource_group_name, workspace_name, compute_name, custom_headers=None, raw=False, **operation_config): @@ -177,7 +177,7 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} def _create_or_update_initial( @@ -298,7 +298,7 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} def _delete_initial( @@ -390,9 +390,101 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} - def get_keys( + + def _system_update_initial( + self, resource_group_name, workspace_name, compute_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.system_update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.MachineLearningServiceErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + header_dict = { + 'Azure-AsyncOperation': 'str', + 'Location': 'str', + } + client_raw_response.add_headers(header_dict) + return client_raw_response + + def system_update( + self, resource_group_name, workspace_name, compute_name, custom_headers=None, raw=False, polling=True, **operation_config): + """System Update On 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 dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`MachineLearningServiceErrorException` + """ + raw_result = self._system_update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'Azure-AsyncOperation': 'str', + 'Location': 'str', + }) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + system_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} + + def list_keys( self, resource_group_name, workspace_name, compute_name, custom_headers=None, raw=False, **operation_config): """Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). @@ -416,7 +508,7 @@ def get_keys( :class:`MachineLearningServiceErrorException` """ # Construct URL - url = self.get_keys.metadata['url'] + url = self.list_keys.metadata['url'] 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'), @@ -456,4 +548,4 @@ def get_keys( return client_raw_response return deserialized - get_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listKeys'} + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listKeys'} From 23b79474b8f8639acf46d99dccf4e4ca79a46196 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 3 Dec 2018 23:10:54 -0800 Subject: [PATCH 4/7] [AutoPR machinelearningservices/resource-manager] typo: machinelearningservices/resource-manager/Microsoft.MachineLearningServices (#3947) * Generated from c5cbe5bc003fa15bccef51f089788c2cfb6a0a9c typo: machinelearningservices/resource-manager/Microsoft.MachineLearningServices - SSL capitalization - configugation -> configuration - creadentials -> credentials * Packaging update of azure-mgmt-machinelearningservices --- .../MANIFEST.in | 4 +- .../azure/__init__.py | 2 +- .../azure/mgmt/__init__.py | 2 +- .../models/ssl_configuration.py | 4 +- .../models/ssl_configuration_py3.py | 4 +- .../models/virtual_machine_secrets.py | 2 +- .../models/virtual_machine_secrets_py3.py | 2 +- .../azure_bdist_wheel.py | 54 ------------------- azure-mgmt-machinelearningservices/setup.cfg | 1 - azure-mgmt-machinelearningservices/setup.py | 17 +++--- 10 files changed, 20 insertions(+), 72 deletions(-) delete mode 100644 azure-mgmt-machinelearningservices/azure_bdist_wheel.py diff --git a/azure-mgmt-machinelearningservices/MANIFEST.in b/azure-mgmt-machinelearningservices/MANIFEST.in index 9ecaeb15de50..6ceb27f7a96e 100644 --- a/azure-mgmt-machinelearningservices/MANIFEST.in +++ b/azure-mgmt-machinelearningservices/MANIFEST.in @@ -1,2 +1,4 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file +include azure/__init__.py +include azure/mgmt/__init__.py + diff --git a/azure-mgmt-machinelearningservices/azure/__init__.py b/azure-mgmt-machinelearningservices/azure/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-machinelearningservices/azure/__init__.py +++ b/azure-mgmt-machinelearningservices/azure/__init__.py @@ -1 +1 @@ -__import__('pkg_resources').declare_namespace(__name__) +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/__init__.py b/azure-mgmt-machinelearningservices/azure/mgmt/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-machinelearningservices/azure/mgmt/__init__.py +++ b/azure-mgmt-machinelearningservices/azure/mgmt/__init__.py @@ -1 +1 @@ -__import__('pkg_resources').declare_namespace(__name__) +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/ssl_configuration.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/ssl_configuration.py index 0a718453e156..ab4367782f4d 100644 --- a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/ssl_configuration.py +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/ssl_configuration.py @@ -13,9 +13,9 @@ class SslConfiguration(Model): - """The ssl configugation for scoring. + """The SSL configuration for scoring. - :param status: Enable or disable ssl for scoring. Possible values include: + :param status: Enable or disable SSL for scoring. Possible values include: 'Disabled', 'Enabled' :type status: str or ~azure.mgmt.machinelearningservices.models.enum :param cert: Cert data diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/ssl_configuration_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/ssl_configuration_py3.py index cd035222b7d3..4189b4f75d66 100644 --- a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/ssl_configuration_py3.py +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/ssl_configuration_py3.py @@ -13,9 +13,9 @@ class SslConfiguration(Model): - """The ssl configugation for scoring. + """The SSL configuration for scoring. - :param status: Enable or disable ssl for scoring. Possible values include: + :param status: Enable or disable SSL for scoring. Possible values include: 'Disabled', 'Enabled' :type status: str or ~azure.mgmt.machinelearningservices.models.enum :param cert: Cert data diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_secrets.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_secrets.py index c7add28fc6ae..d396ddaa02d3 100644 --- a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_secrets.py +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_secrets.py @@ -19,7 +19,7 @@ class VirtualMachineSecrets(ComputeSecrets): :param compute_type: Required. Constant filled by server. :type compute_type: str - :param administrator_account: Admin creadentials for virtual machine. + :param administrator_account: Admin credentials for virtual machine. :type administrator_account: ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials """ diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_secrets_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_secrets_py3.py index 4b336f3486d7..badd030d2830 100644 --- a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_secrets_py3.py +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_secrets_py3.py @@ -19,7 +19,7 @@ class VirtualMachineSecrets(ComputeSecrets): :param compute_type: Required. Constant filled by server. :type compute_type: str - :param administrator_account: Admin creadentials for virtual machine. + :param administrator_account: Admin credentials for virtual machine. :type administrator_account: ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials """ diff --git a/azure-mgmt-machinelearningservices/azure_bdist_wheel.py b/azure-mgmt-machinelearningservices/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-machinelearningservices/azure_bdist_wheel.py +++ /dev/null @@ -1,54 +0,0 @@ -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -from distutils import log as logger -import os.path - -from wheel.bdist_wheel import bdist_wheel -class azure_bdist_wheel(bdist_wheel): - """The purpose of this class is to build wheel a little differently than the sdist, - without requiring to build the wheel from the sdist (i.e. you can build the wheel - directly from source). - """ - - description = "Create an Azure wheel distribution" - - user_options = bdist_wheel.user_options + \ - [('azure-namespace-package=', None, - "Name of the deepest nspkg used")] - - def initialize_options(self): - bdist_wheel.initialize_options(self) - self.azure_namespace_package = None - - def finalize_options(self): - bdist_wheel.finalize_options(self) - if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): - raise ValueError("azure_namespace_package must finish by -nspkg") - - def run(self): - if not self.distribution.install_requires: - self.distribution.install_requires = [] - self.distribution.install_requires.append( - "{}>=2.0.0".format(self.azure_namespace_package)) - bdist_wheel.run(self) - - def write_record(self, bdist_dir, distinfo_dir): - if self.azure_namespace_package: - # Split and remove last part, assuming it's "nspkg" - subparts = self.azure_namespace_package.split('-')[0:-1] - folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] - for azure_sub_package in folder_with_init: - init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') - if os.path.isfile(init_file): - logger.info("manually remove {} while building the wheel".format(init_file)) - os.remove(init_file) - else: - raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) - bdist_wheel.write_record(self, bdist_dir, distinfo_dir) -cmdclass = { - 'bdist_wheel': azure_bdist_wheel, -} diff --git a/azure-mgmt-machinelearningservices/setup.cfg b/azure-mgmt-machinelearningservices/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-machinelearningservices/setup.cfg +++ b/azure-mgmt-machinelearningservices/setup.cfg @@ -1,3 +1,2 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/azure-mgmt-machinelearningservices/setup.py b/azure-mgmt-machinelearningservices/setup.py index 1d9d1aef5068..25064985091f 100644 --- a/azure-mgmt-machinelearningservices/setup.py +++ b/azure-mgmt-machinelearningservices/setup.py @@ -10,12 +10,6 @@ import os.path from io import open from setuptools import find_packages, setup -try: - from azure_bdist_wheel import cmdclass -except ImportError: - from distutils import log as logger - logger.warn("Wheel is not available, disabling bdist_wheel hook") - cmdclass = {} # Change the PACKAGE_NAME only to change folder and different name PACKAGE_NAME = "azure-mgmt-machinelearningservices" @@ -76,11 +70,18 @@ 'License :: OSI Approved :: MIT License', ], zip_safe=False, - packages=find_packages(exclude=["tests"]), + packages=find_packages(exclude=[ + 'tests', + # Exclude packages that will be covered by PEP420 or nspkg + 'azure', + 'azure.mgmt', + ]), install_requires=[ 'msrest>=0.5.0', 'msrestazure>=0.4.32,<2.0.0', 'azure-common~=1.1', ], - cmdclass=cmdclass + extras_require={ + ":python_version<'3.0'": ['azure-mgmt-nspkg'], + } ) From 1bc3d0dc2cb8c2e929c941ef5c9bc845f3a42499 Mon Sep 17 00:00:00 2001 From: iscai-msft <43154838+iscai-msft@users.noreply.github.com> Date: Thu, 21 Feb 2019 16:25:28 -0800 Subject: [PATCH 5/7] Update HISTORY.rst --- azure-mgmt-machinelearningservices/HISTORY.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-mgmt-machinelearningservices/HISTORY.rst b/azure-mgmt-machinelearningservices/HISTORY.rst index 8924d5d6c445..e940f8f3ae6e 100644 --- a/azure-mgmt-machinelearningservices/HISTORY.rst +++ b/azure-mgmt-machinelearningservices/HISTORY.rst @@ -3,7 +3,7 @@ Release History =============== -0.1.0 (1970-01-01) +0.1.0 (2019-02-21) ++++++++++++++++++ * Initial Release From 4fe1f442673994a2da842d05332d11bbfd3b241d Mon Sep 17 00:00:00 2001 From: iscai-msft <43154838+iscai-msft@users.noreply.github.com> Date: Thu, 21 Feb 2019 16:26:10 -0800 Subject: [PATCH 6/7] Update sdk_packaging.toml --- azure-mgmt-machinelearningservices/sdk_packaging.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-mgmt-machinelearningservices/sdk_packaging.toml b/azure-mgmt-machinelearningservices/sdk_packaging.toml index 42a8f90bd7e2..e74d192dcacf 100644 --- a/azure-mgmt-machinelearningservices/sdk_packaging.toml +++ b/azure-mgmt-machinelearningservices/sdk_packaging.toml @@ -1,6 +1,6 @@ [packaging] package_name = "azure-mgmt-machinelearningservices" -package_pprint_name = "MyService Management" +package_pprint_name = "Machine Learning Service" package_doc_id = "" is_stable = false is_arm = true From f89b9d56f06f776c3c823b525a01170fc32231e9 Mon Sep 17 00:00:00 2001 From: azuresdkci Date: Fri, 22 Feb 2019 00:32:55 +0000 Subject: [PATCH 7/7] Packaging update of azure-mgmt-machinelearningservices --- azure-mgmt-machinelearningservices/README.rst | 23 ++----------------- azure-mgmt-machinelearningservices/setup.py | 2 +- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/azure-mgmt-machinelearningservices/README.rst b/azure-mgmt-machinelearningservices/README.rst index 45de4e6b43dd..d81e701f3097 100644 --- a/azure-mgmt-machinelearningservices/README.rst +++ b/azure-mgmt-machinelearningservices/README.rst @@ -1,7 +1,7 @@ Microsoft Azure SDK for Python ============================== -This is the Microsoft Azure MyService Management Client Library. +This is the Microsoft Azure Machine Learning Service Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). @@ -14,29 +14,10 @@ For the older Azure Service Management (ASM) libraries, see For a more complete set of Azure libraries, see the `azure `__ bundle package. -Compatibility -============= - -**IMPORTANT**: If you have an earlier version of the azure package -(version < 1.0), you should uninstall it before installing this package. - -You can check the version using pip: - -.. code:: shell - - pip freeze - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -.. code:: shell - - pip uninstall azure - - Usage ===== -For code examples, see `MyService Management +For code examples, see `Machine Learning Service `__ on docs.microsoft.com. diff --git a/azure-mgmt-machinelearningservices/setup.py b/azure-mgmt-machinelearningservices/setup.py index 25064985091f..0217d189360d 100644 --- a/azure-mgmt-machinelearningservices/setup.py +++ b/azure-mgmt-machinelearningservices/setup.py @@ -13,7 +13,7 @@ # Change the PACKAGE_NAME only to change folder and different name PACKAGE_NAME = "azure-mgmt-machinelearningservices" -PACKAGE_PPRINT_NAME = "MyService Management" +PACKAGE_PPRINT_NAME = "Machine Learning Service" # a-b-c => a/b/c package_folder_path = PACKAGE_NAME.replace('-', '/')