-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AutoPR] databricks/resource-manager (#4878)
* [AutoPR databricks/resource-manager] Databricks Python configuration (#4876) * Generated from b80ecaeea6e0516fd40656d6289e24c65883cf4e Databricks Python configuration * Packaging update of azure-mgmt-databricks * Update sdk_packaging.toml * Update HISTORY.rst * Packaging update of azure-mgmt-databricks
- Loading branch information
1 parent
4559b41
commit d4ad751
Showing
40 changed files
with
2,041 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.. :changelog: | ||
Release History | ||
=============== | ||
|
||
0.1.0 (2019-04-17) | ||
++++++++++++++++++ | ||
|
||
* Initial Release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
recursive-include tests *.py *.yaml | ||
include *.rst | ||
include azure/__init__.py | ||
include azure/mgmt/__init__.py | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Microsoft Azure SDK for Python | ||
============================== | ||
|
||
This is the Microsoft Azure Databricks Management Client Library. | ||
|
||
Azure Resource Manager (ARM) is the next generation of management APIs that | ||
replace the old Azure Service Management (ASM). | ||
|
||
This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. | ||
|
||
For the older Azure Service Management (ASM) libraries, see | ||
`azure-servicemanagement-legacy <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 `Databricks Management | ||
<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. | ||
|
||
|
||
.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-databricks%2FREADME.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__path__ = __import__('pkgutil').extend_path(__path__, __name__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__path__ = __import__('pkgutil').extend_path(__path__, __name__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 .databricks_client import DatabricksClient | ||
from .version import VERSION | ||
|
||
__all__ = ['DatabricksClient'] | ||
|
||
__version__ = VERSION | ||
|
86 changes: 86 additions & 0 deletions
86
azure-mgmt-databricks/azure/mgmt/databricks/databricks_client.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# 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.workspaces_operations import WorkspacesOperations | ||
from .operations.operations import Operations | ||
from . import models | ||
|
||
|
||
class DatabricksClientConfiguration(AzureConfiguration): | ||
"""Configuration for DatabricksClient | ||
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: The ID of the target subscription. | ||
: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(DatabricksClientConfiguration, self).__init__(base_url) | ||
|
||
self.add_user_agent('azure-mgmt-databricks/{}'.format(VERSION)) | ||
self.add_user_agent('Azure-SDK-For-Python') | ||
|
||
self.credentials = credentials | ||
self.subscription_id = subscription_id | ||
|
||
|
||
class DatabricksClient(SDKClient): | ||
"""ARM Databricks | ||
:ivar config: Configuration for client. | ||
:vartype config: DatabricksClientConfiguration | ||
:ivar workspaces: Workspaces operations | ||
:vartype workspaces: azure.mgmt.databricks.operations.WorkspacesOperations | ||
:ivar operations: Operations operations | ||
:vartype operations: azure.mgmt.databricks.operations.Operations | ||
: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: The ID of the target subscription. | ||
:type subscription_id: str | ||
:param str base_url: Service URL | ||
""" | ||
|
||
def __init__( | ||
self, credentials, subscription_id, base_url=None): | ||
|
||
self.config = DatabricksClientConfiguration(credentials, subscription_id, base_url) | ||
super(DatabricksClient, 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-04-01' | ||
self._serialize = Serializer(client_models) | ||
self._deserialize = Deserializer(client_models) | ||
|
||
self.workspaces = WorkspacesOperations( | ||
self._client, self.config, self._serialize, self._deserialize) | ||
self.operations = Operations( | ||
self._client, self.config, self._serialize, self._deserialize) |
57 changes: 57 additions & 0 deletions
57
azure-mgmt-databricks/azure/mgmt/databricks/models/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# 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 .workspace_provider_authorization_py3 import WorkspaceProviderAuthorization | ||
from .sku_py3 import Sku | ||
from .workspace_py3 import Workspace | ||
from .tracked_resource_py3 import TrackedResource | ||
from .resource_py3 import Resource | ||
from .workspace_update_py3 import WorkspaceUpdate | ||
from .error_detail_py3 import ErrorDetail | ||
from .error_info_py3 import ErrorInfo | ||
from .error_response_py3 import ErrorResponse, ErrorResponseException | ||
from .operation_display_py3 import OperationDisplay | ||
from .operation_py3 import Operation | ||
except (SyntaxError, ImportError): | ||
from .workspace_provider_authorization import WorkspaceProviderAuthorization | ||
from .sku import Sku | ||
from .workspace import Workspace | ||
from .tracked_resource import TrackedResource | ||
from .resource import Resource | ||
from .workspace_update import WorkspaceUpdate | ||
from .error_detail import ErrorDetail | ||
from .error_info import ErrorInfo | ||
from .error_response import ErrorResponse, ErrorResponseException | ||
from .operation_display import OperationDisplay | ||
from .operation import Operation | ||
from .workspace_paged import WorkspacePaged | ||
from .operation_paged import OperationPaged | ||
from .databricks_client_enums import ( | ||
ProvisioningState, | ||
) | ||
|
||
__all__ = [ | ||
'WorkspaceProviderAuthorization', | ||
'Sku', | ||
'Workspace', | ||
'TrackedResource', | ||
'Resource', | ||
'WorkspaceUpdate', | ||
'ErrorDetail', | ||
'ErrorInfo', | ||
'ErrorResponse', 'ErrorResponseException', | ||
'OperationDisplay', | ||
'Operation', | ||
'WorkspacePaged', | ||
'OperationPaged', | ||
'ProvisioningState', | ||
] |
27 changes: 27 additions & 0 deletions
27
azure-mgmt-databricks/azure/mgmt/databricks/models/databricks_client_enums.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 enum import Enum | ||
|
||
|
||
class ProvisioningState(str, Enum): | ||
|
||
accepted = "Accepted" | ||
running = "Running" | ||
ready = "Ready" | ||
creating = "Creating" | ||
created = "Created" | ||
deleting = "Deleting" | ||
deleted = "Deleted" | ||
canceled = "Canceled" | ||
failed = "Failed" | ||
succeeded = "Succeeded" | ||
updating = "Updating" |
44 changes: 44 additions & 0 deletions
44
azure-mgmt-databricks/azure/mgmt/databricks/models/error_detail.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ErrorDetail(Model): | ||
"""Error details. | ||
All required parameters must be populated in order to send to Azure. | ||
:param code: Required. The error's code. | ||
:type code: str | ||
:param message: Required. A human readable error message. | ||
:type message: str | ||
:param target: Indicates which property in the request is responsible for | ||
the error. | ||
:type target: str | ||
""" | ||
|
||
_validation = { | ||
'code': {'required': True}, | ||
'message': {'required': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'code': {'key': 'code', 'type': 'str'}, | ||
'message': {'key': 'message', 'type': 'str'}, | ||
'target': {'key': 'target', 'type': 'str'}, | ||
} | ||
|
||
def __init__(self, **kwargs): | ||
super(ErrorDetail, self).__init__(**kwargs) | ||
self.code = kwargs.get('code', None) | ||
self.message = kwargs.get('message', None) | ||
self.target = kwargs.get('target', None) |
44 changes: 44 additions & 0 deletions
44
azure-mgmt-databricks/azure/mgmt/databricks/models/error_detail_py3.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ErrorDetail(Model): | ||
"""Error details. | ||
All required parameters must be populated in order to send to Azure. | ||
:param code: Required. The error's code. | ||
:type code: str | ||
:param message: Required. A human readable error message. | ||
:type message: str | ||
:param target: Indicates which property in the request is responsible for | ||
the error. | ||
:type target: str | ||
""" | ||
|
||
_validation = { | ||
'code': {'required': True}, | ||
'message': {'required': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'code': {'key': 'code', 'type': 'str'}, | ||
'message': {'key': 'message', 'type': 'str'}, | ||
'target': {'key': 'target', 'type': 'str'}, | ||
} | ||
|
||
def __init__(self, *, code: str, message: str, target: str=None, **kwargs) -> None: | ||
super(ErrorDetail, self).__init__(**kwargs) | ||
self.code = code | ||
self.message = message | ||
self.target = target |
47 changes: 47 additions & 0 deletions
47
azure-mgmt-databricks/azure/mgmt/databricks/models/error_info.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from msrest.serialization import Model | ||
|
||
|
||
class ErrorInfo(Model): | ||
"""The code and message for an error. | ||
All required parameters must be populated in order to send to Azure. | ||
:param code: Required. A machine readable error code. | ||
:type code: str | ||
:param message: Required. A human readable error message. | ||
:type message: str | ||
:param details: error details. | ||
:type details: list[~azure.mgmt.databricks.models.ErrorDetail] | ||
:param innererror: Inner error details if they exist. | ||
:type innererror: str | ||
""" | ||
|
||
_validation = { | ||
'code': {'required': True}, | ||
'message': {'required': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'code': {'key': 'code', 'type': 'str'}, | ||
'message': {'key': 'message', 'type': 'str'}, | ||
'details': {'key': 'details', 'type': '[ErrorDetail]'}, | ||
'innererror': {'key': 'innererror', 'type': 'str'}, | ||
} | ||
|
||
def __init__(self, **kwargs): | ||
super(ErrorInfo, self).__init__(**kwargs) | ||
self.code = kwargs.get('code', None) | ||
self.message = kwargs.get('message', None) | ||
self.details = kwargs.get('details', None) | ||
self.innererror = kwargs.get('innererror', None) |
Oops, something went wrong.