Skip to content

Commit d4ad751

Browse files
AutorestCIlmazuel
authored andcommitted
[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
1 parent 4559b41 commit d4ad751

40 files changed

+2041
-0
lines changed

azure-mgmt-databricks/HISTORY.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.. :changelog:
2+
3+
Release History
4+
===============
5+
6+
0.1.0 (2019-04-17)
7+
++++++++++++++++++
8+
9+
* Initial Release

azure-mgmt-databricks/MANIFEST.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
recursive-include tests *.py *.yaml
2+
include *.rst
3+
include azure/__init__.py
4+
include azure/mgmt/__init__.py
5+

azure-mgmt-databricks/README.rst

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Microsoft Azure SDK for Python
2+
==============================
3+
4+
This is the Microsoft Azure Databricks Management Client Library.
5+
6+
Azure Resource Manager (ARM) is the next generation of management APIs that
7+
replace the old Azure Service Management (ASM).
8+
9+
This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.
10+
11+
For the older Azure Service Management (ASM) libraries, see
12+
`azure-servicemanagement-legacy <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library.
13+
14+
For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.
15+
16+
17+
Usage
18+
=====
19+
20+
For code examples, see `Databricks Management
21+
<https://docs.microsoft.com/python/api/overview/azure/>`__
22+
on docs.microsoft.com.
23+
24+
25+
Provide Feedback
26+
================
27+
28+
If you encounter any bugs or have suggestions, please file an issue in the
29+
`Issues <https://github.com/Azure/azure-sdk-for-python/issues>`__
30+
section of the project.
31+
32+
33+
.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-databricks%2FREADME.png
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from .databricks_client import DatabricksClient
13+
from .version import VERSION
14+
15+
__all__ = ['DatabricksClient']
16+
17+
__version__ = VERSION
18+
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.service_client import SDKClient
13+
from msrest import Serializer, Deserializer
14+
from msrestazure import AzureConfiguration
15+
from .version import VERSION
16+
from .operations.workspaces_operations import WorkspacesOperations
17+
from .operations.operations import Operations
18+
from . import models
19+
20+
21+
class DatabricksClientConfiguration(AzureConfiguration):
22+
"""Configuration for DatabricksClient
23+
Note that all parameters used to create this instance are saved as instance
24+
attributes.
25+
26+
:param credentials: Credentials needed for the client to connect to Azure.
27+
:type credentials: :mod:`A msrestazure Credentials
28+
object<msrestazure.azure_active_directory>`
29+
:param subscription_id: The ID of the target subscription.
30+
:type subscription_id: str
31+
:param str base_url: Service URL
32+
"""
33+
34+
def __init__(
35+
self, credentials, subscription_id, base_url=None):
36+
37+
if credentials is None:
38+
raise ValueError("Parameter 'credentials' must not be None.")
39+
if subscription_id is None:
40+
raise ValueError("Parameter 'subscription_id' must not be None.")
41+
if not base_url:
42+
base_url = 'https://management.azure.com'
43+
44+
super(DatabricksClientConfiguration, self).__init__(base_url)
45+
46+
self.add_user_agent('azure-mgmt-databricks/{}'.format(VERSION))
47+
self.add_user_agent('Azure-SDK-For-Python')
48+
49+
self.credentials = credentials
50+
self.subscription_id = subscription_id
51+
52+
53+
class DatabricksClient(SDKClient):
54+
"""ARM Databricks
55+
56+
:ivar config: Configuration for client.
57+
:vartype config: DatabricksClientConfiguration
58+
59+
:ivar workspaces: Workspaces operations
60+
:vartype workspaces: azure.mgmt.databricks.operations.WorkspacesOperations
61+
:ivar operations: Operations operations
62+
:vartype operations: azure.mgmt.databricks.operations.Operations
63+
64+
:param credentials: Credentials needed for the client to connect to Azure.
65+
:type credentials: :mod:`A msrestazure Credentials
66+
object<msrestazure.azure_active_directory>`
67+
:param subscription_id: The ID of the target subscription.
68+
:type subscription_id: str
69+
:param str base_url: Service URL
70+
"""
71+
72+
def __init__(
73+
self, credentials, subscription_id, base_url=None):
74+
75+
self.config = DatabricksClientConfiguration(credentials, subscription_id, base_url)
76+
super(DatabricksClient, self).__init__(self.config.credentials, self.config)
77+
78+
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
79+
self.api_version = '2018-04-01'
80+
self._serialize = Serializer(client_models)
81+
self._deserialize = Deserializer(client_models)
82+
83+
self.workspaces = WorkspacesOperations(
84+
self._client, self.config, self._serialize, self._deserialize)
85+
self.operations = Operations(
86+
self._client, self.config, self._serialize, self._deserialize)
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
try:
13+
from .workspace_provider_authorization_py3 import WorkspaceProviderAuthorization
14+
from .sku_py3 import Sku
15+
from .workspace_py3 import Workspace
16+
from .tracked_resource_py3 import TrackedResource
17+
from .resource_py3 import Resource
18+
from .workspace_update_py3 import WorkspaceUpdate
19+
from .error_detail_py3 import ErrorDetail
20+
from .error_info_py3 import ErrorInfo
21+
from .error_response_py3 import ErrorResponse, ErrorResponseException
22+
from .operation_display_py3 import OperationDisplay
23+
from .operation_py3 import Operation
24+
except (SyntaxError, ImportError):
25+
from .workspace_provider_authorization import WorkspaceProviderAuthorization
26+
from .sku import Sku
27+
from .workspace import Workspace
28+
from .tracked_resource import TrackedResource
29+
from .resource import Resource
30+
from .workspace_update import WorkspaceUpdate
31+
from .error_detail import ErrorDetail
32+
from .error_info import ErrorInfo
33+
from .error_response import ErrorResponse, ErrorResponseException
34+
from .operation_display import OperationDisplay
35+
from .operation import Operation
36+
from .workspace_paged import WorkspacePaged
37+
from .operation_paged import OperationPaged
38+
from .databricks_client_enums import (
39+
ProvisioningState,
40+
)
41+
42+
__all__ = [
43+
'WorkspaceProviderAuthorization',
44+
'Sku',
45+
'Workspace',
46+
'TrackedResource',
47+
'Resource',
48+
'WorkspaceUpdate',
49+
'ErrorDetail',
50+
'ErrorInfo',
51+
'ErrorResponse', 'ErrorResponseException',
52+
'OperationDisplay',
53+
'Operation',
54+
'WorkspacePaged',
55+
'OperationPaged',
56+
'ProvisioningState',
57+
]
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from enum import Enum
13+
14+
15+
class ProvisioningState(str, Enum):
16+
17+
accepted = "Accepted"
18+
running = "Running"
19+
ready = "Ready"
20+
creating = "Creating"
21+
created = "Created"
22+
deleting = "Deleting"
23+
deleted = "Deleted"
24+
canceled = "Canceled"
25+
failed = "Failed"
26+
succeeded = "Succeeded"
27+
updating = "Updating"
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.serialization import Model
13+
14+
15+
class ErrorDetail(Model):
16+
"""Error details.
17+
18+
All required parameters must be populated in order to send to Azure.
19+
20+
:param code: Required. The error's code.
21+
:type code: str
22+
:param message: Required. A human readable error message.
23+
:type message: str
24+
:param target: Indicates which property in the request is responsible for
25+
the error.
26+
:type target: str
27+
"""
28+
29+
_validation = {
30+
'code': {'required': True},
31+
'message': {'required': True},
32+
}
33+
34+
_attribute_map = {
35+
'code': {'key': 'code', 'type': 'str'},
36+
'message': {'key': 'message', 'type': 'str'},
37+
'target': {'key': 'target', 'type': 'str'},
38+
}
39+
40+
def __init__(self, **kwargs):
41+
super(ErrorDetail, self).__init__(**kwargs)
42+
self.code = kwargs.get('code', None)
43+
self.message = kwargs.get('message', None)
44+
self.target = kwargs.get('target', None)
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.serialization import Model
13+
14+
15+
class ErrorDetail(Model):
16+
"""Error details.
17+
18+
All required parameters must be populated in order to send to Azure.
19+
20+
:param code: Required. The error's code.
21+
:type code: str
22+
:param message: Required. A human readable error message.
23+
:type message: str
24+
:param target: Indicates which property in the request is responsible for
25+
the error.
26+
:type target: str
27+
"""
28+
29+
_validation = {
30+
'code': {'required': True},
31+
'message': {'required': True},
32+
}
33+
34+
_attribute_map = {
35+
'code': {'key': 'code', 'type': 'str'},
36+
'message': {'key': 'message', 'type': 'str'},
37+
'target': {'key': 'target', 'type': 'str'},
38+
}
39+
40+
def __init__(self, *, code: str, message: str, target: str=None, **kwargs) -> None:
41+
super(ErrorDetail, self).__init__(**kwargs)
42+
self.code = code
43+
self.message = message
44+
self.target = target
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.serialization import Model
13+
14+
15+
class ErrorInfo(Model):
16+
"""The code and message for an error.
17+
18+
All required parameters must be populated in order to send to Azure.
19+
20+
:param code: Required. A machine readable error code.
21+
:type code: str
22+
:param message: Required. A human readable error message.
23+
:type message: str
24+
:param details: error details.
25+
:type details: list[~azure.mgmt.databricks.models.ErrorDetail]
26+
:param innererror: Inner error details if they exist.
27+
:type innererror: str
28+
"""
29+
30+
_validation = {
31+
'code': {'required': True},
32+
'message': {'required': True},
33+
}
34+
35+
_attribute_map = {
36+
'code': {'key': 'code', 'type': 'str'},
37+
'message': {'key': 'message', 'type': 'str'},
38+
'details': {'key': 'details', 'type': '[ErrorDetail]'},
39+
'innererror': {'key': 'innererror', 'type': 'str'},
40+
}
41+
42+
def __init__(self, **kwargs):
43+
super(ErrorInfo, self).__init__(**kwargs)
44+
self.code = kwargs.get('code', None)
45+
self.message = kwargs.get('message', None)
46+
self.details = kwargs.get('details', None)
47+
self.innererror = kwargs.get('innererror', None)

0 commit comments

Comments
 (0)