diff --git a/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/__init__.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/__init__.py new file mode 100644 index 000000000000..3d99419d58fb --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/azure_machine_learning_workspaces.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/azure_machine_learning_workspaces.py new file mode 100644 index 000000000000..7d5724562c62 --- /dev/null +++ b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/azure_machine_learning_workspaces.py @@ -0,0 +1,91 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.operations import Operations +from .operations.workspaces_operations import WorkspacesOperations +from .operations.machine_learning_compute_operations import MachineLearningComputeOperations +from . import models + + +class AzureMachineLearningWorkspacesConfiguration(AzureConfiguration): + """Configuration for AzureMachineLearningWorkspaces + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription identifier. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(AzureMachineLearningWorkspacesConfiguration, self).__init__(base_url) + + self.add_user_agent('azure-mgmt-machinelearningservices/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class AzureMachineLearningWorkspaces(SDKClient): + """These APIs allow end users to operate on Azure Machine Learning Workspace resources. + + :ivar config: Configuration for client. + :vartype config: AzureMachineLearningWorkspacesConfiguration + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.machinelearningservices.operations.Operations + :ivar workspaces: Workspaces operations + :vartype workspaces: azure.mgmt.machinelearningservices.operations.WorkspacesOperations + :ivar machine_learning_compute: MachineLearningCompute operations + :vartype machine_learning_compute: azure.mgmt.machinelearningservices.operations.MachineLearningComputeOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Azure subscription identifier. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = AzureMachineLearningWorkspacesConfiguration(credentials, subscription_id, base_url) + super(AzureMachineLearningWorkspaces, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2018-03-01-preview' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.workspaces = WorkspacesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.machine_learning_compute = MachineLearningComputeOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/__init__.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/__init__.py new file mode 100644 index 000000000000..e03d0d68a8a8 --- /dev/null +++ b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/__init__.py @@ -0,0 +1,123 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +try: + from .operation_display_py3 import OperationDisplay + from .operation_py3 import Operation + from .workspace_py3 import Workspace + from .workspace_update_parameters_py3 import WorkspaceUpdateParameters + from .identity_py3 import Identity + from .resource_py3 import Resource + from .password_py3 import Password + from .registry_list_credentials_result_py3 import RegistryListCredentialsResult + from .list_workspace_keys_result_py3 import ListWorkspaceKeysResult + from .error_detail_py3 import ErrorDetail + from .error_response_py3 import ErrorResponse + from .machine_learning_service_error_py3 import MachineLearningServiceError, MachineLearningServiceErrorException + from .compute_py3 import Compute + from .compute_resource_py3 import ComputeResource + from .system_service_py3 import SystemService + from .ssl_configuration_py3 import SslConfiguration + from .aks_properties_py3 import AKSProperties + from .aks_py3 import AKS + from .scale_settings_py3 import ScaleSettings + from .batch_ai_properties_py3 import BatchAIProperties + from .batch_ai_py3 import BatchAI + from .virtual_machine_ssh_credentials_py3 import VirtualMachineSshCredentials + from .virtual_machine_properties_py3 import VirtualMachineProperties + from .virtual_machine_py3 import VirtualMachine + from .hd_insight_properties_py3 import HDInsightProperties + from .hd_insight_py3 import HDInsight + from .data_factory_py3 import DataFactory + from .service_principal_credentials_py3 import ServicePrincipalCredentials + from .compute_secrets_py3 import ComputeSecrets + from .aks_compute_secrets_py3 import AksComputeSecrets + from .virtual_machine_secrets_py3 import VirtualMachineSecrets +except (SyntaxError, ImportError): + from .operation_display import OperationDisplay + from .operation import Operation + from .workspace import Workspace + from .workspace_update_parameters import WorkspaceUpdateParameters + from .identity import Identity + from .resource import Resource + from .password import Password + from .registry_list_credentials_result import RegistryListCredentialsResult + from .list_workspace_keys_result import ListWorkspaceKeysResult + from .error_detail import ErrorDetail + from .error_response import ErrorResponse + from .machine_learning_service_error import MachineLearningServiceError, MachineLearningServiceErrorException + from .compute import Compute + from .compute_resource import ComputeResource + from .system_service import SystemService + from .ssl_configuration import SslConfiguration + from .aks_properties import AKSProperties + from .aks import AKS + from .scale_settings import ScaleSettings + from .batch_ai_properties import BatchAIProperties + from .batch_ai import BatchAI + from .virtual_machine_ssh_credentials import VirtualMachineSshCredentials + from .virtual_machine_properties import VirtualMachineProperties + from .virtual_machine import VirtualMachine + from .hd_insight_properties import HDInsightProperties + from .hd_insight import HDInsight + from .data_factory import DataFactory + from .service_principal_credentials import ServicePrincipalCredentials + from .compute_secrets import ComputeSecrets + from .aks_compute_secrets import AksComputeSecrets + from .virtual_machine_secrets import VirtualMachineSecrets +from .operation_paged import OperationPaged +from .workspace_paged import WorkspacePaged +from .compute_resource_paged import ComputeResourcePaged +from .azure_machine_learning_workspaces_enums import ( + ProvisioningState, + ResourceIdentityType, + ComputeType, +) + +__all__ = [ + 'OperationDisplay', + 'Operation', + 'Workspace', + 'WorkspaceUpdateParameters', + 'Identity', + 'Resource', + 'Password', + 'RegistryListCredentialsResult', + 'ListWorkspaceKeysResult', + 'ErrorDetail', + 'ErrorResponse', + 'MachineLearningServiceError', 'MachineLearningServiceErrorException', + 'Compute', + 'ComputeResource', + 'SystemService', + 'SslConfiguration', + 'AKSProperties', + 'AKS', + 'ScaleSettings', + 'BatchAIProperties', + 'BatchAI', + 'VirtualMachineSshCredentials', + 'VirtualMachineProperties', + 'VirtualMachine', + 'HDInsightProperties', + 'HDInsight', + 'DataFactory', + 'ServicePrincipalCredentials', + 'ComputeSecrets', + 'AksComputeSecrets', + 'VirtualMachineSecrets', + 'OperationPaged', + 'WorkspacePaged', + 'ComputeResourcePaged', + 'ProvisioningState', + 'ResourceIdentityType', + 'ComputeType', +] diff --git a/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks.py new file mode 100644 index 000000000000..e5d56bfa1a0b --- /dev/null +++ b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .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 compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param properties: AKS properties + :type properties: ~azure.mgmt.machinelearningservices.models.AKSProperties + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'AKSProperties'}, + } + + def __init__(self, **kwargs): + super(AKS, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.compute_type = 'AKS' diff --git a/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_compute_secrets.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_compute_secrets.py new file mode 100644 index 000000000000..bd1ae7a7f5ba --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_compute_secrets_py3.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_compute_secrets_py3.py new file mode 100644 index 000000000000..d7c3d2a707ec --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_properties.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_properties.py new file mode 100644 index 000000000000..d1907b9a241c --- /dev/null +++ b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_properties.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AKSProperties(Model): + """AKS properties. + + :param cluster_fqdn: Cluster full qualified domain name + :type cluster_fqdn: str + :param system_services: System services + :type system_services: + list[~azure.mgmt.machinelearningservices.models.SystemService] + :param agent_count: Number of agents + :type agent_count: int + :param agent_vm_size: Agent virtual machine size + :type agent_vm_size: str + :param ssl_configuration: SSL configuration + :type ssl_configuration: + ~azure.mgmt.machinelearningservices.models.SslConfiguration + """ + + _validation = { + 'agent_count': {'minimum': 1}, + } + + _attribute_map = { + 'cluster_fqdn': {'key': 'clusterFqdn', 'type': 'str'}, + 'system_services': {'key': 'systemServices', 'type': '[SystemService]'}, + 'agent_count': {'key': 'agentCount', 'type': 'int'}, + 'agent_vm_size': {'key': 'agentVMSize', 'type': 'str'}, + 'ssl_configuration': {'key': 'sslConfiguration', 'type': 'SslConfiguration'}, + } + + def __init__(self, **kwargs): + super(AKSProperties, self).__init__(**kwargs) + self.cluster_fqdn = kwargs.get('cluster_fqdn', None) + self.system_services = kwargs.get('system_services', None) + self.agent_count = kwargs.get('agent_count', None) + self.agent_vm_size = kwargs.get('agent_vm_size', None) + self.ssl_configuration = kwargs.get('ssl_configuration', None) diff --git a/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_properties_py3.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_properties_py3.py new file mode 100644 index 000000000000..35cb7ba606b7 --- /dev/null +++ b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_properties_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AKSProperties(Model): + """AKS properties. + + :param cluster_fqdn: Cluster full qualified domain name + :type cluster_fqdn: str + :param system_services: System services + :type system_services: + list[~azure.mgmt.machinelearningservices.models.SystemService] + :param agent_count: Number of agents + :type agent_count: int + :param agent_vm_size: Agent virtual machine size + :type agent_vm_size: str + :param ssl_configuration: SSL configuration + :type ssl_configuration: + ~azure.mgmt.machinelearningservices.models.SslConfiguration + """ + + _validation = { + 'agent_count': {'minimum': 1}, + } + + _attribute_map = { + 'cluster_fqdn': {'key': 'clusterFqdn', 'type': 'str'}, + 'system_services': {'key': 'systemServices', 'type': '[SystemService]'}, + 'agent_count': {'key': 'agentCount', 'type': 'int'}, + 'agent_vm_size': {'key': 'agentVMSize', 'type': 'str'}, + 'ssl_configuration': {'key': 'sslConfiguration', 'type': 'SslConfiguration'}, + } + + def __init__(self, *, cluster_fqdn: str=None, system_services=None, agent_count: int=None, agent_vm_size: str=None, ssl_configuration=None, **kwargs) -> None: + super(AKSProperties, self).__init__(**kwargs) + self.cluster_fqdn = cluster_fqdn + self.system_services = system_services + self.agent_count = agent_count + self.agent_vm_size = agent_vm_size + self.ssl_configuration = ssl_configuration diff --git a/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_py3.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_py3.py new file mode 100644 index 000000000000..063a0677bdc1 --- /dev/null +++ b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/aks_py3.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .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 compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param properties: AKS properties + :type properties: ~azure.mgmt.machinelearningservices.models.AKSProperties + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/azure_machine_learning_workspaces_enums.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/azure_machine_learning_workspaces_enums.py new file mode 100644 index 000000000000..b36d430ec8dd --- /dev/null +++ b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/azure_machine_learning_workspaces_enums.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class ProvisioningState(str, Enum): + + unknown = "Unknown" + updating = "Updating" + creating = "Creating" + deleting = "Deleting" + succeeded = "Succeeded" + failed = "Failed" + canceled = "Canceled" + + +class ResourceIdentityType(str, Enum): + + system_assigned = "SystemAssigned" + + +class ComputeType(str, Enum): + + aks = "AKS" + batch_ai = "BatchAI" + data_factory = "DataFactory" + virtual_machine = "VirtualMachine" + hd_insight = "HDInsight" diff --git a/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai.py new file mode 100644 index 000000000000..87462f377eca --- /dev/null +++ b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .compute import Compute + + +class BatchAI(Compute): + """A Machine Learning compute based on Azure BatchAI. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param compute_location: Location for the underlying compute + :type compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values + are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible + values include: 'Unknown', 'Updating', 'Creating', 'Deleting', + 'Succeeded', 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :param description: The description of the Machine Learning compute. + :type description: str + :ivar created_on: The date and time when the compute was created. + :vartype created_on: datetime + :ivar modified_on: The date and time when the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param properties: BatchAI properties + :type properties: + ~azure.mgmt.machinelearningservices.models.BatchAIProperties + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'BatchAIProperties'}, + } + + def __init__(self, **kwargs): + super(BatchAI, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.compute_type = 'BatchAI' diff --git a/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai_properties.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai_properties.py new file mode 100644 index 000000000000..37abd1794e4b --- /dev/null +++ b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai_properties.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BatchAIProperties(Model): + """BatchAI properties. + + :param vm_size: Virtual Machine Size + :type vm_size: str + :param vm_priority: Virtual Machine priority + :type vm_priority: str + :param scale_settings: Scale settings for BatchAI + :type scale_settings: + ~azure.mgmt.machinelearningservices.models.ScaleSettings + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'vm_priority': {'key': 'vmPriority', 'type': 'str'}, + 'scale_settings': {'key': 'scaleSettings', 'type': 'ScaleSettings'}, + } + + def __init__(self, **kwargs): + super(BatchAIProperties, self).__init__(**kwargs) + self.vm_size = kwargs.get('vm_size', None) + self.vm_priority = kwargs.get('vm_priority', None) + self.scale_settings = kwargs.get('scale_settings', None) diff --git a/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai_properties_py3.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai_properties_py3.py new file mode 100644 index 000000000000..16ad2e10f6f4 --- /dev/null +++ b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai_properties_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BatchAIProperties(Model): + """BatchAI properties. + + :param vm_size: Virtual Machine Size + :type vm_size: str + :param vm_priority: Virtual Machine priority + :type vm_priority: str + :param scale_settings: Scale settings for BatchAI + :type scale_settings: + ~azure.mgmt.machinelearningservices.models.ScaleSettings + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'vm_priority': {'key': 'vmPriority', 'type': 'str'}, + 'scale_settings': {'key': 'scaleSettings', 'type': 'ScaleSettings'}, + } + + def __init__(self, *, vm_size: str=None, vm_priority: str=None, scale_settings=None, **kwargs) -> None: + super(BatchAIProperties, self).__init__(**kwargs) + self.vm_size = vm_size + self.vm_priority = vm_priority + self.scale_settings = scale_settings diff --git a/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai_py3.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai_py3.py new file mode 100644 index 000000000000..796a26605720 --- /dev/null +++ b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/batch_ai_py3.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .compute_py3 import Compute + + +class BatchAI(Compute): + """A Machine Learning compute based on Azure BatchAI. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param compute_location: Location for the underlying compute + :type compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values + are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible + values include: 'Unknown', 'Updating', 'Creating', 'Deleting', + 'Succeeded', 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :param description: The description of the Machine Learning compute. + :type description: str + :ivar created_on: The date and time when the compute was created. + :vartype created_on: datetime + :ivar modified_on: The date and time when the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param properties: BatchAI properties + :type properties: + ~azure.mgmt.machinelearningservices.models.BatchAIProperties + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'BatchAIProperties'}, + } + + def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, properties=None, **kwargs) -> None: + super(BatchAI, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, **kwargs) + self.properties = properties + self.compute_type = 'BatchAI' diff --git a/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute.py new file mode 100644 index 000000000000..036834066c20 --- /dev/null +++ b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute.py @@ -0,0 +1,81 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Compute(Model): + """Machine Learning compute object. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AKS, BatchAI, VirtualMachine, HDInsight, DataFactory + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param compute_location: Location for the underlying compute + :type compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values + are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible + values include: 'Unknown', 'Updating', 'Creating', 'Deleting', + 'Succeeded', 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :param description: The description of the Machine Learning compute. + :type description: str + :ivar created_on: The date and time when the compute was created. + :vartype created_on: datetime + :ivar modified_on: The date and time when the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :param compute_type: Required. Constant filled by server. + :type compute_type: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + } + + _subtype_map = { + 'compute_type': {'AKS': 'AKS', 'BatchAI': 'BatchAI', 'VirtualMachine': 'VirtualMachine', 'HDInsight': 'HDInsight', 'DataFactory': 'DataFactory'} + } + + def __init__(self, **kwargs): + super(Compute, self).__init__(**kwargs) + self.compute_location = kwargs.get('compute_location', None) + self.provisioning_state = None + self.description = kwargs.get('description', None) + self.created_on = None + self.modified_on = None + self.resource_id = kwargs.get('resource_id', None) + self.provisioning_errors = None + self.compute_type = None diff --git a/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_py3.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_py3.py new file mode 100644 index 000000000000..1e4bd15aa95a --- /dev/null +++ b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_py3.py @@ -0,0 +1,81 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Compute(Model): + """Machine Learning compute object. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AKS, BatchAI, VirtualMachine, HDInsight, DataFactory + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param compute_location: Location for the underlying compute + :type compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values + are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible + values include: 'Unknown', 'Updating', 'Creating', 'Deleting', + 'Succeeded', 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :param description: The description of the Machine Learning compute. + :type description: str + :ivar created_on: The date and time when the compute was created. + :vartype created_on: datetime + :ivar modified_on: The date and time when the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :param compute_type: Required. Constant filled by server. + :type compute_type: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + } + + _subtype_map = { + 'compute_type': {'AKS': 'AKS', 'BatchAI': 'BatchAI', 'VirtualMachine': 'VirtualMachine', 'HDInsight': 'HDInsight', 'DataFactory': 'DataFactory'} + } + + 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.compute_type = None diff --git a/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_resource.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_resource.py new file mode 100644 index 000000000000..4f9e25c30670 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_resource_paged.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_resource_paged.py new file mode 100644 index 000000000000..1666107af00a --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_resource_py3.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_resource_py3.py new file mode 100644 index 000000000000..a5f7e8679a20 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_secrets.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_secrets.py new file mode 100644 index 000000000000..be25425af2df --- /dev/null +++ b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_secrets.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ComputeSecrets(Model): + """Secrets related to a Machine Learning compute. Might differ for every type + of compute. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AksComputeSecrets, VirtualMachineSecrets + + All required parameters must be populated in order to send to Azure. + + :param compute_type: Required. Constant filled by server. + :type compute_type: str + """ + + _validation = { + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'compute_type': {'key': 'computeType', 'type': 'str'}, + } + + _subtype_map = { + 'compute_type': {'AKS': 'AksComputeSecrets', 'VirtualMachine': 'VirtualMachineSecrets'} + } + + def __init__(self, **kwargs): + super(ComputeSecrets, self).__init__(**kwargs) + self.compute_type = None diff --git a/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_secrets_py3.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_secrets_py3.py new file mode 100644 index 000000000000..b3428cbc8e0a --- /dev/null +++ b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/compute_secrets_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ComputeSecrets(Model): + """Secrets related to a Machine Learning compute. Might differ for every type + of compute. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AksComputeSecrets, VirtualMachineSecrets + + All required parameters must be populated in order to send to Azure. + + :param compute_type: Required. Constant filled by server. + :type compute_type: str + """ + + _validation = { + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'compute_type': {'key': 'computeType', 'type': 'str'}, + } + + _subtype_map = { + 'compute_type': {'AKS': 'AksComputeSecrets', 'VirtualMachine': 'VirtualMachineSecrets'} + } + + def __init__(self, **kwargs) -> None: + super(ComputeSecrets, self).__init__(**kwargs) + self.compute_type = None diff --git a/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_factory.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_factory.py new file mode 100644 index 000000000000..0733acb2664c --- /dev/null +++ b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_factory.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .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 compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :param compute_type: Required. Constant filled by server. + :type compute_type: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataFactory, self).__init__(**kwargs) + self.compute_type = 'DataFactory' diff --git a/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_factory_py3.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_factory_py3.py new file mode 100644 index 000000000000..7c3501b24c10 --- /dev/null +++ b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/data_factory_py3.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .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 compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :param compute_type: Required. Constant filled by server. + :type compute_type: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + } + + 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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/error_detail.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/error_detail.py new file mode 100644 index 000000000000..fa22ca734577 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/error_detail_py3.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/error_detail_py3.py new file mode 100644 index 000000000000..aa5cb5c69036 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/error_response.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/error_response.py new file mode 100644 index 000000000000..1eaa8f685877 --- /dev/null +++ b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/error_response.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ErrorResponse(Model): + """Error response information. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Error code. + :type code: str + :param message: Required. Error message. + :type message: str + :param details: An array of error detail objects. + :type details: + list[~azure.mgmt.machinelearningservices.models.ErrorDetail] + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) diff --git a/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/error_response_py3.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/error_response_py3.py new file mode 100644 index 000000000000..2fc3a331d42c --- /dev/null +++ b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/error_response_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ErrorResponse(Model): + """Error response information. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Error code. + :type code: str + :param message: Required. Error message. + :type message: str + :param details: An array of error detail objects. + :type details: + list[~azure.mgmt.machinelearningservices.models.ErrorDetail] + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + } + + def __init__(self, *, code: str, message: str, details=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.code = code + self.message = message + self.details = details diff --git a/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/hd_insight.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/hd_insight.py new file mode 100644 index 000000000000..36e32adee0fe --- /dev/null +++ b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/hd_insight.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .compute import Compute + + +class HDInsight(Compute): + """A HDInsight compute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param compute_location: Location for the underlying compute + :type compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values + are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible + values include: 'Unknown', 'Updating', 'Creating', 'Deleting', + 'Succeeded', 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :param description: The description of the Machine Learning compute. + :type description: str + :ivar created_on: The date and time when the compute was created. + :vartype created_on: datetime + :ivar modified_on: The date and time when the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param properties: + :type properties: + ~azure.mgmt.machinelearningservices.models.HDInsightProperties + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'HDInsightProperties'}, + } + + def __init__(self, **kwargs): + super(HDInsight, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.compute_type = 'HDInsight' diff --git a/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/hd_insight_properties.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/hd_insight_properties.py new file mode 100644 index 000000000000..d463d743423c --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/hd_insight_properties_py3.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/hd_insight_properties_py3.py new file mode 100644 index 000000000000..261b347410f0 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/hd_insight_py3.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/hd_insight_py3.py new file mode 100644 index 000000000000..e4341660c48e --- /dev/null +++ b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/hd_insight_py3.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .compute_py3 import Compute + + +class HDInsight(Compute): + """A HDInsight compute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param compute_location: Location for the underlying compute + :type compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values + are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible + values include: 'Unknown', 'Updating', 'Creating', 'Deleting', + 'Succeeded', 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :param description: The description of the Machine Learning compute. + :type description: str + :ivar created_on: The date and time when the compute was created. + :vartype created_on: datetime + :ivar modified_on: The date and time when the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param properties: + :type properties: + ~azure.mgmt.machinelearningservices.models.HDInsightProperties + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'HDInsightProperties'}, + } + + def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, properties=None, **kwargs) -> None: + super(HDInsight, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, **kwargs) + self.properties = properties + self.compute_type = 'HDInsight' diff --git a/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/identity.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/identity.py new file mode 100644 index 000000000000..12ba2d30a988 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/identity_py3.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/identity_py3.py new file mode 100644 index 000000000000..4316665f65dd --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/list_workspace_keys_result.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/list_workspace_keys_result.py new file mode 100644 index 000000000000..c6a8f043c146 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/list_workspace_keys_result_py3.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/list_workspace_keys_result_py3.py new file mode 100644 index 000000000000..ceca0ea0bbca --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/machine_learning_service_error.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/machine_learning_service_error.py new file mode 100644 index 000000000000..b6e52d4d43b0 --- /dev/null +++ b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/machine_learning_service_error.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class MachineLearningServiceError(Model): + """Wrapper for error response to follow ARM guidelines. + + :param error: The error response. + :type error: ~azure.mgmt.machinelearningservices.models.ErrorResponse + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponse'}, + } + + def __init__(self, **kwargs): + super(MachineLearningServiceError, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class MachineLearningServiceErrorException(HttpOperationError): + """Server responsed with exception of type: 'MachineLearningServiceError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(MachineLearningServiceErrorException, self).__init__(deserialize, response, 'MachineLearningServiceError', *args) diff --git a/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/machine_learning_service_error_py3.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/machine_learning_service_error_py3.py new file mode 100644 index 000000000000..c8465eced88a --- /dev/null +++ b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/machine_learning_service_error_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class MachineLearningServiceError(Model): + """Wrapper for error response to follow ARM guidelines. + + :param error: The error response. + :type error: ~azure.mgmt.machinelearningservices.models.ErrorResponse + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponse'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(MachineLearningServiceError, self).__init__(**kwargs) + self.error = error + + +class MachineLearningServiceErrorException(HttpOperationError): + """Server responsed with exception of type: 'MachineLearningServiceError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(MachineLearningServiceErrorException, self).__init__(deserialize, response, 'MachineLearningServiceError', *args) diff --git a/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/operation.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/operation.py new file mode 100644 index 000000000000..f6e5478affed --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/operation_display.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/operation_display.py new file mode 100644 index 000000000000..1b1b069e31fc --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/operation_display_py3.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/operation_display_py3.py new file mode 100644 index 000000000000..402b7d0b2a8e --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/operation_paged.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/operation_paged.py new file mode 100644 index 000000000000..5909c1c82a08 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/operation_py3.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/operation_py3.py new file mode 100644 index 000000000000..2cc1283e7a7f --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/password.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/password.py new file mode 100644 index 000000000000..f6fc73d9bd2a --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/password_py3.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/password_py3.py new file mode 100644 index 000000000000..51b7087d65a1 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/registry_list_credentials_result.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/registry_list_credentials_result.py new file mode 100644 index 000000000000..6e0ae5190590 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/registry_list_credentials_result_py3.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/registry_list_credentials_result_py3.py new file mode 100644 index 000000000000..b13127ec77c0 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/resource.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/resource.py new file mode 100644 index 000000000000..de3f8c6102ac --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/resource_py3.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/resource_py3.py new file mode 100644 index 000000000000..ae99189d6f1e --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/scale_settings.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/scale_settings.py new file mode 100644 index 000000000000..22b7378a8dca --- /dev/null +++ b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/scale_settings.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ScaleSettings(Model): + """scale settings for BatchAI Compute. + + :param max_node_count: Max number of nodes to use + :type max_node_count: int + :param min_node_count: Min number of nodes to use + :type min_node_count: int + :param auto_scale_enabled: Enable or disable auto scale + :type auto_scale_enabled: bool + """ + + _attribute_map = { + 'max_node_count': {'key': 'maxNodeCount', 'type': 'int'}, + 'min_node_count': {'key': 'minNodeCount', 'type': 'int'}, + 'auto_scale_enabled': {'key': 'autoScaleEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ScaleSettings, self).__init__(**kwargs) + self.max_node_count = kwargs.get('max_node_count', None) + self.min_node_count = kwargs.get('min_node_count', None) + self.auto_scale_enabled = kwargs.get('auto_scale_enabled', None) diff --git a/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/scale_settings_py3.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/scale_settings_py3.py new file mode 100644 index 000000000000..6a31a9d0d260 --- /dev/null +++ b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/scale_settings_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ScaleSettings(Model): + """scale settings for BatchAI Compute. + + :param max_node_count: Max number of nodes to use + :type max_node_count: int + :param min_node_count: Min number of nodes to use + :type min_node_count: int + :param auto_scale_enabled: Enable or disable auto scale + :type auto_scale_enabled: bool + """ + + _attribute_map = { + 'max_node_count': {'key': 'maxNodeCount', 'type': 'int'}, + 'min_node_count': {'key': 'minNodeCount', 'type': 'int'}, + 'auto_scale_enabled': {'key': 'autoScaleEnabled', 'type': 'bool'}, + } + + def __init__(self, *, max_node_count: int=None, min_node_count: int=None, auto_scale_enabled: bool=None, **kwargs) -> None: + super(ScaleSettings, self).__init__(**kwargs) + self.max_node_count = max_node_count + self.min_node_count = min_node_count + self.auto_scale_enabled = auto_scale_enabled diff --git a/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/service_principal_credentials.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/service_principal_credentials.py new file mode 100644 index 000000000000..0d9604a1f99a --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/service_principal_credentials_py3.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/service_principal_credentials_py3.py new file mode 100644 index 000000000000..63c03e32c0e2 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/ssl_configuration.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/ssl_configuration.py new file mode 100644 index 000000000000..ab4367782f4d --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/ssl_configuration_py3.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/ssl_configuration_py3.py new file mode 100644 index 000000000000..4189b4f75d66 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/system_service.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/system_service.py new file mode 100644 index 000000000000..1cb0ce3fd726 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/system_service_py3.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/system_service_py3.py new file mode 100644 index 000000000000..7896c46543f8 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine.py new file mode 100644 index 000000000000..b28ea14b0cb7 --- /dev/null +++ b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .compute import Compute + + +class 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 compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param properties: + :type properties: + ~azure.mgmt.machinelearningservices.models.VirtualMachineProperties + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'VirtualMachineProperties'}, + } + + def __init__(self, **kwargs): + super(VirtualMachine, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.compute_type = 'VirtualMachine' diff --git a/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_properties.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_properties.py new file mode 100644 index 000000000000..caaffa670ad1 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_properties_py3.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_properties_py3.py new file mode 100644 index 000000000000..bd21b20d593d --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_py3.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_py3.py new file mode 100644 index 000000000000..eb9108b0d7df --- /dev/null +++ b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_py3.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .compute_py3 import Compute + + +class 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 compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param properties: + :type properties: + ~azure.mgmt.machinelearningservices.models.VirtualMachineProperties + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_secrets.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_secrets.py new file mode 100644 index 000000000000..d396ddaa02d3 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_secrets_py3.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_secrets_py3.py new file mode 100644 index 000000000000..badd030d2830 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_ssh_credentials.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_ssh_credentials.py new file mode 100644 index 000000000000..af8de2146197 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_ssh_credentials_py3.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/virtual_machine_ssh_credentials_py3.py new file mode 100644 index 000000000000..4791516564df --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace.py new file mode 100644 index 000000000000..b6825cde06df --- /dev/null +++ b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace.py @@ -0,0 +1,113 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# 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 batchai_workspace: ARM id of the Batch AI workspace associated with + this workspace. This cannot be changed once the workspace has been created + :type batchai_workspace: str + :param key_vault: ARM id of the key vault associated with this workspace. + This cannot be changed once the workspace has been created + :type key_vault: str + :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'}, + 'batchai_workspace': {'key': 'properties.batchaiWorkspace', 'type': 'str'}, + 'key_vault': {'key': 'properties.keyVault', 'type': 'str'}, + 'application_insights': {'key': 'properties.applicationInsights', 'type': 'str'}, + 'container_registry': {'key': 'properties.containerRegistry', 'type': 'str'}, + '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.batchai_workspace = kwargs.get('batchai_workspace', None) + self.key_vault = kwargs.get('key_vault', None) + self.application_insights = kwargs.get('application_insights', None) + self.container_registry = kwargs.get('container_registry', None) + self.storage_account = kwargs.get('storage_account', None) + self.discovery_url = kwargs.get('discovery_url', None) + self.provisioning_state = None diff --git a/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace_paged.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace_paged.py new file mode 100644 index 000000000000..de17db93f2c3 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace_py3.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace_py3.py new file mode 100644 index 000000000000..66c8edfd9657 --- /dev/null +++ b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace_py3.py @@ -0,0 +1,113 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# 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 batchai_workspace: ARM id of the Batch AI workspace associated with + this workspace. This cannot be changed once the workspace has been created + :type batchai_workspace: str + :param key_vault: ARM id of the key vault associated with this workspace. + This cannot be changed once the workspace has been created + :type key_vault: str + :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'}, + 'batchai_workspace': {'key': 'properties.batchaiWorkspace', 'type': 'str'}, + 'key_vault': {'key': 'properties.keyVault', 'type': 'str'}, + 'application_insights': {'key': 'properties.applicationInsights', 'type': 'str'}, + 'container_registry': {'key': 'properties.containerRegistry', 'type': 'str'}, + '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, batchai_workspace: str=None, key_vault: str=None, application_insights: str=None, container_registry: str=None, storage_account: str=None, discovery_url: str=None, **kwargs) -> None: + super(Workspace, self).__init__(location=location, tags=tags, **kwargs) + self.workspace_id = None + self.description = description + self.friendly_name = friendly_name + self.creation_time = None + self.batchai_workspace = batchai_workspace + self.key_vault = key_vault + self.application_insights = application_insights + self.container_registry = container_registry + self.storage_account = storage_account + self.discovery_url = discovery_url + self.provisioning_state = None diff --git a/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace_update_parameters.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace_update_parameters.py new file mode 100644 index 000000000000..0fac3f7648f4 --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace_update_parameters_py3.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/workspace_update_parameters_py3.py new file mode 100644 index 000000000000..ad44f269cf6a --- /dev/null +++ b/sdk/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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/__init__.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/__init__.py new file mode 100644 index 000000000000..97f27ec5c277 --- /dev/null +++ b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/__init__.py @@ -0,0 +1,20 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .operations import Operations +from .workspaces_operations import WorkspacesOperations +from .machine_learning_compute_operations import MachineLearningComputeOperations + +__all__ = [ + 'Operations', + 'WorkspacesOperations', + 'MachineLearningComputeOperations', +] diff --git a/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/machine_learning_compute_operations.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/machine_learning_compute_operations.py new file mode 100644 index 000000000000..af0af15ccc9e --- /dev/null +++ b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/machine_learning_compute_operations.py @@ -0,0 +1,551 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class MachineLearningComputeOperations(object): + """MachineLearningComputeOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of Azure Machine Learning resource provider API. Constant value: "2018-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-03-01-preview" + + self.config = config + + def list_by_workspace( + self, resource_group_name, workspace_name, skiptoken=None, custom_headers=None, raw=False, **operation_config): + """Gets computes in specified workspace. + + :param resource_group_name: Name of the resource group in which + workspace is located. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param skiptoken: Continuation token for pagination. + :type skiptoken: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ComputeResource + :rtype: + ~azure.mgmt.machinelearningservices.models.ComputeResourcePaged[~azure.mgmt.machinelearningservices.models.ComputeResource] + :raises: + :class:`MachineLearningServiceErrorException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_workspace.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if skiptoken is not None: + query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['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 _delete_initial( + self, resource_group_name, workspace_name, compute_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'computeName': self._serialize.url("compute_name", compute_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes specified Machine Learning compute. + + :param resource_group_name: Name of the resource group in which + workspace is located. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param compute_name: Name of the Azure Machine Learning compute. + :type compute_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`MachineLearningServiceErrorException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'Azure-AsyncOperation': 'str', + 'Location': 'str', + }) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} + + + def _system_update_initial( + self, resource_group_name, workspace_name, compute_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.system_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'computeName': self._serialize.url("compute_name", compute_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.MachineLearningServiceErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + header_dict = { + 'Azure-AsyncOperation': 'str', + 'Location': 'str', + } + client_raw_response.add_headers(header_dict) + return client_raw_response + + def system_update( + self, resource_group_name, workspace_name, compute_name, custom_headers=None, raw=False, polling=True, **operation_config): + """System Update On Machine Learning compute. + + :param resource_group_name: Name of the resource group in which + workspace is located. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param compute_name: Name of the Azure Machine Learning compute. + :type compute_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`MachineLearningServiceErrorException` + """ + raw_result = self._system_update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'Azure-AsyncOperation': 'str', + 'Location': 'str', + }) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + system_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'} + + def list_keys( + self, resource_group_name, workspace_name, compute_name, custom_headers=None, raw=False, **operation_config): + """Gets secrets related to Machine Learning compute (storage keys, service + credentials, etc). + + :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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/operations.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/operations.py new file mode 100644 index 000000000000..d3de28914e7b --- /dev/null +++ b/sdk/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-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-03-01-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available Azure Machine Learning Workspaces REST API + operations. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.machinelearningservices.models.OperationPaged[~azure.mgmt.machinelearningservices.models.Operation] + :raises: + :class:`MachineLearningServiceErrorException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/workspaces_operations.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/workspaces_operations.py new file mode 100644 index 000000000000..eae707efcb11 --- /dev/null +++ b/sdk/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-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-03-01-preview" + + self.config = config + + def get( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """Gets the properties of the specified machine learning workspace. + + :param resource_group_name: Name of the resource group in which + workspace is located. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Workspace or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.machinelearningservices.models.Workspace or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`MachineLearningServiceErrorException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['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/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/version.py b/sdk/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/version.py new file mode 100644 index 000000000000..e0ec669828cb --- /dev/null +++ b/sdk/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" +