Skip to content

Commit a26118a

Browse files
author
SDKAuto
committed
CodeGen from PR 33608 in Azure/azure-rest-api-specs
Merge 832fb5067217126a61b3cd859bc5800fc2c4db2e into a8f625201b3611ee65a832522dba59ae1c287f10
1 parent 2249e3c commit a26118a

File tree

83 files changed

+3712
-2150
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+3712
-2150
lines changed

sdk/databricks/azure-mgmt-databricks/CHANGELOG.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,40 @@
11
# Release History
22

3+
## 3.0.0b1 (2025-03-31)
4+
5+
### Features Added
6+
7+
- Model `AccessConnectorProperties` added property `refered_by`
8+
- Model `Workspace` added property `enhanced_security_compliance`
9+
- Model `Workspace` added property `default_catalog`
10+
- Model `Workspace` added property `is_uc_enabled`
11+
- Model `Workspace` added property `access_connector`
12+
- Model `Workspace` added property `default_storage_firewall`
13+
- Added model `AutomaticClusterUpdateDefinition`
14+
- Added enum `AutomaticClusterUpdateValue`
15+
- Added model `ComplianceSecurityProfileDefinition`
16+
- Added enum `ComplianceSecurityProfileValue`
17+
- Added enum `ComplianceStandard`
18+
- Added model `DefaultCatalogProperties`
19+
- Added enum `DefaultStorageFirewall`
20+
- Added model `EnhancedSecurityComplianceDefinition`
21+
- Added model `EnhancedSecurityMonitoringDefinition`
22+
- Added enum `EnhancedSecurityMonitoringValue`
23+
- Added enum `IdentityType`
24+
- Added enum `InitialType`
25+
- Added model `WorkspaceNoPublicIPBooleanParameter`
26+
- Added model `WorkspacePropertiesAccessConnector`
27+
- Method `AccessConnectorsOperations.begin_create_or_update` has a new overload `def begin_create_or_update(self: None, resource_group_name: str, connector_name: str, parameters: IO[bytes], content_type: str)`
28+
- Method `AccessConnectorsOperations.begin_update` has a new overload `def begin_update(self: None, resource_group_name: str, connector_name: str, parameters: IO[bytes], content_type: str)`
29+
- Method `PrivateEndpointConnectionsOperations.begin_create` has a new overload `def begin_create(self: None, resource_group_name: str, workspace_name: str, private_endpoint_connection_name: str, private_endpoint_connection: IO[bytes], content_type: str)`
30+
- Method `VNetPeeringOperations.begin_create_or_update` has a new overload `def begin_create_or_update(self: None, resource_group_name: str, workspace_name: str, peering_name: str, virtual_network_peering_parameters: IO[bytes], content_type: str)`
31+
- Method `WorkspacesOperations.begin_create_or_update` has a new overload `def begin_create_or_update(self: None, resource_group_name: str, workspace_name: str, parameters: IO[bytes], content_type: str)`
32+
- Method `WorkspacesOperations.begin_update` has a new overload `def begin_update(self: None, resource_group_name: str, workspace_name: str, parameters: IO[bytes], content_type: str)`
33+
34+
### Breaking Changes
35+
36+
- Method `WorkspacesOperations.begin_delete` inserted a `positional_or_keyword` parameter `force_deletion`
37+
338
## 2.0.0 (2023-06-29)
439

540
### Features Added

sdk/databricks/azure-mgmt-databricks/README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Microsoft Azure SDK for Python
22

33
This is the Microsoft Azure Data Bricks Management Client Library.
4-
This package has been tested with Python 3.7+.
4+
This package has been tested with Python 3.8+.
55
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
66

77
## _Disclaimer_
@@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For
1212

1313
### Prerequisites
1414

