Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR] machinelearningservices/resource-manager #2663

Closed
9 changes: 9 additions & 0 deletions azure-mgmt-machinelearningservices/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. :changelog:

Release History
===============

0.1.0 (2019-02-21)
++++++++++++++++++

* Initial Release
4 changes: 4 additions & 0 deletions azure-mgmt-machinelearningservices/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py

30 changes: 30 additions & 0 deletions azure-mgmt-machinelearningservices/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Microsoft Azure SDK for Python
==============================

This is the Microsoft Azure Machine Learning Service Client Library.

Azure Resource Manager (ARM) is the next generation of management APIs that
replace the old Azure Service Management (ASM).

This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.

For the older Azure Service Management (ASM) libraries, see
`azure-servicemanagement-legacy <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library.

For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


Usage
=====

For code examples, see `Machine Learning Service
<https://docs.microsoft.com/python/api/overview/azure/>`__
on docs.microsoft.com.


Provide Feedback
================

If you encounter any bugs or have suggestions, please file an issue in the
`Issues <https://github.com/Azure/azure-sdk-for-python/issues>`__
section of the project.
1 change: 1 addition & 0 deletions azure-mgmt-machinelearningservices/azure/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
1 change: 1 addition & 0 deletions azure-mgmt-machinelearningservices/azure/mgmt/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Original file line number Diff line number Diff line change
@@ -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

Original file line number Diff line number Diff line change
@@ -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<msrestazure.azure_active_directory>`
: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<msrestazure.azure_active_directory>`
: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)
Original file line number Diff line number Diff line change
@@ -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',
]
Original file line number Diff line number Diff line change
@@ -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'
Loading