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..e4884efef41b --- /dev/null +++ b/azure-mgmt-machinelearningservices/MANIFEST.in @@ -0,0 +1,5 @@ +recursive-include tests *.py *.yaml +include *.rst +include azure/__init__.py +include azure/mgmt/__init__.py + diff --git a/azure-mgmt-machinelearningservices/README.rst b/azure-mgmt-machinelearningservices/README.rst new file mode 100644 index 000000000000..5f80f83d4a66 --- /dev/null +++ b/azure-mgmt-machinelearningservices/README.rst @@ -0,0 +1,33 @@ +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. + + +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. + + +.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-machinelearningservices%2FREADME.png diff --git a/azure-mgmt-machinelearningservices/azure/__init__.py b/azure-mgmt-machinelearningservices/azure/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/__init__.py @@ -0,0 +1 @@ +__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 new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file 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..ee1f3beb6368 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/azure_machine_learning_workspaces.py @@ -0,0 +1,106 @@ +# 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.usages_operations import UsagesOperations +from .operations.usages_by_vm_family_operations import UsagesByVMFamilyOperations +from .operations.virtual_machine_sizes_operations import VirtualMachineSizesOperations +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 usages: Usages operations + :vartype usages: azure.mgmt.machinelearningservices.operations.UsagesOperations + :ivar usages_by_vm_family: UsagesByVMFamily operations + :vartype usages_by_vm_family: azure.mgmt.machinelearningservices.operations.UsagesByVMFamilyOperations + :ivar virtual_machine_sizes: VirtualMachineSizes operations + :vartype virtual_machine_sizes: azure.mgmt.machinelearningservices.operations.VirtualMachineSizesOperations + :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-11-19' + 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.usages = UsagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.usages_by_vm_family = UsagesByVMFamilyOperations( + self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_sizes = VirtualMachineSizesOperations( + 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..5846711b9ece --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/__init__.py @@ -0,0 +1,189 @@ +# 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 .usage_name_py3 import UsageName + from .usage_py3 import Usage + from .usage_by_vm_family_py3 import UsageByVMFamily + from .virtual_machine_size_py3 import VirtualMachineSize + from .virtual_machine_size_list_result_py3 import VirtualMachineSizeListResult + from .identity_py3 import Identity + from .resource_py3 import Resource + from .resource_id_py3 import ResourceId + 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_networking_configuration_py3 import AksNetworkingConfiguration + from .aks_properties_py3 import AKSProperties + from .aks_py3 import AKS + from .scale_settings_py3 import ScaleSettings + from .user_account_credentials_py3 import UserAccountCredentials + from .node_state_counts_py3 import NodeStateCounts + from .aml_compute_properties_py3 import AmlComputeProperties + from .aml_compute_py3 import AmlCompute + 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 .databricks_properties_py3 import DatabricksProperties + from .databricks_py3 import Databricks + from .data_lake_analytics_properties_py3 import DataLakeAnalyticsProperties + from .data_lake_analytics_py3 import DataLakeAnalytics + from .service_principal_credentials_py3 import ServicePrincipalCredentials + from .cluster_update_parameters_py3 import ClusterUpdateParameters + from .compute_nodes_information_py3 import ComputeNodesInformation + from .aml_compute_node_information_py3 import AmlComputeNodeInformation + from .aml_compute_nodes_information_py3 import AmlComputeNodesInformation + from .compute_secrets_py3 import ComputeSecrets + from .aks_compute_secrets_py3 import AksComputeSecrets + from .virtual_machine_secrets_py3 import VirtualMachineSecrets + from .databricks_compute_secrets_py3 import DatabricksComputeSecrets +except (SyntaxError, ImportError): + from .operation_display import OperationDisplay + from .operation import Operation + from .workspace import Workspace + from .workspace_update_parameters import WorkspaceUpdateParameters + from .usage_name import UsageName + from .usage import Usage + from .usage_by_vm_family import UsageByVMFamily + from .virtual_machine_size import VirtualMachineSize + from .virtual_machine_size_list_result import VirtualMachineSizeListResult + from .identity import Identity + from .resource import Resource + from .resource_id import ResourceId + 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_networking_configuration import AksNetworkingConfiguration + from .aks_properties import AKSProperties + from .aks import AKS + from .scale_settings import ScaleSettings + from .user_account_credentials import UserAccountCredentials + from .node_state_counts import NodeStateCounts + from .aml_compute_properties import AmlComputeProperties + from .aml_compute import AmlCompute + 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 .databricks_properties import DatabricksProperties + from .databricks import Databricks + from .data_lake_analytics_properties import DataLakeAnalyticsProperties + from .data_lake_analytics import DataLakeAnalytics + from .service_principal_credentials import ServicePrincipalCredentials + from .cluster_update_parameters import ClusterUpdateParameters + from .compute_nodes_information import ComputeNodesInformation + from .aml_compute_node_information import AmlComputeNodeInformation + from .aml_compute_nodes_information import AmlComputeNodesInformation + from .compute_secrets import ComputeSecrets + from .aks_compute_secrets import AksComputeSecrets + from .virtual_machine_secrets import VirtualMachineSecrets + from .databricks_compute_secrets import DatabricksComputeSecrets +from .operation_paged import OperationPaged +from .workspace_paged import WorkspacePaged +from .usage_paged import UsagePaged +from .usage_by_vm_family_paged import UsageByVMFamilyPaged +from .compute_resource_paged import ComputeResourcePaged +from .azure_machine_learning_workspaces_enums import ( + ProvisioningState, + UsageUnit, + ResourceIdentityType, + VmPriority, + AllocationState, + ComputeType, + UnderlyingResourceAction, +) + +__all__ = [ + 'OperationDisplay', + 'Operation', + 'Workspace', + 'WorkspaceUpdateParameters', + 'UsageName', + 'Usage', + 'UsageByVMFamily', + 'VirtualMachineSize', + 'VirtualMachineSizeListResult', + 'Identity', + 'Resource', + 'ResourceId', + 'Password', + 'RegistryListCredentialsResult', + 'ListWorkspaceKeysResult', + 'ErrorDetail', + 'ErrorResponse', + 'MachineLearningServiceError', 'MachineLearningServiceErrorException', + 'Compute', + 'ComputeResource', + 'SystemService', + 'SslConfiguration', + 'AksNetworkingConfiguration', + 'AKSProperties', + 'AKS', + 'ScaleSettings', + 'UserAccountCredentials', + 'NodeStateCounts', + 'AmlComputeProperties', + 'AmlCompute', + 'VirtualMachineSshCredentials', + 'VirtualMachineProperties', + 'VirtualMachine', + 'HDInsightProperties', + 'HDInsight', + 'DataFactory', + 'DatabricksProperties', + 'Databricks', + 'DataLakeAnalyticsProperties', + 'DataLakeAnalytics', + 'ServicePrincipalCredentials', + 'ClusterUpdateParameters', + 'ComputeNodesInformation', + 'AmlComputeNodeInformation', + 'AmlComputeNodesInformation', + 'ComputeSecrets', + 'AksComputeSecrets', + 'VirtualMachineSecrets', + 'DatabricksComputeSecrets', + 'OperationPaged', + 'WorkspacePaged', + 'UsagePaged', + 'UsageByVMFamilyPaged', + 'ComputeResourcePaged', + 'ProvisioningState', + 'UsageUnit', + 'ResourceIdentityType', + 'VmPriority', + 'AllocationState', + 'ComputeType', + 'UnderlyingResourceAction', +] 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..d56f2c8a674a --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks.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 .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. + + :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 underlying compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :ivar is_attached_compute: Indicating whether the compute was provisioned + by user and brought from outside if true, or machine learning service + provisioned it if false. + :vartype is_attached_compute: bool + :param 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}, + 'is_attached_compute': {'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]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + '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_networking_configuration.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_networking_configuration.py new file mode 100644 index 000000000000..29697cd661d9 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_networking_configuration.py @@ -0,0 +1,52 @@ +# 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 AksNetworkingConfiguration(Model): + """Advance configuration for AKS networking. + + :param subnet_id: Virtual network subnet resource ID the compute nodes + belong to + :type subnet_id: str + :param service_cidr: A CIDR notation IP range from which to assign service + cluster IPs. It must not overlap with any Subnet IP ranges. + :type service_cidr: str + :param dns_service_ip: An IP address assigned to the Kubernetes DNS + service. It must be within the Kubernetes service address range specified + in serviceCidr. + :type dns_service_ip: str + :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker + bridge network. It must not overlap with any Subnet IP ranges or the + Kubernetes service address range. + :type docker_bridge_cidr: str + """ + + _validation = { + 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, + 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + } + + _attribute_map = { + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, + 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, + 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AksNetworkingConfiguration, self).__init__(**kwargs) + self.subnet_id = kwargs.get('subnet_id', None) + self.service_cidr = kwargs.get('service_cidr', None) + self.dns_service_ip = kwargs.get('dns_service_ip', None) + self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', None) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_networking_configuration_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_networking_configuration_py3.py new file mode 100644 index 000000000000..81bb51529b27 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_networking_configuration_py3.py @@ -0,0 +1,52 @@ +# 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 AksNetworkingConfiguration(Model): + """Advance configuration for AKS networking. + + :param subnet_id: Virtual network subnet resource ID the compute nodes + belong to + :type subnet_id: str + :param service_cidr: A CIDR notation IP range from which to assign service + cluster IPs. It must not overlap with any Subnet IP ranges. + :type service_cidr: str + :param dns_service_ip: An IP address assigned to the Kubernetes DNS + service. It must be within the Kubernetes service address range specified + in serviceCidr. + :type dns_service_ip: str + :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker + bridge network. It must not overlap with any Subnet IP ranges or the + Kubernetes service address range. + :type docker_bridge_cidr: str + """ + + _validation = { + 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, + 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + } + + _attribute_map = { + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, + 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, + 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, + } + + def __init__(self, *, subnet_id: str=None, service_cidr: str=None, dns_service_ip: str=None, docker_bridge_cidr: str=None, **kwargs) -> None: + super(AksNetworkingConfiguration, self).__init__(**kwargs) + self.subnet_id = subnet_id + self.service_cidr = service_cidr + self.dns_service_ip = dns_service_ip + self.docker_bridge_cidr = docker_bridge_cidr 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..d4be9f90b5ff --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_properties.py @@ -0,0 +1,59 @@ +# 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. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param cluster_fqdn: Cluster full qualified domain name + :type cluster_fqdn: str + :ivar system_services: System services + :vartype system_services: + list[~azure.mgmt.machinelearningservices.models.SystemService] + :param agent_count: Number of agents + :type agent_count: int + :param agent_vm_size: Agent virtual machine size + :type agent_vm_size: str + :param ssl_configuration: SSL configuration + :type ssl_configuration: + ~azure.mgmt.machinelearningservices.models.SslConfiguration + :param aks_networking_configuration: AKS networking configuration for vnet + :type aks_networking_configuration: + ~azure.mgmt.machinelearningservices.models.AksNetworkingConfiguration + """ + + _validation = { + 'system_services': {'readonly': True}, + 'agent_count': {'minimum': 1}, + } + + _attribute_map = { + 'cluster_fqdn': {'key': 'clusterFqdn', 'type': 'str'}, + 'system_services': {'key': 'systemServices', 'type': '[SystemService]'}, + 'agent_count': {'key': 'agentCount', 'type': 'int'}, + 'agent_vm_size': {'key': 'agentVMSize', 'type': 'str'}, + 'ssl_configuration': {'key': 'sslConfiguration', 'type': 'SslConfiguration'}, + 'aks_networking_configuration': {'key': 'aksNetworkingConfiguration', 'type': 'AksNetworkingConfiguration'}, + } + + def __init__(self, **kwargs): + super(AKSProperties, self).__init__(**kwargs) + self.cluster_fqdn = kwargs.get('cluster_fqdn', None) + self.system_services = None + self.agent_count = kwargs.get('agent_count', None) + self.agent_vm_size = kwargs.get('agent_vm_size', None) + self.ssl_configuration = kwargs.get('ssl_configuration', None) + self.aks_networking_configuration = kwargs.get('aks_networking_configuration', None) 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..02216713dee7 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_properties_py3.py @@ -0,0 +1,59 @@ +# 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. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param cluster_fqdn: Cluster full qualified domain name + :type cluster_fqdn: str + :ivar system_services: System services + :vartype system_services: + list[~azure.mgmt.machinelearningservices.models.SystemService] + :param agent_count: Number of agents + :type agent_count: int + :param agent_vm_size: Agent virtual machine size + :type agent_vm_size: str + :param ssl_configuration: SSL configuration + :type ssl_configuration: + ~azure.mgmt.machinelearningservices.models.SslConfiguration + :param aks_networking_configuration: AKS networking configuration for vnet + :type aks_networking_configuration: + ~azure.mgmt.machinelearningservices.models.AksNetworkingConfiguration + """ + + _validation = { + 'system_services': {'readonly': True}, + 'agent_count': {'minimum': 1}, + } + + _attribute_map = { + 'cluster_fqdn': {'key': 'clusterFqdn', 'type': 'str'}, + 'system_services': {'key': 'systemServices', 'type': '[SystemService]'}, + 'agent_count': {'key': 'agentCount', 'type': 'int'}, + 'agent_vm_size': {'key': 'agentVMSize', 'type': 'str'}, + 'ssl_configuration': {'key': 'sslConfiguration', 'type': 'SslConfiguration'}, + 'aks_networking_configuration': {'key': 'aksNetworkingConfiguration', 'type': 'AksNetworkingConfiguration'}, + } + + def __init__(self, *, cluster_fqdn: str=None, agent_count: int=None, agent_vm_size: str=None, ssl_configuration=None, aks_networking_configuration=None, **kwargs) -> None: + super(AKSProperties, self).__init__(**kwargs) + self.cluster_fqdn = cluster_fqdn + self.system_services = None + self.agent_count = agent_count + self.agent_vm_size = agent_vm_size + self.ssl_configuration = ssl_configuration + self.aks_networking_configuration = aks_networking_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..719837ff96d4 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_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 .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. + + :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 underlying compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :ivar is_attached_compute: Indicating whether the compute was provisioned + by user and brought from outside if true, or machine learning service + provisioned it if false. + :vartype is_attached_compute: bool + :param 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}, + 'is_attached_compute': {'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]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AKSProperties'}, + } + + 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/aml_compute.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aml_compute.py new file mode 100644 index 000000000000..ea03a8c567af --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aml_compute.py @@ -0,0 +1,78 @@ +# 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 AmlCompute(Compute): + """An Azure Machine Learning compute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param compute_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 underlying compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :ivar is_attached_compute: Indicating whether the compute was provisioned + by user and brought from outside if true, or machine learning service + provisioned it if false. + :vartype is_attached_compute: bool + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param properties: AML Compute properties + :type properties: + ~azure.mgmt.machinelearningservices.models.AmlComputeProperties + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'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]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AmlComputeProperties'}, + } + + def __init__(self, **kwargs): + super(AmlCompute, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.compute_type = 'AmlCompute' diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aml_compute_node_information.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aml_compute_node_information.py new file mode 100644 index 000000000000..e2e80f343e8d --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aml_compute_node_information.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 AmlComputeNodeInformation(Model): + """Compute node information related to a AmlCompute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar node_id: Node ID. ID of the compute node. + :vartype node_id: str + :ivar ip_address: IP address. Public IP address of the compute node. + :vartype ip_address: str + :ivar port: Port. SSH port number of the node. + :vartype port: float + """ + + _validation = { + 'node_id': {'readonly': True}, + 'ip_address': {'readonly': True}, + 'port': {'readonly': True}, + } + + _attribute_map = { + 'node_id': {'key': 'nodeId', 'type': 'str'}, + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(AmlComputeNodeInformation, self).__init__(**kwargs) + self.node_id = None + self.ip_address = None + self.port = None diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aml_compute_node_information_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aml_compute_node_information_py3.py new file mode 100644 index 000000000000..d6f89e02fca9 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aml_compute_node_information_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 AmlComputeNodeInformation(Model): + """Compute node information related to a AmlCompute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar node_id: Node ID. ID of the compute node. + :vartype node_id: str + :ivar ip_address: IP address. Public IP address of the compute node. + :vartype ip_address: str + :ivar port: Port. SSH port number of the node. + :vartype port: float + """ + + _validation = { + 'node_id': {'readonly': True}, + 'ip_address': {'readonly': True}, + 'port': {'readonly': True}, + } + + _attribute_map = { + 'node_id': {'key': 'nodeId', 'type': 'str'}, + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(AmlComputeNodeInformation, self).__init__(**kwargs) + self.node_id = None + self.ip_address = None + self.port = None diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aml_compute_nodes_information.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aml_compute_nodes_information.py new file mode 100644 index 000000000000..52e65354d470 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aml_compute_nodes_information.py @@ -0,0 +1,47 @@ +# 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_nodes_information import ComputeNodesInformation + + +class AmlComputeNodesInformation(ComputeNodesInformation): + """Compute node information related to a AmlCompute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar next_link: The continuation token. + :vartype next_link: str + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :ivar nodes: The collection of returned AmlCompute nodes details. + :vartype nodes: + list[~azure.mgmt.machinelearningservices.models.AmlComputeNodeInformation] + """ + + _validation = { + 'next_link': {'readonly': True}, + 'compute_type': {'required': True}, + 'nodes': {'readonly': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'nodes': {'key': 'nodes', 'type': '[AmlComputeNodeInformation]'}, + } + + def __init__(self, **kwargs): + super(AmlComputeNodesInformation, self).__init__(**kwargs) + self.nodes = None + self.compute_type = 'AmlCompute' diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aml_compute_nodes_information_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aml_compute_nodes_information_py3.py new file mode 100644 index 000000000000..f2f73216daa6 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aml_compute_nodes_information_py3.py @@ -0,0 +1,47 @@ +# 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_nodes_information_py3 import ComputeNodesInformation + + +class AmlComputeNodesInformation(ComputeNodesInformation): + """Compute node information related to a AmlCompute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar next_link: The continuation token. + :vartype next_link: str + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :ivar nodes: The collection of returned AmlCompute nodes details. + :vartype nodes: + list[~azure.mgmt.machinelearningservices.models.AmlComputeNodeInformation] + """ + + _validation = { + 'next_link': {'readonly': True}, + 'compute_type': {'required': True}, + 'nodes': {'readonly': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'nodes': {'key': 'nodes', 'type': '[AmlComputeNodeInformation]'}, + } + + def __init__(self, **kwargs) -> None: + super(AmlComputeNodesInformation, self).__init__(**kwargs) + self.nodes = None + self.compute_type = 'AmlCompute' diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aml_compute_properties.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aml_compute_properties.py new file mode 100644 index 000000000000..5256febc3c51 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aml_compute_properties.py @@ -0,0 +1,104 @@ +# 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 AmlComputeProperties(Model): + """AML Compute properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param vm_size: Virtual Machine Size + :type vm_size: str + :param vm_priority: Virtual Machine priority. Possible values include: + 'Dedicated', 'LowPriority' + :type vm_priority: str or + ~azure.mgmt.machinelearningservices.models.VmPriority + :param scale_settings: Scale settings for AML Compute + :type scale_settings: + ~azure.mgmt.machinelearningservices.models.ScaleSettings + :param user_account_credentials: User account credentials. Credentials for + an administrator user account that will be created on each compute node. + :type user_account_credentials: + ~azure.mgmt.machinelearningservices.models.UserAccountCredentials + :param subnet: Subnet. Virtual network subnet resource ID the compute + nodes belong to. + :type subnet: ~azure.mgmt.machinelearningservices.models.ResourceId + :ivar allocation_state: Allocation state. Allocation state of the compute. + Possible values are: steady - Indicates that the compute is not resizing. + There are no changes to the number of compute nodes in the compute in + progress. A compute enters this state when it is created and when no + operations are being performed on the compute to change the number of + compute nodes. resizing - Indicates that the compute is resizing; that is, + compute nodes are being added to or removed from the compute. Possible + values include: 'Steady', 'Resizing' + :vartype allocation_state: str or + ~azure.mgmt.machinelearningservices.models.AllocationState + :ivar allocation_state_transition_time: Allocation state transition time. + The time at which the compute entered its current allocation state. + :vartype allocation_state_transition_time: datetime + :ivar errors: Errors. Collection of errors encountered by various compute + nodes during node setup. + :vartype errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :ivar current_node_count: Current node count. The number of compute nodes + currently assigned to the compute. + :vartype current_node_count: int + :ivar target_node_count: Target node count. The target number of compute + nodes for the compute. If the allocationState is resizing, this property + denotes the target node count for the ongoing resize operation. If the + allocationState is steady, this property denotes the target node count for + the previous resize operation. + :vartype target_node_count: int + :ivar node_state_counts: Node state counts. Counts of various node states + on the compute. + :vartype node_state_counts: + ~azure.mgmt.machinelearningservices.models.NodeStateCounts + """ + + _validation = { + 'allocation_state': {'readonly': True}, + 'allocation_state_transition_time': {'readonly': True}, + 'errors': {'readonly': True}, + 'current_node_count': {'readonly': True}, + 'target_node_count': {'readonly': True}, + 'node_state_counts': {'readonly': True}, + } + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'vm_priority': {'key': 'vmPriority', 'type': 'str'}, + 'scale_settings': {'key': 'scaleSettings', 'type': 'ScaleSettings'}, + 'user_account_credentials': {'key': 'userAccountCredentials', 'type': 'UserAccountCredentials'}, + 'subnet': {'key': 'subnet', 'type': 'ResourceId'}, + 'allocation_state': {'key': 'allocationState', 'type': 'str'}, + 'allocation_state_transition_time': {'key': 'allocationStateTransitionTime', 'type': 'iso-8601'}, + 'errors': {'key': 'errors', 'type': '[MachineLearningServiceError]'}, + 'current_node_count': {'key': 'currentNodeCount', 'type': 'int'}, + 'target_node_count': {'key': 'targetNodeCount', 'type': 'int'}, + 'node_state_counts': {'key': 'nodeStateCounts', 'type': 'NodeStateCounts'}, + } + + def __init__(self, **kwargs): + super(AmlComputeProperties, self).__init__(**kwargs) + self.vm_size = kwargs.get('vm_size', None) + self.vm_priority = kwargs.get('vm_priority', None) + self.scale_settings = kwargs.get('scale_settings', None) + self.user_account_credentials = kwargs.get('user_account_credentials', None) + self.subnet = kwargs.get('subnet', None) + self.allocation_state = None + self.allocation_state_transition_time = None + self.errors = None + self.current_node_count = None + self.target_node_count = None + self.node_state_counts = None diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aml_compute_properties_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aml_compute_properties_py3.py new file mode 100644 index 000000000000..9b77e544f9d6 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aml_compute_properties_py3.py @@ -0,0 +1,104 @@ +# 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 AmlComputeProperties(Model): + """AML Compute properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param vm_size: Virtual Machine Size + :type vm_size: str + :param vm_priority: Virtual Machine priority. Possible values include: + 'Dedicated', 'LowPriority' + :type vm_priority: str or + ~azure.mgmt.machinelearningservices.models.VmPriority + :param scale_settings: Scale settings for AML Compute + :type scale_settings: + ~azure.mgmt.machinelearningservices.models.ScaleSettings + :param user_account_credentials: User account credentials. Credentials for + an administrator user account that will be created on each compute node. + :type user_account_credentials: + ~azure.mgmt.machinelearningservices.models.UserAccountCredentials + :param subnet: Subnet. Virtual network subnet resource ID the compute + nodes belong to. + :type subnet: ~azure.mgmt.machinelearningservices.models.ResourceId + :ivar allocation_state: Allocation state. Allocation state of the compute. + Possible values are: steady - Indicates that the compute is not resizing. + There are no changes to the number of compute nodes in the compute in + progress. A compute enters this state when it is created and when no + operations are being performed on the compute to change the number of + compute nodes. resizing - Indicates that the compute is resizing; that is, + compute nodes are being added to or removed from the compute. Possible + values include: 'Steady', 'Resizing' + :vartype allocation_state: str or + ~azure.mgmt.machinelearningservices.models.AllocationState + :ivar allocation_state_transition_time: Allocation state transition time. + The time at which the compute entered its current allocation state. + :vartype allocation_state_transition_time: datetime + :ivar errors: Errors. Collection of errors encountered by various compute + nodes during node setup. + :vartype errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :ivar current_node_count: Current node count. The number of compute nodes + currently assigned to the compute. + :vartype current_node_count: int + :ivar target_node_count: Target node count. The target number of compute + nodes for the compute. If the allocationState is resizing, this property + denotes the target node count for the ongoing resize operation. If the + allocationState is steady, this property denotes the target node count for + the previous resize operation. + :vartype target_node_count: int + :ivar node_state_counts: Node state counts. Counts of various node states + on the compute. + :vartype node_state_counts: + ~azure.mgmt.machinelearningservices.models.NodeStateCounts + """ + + _validation = { + 'allocation_state': {'readonly': True}, + 'allocation_state_transition_time': {'readonly': True}, + 'errors': {'readonly': True}, + 'current_node_count': {'readonly': True}, + 'target_node_count': {'readonly': True}, + 'node_state_counts': {'readonly': True}, + } + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'vm_priority': {'key': 'vmPriority', 'type': 'str'}, + 'scale_settings': {'key': 'scaleSettings', 'type': 'ScaleSettings'}, + 'user_account_credentials': {'key': 'userAccountCredentials', 'type': 'UserAccountCredentials'}, + 'subnet': {'key': 'subnet', 'type': 'ResourceId'}, + 'allocation_state': {'key': 'allocationState', 'type': 'str'}, + 'allocation_state_transition_time': {'key': 'allocationStateTransitionTime', 'type': 'iso-8601'}, + 'errors': {'key': 'errors', 'type': '[MachineLearningServiceError]'}, + 'current_node_count': {'key': 'currentNodeCount', 'type': 'int'}, + 'target_node_count': {'key': 'targetNodeCount', 'type': 'int'}, + 'node_state_counts': {'key': 'nodeStateCounts', 'type': 'NodeStateCounts'}, + } + + def __init__(self, *, vm_size: str=None, vm_priority=None, scale_settings=None, user_account_credentials=None, subnet=None, **kwargs) -> None: + super(AmlComputeProperties, self).__init__(**kwargs) + self.vm_size = vm_size + self.vm_priority = vm_priority + self.scale_settings = scale_settings + self.user_account_credentials = user_account_credentials + self.subnet = subnet + self.allocation_state = None + self.allocation_state_transition_time = None + self.errors = None + self.current_node_count = None + self.target_node_count = None + self.node_state_counts = None diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aml_compute_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aml_compute_py3.py new file mode 100644 index 000000000000..3ba8cae30472 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aml_compute_py3.py @@ -0,0 +1,78 @@ +# 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 AmlCompute(Compute): + """An Azure Machine Learning compute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param compute_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 underlying compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :ivar is_attached_compute: Indicating whether the compute was provisioned + by user and brought from outside if true, or machine learning service + provisioned it if false. + :vartype is_attached_compute: bool + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param properties: AML Compute properties + :type properties: + ~azure.mgmt.machinelearningservices.models.AmlComputeProperties + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'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]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AmlComputeProperties'}, + } + + def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, properties=None, **kwargs) -> None: + super(AmlCompute, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, **kwargs) + self.properties = properties + self.compute_type = 'AmlCompute' 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..0e95e8e3d7ff --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/azure_machine_learning_workspaces_enums.py @@ -0,0 +1,62 @@ +# 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 UsageUnit(str, Enum): + + count = "Count" + + +class ResourceIdentityType(str, Enum): + + system_assigned = "SystemAssigned" + + +class VmPriority(str, Enum): + + dedicated = "Dedicated" + low_priority = "LowPriority" + + +class AllocationState(str, Enum): + + steady = "Steady" + resizing = "Resizing" + + +class ComputeType(str, Enum): + + aks = "AKS" + aml_compute = "AmlCompute" + data_factory = "DataFactory" + virtual_machine = "VirtualMachine" + hd_insight = "HDInsight" + databricks = "Databricks" + data_lake_analytics = "DataLakeAnalytics" + + +class UnderlyingResourceAction(str, Enum): + + delete = "Delete" + detach = "Detach" diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/cluster_update_parameters.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/cluster_update_parameters.py new file mode 100644 index 000000000000..a7c907ccdebb --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/cluster_update_parameters.py @@ -0,0 +1,30 @@ +# 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 ClusterUpdateParameters(Model): + """AmlCompute update parameters. + + :param scale_settings: Scale settings. Desired scale settings for the + amlCompute. + :type scale_settings: + ~azure.mgmt.machinelearningservices.models.ScaleSettings + """ + + _attribute_map = { + 'scale_settings': {'key': 'properties.scaleSettings', 'type': 'ScaleSettings'}, + } + + def __init__(self, **kwargs): + super(ClusterUpdateParameters, self).__init__(**kwargs) + self.scale_settings = kwargs.get('scale_settings', None) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/cluster_update_parameters_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/cluster_update_parameters_py3.py new file mode 100644 index 000000000000..39033879882c --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/cluster_update_parameters_py3.py @@ -0,0 +1,30 @@ +# 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 ClusterUpdateParameters(Model): + """AmlCompute update parameters. + + :param scale_settings: Scale settings. Desired scale settings for the + amlCompute. + :type scale_settings: + ~azure.mgmt.machinelearningservices.models.ScaleSettings + """ + + _attribute_map = { + 'scale_settings': {'key': 'properties.scaleSettings', 'type': 'ScaleSettings'}, + } + + def __init__(self, *, scale_settings=None, **kwargs) -> None: + super(ClusterUpdateParameters, self).__init__(**kwargs) + self.scale_settings = scale_settings 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..0b394567f159 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute.py @@ -0,0 +1,89 @@ +# 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, AmlCompute, VirtualMachine, HDInsight, DataFactory, + Databricks, DataLakeAnalytics + + 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 underlying compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :ivar is_attached_compute: Indicating whether the compute was provisioned + by user and brought from outside if true, or machine learning service + provisioned it if false. + :vartype is_attached_compute: bool + :param 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}, + 'is_attached_compute': {'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]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + } + + _subtype_map = { + 'compute_type': {'AKS': 'AKS', 'AmlCompute': 'AmlCompute', 'VirtualMachine': 'VirtualMachine', 'HDInsight': 'HDInsight', 'DataFactory': 'DataFactory', 'Databricks': 'Databricks', 'DataLakeAnalytics': 'DataLakeAnalytics'} + } + + 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 + self.modified_on = None + self.resource_id = kwargs.get('resource_id', None) + self.provisioning_errors = None + self.is_attached_compute = None + self.compute_type = None diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_nodes_information.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_nodes_information.py new file mode 100644 index 000000000000..0d45aec948eb --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_nodes_information.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 ComputeNodesInformation(Model): + """Compute nodes information related to a Machine Learning compute. Might + differ for every type of compute. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AmlComputeNodesInformation + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar next_link: The continuation token. + :vartype next_link: str + :param compute_type: Required. Constant filled by server. + :type compute_type: str + """ + + _validation = { + 'next_link': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + } + + _subtype_map = { + 'compute_type': {'AmlCompute': 'AmlComputeNodesInformation'} + } + + def __init__(self, **kwargs): + super(ComputeNodesInformation, self).__init__(**kwargs) + self.next_link = None + self.compute_type = None diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_nodes_information_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_nodes_information_py3.py new file mode 100644 index 000000000000..7845fded3368 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_nodes_information_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 ComputeNodesInformation(Model): + """Compute nodes information related to a Machine Learning compute. Might + differ for every type of compute. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AmlComputeNodesInformation + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar next_link: The continuation token. + :vartype next_link: str + :param compute_type: Required. Constant filled by server. + :type compute_type: str + """ + + _validation = { + 'next_link': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + } + + _subtype_map = { + 'compute_type': {'AmlCompute': 'AmlComputeNodesInformation'} + } + + def __init__(self, **kwargs) -> None: + super(ComputeNodesInformation, self).__init__(**kwargs) + self.next_link = 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..d248642c401b --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_py3.py @@ -0,0 +1,89 @@ +# 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, AmlCompute, VirtualMachine, HDInsight, DataFactory, + Databricks, DataLakeAnalytics + + 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 underlying compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :ivar is_attached_compute: Indicating whether the compute was provisioned + by user and brought from outside if true, or machine learning service + provisioned it if false. + :vartype is_attached_compute: bool + :param 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}, + 'is_attached_compute': {'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]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + } + + _subtype_map = { + 'compute_type': {'AKS': 'AKS', 'AmlCompute': 'AmlCompute', 'VirtualMachine': 'VirtualMachine', 'HDInsight': 'HDInsight', 'DataFactory': 'DataFactory', 'Databricks': 'Databricks', 'DataLakeAnalytics': 'DataLakeAnalytics'} + } + + 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 + self.modified_on = None + self.resource_id = resource_id + self.provisioning_errors = None + self.is_attached_compute = 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..7ccf58fedb5b --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_secrets.py @@ -0,0 +1,43 @@ +# 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, + DatabricksComputeSecrets + + 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', 'Databricks': 'DatabricksComputeSecrets'} + } + + 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..c00926c51812 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_secrets_py3.py @@ -0,0 +1,43 @@ +# 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, + DatabricksComputeSecrets + + 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', 'Databricks': 'DatabricksComputeSecrets'} + } + + 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..a582f025658c --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_factory.py @@ -0,0 +1,73 @@ +# 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. + + :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 underlying compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :ivar is_attached_compute: Indicating whether the compute was provisioned + by user and brought from outside if true, or machine learning service + provisioned it if false. + :vartype is_attached_compute: bool + :param 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}, + 'is_attached_compute': {'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]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + '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..7c2d3bbf79b3 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_factory_py3.py @@ -0,0 +1,73 @@ +# 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. + + :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 underlying compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :ivar is_attached_compute: Indicating whether the compute was provisioned + by user and brought from outside if true, or machine learning service + provisioned it if false. + :vartype is_attached_compute: bool + :param 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}, + 'is_attached_compute': {'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]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + } + + 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/data_lake_analytics.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_lake_analytics.py new file mode 100644 index 000000000000..5608b97e5b8d --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_lake_analytics.py @@ -0,0 +1,78 @@ +# 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 DataLakeAnalytics(Compute): + """A DataLakeAnalytics compute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param compute_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 underlying compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :ivar is_attached_compute: Indicating whether the compute was provisioned + by user and brought from outside if true, or machine learning service + provisioned it if false. + :vartype is_attached_compute: bool + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param properties: + :type properties: + ~azure.mgmt.machinelearningservices.models.DataLakeAnalyticsProperties + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'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]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'DataLakeAnalyticsProperties'}, + } + + def __init__(self, **kwargs): + super(DataLakeAnalytics, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.compute_type = 'DataLakeAnalytics' diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_lake_analytics_properties.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_lake_analytics_properties.py new file mode 100644 index 000000000000..d0ed4dacfddd --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_lake_analytics_properties.py @@ -0,0 +1,28 @@ +# 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 DataLakeAnalyticsProperties(Model): + """DataLakeAnalyticsProperties. + + :param data_lake_store_account_name: DataLake Store Account Name + :type data_lake_store_account_name: str + """ + + _attribute_map = { + 'data_lake_store_account_name': {'key': 'dataLakeStoreAccountName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataLakeAnalyticsProperties, self).__init__(**kwargs) + self.data_lake_store_account_name = kwargs.get('data_lake_store_account_name', None) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_lake_analytics_properties_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_lake_analytics_properties_py3.py new file mode 100644 index 000000000000..29776c44604a --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_lake_analytics_properties_py3.py @@ -0,0 +1,28 @@ +# 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 DataLakeAnalyticsProperties(Model): + """DataLakeAnalyticsProperties. + + :param data_lake_store_account_name: DataLake Store Account Name + :type data_lake_store_account_name: str + """ + + _attribute_map = { + 'data_lake_store_account_name': {'key': 'dataLakeStoreAccountName', 'type': 'str'}, + } + + def __init__(self, *, data_lake_store_account_name: str=None, **kwargs) -> None: + super(DataLakeAnalyticsProperties, self).__init__(**kwargs) + self.data_lake_store_account_name = data_lake_store_account_name diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_lake_analytics_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_lake_analytics_py3.py new file mode 100644 index 000000000000..5a36e2bd9503 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_lake_analytics_py3.py @@ -0,0 +1,78 @@ +# 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 DataLakeAnalytics(Compute): + """A DataLakeAnalytics compute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param compute_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 underlying compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :ivar is_attached_compute: Indicating whether the compute was provisioned + by user and brought from outside if true, or machine learning service + provisioned it if false. + :vartype is_attached_compute: bool + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param properties: + :type properties: + ~azure.mgmt.machinelearningservices.models.DataLakeAnalyticsProperties + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'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]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'DataLakeAnalyticsProperties'}, + } + + def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, properties=None, **kwargs) -> None: + super(DataLakeAnalytics, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, **kwargs) + self.properties = properties + self.compute_type = 'DataLakeAnalytics' diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/databricks.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/databricks.py new file mode 100644 index 000000000000..83dce66a7488 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/databricks.py @@ -0,0 +1,78 @@ +# 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 Databricks(Compute): + """A DataFactory compute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param compute_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 underlying compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :ivar is_attached_compute: Indicating whether the compute was provisioned + by user and brought from outside if true, or machine learning service + provisioned it if false. + :vartype is_attached_compute: bool + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param properties: + :type properties: + ~azure.mgmt.machinelearningservices.models.DatabricksProperties + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'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]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'DatabricksProperties'}, + } + + def __init__(self, **kwargs): + super(Databricks, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.compute_type = 'Databricks' diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/databricks_compute_secrets.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/databricks_compute_secrets.py new file mode 100644 index 000000000000..57b47fa50d8d --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/databricks_compute_secrets.py @@ -0,0 +1,38 @@ +# 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 DatabricksComputeSecrets(ComputeSecrets): + """Secrets related to a Machine Learning compute based on Databricks. + + All required parameters must be populated in order to send to Azure. + + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param databricks_access_token: access token for databricks account. + :type databricks_access_token: str + """ + + _validation = { + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DatabricksComputeSecrets, self).__init__(**kwargs) + self.databricks_access_token = kwargs.get('databricks_access_token', None) + self.compute_type = 'Databricks' diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/databricks_compute_secrets_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/databricks_compute_secrets_py3.py new file mode 100644 index 000000000000..d2016415da8f --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/databricks_compute_secrets_py3.py @@ -0,0 +1,38 @@ +# 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 DatabricksComputeSecrets(ComputeSecrets): + """Secrets related to a Machine Learning compute based on Databricks. + + All required parameters must be populated in order to send to Azure. + + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param databricks_access_token: access token for databricks account. + :type databricks_access_token: str + """ + + _validation = { + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'}, + } + + def __init__(self, *, databricks_access_token: str=None, **kwargs) -> None: + super(DatabricksComputeSecrets, self).__init__(**kwargs) + self.databricks_access_token = databricks_access_token + self.compute_type = 'Databricks' diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/databricks_properties.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/databricks_properties.py new file mode 100644 index 000000000000..0bfc22dc8fcb --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/databricks_properties.py @@ -0,0 +1,28 @@ +# 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 DatabricksProperties(Model): + """DatabricksProperties. + + :param databricks_access_token: Databricks access token + :type databricks_access_token: str + """ + + _attribute_map = { + 'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DatabricksProperties, self).__init__(**kwargs) + self.databricks_access_token = kwargs.get('databricks_access_token', None) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/databricks_properties_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/databricks_properties_py3.py new file mode 100644 index 000000000000..78612df3f269 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/databricks_properties_py3.py @@ -0,0 +1,28 @@ +# 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 DatabricksProperties(Model): + """DatabricksProperties. + + :param databricks_access_token: Databricks access token + :type databricks_access_token: str + """ + + _attribute_map = { + 'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'}, + } + + def __init__(self, *, databricks_access_token: str=None, **kwargs) -> None: + super(DatabricksProperties, self).__init__(**kwargs) + self.databricks_access_token = databricks_access_token diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/databricks_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/databricks_py3.py new file mode 100644 index 000000000000..0ffcb61e2891 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/databricks_py3.py @@ -0,0 +1,78 @@ +# 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 Databricks(Compute): + """A DataFactory compute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param compute_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 underlying compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :ivar is_attached_compute: Indicating whether the compute was provisioned + by user and brought from outside if true, or machine learning service + provisioned it if false. + :vartype is_attached_compute: bool + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param properties: + :type properties: + ~azure.mgmt.machinelearningservices.models.DatabricksProperties + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'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]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'DatabricksProperties'}, + } + + def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, properties=None, **kwargs) -> None: + super(Databricks, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, **kwargs) + self.properties = properties + self.compute_type = 'Databricks' 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..93848e9922f3 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/error_response.py @@ -0,0 +1,46 @@ +# 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. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Error code. + :vartype code: str + :ivar message: Error message. + :vartype message: str + :ivar details: An array of error detail objects. + :vartype details: + list[~azure.mgmt.machinelearningservices.models.ErrorDetail] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'details': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.code = None + self.message = None + self.details = None 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..b5422c170ba3 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/error_response_py3.py @@ -0,0 +1,46 @@ +# 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. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Error code. + :vartype code: str + :ivar message: Error message. + :vartype message: str + :ivar details: An array of error detail objects. + :vartype details: + list[~azure.mgmt.machinelearningservices.models.ErrorDetail] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'details': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + } + + def __init__(self, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.code = None + self.message = None + self.details = None 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..d66092c4fb0b --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/hd_insight.py @@ -0,0 +1,78 @@ +# 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 underlying compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :ivar is_attached_compute: Indicating whether the compute was provisioned + by user and brought from outside if true, or machine learning service + provisioned it if false. + :vartype is_attached_compute: bool + :param 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}, + 'is_attached_compute': {'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]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + '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..cf6cef02cd64 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/hd_insight_py3.py @@ -0,0 +1,78 @@ +# 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 underlying compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :ivar is_attached_compute: Indicating whether the compute was provisioned + by user and brought from outside if true, or machine learning service + provisioned it if false. + :vartype is_attached_compute: bool + :param 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}, + 'is_attached_compute': {'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]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + '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/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..8ba848dced24 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/machine_learning_service_error.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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class MachineLearningServiceError(Model): + """Wrapper for error response to follow ARM guidelines. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar error: The error response. + :vartype error: ~azure.mgmt.machinelearningservices.models.ErrorResponse + """ + + _validation = { + 'error': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponse'}, + } + + def __init__(self, **kwargs): + super(MachineLearningServiceError, self).__init__(**kwargs) + self.error = None + + +class 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..feb3043fb81a --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/machine_learning_service_error_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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class MachineLearningServiceError(Model): + """Wrapper for error response to follow ARM guidelines. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar error: The error response. + :vartype error: ~azure.mgmt.machinelearningservices.models.ErrorResponse + """ + + _validation = { + 'error': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponse'}, + } + + def __init__(self, **kwargs) -> None: + super(MachineLearningServiceError, self).__init__(**kwargs) + self.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/node_state_counts.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/node_state_counts.py new file mode 100644 index 000000000000..da1c3f67b3fc --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/node_state_counts.py @@ -0,0 +1,66 @@ +# 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 NodeStateCounts(Model): + """Counts of various compute node states on the amlCompute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar idle_node_count: Idle node count. Number of compute nodes in idle + state. + :vartype idle_node_count: int + :ivar running_node_count: Running node count. Number of compute nodes + which are running jobs. + :vartype running_node_count: int + :ivar preparing_node_count: Preparing node count. Number of compute nodes + which are being prepared. + :vartype preparing_node_count: int + :ivar unusable_node_count: Unusable node count. Number of compute nodes + which are in unusable state. + :vartype unusable_node_count: int + :ivar leaving_node_count: Leaving node count. Number of compute nodes + which are leaving the amlCompute. + :vartype leaving_node_count: int + :ivar preempted_node_count: Preempted node count. Number of compute nodes + which are in preempted state. + :vartype preempted_node_count: int + """ + + _validation = { + 'idle_node_count': {'readonly': True}, + 'running_node_count': {'readonly': True}, + 'preparing_node_count': {'readonly': True}, + 'unusable_node_count': {'readonly': True}, + 'leaving_node_count': {'readonly': True}, + 'preempted_node_count': {'readonly': True}, + } + + _attribute_map = { + 'idle_node_count': {'key': 'idleNodeCount', 'type': 'int'}, + 'running_node_count': {'key': 'runningNodeCount', 'type': 'int'}, + 'preparing_node_count': {'key': 'preparingNodeCount', 'type': 'int'}, + 'unusable_node_count': {'key': 'unusableNodeCount', 'type': 'int'}, + 'leaving_node_count': {'key': 'leavingNodeCount', 'type': 'int'}, + 'preempted_node_count': {'key': 'preemptedNodeCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(NodeStateCounts, self).__init__(**kwargs) + self.idle_node_count = None + self.running_node_count = None + self.preparing_node_count = None + self.unusable_node_count = None + self.leaving_node_count = None + self.preempted_node_count = None diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/node_state_counts_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/node_state_counts_py3.py new file mode 100644 index 000000000000..16308578dbea --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/node_state_counts_py3.py @@ -0,0 +1,66 @@ +# 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 NodeStateCounts(Model): + """Counts of various compute node states on the amlCompute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar idle_node_count: Idle node count. Number of compute nodes in idle + state. + :vartype idle_node_count: int + :ivar running_node_count: Running node count. Number of compute nodes + which are running jobs. + :vartype running_node_count: int + :ivar preparing_node_count: Preparing node count. Number of compute nodes + which are being prepared. + :vartype preparing_node_count: int + :ivar unusable_node_count: Unusable node count. Number of compute nodes + which are in unusable state. + :vartype unusable_node_count: int + :ivar leaving_node_count: Leaving node count. Number of compute nodes + which are leaving the amlCompute. + :vartype leaving_node_count: int + :ivar preempted_node_count: Preempted node count. Number of compute nodes + which are in preempted state. + :vartype preempted_node_count: int + """ + + _validation = { + 'idle_node_count': {'readonly': True}, + 'running_node_count': {'readonly': True}, + 'preparing_node_count': {'readonly': True}, + 'unusable_node_count': {'readonly': True}, + 'leaving_node_count': {'readonly': True}, + 'preempted_node_count': {'readonly': True}, + } + + _attribute_map = { + 'idle_node_count': {'key': 'idleNodeCount', 'type': 'int'}, + 'running_node_count': {'key': 'runningNodeCount', 'type': 'int'}, + 'preparing_node_count': {'key': 'preparingNodeCount', 'type': 'int'}, + 'unusable_node_count': {'key': 'unusableNodeCount', 'type': 'int'}, + 'leaving_node_count': {'key': 'leavingNodeCount', 'type': 'int'}, + 'preempted_node_count': {'key': 'preemptedNodeCount', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(NodeStateCounts, self).__init__(**kwargs) + self.idle_node_count = None + self.running_node_count = None + self.preparing_node_count = None + self.unusable_node_count = None + self.leaving_node_count = None + self.preempted_node_count = None 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_id.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/resource_id.py new file mode 100644 index 000000000000..0985a22c02e1 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/resource_id.py @@ -0,0 +1,35 @@ +# 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 ResourceId(Model): + """Represents a resource ID. For example, for a subnet, it is the resource URL + for the subnet. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the resource + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceId, self).__init__(**kwargs) + self.id = kwargs.get('id', None) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/resource_id_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/resource_id_py3.py new file mode 100644 index 000000000000..3a01a74656c3 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/resource_id_py3.py @@ -0,0 +1,35 @@ +# 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 ResourceId(Model): + """Represents a resource ID. For example, for a subnet, it is the resource URL + for the subnet. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the resource + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(ResourceId, self).__init__(**kwargs) + self.id = id 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..4afccf20d8e1 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/scale_settings.py @@ -0,0 +1,43 @@ +# 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 AML Compute. + + All required parameters must be populated in order to send to Azure. + + :param max_node_count: Required. Max number of nodes to use + :type max_node_count: int + :param min_node_count: Min number of nodes to use. Default value: 0 . + :type min_node_count: int + :param node_idle_time_before_scale_down: Node Idle Time before scaling + down amlCompute + :type node_idle_time_before_scale_down: timedelta + """ + + _validation = { + 'max_node_count': {'required': True}, + } + + _attribute_map = { + 'max_node_count': {'key': 'maxNodeCount', 'type': 'int'}, + 'min_node_count': {'key': 'minNodeCount', 'type': 'int'}, + 'node_idle_time_before_scale_down': {'key': 'nodeIdleTimeBeforeScaleDown', 'type': 'duration'}, + } + + def __init__(self, **kwargs): + super(ScaleSettings, self).__init__(**kwargs) + self.max_node_count = kwargs.get('max_node_count', None) + self.min_node_count = kwargs.get('min_node_count', 0) + self.node_idle_time_before_scale_down = kwargs.get('node_idle_time_before_scale_down', None) 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..e4be2b96c06f --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/scale_settings_py3.py @@ -0,0 +1,43 @@ +# 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 AML Compute. + + All required parameters must be populated in order to send to Azure. + + :param max_node_count: Required. Max number of nodes to use + :type max_node_count: int + :param min_node_count: Min number of nodes to use. Default value: 0 . + :type min_node_count: int + :param node_idle_time_before_scale_down: Node Idle Time before scaling + down amlCompute + :type node_idle_time_before_scale_down: timedelta + """ + + _validation = { + 'max_node_count': {'required': True}, + } + + _attribute_map = { + 'max_node_count': {'key': 'maxNodeCount', 'type': 'int'}, + 'min_node_count': {'key': 'minNodeCount', 'type': 'int'}, + 'node_idle_time_before_scale_down': {'key': 'nodeIdleTimeBeforeScaleDown', 'type': 'duration'}, + } + + def __init__(self, *, max_node_count: int, min_node_count: int=0, node_idle_time_before_scale_down=None, **kwargs) -> None: + super(ScaleSettings, self).__init__(**kwargs) + self.max_node_count = max_node_count + self.min_node_count = min_node_count + self.node_idle_time_before_scale_down = node_idle_time_before_scale_down 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..5f46c657b133 --- /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 configuration 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..121c2d06710a --- /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 configuration 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/usage.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/usage.py new file mode 100644 index 000000000000..daafd2298b76 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/usage.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 Usage(Model): + """Describes AML Resource Usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar unit: An enum describing the unit of usage measurement. Possible + values include: 'Count' + :vartype unit: str or ~azure.mgmt.machinelearningservices.models.UsageUnit + :ivar current_value: The current usage of the resource. + :vartype current_value: long + :ivar limit: The maximum permitted usage of the resource. + :vartype limit: long + :ivar name: The name of the type of usage. + :vartype name: ~azure.mgmt.machinelearningservices.models.UsageName + """ + + _validation = { + 'unit': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + def __init__(self, **kwargs): + super(Usage, self).__init__(**kwargs) + self.unit = None + self.current_value = None + self.limit = None + self.name = None diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/usage_by_vm_family.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/usage_by_vm_family.py new file mode 100644 index 000000000000..fd1a0d13e32e --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/usage_by_vm_family.py @@ -0,0 +1,66 @@ +# 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 .usage import Usage + + +class UsageByVMFamily(Usage): + """Describes Batch AI Resource Usage by VM Family, broken down by Workspace + and Cluster usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar unit: An enum describing the unit of usage measurement. Possible + values include: 'Count' + :vartype unit: str or ~azure.mgmt.machinelearningservices.models.UsageUnit + :ivar current_value: The current usage of the resource. + :vartype current_value: long + :ivar limit: The maximum permitted usage of the resource. + :vartype limit: long + :ivar name: The name of the type of usage. + :vartype name: ~azure.mgmt.machinelearningservices.models.UsageName + :ivar resource_group_name: The name of the resource group this resource + type belongs to + :vartype resource_group_name: str + :ivar resource_type: The type of the resource, whether its VM family, + workspace name, or cluster + :vartype resource_type: str + :ivar usage_breakdown: The breakdown of usage by Workspace or Cluster + :vartype usage_breakdown: + list[~azure.mgmt.machinelearningservices.models.UsageByVMFamily] + """ + + _validation = { + 'unit': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'name': {'readonly': True}, + 'resource_group_name': {'readonly': True}, + 'resource_type': {'readonly': True}, + 'usage_breakdown': {'readonly': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + 'resource_group_name': {'key': 'properties.resourceGroupName', 'type': 'str'}, + 'resource_type': {'key': 'properties.resourceType', 'type': 'str'}, + 'usage_breakdown': {'key': 'properties.usageBreakdown', 'type': '[UsageByVMFamily]'}, + } + + def __init__(self, **kwargs): + super(UsageByVMFamily, self).__init__(**kwargs) + self.resource_group_name = None + self.resource_type = None + self.usage_breakdown = None diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/usage_by_vm_family_paged.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/usage_by_vm_family_paged.py new file mode 100644 index 000000000000..50d2747182e4 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/usage_by_vm_family_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 UsageByVMFamilyPaged(Paged): + """ + A paging container for iterating over a list of :class:`UsageByVMFamily ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[UsageByVMFamily]'} + } + + def __init__(self, *args, **kwargs): + + super(UsageByVMFamilyPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/usage_by_vm_family_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/usage_by_vm_family_py3.py new file mode 100644 index 000000000000..50cdc3b27f8e --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/usage_by_vm_family_py3.py @@ -0,0 +1,66 @@ +# 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 .usage_py3 import Usage + + +class UsageByVMFamily(Usage): + """Describes Batch AI Resource Usage by VM Family, broken down by Workspace + and Cluster usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar unit: An enum describing the unit of usage measurement. Possible + values include: 'Count' + :vartype unit: str or ~azure.mgmt.machinelearningservices.models.UsageUnit + :ivar current_value: The current usage of the resource. + :vartype current_value: long + :ivar limit: The maximum permitted usage of the resource. + :vartype limit: long + :ivar name: The name of the type of usage. + :vartype name: ~azure.mgmt.machinelearningservices.models.UsageName + :ivar resource_group_name: The name of the resource group this resource + type belongs to + :vartype resource_group_name: str + :ivar resource_type: The type of the resource, whether its VM family, + workspace name, or cluster + :vartype resource_type: str + :ivar usage_breakdown: The breakdown of usage by Workspace or Cluster + :vartype usage_breakdown: + list[~azure.mgmt.machinelearningservices.models.UsageByVMFamily] + """ + + _validation = { + 'unit': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'name': {'readonly': True}, + 'resource_group_name': {'readonly': True}, + 'resource_type': {'readonly': True}, + 'usage_breakdown': {'readonly': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + 'resource_group_name': {'key': 'properties.resourceGroupName', 'type': 'str'}, + 'resource_type': {'key': 'properties.resourceType', 'type': 'str'}, + 'usage_breakdown': {'key': 'properties.usageBreakdown', 'type': '[UsageByVMFamily]'}, + } + + def __init__(self, **kwargs) -> None: + super(UsageByVMFamily, self).__init__(**kwargs) + self.resource_group_name = None + self.resource_type = None + self.usage_breakdown = None diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/usage_name.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/usage_name.py new file mode 100644 index 000000000000..9140d61b9b98 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/usage_name.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 UsageName(Model): + """The Usage Names. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The name of the resource. + :vartype value: str + :ivar localized_value: The localized name of the resource. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UsageName, self).__init__(**kwargs) + self.value = None + self.localized_value = None diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/usage_name_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/usage_name_py3.py new file mode 100644 index 000000000000..5b6c039f8a9a --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/usage_name_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 UsageName(Model): + """The Usage Names. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The name of the resource. + :vartype value: str + :ivar localized_value: The localized name of the resource. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(UsageName, self).__init__(**kwargs) + self.value = None + self.localized_value = None diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/usage_paged.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/usage_paged.py new file mode 100644 index 000000000000..93afee264806 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/usage_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 UsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Usage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Usage]'} + } + + def __init__(self, *args, **kwargs): + + super(UsagePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/usage_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/usage_py3.py new file mode 100644 index 000000000000..ff256e5149b1 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/usage_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 Usage(Model): + """Describes AML Resource Usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar unit: An enum describing the unit of usage measurement. Possible + values include: 'Count' + :vartype unit: str or ~azure.mgmt.machinelearningservices.models.UsageUnit + :ivar current_value: The current usage of the resource. + :vartype current_value: long + :ivar limit: The maximum permitted usage of the resource. + :vartype limit: long + :ivar name: The name of the type of usage. + :vartype name: ~azure.mgmt.machinelearningservices.models.UsageName + """ + + _validation = { + 'unit': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + def __init__(self, **kwargs) -> None: + super(Usage, self).__init__(**kwargs) + self.unit = None + self.current_value = None + self.limit = None + self.name = None diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/user_account_credentials.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/user_account_credentials.py new file mode 100644 index 000000000000..3da1fe6744d6 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/user_account_credentials.py @@ -0,0 +1,46 @@ +# 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 UserAccountCredentials(Model): + """Settings for user account that gets created on each on the nodes of a + compute. + + All required parameters must be populated in order to send to Azure. + + :param admin_user_name: Required. User name. Name of the administrator + user account which can be used to SSH to nodes. + :type admin_user_name: str + :param admin_user_ssh_public_key: SSH public key. SSH public key of the + administrator user account. + :type admin_user_ssh_public_key: str + :param admin_user_password: Password. Password of the administrator user + account. + :type admin_user_password: str + """ + + _validation = { + 'admin_user_name': {'required': True}, + } + + _attribute_map = { + 'admin_user_name': {'key': 'adminUserName', 'type': 'str'}, + 'admin_user_ssh_public_key': {'key': 'adminUserSshPublicKey', 'type': 'str'}, + 'admin_user_password': {'key': 'adminUserPassword', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserAccountCredentials, self).__init__(**kwargs) + self.admin_user_name = kwargs.get('admin_user_name', None) + self.admin_user_ssh_public_key = kwargs.get('admin_user_ssh_public_key', None) + self.admin_user_password = kwargs.get('admin_user_password', None) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/user_account_credentials_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/user_account_credentials_py3.py new file mode 100644 index 000000000000..6d1360999ad6 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/user_account_credentials_py3.py @@ -0,0 +1,46 @@ +# 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 UserAccountCredentials(Model): + """Settings for user account that gets created on each on the nodes of a + compute. + + All required parameters must be populated in order to send to Azure. + + :param admin_user_name: Required. User name. Name of the administrator + user account which can be used to SSH to nodes. + :type admin_user_name: str + :param admin_user_ssh_public_key: SSH public key. SSH public key of the + administrator user account. + :type admin_user_ssh_public_key: str + :param admin_user_password: Password. Password of the administrator user + account. + :type admin_user_password: str + """ + + _validation = { + 'admin_user_name': {'required': True}, + } + + _attribute_map = { + 'admin_user_name': {'key': 'adminUserName', 'type': 'str'}, + 'admin_user_ssh_public_key': {'key': 'adminUserSshPublicKey', 'type': 'str'}, + 'admin_user_password': {'key': 'adminUserPassword', 'type': 'str'}, + } + + def __init__(self, *, admin_user_name: str, admin_user_ssh_public_key: str=None, admin_user_password: str=None, **kwargs) -> None: + super(UserAccountCredentials, self).__init__(**kwargs) + self.admin_user_name = admin_user_name + self.admin_user_ssh_public_key = admin_user_ssh_public_key + self.admin_user_password = admin_user_password 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..f4f8f8f85cdd --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine.py @@ -0,0 +1,78 @@ +# 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. + + :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 underlying compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :ivar is_attached_compute: Indicating whether the compute was provisioned + by user and brought from outside if true, or machine learning service + provisioned it if false. + :vartype is_attached_compute: bool + :param 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}, + 'is_attached_compute': {'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]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + '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..caaffa670ad1 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_properties.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 VirtualMachineProperties(Model): + """VirtualMachineProperties. + + :param virtual_machine_size: Virtual Machine size + :type virtual_machine_size: str + :param ssh_port: Port open for ssh connections. + :type ssh_port: int + :param address: Public IP address of the virtual machine. + :type address: str + :param administrator_account: Admin credentials for virtual machine + :type administrator_account: + ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials + """ + + _attribute_map = { + 'virtual_machine_size': {'key': 'virtualMachineSize', 'type': 'str'}, + 'ssh_port': {'key': 'sshPort', 'type': 'int'}, + 'address': {'key': 'address', 'type': 'str'}, + 'administrator_account': {'key': 'administratorAccount', 'type': 'VirtualMachineSshCredentials'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineProperties, self).__init__(**kwargs) + self.virtual_machine_size = kwargs.get('virtual_machine_size', None) + self.ssh_port = kwargs.get('ssh_port', None) + self.address = kwargs.get('address', None) + self.administrator_account = kwargs.get('administrator_account', None) 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..bd21b20d593d --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_properties_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 VirtualMachineProperties(Model): + """VirtualMachineProperties. + + :param virtual_machine_size: Virtual Machine size + :type virtual_machine_size: str + :param ssh_port: Port open for ssh connections. + :type ssh_port: int + :param address: Public IP address of the virtual machine. + :type address: str + :param administrator_account: Admin credentials for virtual machine + :type administrator_account: + ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials + """ + + _attribute_map = { + 'virtual_machine_size': {'key': 'virtualMachineSize', 'type': 'str'}, + 'ssh_port': {'key': 'sshPort', 'type': 'int'}, + 'address': {'key': 'address', 'type': 'str'}, + 'administrator_account': {'key': 'administratorAccount', 'type': 'VirtualMachineSshCredentials'}, + } + + def __init__(self, *, 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 new file mode 100644 index 000000000000..b8647a0562d1 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_py3.py @@ -0,0 +1,78 @@ +# 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. + + :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 underlying compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :ivar is_attached_compute: Indicating whether the compute was provisioned + by user and brought from outside if true, or machine learning service + provisioned it if false. + :vartype is_attached_compute: bool + :param 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}, + 'is_attached_compute': {'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]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'VirtualMachineProperties'}, + } + + 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/models/virtual_machine_secrets.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_secrets.py new file mode 100644 index 000000000000..d396ddaa02d3 --- /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 credentials for virtual machine. + :type administrator_account: + ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials + """ + + _validation = { + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'administrator_account': {'key': 'administratorAccount', 'type': 'VirtualMachineSshCredentials'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineSecrets, self).__init__(**kwargs) + self.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..badd030d2830 --- /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 credentials for virtual machine. + :type administrator_account: + ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials + """ + + _validation = { + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'administrator_account': {'key': 'administratorAccount', 'type': 'VirtualMachineSshCredentials'}, + } + + def __init__(self, *, 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_size.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_size.py new file mode 100644 index 000000000000..52d7ee3a40de --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_size.py @@ -0,0 +1,78 @@ +# 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 VirtualMachineSize(Model): + """Describes the properties of a VM size. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Virtual Machine size name. The name of the virtual machine + size. + :vartype name: str + :ivar family: Virtual Machine family name. The family name of the virtual + machine size. + :vartype family: str + :ivar v_cp_us: Number of vPUs. The number of vCPUs supported by the + virtual machine size. + :vartype v_cp_us: int + :ivar os_vhd_size_mb: OS VHD Disk size. The OS VHD disk size, in MB, + allowed by the virtual machine size. + :vartype os_vhd_size_mb: int + :ivar max_resource_volume_mb: Resource volume size. The resource volume + size, in MB, allowed by the virtual machine size. + :vartype max_resource_volume_mb: int + :ivar memory_gb: Memory size. The amount of memory, in GB, supported by + the virtual machine size. + :vartype memory_gb: float + :ivar low_priority_capable: Low priority capable. Specifies if the virtual + machine size supports low priority VMs. + :vartype low_priority_capable: bool + :ivar premium_io: Premium IO supported. Specifies if the virtual machine + size supports premium IO. + :vartype premium_io: bool + """ + + _validation = { + 'name': {'readonly': True}, + 'family': {'readonly': True}, + 'v_cp_us': {'readonly': True}, + 'os_vhd_size_mb': {'readonly': True}, + 'max_resource_volume_mb': {'readonly': True}, + 'memory_gb': {'readonly': True}, + 'low_priority_capable': {'readonly': True}, + 'premium_io': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'v_cp_us': {'key': 'vCPUs', 'type': 'int'}, + 'os_vhd_size_mb': {'key': 'osVhdSizeMB', 'type': 'int'}, + 'max_resource_volume_mb': {'key': 'maxResourceVolumeMB', 'type': 'int'}, + 'memory_gb': {'key': 'memoryGB', 'type': 'float'}, + 'low_priority_capable': {'key': 'lowPriorityCapable', 'type': 'bool'}, + 'premium_io': {'key': 'premiumIO', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineSize, self).__init__(**kwargs) + self.name = None + self.family = None + self.v_cp_us = None + self.os_vhd_size_mb = None + self.max_resource_volume_mb = None + self.memory_gb = None + self.low_priority_capable = None + self.premium_io = None diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_size_list_result.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_size_list_result.py new file mode 100644 index 000000000000..fc04668a0a5b --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_size_list_result.py @@ -0,0 +1,30 @@ +# 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 VirtualMachineSizeListResult(Model): + """The List Virtual Machine size operation response. + + :param aml_compute: The list of virtual machine sizes supported by + AmlCompute. + :type aml_compute: + list[~azure.mgmt.machinelearningservices.models.VirtualMachineSize] + """ + + _attribute_map = { + 'aml_compute': {'key': 'amlCompute', 'type': '[VirtualMachineSize]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineSizeListResult, self).__init__(**kwargs) + self.aml_compute = kwargs.get('aml_compute', None) diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_size_list_result_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_size_list_result_py3.py new file mode 100644 index 000000000000..912dff33a72e --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_size_list_result_py3.py @@ -0,0 +1,30 @@ +# 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 VirtualMachineSizeListResult(Model): + """The List Virtual Machine size operation response. + + :param aml_compute: The list of virtual machine sizes supported by + AmlCompute. + :type aml_compute: + list[~azure.mgmt.machinelearningservices.models.VirtualMachineSize] + """ + + _attribute_map = { + 'aml_compute': {'key': 'amlCompute', 'type': '[VirtualMachineSize]'}, + } + + def __init__(self, *, aml_compute=None, **kwargs) -> None: + super(VirtualMachineSizeListResult, self).__init__(**kwargs) + self.aml_compute = aml_compute diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_size_py3.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_size_py3.py new file mode 100644 index 000000000000..e78fde17bcfa --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_size_py3.py @@ -0,0 +1,78 @@ +# 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 VirtualMachineSize(Model): + """Describes the properties of a VM size. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Virtual Machine size name. The name of the virtual machine + size. + :vartype name: str + :ivar family: Virtual Machine family name. The family name of the virtual + machine size. + :vartype family: str + :ivar v_cp_us: Number of vPUs. The number of vCPUs supported by the + virtual machine size. + :vartype v_cp_us: int + :ivar os_vhd_size_mb: OS VHD Disk size. The OS VHD disk size, in MB, + allowed by the virtual machine size. + :vartype os_vhd_size_mb: int + :ivar max_resource_volume_mb: Resource volume size. The resource volume + size, in MB, allowed by the virtual machine size. + :vartype max_resource_volume_mb: int + :ivar memory_gb: Memory size. The amount of memory, in GB, supported by + the virtual machine size. + :vartype memory_gb: float + :ivar low_priority_capable: Low priority capable. Specifies if the virtual + machine size supports low priority VMs. + :vartype low_priority_capable: bool + :ivar premium_io: Premium IO supported. Specifies if the virtual machine + size supports premium IO. + :vartype premium_io: bool + """ + + _validation = { + 'name': {'readonly': True}, + 'family': {'readonly': True}, + 'v_cp_us': {'readonly': True}, + 'os_vhd_size_mb': {'readonly': True}, + 'max_resource_volume_mb': {'readonly': True}, + 'memory_gb': {'readonly': True}, + 'low_priority_capable': {'readonly': True}, + 'premium_io': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'v_cp_us': {'key': 'vCPUs', 'type': 'int'}, + 'os_vhd_size_mb': {'key': 'osVhdSizeMB', 'type': 'int'}, + 'max_resource_volume_mb': {'key': 'maxResourceVolumeMB', 'type': 'int'}, + 'memory_gb': {'key': 'memoryGB', 'type': 'float'}, + 'low_priority_capable': {'key': 'lowPriorityCapable', 'type': 'bool'}, + 'premium_io': {'key': 'premiumIO', 'type': 'bool'}, + } + + def __init__(self, **kwargs) -> None: + super(VirtualMachineSize, self).__init__(**kwargs) + self.name = None + self.family = None + self.v_cp_us = None + self.os_vhd_size_mb = None + self.max_resource_volume_mb = None + self.memory_gb = None + self.low_priority_capable = None + self.premium_io = None 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..f5f73170d9dd --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/__init__.py @@ -0,0 +1,26 @@ +# 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 .usages_operations import UsagesOperations +from .usages_by_vm_family_operations import UsagesByVMFamilyOperations +from .virtual_machine_sizes_operations import VirtualMachineSizesOperations +from .machine_learning_compute_operations import MachineLearningComputeOperations + +__all__ = [ + 'Operations', + 'WorkspacesOperations', + 'UsagesOperations', + 'UsagesByVMFamilyOperations', + 'VirtualMachineSizesOperations', + '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..f8dc8d8e3d70 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/machine_learning_compute_operations.py @@ -0,0 +1,642 @@ +# 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-11-19". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-11-19" + + 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['Accept'] = 'application/json' + 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, header_parameters) + response = self._client.send(request, 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}/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): + """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['Accept'] = 'application/json' + 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, header_parameters) + response = self._client.send(request, 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}/resourceGroups/{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['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()) + 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, 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) + + 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}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} + + + def _update_initial( + self, resource_group_name, workspace_name, compute_name, scale_settings=None, custom_headers=None, raw=False, **operation_config): + parameters = models.ClusterUpdateParameters(scale_settings=scale_settings) + + # 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'), + '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['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()) + 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, 'ClusterUpdateParameters') + + # Construct and send request + 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) + + 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 + + def update( + self, resource_group_name, workspace_name, compute_name, scale_settings=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates properties of a compute. This call will overwrite a compute if + it exists. This is a nonrecoverable operation. + + :param resource_group_name: Name of the resource group in which + workspace is located. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param compute_name: Name of the Azure Machine Learning compute. + :type compute_name: str + :param scale_settings: Scale settings. Desired scale settings for the + amlCompute. + :type scale_settings: + ~azure.mgmt.machinelearningservices.models.ScaleSettings + :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._update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + scale_settings=scale_settings, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ComputeResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + 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) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} + + + def _delete_initial( + self, resource_group_name, workspace_name, compute_name, underlying_resource_action, 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') + query_parameters['underlyingResourceAction'] = self._serialize.query("underlying_resource_action", underlying_resource_action, '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.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) + + 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, underlying_resource_action, 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 underlying_resource_action: Delete the underlying compute if + 'Delete', or detach the underlying compute from workspace if 'Detach'. + Possible values include: 'Delete', 'Detach' + :type underlying_resource_action: str or + ~azure.mgmt.machinelearningservices.models.UnderlyingResourceAction + :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, + underlying_resource_action=underlying_resource_action, + 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}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} + + def list_nodes( + self, resource_group_name, workspace_name, compute_name, custom_headers=None, raw=False, **operation_config): + """Get the details (e.g IP address, port etc) of all the compute nodes in + the compute. + + :param resource_group_name: Name of the resource group in which + workspace is located. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param compute_name: Name of the Azure Machine Learning compute. + :type compute_name: str + :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: ComputeNodesInformation or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.machinelearningservices.models.ComputeNodesInformation or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`MachineLearningServiceErrorException` + """ + # Construct URL + url = self.list_nodes.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['Accept'] = 'application/json' + 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]: + raise models.MachineLearningServiceErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ComputeNodesInformation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_nodes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listNodes'} + + 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). + + :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.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'), + '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['Accept'] = 'application/json' + 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]: + 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 + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{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..6a7baa94a9f1 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/operations.py @@ -0,0 +1,97 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import 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-11-19". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-11-19" + + 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['Accept'] = 'application/json' + 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, header_parameters) + response = self._client.send(request, 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/usages_by_vm_family_operations.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/usages_by_vm_family_operations.py new file mode 100644 index 000000000000..198494af0a74 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/usages_by_vm_family_operations.py @@ -0,0 +1,107 @@ +# 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 msrestazure.azure_exceptions import CloudError + +from .. import models + + +class UsagesByVMFamilyOperations(object): + """UsagesByVMFamilyOperations 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-11-19". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-11-19" + + self.config = config + + def list( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets the current usage information in a detailed format as well as + limits for Batch AI resources for given subscription, by VM family, + workspace and cluster hierarchy. + + :param location: The location for which resource usage is queried. + :type location: 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 UsageByVMFamily + :rtype: + ~azure.mgmt.machinelearningservices.models.UsageByVMFamilyPaged[~azure.mgmt.machinelearningservices.models.UsageByVMFamily] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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['Accept'] = 'application/json' + 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, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.UsageByVMFamilyPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.UsageByVMFamilyPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/usagesByVMFamily'} diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/usages_operations.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/usages_operations.py new file mode 100644 index 000000000000..6962c178b0f9 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/usages_operations.py @@ -0,0 +1,106 @@ +# 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 msrestazure.azure_exceptions import CloudError + +from .. import models + + +class UsagesOperations(object): + """UsagesOperations 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-11-19". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-11-19" + + self.config = config + + def list( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets the current usage information as well as limits for AML resources + for given subscription and location. + + :param location: The location for which resource usage is queried. + :type location: str + :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 Usage + :rtype: + ~azure.mgmt.machinelearningservices.models.UsagePaged[~azure.mgmt.machinelearningservices.models.Usage] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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['Accept'] = 'application/json' + 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, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/usages'} diff --git a/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/virtual_machine_sizes_operations.py b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/virtual_machine_sizes_operations.py new file mode 100644 index 000000000000..b6257484eef0 --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/virtual_machine_sizes_operations.py @@ -0,0 +1,99 @@ +# 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 msrestazure.azure_exceptions import CloudError + +from .. import models + + +class VirtualMachineSizesOperations(object): + """VirtualMachineSizesOperations 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-11-19". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-11-19" + + self.config = config + + def list( + self, location, custom_headers=None, raw=False, **operation_config): + """Returns supported VM Sizes in a location. + + :param location: The location upon which virtual-machine-sizes is + queried. + :type location: 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: VirtualMachineSizeListResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.machinelearningservices.models.VirtualMachineSizeListResult + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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: + 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, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineSizeListResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/vmSizes'} 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..2fa4e262635c --- /dev/null +++ b/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/workspaces_operations.py @@ -0,0 +1,553 @@ +# 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-11-19". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-11-19" + + 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['Accept'] = 'application/json' + 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, header_parameters) + response = self._client.send(request, 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['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()) + 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, 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) + + 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 = {} + 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, 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) + + 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['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()) + 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, 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) + + 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['Accept'] = 'application/json' + 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, header_parameters) + response = self._client.send(request, 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['Accept'] = 'application/json' + 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]: + 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 = {} + 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]: + 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['Accept'] = 'application/json' + 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, header_parameters) + response = self._client.send(request, 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" + diff --git a/azure-mgmt-machinelearningservices/sdk_packaging.toml b/azure-mgmt-machinelearningservices/sdk_packaging.toml new file mode 100644 index 000000000000..d7216ff32024 --- /dev/null +++ b/azure-mgmt-machinelearningservices/sdk_packaging.toml @@ -0,0 +1,8 @@ +[packaging] +package_name = "azure-mgmt-machinelearningservices" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "MyService Management" +package_doc_id = "" +is_stable = false +is_arm = true +need_msrestazure = true diff --git a/azure-mgmt-machinelearningservices/setup.cfg b/azure-mgmt-machinelearningservices/setup.cfg new file mode 100644 index 000000000000..3c6e79cf31da --- /dev/null +++ b/azure-mgmt-machinelearningservices/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1 diff --git a/azure-mgmt-machinelearningservices/setup.py b/azure-mgmt-machinelearningservices/setup.py new file mode 100644 index 000000000000..7ede0b1acad3 --- /dev/null +++ b/azure-mgmt-machinelearningservices/setup.py @@ -0,0 +1,88 @@ +#!/usr/bin/env python + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import re +import os.path +from io import open +from setuptools import find_packages, setup + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-mgmt-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, + long_description_content_type='text/x-rst', + 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', + # 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', + ], + extras_require={ + ":python_version<'3.0'": ['azure-mgmt-nspkg'], + } +)