15-
- Python 3.7+ is required to use this package.
15+
- Python 3.8+ is required to use this package.
1616
- [Azure subscription](https://azure.microsoft.com/free/)
1717

1818
### Install the package
@@ -24,7 +24,7 @@ pip install azure-identity
2424

2525
### Authentication
2626

27-
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables.
27+
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables.
2828

2929
- `AZURE_CLIENT_ID` for Azure client ID.
3030
- `AZURE_TENANT_ID` for Azure tenant ID.
@@ -59,6 +59,3 @@ Code samples for this package can be found at:
5959
If you encounter any bugs or have suggestions, please file an issue in the
6060
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
6161
section of the project.
62-
63-
64-
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "f36175f4c54eeec5b6d409406e131dadb540546a",
2+
"commit": "59c4421b00666b8f0d877d69829a5fecceab779b",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4-
"autorest": "3.9.2",
4+
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.6.0",
7-
"@autorest/modelerfour@4.24.3"
6+
"@autorest/python@6.27.4",
7+
"@autorest/modelerfour@4.27.0"
88
],
9-
"autorest_command": "autorest specification/databricks/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.6.0 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/databricks/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.27.4 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/databricks/resource-manager/readme.md"
1111
}

sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/__init__.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,28 @@
55
# Code generated by Microsoft (R) AutoRest Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
8+
# pylint: disable=wrong-import-position
89

9-
from ._azure_databricks_management_client import AzureDatabricksManagementClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._azure_databricks_management_client import AzureDatabricksManagementClient # type: ignore
1016
from ._version import VERSION
1117

1218
__version__ = VERSION
1319

1420
try:
1521
from ._patch import __all__ as _patch_all
16-
from ._patch import * # pylint: disable=unused-wildcard-import
22+
from ._patch import *
1723
except ImportError:
1824
_patch_all = []
1925
from ._patch import patch_sdk as _patch_sdk
2026

2127
__all__ = [
2228
"AzureDatabricksManagementClient",
2329
]
24-
__all__.extend([p for p in _patch_all if p not in __all__])
30+
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
2531

2632
_patch_sdk()

sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/_azure_databricks_management_client.py

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,12 @@
88

99
from copy import deepcopy
1010
from typing import Any, TYPE_CHECKING
11+
from typing_extensions import Self
1112

13+
from azure.core.pipeline import policies
1214
from azure.core.rest import HttpRequest, HttpResponse
1315
from azure.mgmt.core import ARMPipelineClient
16+
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
1417

1518
from . import models as _models
1619
from ._configuration import AzureDatabricksManagementClientConfiguration
@@ -26,11 +29,10 @@
2629
)
2730

2831
if TYPE_CHECKING:
29-
# pylint: disable=unused-import,ungrouped-imports
3032
from azure.core.credentials import TokenCredential
3133

3234

