Skip to content

Commit 3d31519

Browse files
author
SDKAuto
committed
CodeGen from PR 16431 in Azure/azure-rest-api-specs
Merge 55237cfe8ea393799b30c95c029cfee68aa09574 into 62ec790
1 parent 14496e7 commit 3d31519

16 files changed

+425
-15
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"autorest": "3.4.2",
2+
"autorest": "3.4.5",
33
"use": [
4-
"@autorest/[email protected].1",
4+
"@autorest/[email protected].4",
55
"@autorest/[email protected]"
66
],
7-
"commit": "fa3ba1acdd45ddad8950133befc5b0a6f1ee5163",
7+
"commit": "0418ecbffbf97c145408c915d741d7c73ab2295c",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/databricks/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/[email protected].1 --use=@autorest/[email protected] --version=3.4.2",
9+
"autorest_command": "autorest specification/databricks/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/[email protected].4 --use=@autorest/[email protected] --version=3.4.5",
1010
"readme": "specification/databricks/resource-manager/readme.md"
1111
}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from .operations import Operations
2424
from .operations import PrivateLinkResourcesOperations
2525
from .operations import PrivateEndpointConnectionsOperations
26+
from .operations import OutboundNetworkDependenciesEndpointsOperations
2627
from .operations import VNetPeeringOperations
2728
from . import models
2829

@@ -38,6 +39,8 @@ class AzureDatabricksManagementClient(object):
3839
:vartype private_link_resources: azure_databricks_management_client.operations.PrivateLinkResourcesOperations
3940
:ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
4041
:vartype private_endpoint_connections: azure_databricks_management_client.operations.PrivateEndpointConnectionsOperations
42+
:ivar outbound_network_dependencies_endpoints: OutboundNetworkDependenciesEndpointsOperations operations
43+
:vartype outbound_network_dependencies_endpoints: azure_databricks_management_client.operations.OutboundNetworkDependenciesEndpointsOperations
4144
:ivar vnet_peering: VNetPeeringOperations operations
4245
:vartype vnet_peering: azure_databricks_management_client.operations.VNetPeeringOperations
4346
:param credential: Credential needed for the client to connect to Azure.
@@ -74,6 +77,8 @@ def __init__(
7477
self._client, self._config, self._serialize, self._deserialize)
7578
self.private_endpoint_connections = PrivateEndpointConnectionsOperations(
7679
self._client, self._config, self._serialize, self._deserialize)
80+
self.outbound_network_dependencies_endpoints = OutboundNetworkDependenciesEndpointsOperations(
81+
self._client, self._config, self._serialize, self._deserialize)
7782
self.vnet_peering = VNetPeeringOperations(
7883
self._client, self._config, self._serialize, self._deserialize)
7984

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def __init__(
4848

4949
self.credential = credential
5050
self.subscription_id = subscription_id
51+
self.api_version = "2021-04-01-preview"
5152
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5253
kwargs.setdefault('sdk_moniker', 'mgmt-databricks/{}'.format(VERSION))
5354
self._configure(**kwargs)

sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/_metadata.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"chosen_version": "",
3-
"total_api_version_list": ["2018-04-01", "2021-04-01-preview"],
2+
"chosen_version": "2021-04-01-preview",
3+
"total_api_version_list": ["2021-04-01-preview"],
44
"client": {
55
"name": "AzureDatabricksManagementClient",
66
"filename": "_azure_databricks_management_client",
@@ -102,6 +102,7 @@
102102
"operations": "Operations",
103103
"private_link_resources": "PrivateLinkResourcesOperations",
104104
"private_endpoint_connections": "PrivateEndpointConnectionsOperations",
105+
"outbound_network_dependencies_endpoints": "OutboundNetworkDependenciesEndpointsOperations",
105106
"vnet_peering": "VNetPeeringOperations"
106107
}
107108
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "1.1.0b1"
9+
VERSION = "1.0.0b1"

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from .operations import Operations
2222
from .operations import PrivateLinkResourcesOperations
2323
from .operations import PrivateEndpointConnectionsOperations
24+
from .operations import OutboundNetworkDependenciesEndpointsOperations
2425
from .operations import VNetPeeringOperations
2526
from .. import models
2627

@@ -36,6 +37,8 @@ class AzureDatabricksManagementClient(object):
3637
:vartype private_link_resources: azure_databricks_management_client.aio.operations.PrivateLinkResourcesOperations
3738
:ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
3839
:vartype private_endpoint_connections: azure_databricks_management_client.aio.operations.PrivateEndpointConnectionsOperations
40+
:ivar outbound_network_dependencies_endpoints: OutboundNetworkDependenciesEndpointsOperations operations
41+
:vartype outbound_network_dependencies_endpoints: azure_databricks_management_client.aio.operations.OutboundNetworkDependenciesEndpointsOperations
3942
:ivar vnet_peering: VNetPeeringOperations operations
4043
:vartype vnet_peering: azure_databricks_management_client.aio.operations.VNetPeeringOperations
4144
:param credential: Credential needed for the client to connect to Azure.
@@ -71,6 +74,8 @@ def __init__(
7174
self._client, self._config, self._serialize, self._deserialize)
7275
self.private_endpoint_connections = PrivateEndpointConnectionsOperations(
7376
self._client, self._config, self._serialize, self._deserialize)
77+
self.outbound_network_dependencies_endpoints = OutboundNetworkDependenciesEndpointsOperations(
78+
self._client, self._config, self._serialize, self._deserialize)
7479
self.vnet_peering = VNetPeeringOperations(
7580
self._client, self._config, self._serialize, self._deserialize)
7681

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def __init__(
4545

4646
self.credential = credential
4747
self.subscription_id = subscription_id
48+
self.api_version = "2021-04-01-preview"
4849
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
4950
kwargs.setdefault('sdk_moniker', 'mgmt-databricks/{}'.format(VERSION))
5051
self._configure(**kwargs)

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@
1010
from ._operations import Operations
1111
from ._private_link_resources_operations import PrivateLinkResourcesOperations
1212
from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations
13+
from ._outbound_network_dependencies_endpoints_operations import OutboundNetworkDependenciesEndpointsOperations
1314
from ._vnet_peering_operations import VNetPeeringOperations
1415

1516
__all__ = [
1617
'WorkspacesOperations',
1718
'Operations',
1819
'PrivateLinkResourcesOperations',
1920
'PrivateEndpointConnectionsOperations',
21+
'OutboundNetworkDependenciesEndpointsOperations',
2022
'VNetPeeringOperations',
2123
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
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 license information.
5+
# Code generated by Microsoft (R) AutoRest Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar
9+
import warnings
10+
11+
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
12+
from azure.core.pipeline import PipelineResponse
13+
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
14+
from azure.mgmt.core.exceptions import ARMErrorFormat
15+
16+
from ... import models as _models
17+
18+
T = TypeVar('T')
19+
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
20+
21+
class OutboundNetworkDependenciesEndpointsOperations:
22+
"""OutboundNetworkDependenciesEndpointsOperations async operations.
23+
24+
You should not instantiate this class directly. Instead, you should create a Client instance that
25+
instantiates it for you and attaches it as an attribute.
26+
27+
:ivar models: Alias to model classes used in this operation group.
28+
:type models: ~azure_databricks_management_client.models
29+
:param client: Client for service requests.
30+
:param config: Configuration of service client.
31+
:param serializer: An object model serializer.
32+
:param deserializer: An object model deserializer.
33+
"""
34+
35+
models = _models
36+
37+
def __init__(self, client, config, serializer, deserializer) -> None:
38+
self._client = client
39+
self._serialize = serializer
40+
self._deserialize = deserializer
41+
self._config = config
42+
43+
async def list(
44+
self,
45+
resource_group_name: str,
46+
workspace_name: str,
47+
**kwargs: Any
48+
) -> List["_models.OutboundEnvironmentEndpoint"]:
49+
"""Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified Workspace.
50+
51+
Gets the list of endpoints that VNET Injected Workspace calls Azure Databricks Control Plane.
52+
You must configure outbound access with these endpoints. For more information, see
53+
https://docs.microsoft.com/en-us/azure/databricks/administration-guide/cloud-configurations/azure/udr.
54+
55+
:param resource_group_name: The name of the resource group. The name is case insensitive.
56+
:type resource_group_name: str
57+
:param workspace_name: The name of the workspace.
58+
:type workspace_name: str
59+
:keyword callable cls: A custom type or function that will be passed the direct response
60+
:return: list of OutboundEnvironmentEndpoint, or the result of cls(response)
61+
:rtype: list[~azure_databricks_management_client.models.OutboundEnvironmentEndpoint]
62+
:raises: ~azure.core.exceptions.HttpResponseError
63+
"""
64+
cls = kwargs.pop('cls', None) # type: ClsType[List["_models.OutboundEnvironmentEndpoint"]]
65+
error_map = {
66+
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
67+
}
68+
error_map.update(kwargs.pop('error_map', {}))
69+
api_version = "2021-04-01-preview"
70+
accept = "application/json"
71+
72+
# Construct URL
73+
url = self.list.metadata['url'] # type: ignore
74+
path_format_arguments = {
75+
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
76+
'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=64, min_length=3),
77+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
78+
}
79+
url = self._client.format_url(url, **path_format_arguments)
80+
81+
# Construct parameters
82+
query_parameters = {} # type: Dict[str, Any]
83+
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
84+
85+
# Construct headers
86+
header_parameters = {} # type: Dict[str, Any]
87+
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
88+
89+
request = self._client.get(url, query_parameters, header_parameters)
90+
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
91+
response = pipeline_response.http_response
92+
93+
if response.status_code not in [200]:
94+
map_error(status_code=response.status_code, response=response, error_map=error_map)
95+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
96+
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
97+
98+
deserialized = self._deserialize('[OutboundEnvironmentEndpoint]', pipeline_response)
99+
100+
if cls:
101+
return cls(pipeline_response, deserialized, {})
102+
103+
return deserialized
104+
list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints'} # type: ignore

sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/aio/operations/_vnet_peering_operations.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ async def get(
6868
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
6969
}
7070
error_map.update(kwargs.pop('error_map', {}))
71-
api_version = "2018-04-01"
71+
api_version = "2021-04-01-preview"
7272
accept = "application/json"
7373

7474
# Construct URL
@@ -120,7 +120,7 @@ async def _delete_initial(
120120
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
121121
}
122122
error_map.update(kwargs.pop('error_map', {}))
123-
api_version = "2018-04-01"
123+
api_version = "2021-04-01-preview"
124124
accept = "application/json"
125125

126126
# Construct URL
@@ -237,7 +237,7 @@ async def _create_or_update_initial(
237237
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
238238
}
239239
error_map.update(kwargs.pop('error_map', {}))
240-
api_version = "2018-04-01"
240+
api_version = "2021-04-01-preview"
241241
content_type = kwargs.pop("content_type", "application/json")
242242
accept = "application/json"
243243

@@ -383,7 +383,7 @@ def list_by_workspace(
383383
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
384384
}
385385
error_map.update(kwargs.pop('error_map', {}))
386-
api_version = "2018-04-01"
386+
api_version = "2021-04-01-preview"
387387
accept = "application/json"
388388

389389
def prepare_request(next_link=None):

0 commit comments

Comments
 (0)