33-
class AzureDatabricksManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
35+
class AzureDatabricksManagementClient: # pylint: disable=too-many-instance-attributes
3436
"""The Microsoft Azure management APIs allow end users to operate on Azure Databricks Workspace /
3537
Access Connector resources.
3638
@@ -54,10 +56,13 @@ class AzureDatabricksManagementClient: # pylint: disable=client-accepts-api-ver
5456
:vartype access_connectors: azure.mgmt.databricks.operations.AccessConnectorsOperations
5557
:param credential: Credential needed for the client to connect to Azure. Required.
5658
:type credential: ~azure.core.credentials.TokenCredential
57-
:param subscription_id: The ID of the target subscription. Required.
59+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
5860
:type subscription_id: str
5961
:param base_url: Service URL. Default value is "https://management.azure.com".
6062
:type base_url: str
63+
:keyword api_version: Api Version. Default value is "2025-03-01-preview". Note that overriding
64+
this default value may result in unsupported behavior.
65+
:paramtype api_version: str
6166
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
6267
Retry-After header is present.
6368
"""
@@ -72,7 +77,25 @@ def __init__(
7277
self._config = AzureDatabricksManagementClientConfiguration(
7378
credential=credential, subscription_id=subscription_id, **kwargs
7479
)
75-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
80+
_policies = kwargs.pop("policies", None)
81+
if _policies is None:
82+
_policies = [
83+
policies.RequestIdPolicy(**kwargs),
84+
self._config.headers_policy,
85+
self._config.user_agent_policy,
86+
self._config.proxy_policy,
87+
policies.ContentDecodePolicy(**kwargs),
88+
ARMAutoResourceProviderRegistrationPolicy(),
89+
self._config.redirect_policy,
90+
self._config.retry_policy,
91+
self._config.authentication_policy,
92+
self._config.custom_hook_policy,
93+
self._config.logging_policy,
94+
policies.DistributedTracingPolicy(**kwargs),
95+
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
96+
self._config.http_logging_policy,
97+
]
98+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
7699

77100
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
78101
self._serialize = Serializer(client_models)
@@ -94,7 +117,7 @@ def __init__(
94117
self._client, self._config, self._serialize, self._deserialize
95118
)
96119

97-
def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
120+
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
98121
"""Runs the network request through the client's chained policies.
99122
100123
>>> from azure.core.rest import HttpRequest
@@ -114,12 +137,12 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
114137

115138
request_copy = deepcopy(request)
116139
request_copy.url = self._client.format_url(request_copy.url)
117-
return self._client.send_request(request_copy, **kwargs)
140+
return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore
118141

119142
def close(self) -> None:
120143
self._client.close()
121144

122-
def __enter__(self) -> "AzureDatabricksManagementClient":
145+
def __enter__(self) -> Self:
123146
self._client.__enter__()
124147
return self
125148

sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/_configuration.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,40 +8,44 @@
88

99
from typing import Any, TYPE_CHECKING
1010

11-
from azure.core.configuration import Configuration
1211
from azure.core.pipeline import policies
1312
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
1413

1514
from ._version import VERSION
1615

1716
if TYPE_CHECKING:
18-
# pylint: disable=unused-import,ungrouped-imports
1917
from azure.core.credentials import TokenCredential
2018

2119

22-
class AzureDatabricksManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
20+
class AzureDatabricksManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
2321
"""Configuration for AzureDatabricksManagementClient.
2422
2523
Note that all parameters used to create this instance are saved as instance
2624
attributes.
2725
2826
:param credential: Credential needed for the client to connect to Azure. Required.
2927
:type credential: ~azure.core.credentials.TokenCredential
30-
:param subscription_id: The ID of the target subscription. Required.
28+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3129
:type subscription_id: str
30+
:keyword api_version: Api Version. Default value is "2025-03-01-preview". Note that overriding
31+
this default value may result in unsupported behavior.
32+
:paramtype api_version: str
3233
"""
3334

3435
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
35-
super(AzureDatabricksManagementClientConfiguration, self).__init__(**kwargs)
36+
api_version: str = kwargs.pop("api_version", "2025-03-01-preview")
37+
3638
if credential is None:
3739
raise ValueError("Parameter 'credential' must not be None.")
3840
if subscription_id is None:
3941
raise ValueError("Parameter 'subscription_id' must not be None.")
4042

4143
self.credential = credential
4244
self.subscription_id = subscription_id
45+
self.api_version = api_version
4346
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
4447
kwargs.setdefault("sdk_moniker", "mgmt-databricks/{}".format(VERSION))
48+
self.polling_interval = kwargs.get("polling_interval", 30)
4549
self._configure(**kwargs)
4650

4751
def _configure(self, **kwargs: Any) -> None:
@@ -50,9 +54,9 @@ def _configure(self, **kwargs: Any) -> None:
5054
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
5155
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
5256
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
53-
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
5457
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
5558
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
59+
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
5660
self.authentication_policy = kwargs.get("authentication_policy")
5761
if self.credential and not self.authentication_policy:
5862
self.authentication_policy = ARMChallengeAuthenticationPolicy(

0 commit comments

Comments
 (0)