Skip to content

Commit d47447f

Browse files
author
SDKAuto
committed
CodeGen from PR 16581 in Azure/azure-rest-api-specs
Merge 5bbd349296759ddacbce6174a9d92ff9c47bb1a0 into d00bfb2
1 parent f2177e3 commit d47447f

File tree

13 files changed

+148
-240
lines changed

13 files changed

+148
-240
lines changed

sdk/synapse/azure-mgmt-synapse/_meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"@autorest/[email protected]",
55
"@autorest/[email protected]"
66
],
7-
"commit": "f8aa8bcbac3d389a1ed5b9c77f1bcb6cc2074a7d",
7+
"commit": "fadc8c3b3ab303b35ea7e55b73bf847f06502ab7",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
99
"autorest_command": "autorest specification/synapse/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] --use=@autorest/[email protected] --version=3.4.5",
1010
"readme": "specification/synapse/resource-manager/readme.md"

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@
163163
"spark_configuration": "SparkConfigurationOperations",
164164
"spark_configurations": "SparkConfigurationsOperations",
165165
"kusto_operations": "KustoOperationsOperations",
166-
"kusto_pool": "KustoPoolOperations",
167166
"kusto_pools": "KustoPoolsOperations",
168167
"kusto_pool_child_resource": "KustoPoolChildResourceOperations",
169168
"kusto_pool_attached_database_configurations": "KustoPoolAttachedDatabaseConfigurationsOperations",

sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_synapse_management_client.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@
8484
from .operations import SparkConfigurationOperations
8585
from .operations import SparkConfigurationsOperations
8686
from .operations import KustoOperationsOperations
87-
from .operations import KustoPoolOperations
8887
from .operations import KustoPoolsOperations
8988
from .operations import KustoPoolChildResourceOperations
9089
from .operations import KustoPoolAttachedDatabaseConfigurationsOperations
@@ -228,8 +227,6 @@ class SynapseManagementClient(object):
228227
:vartype spark_configurations: azure.mgmt.synapse.operations.SparkConfigurationsOperations
229228
:ivar kusto_operations: KustoOperationsOperations operations
230229
:vartype kusto_operations: azure.mgmt.synapse.operations.KustoOperationsOperations
231-
:ivar kusto_pool: KustoPoolOperations operations
232-
:vartype kusto_pool: azure.mgmt.synapse.operations.KustoPoolOperations
233230
:ivar kusto_pools: KustoPoolsOperations operations
234231
:vartype kusto_pools: azure.mgmt.synapse.operations.KustoPoolsOperations
235232
:ivar kusto_pool_child_resource: KustoPoolChildResourceOperations operations
@@ -400,8 +397,6 @@ def __init__(
400397
self._client, self._config, self._serialize, self._deserialize)
401398
self.kusto_operations = KustoOperationsOperations(
402399
self._client, self._config, self._serialize, self._deserialize)
403-
self.kusto_pool = KustoPoolOperations(
404-
self._client, self._config, self._serialize, self._deserialize)
405400
self.kusto_pools = KustoPoolsOperations(
406401
self._client, self._config, self._serialize, self._deserialize)
407402
self.kusto_pool_child_resource = KustoPoolChildResourceOperations(

sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_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 = "2.1.0b2"
9+
VERSION = "1.0.0b1"

sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/_synapse_management_client.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@
8282
from .operations import SparkConfigurationOperations
8383
from .operations import SparkConfigurationsOperations
8484
from .operations import KustoOperationsOperations
85-
from .operations import KustoPoolOperations
8685
from .operations import KustoPoolsOperations
8786
from .operations import KustoPoolChildResourceOperations
8887
from .operations import KustoPoolAttachedDatabaseConfigurationsOperations
@@ -226,8 +225,6 @@ class SynapseManagementClient(object):
226225
:vartype spark_configurations: azure.mgmt.synapse.aio.operations.SparkConfigurationsOperations
227226
:ivar kusto_operations: KustoOperationsOperations operations
228227
:vartype kusto_operations: azure.mgmt.synapse.aio.operations.KustoOperationsOperations
229-
:ivar kusto_pool: KustoPoolOperations operations
230-
:vartype kusto_pool: azure.mgmt.synapse.aio.operations.KustoPoolOperations
231228
:ivar kusto_pools: KustoPoolsOperations operations
232229
:vartype kusto_pools: azure.mgmt.synapse.aio.operations.KustoPoolsOperations
233230
:ivar kusto_pool_child_resource: KustoPoolChildResourceOperations operations
@@ -397,8 +394,6 @@ def __init__(
397394
self._client, self._config, self._serialize, self._deserialize)
398395
self.kusto_operations = KustoOperationsOperations(
399396
self._client, self._config, self._serialize, self._deserialize)
400-
self.kusto_pool = KustoPoolOperations(
401-
self._client, self._config, self._serialize, self._deserialize)
402397
self.kusto_pools = KustoPoolsOperations(
403398
self._client, self._config, self._serialize, self._deserialize)
404399
self.kusto_pool_child_resource = KustoPoolChildResourceOperations(

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@
7171
from ._spark_configuration_operations import SparkConfigurationOperations
7272
from ._spark_configurations_operations import SparkConfigurationsOperations
7373
from ._kusto_operations_operations import KustoOperationsOperations
74-
from ._kusto_pool_operations import KustoPoolOperations
7574
from ._kusto_pools_operations import KustoPoolsOperations
7675
from ._kusto_pool_child_resource_operations import KustoPoolChildResourceOperations
7776
from ._kusto_pool_attached_database_configurations_operations import KustoPoolAttachedDatabaseConfigurationsOperations
@@ -146,7 +145,6 @@
146145
'SparkConfigurationOperations',
147146
'SparkConfigurationsOperations',
148147
'KustoOperationsOperations',
149-
'KustoPoolOperations',
150148
'KustoPoolsOperations',
151149
'KustoPoolChildResourceOperations',
152150
'KustoPoolAttachedDatabaseConfigurationsOperations',

sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_kusto_pool_operations.py

Lines changed: 0 additions & 109 deletions
This file was deleted.

sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_kusto_pools_operations.py

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,73 @@ def __init__(self, client, config, serializer, deserializer) -> None:
4343
self._deserialize = deserializer
4444
self._config = config
4545

46+
def list_skus(
47+
self,
48+
**kwargs: Any
49+
) -> AsyncIterable["_models.SkuDescriptionList"]:
50+
"""Lists eligible SKUs for Kusto Pool resource.
51+
52+
:keyword callable cls: A custom type or function that will be passed the direct response
53+
:return: An iterator like instance of either SkuDescriptionList or the result of cls(response)
54+
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.synapse.models.SkuDescriptionList]
55+
:raises: ~azure.core.exceptions.HttpResponseError
56+
"""
57+
cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuDescriptionList"]
58+
error_map = {
59+
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
60+
}
61+
error_map.update(kwargs.pop('error_map', {}))
62+
api_version = "2021-06-01-preview"
63+
accept = "application/json"
64+
65+
def prepare_request(next_link=None):
66+
# Construct headers
67+
header_parameters = {} # type: Dict[str, Any]
68+
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
69+
70+
if not next_link:
71+
# Construct URL
72+
url = self.list_skus.metadata['url'] # type: ignore
73+
path_format_arguments = {
74+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
75+
}
76+
url = self._client.format_url(url, **path_format_arguments)
77+
# Construct parameters
78+
query_parameters = {} # type: Dict[str, Any]
79+
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
80+
81+
request = self._client.get(url, query_parameters, header_parameters)
82+
else:
83+
url = next_link
84+
query_parameters = {} # type: Dict[str, Any]
85+
request = self._client.get(url, query_parameters, header_parameters)
86+
return request
87+
88+
async def extract_data(pipeline_response):
89+
deserialized = self._deserialize('SkuDescriptionList', pipeline_response)
90+
list_of_elem = deserialized.value
91+
if cls:
92+
list_of_elem = cls(list_of_elem)
93+
return None, AsyncList(list_of_elem)
94+
95+
async def get_next(next_link=None):
96+
request = prepare_request(next_link)
97+
98+
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
99+
response = pipeline_response.http_response
100+
101+
if response.status_code not in [200]:
102+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
103+
map_error(status_code=response.status_code, response=response, error_map=error_map)
104+
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
105+
106+
return pipeline_response
107+
108+
return AsyncItemPaged(
109+
get_next, extract_data
110+
)
111+
list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Synapse/skus'} # type: ignore
112+
46113
async def check_name_availability(
47114
self,
48115
location: str,

sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_models.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2257,6 +2257,9 @@ class EventHubDataConnection(DataConnection):
22572257
:ivar provisioning_state: The provisioned state of the resource. Possible values include:
22582258
"Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving", "Canceled".
22592259
:vartype provisioning_state: str or ~azure.mgmt.synapse.models.ResourceProvisioningState
2260+
:param managed_identity_resource_id: The resource ID of a managed identity (system or user
2261+
assigned) to be used to authenticate with event hub.
2262+
:type managed_identity_resource_id: str
22602263
"""
22612264

22622265
_validation = {
@@ -2283,6 +2286,7 @@ class EventHubDataConnection(DataConnection):
22832286
'event_system_properties': {'key': 'properties.eventSystemProperties', 'type': '[str]'},
22842287
'compression': {'key': 'properties.compression', 'type': 'str'},
22852288
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
2289+
'managed_identity_resource_id': {'key': 'properties.managedIdentityResourceId', 'type': 'str'},
22862290
}
22872291

22882292
def __init__(
@@ -2299,6 +2303,7 @@ def __init__(
22992303
self.event_system_properties = kwargs.get('event_system_properties', None)
23002304
self.compression = kwargs.get('compression', None)
23012305
self.provisioning_state = None
2306+
self.managed_identity_resource_id = kwargs.get('managed_identity_resource_id', None)
23022307

23032308

23042309
class ExtendedServerBlobAuditingPolicy(ProxyResource):

sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_models_py3.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2445,6 +2445,9 @@ class EventHubDataConnection(DataConnection):
24452445
:ivar provisioning_state: The provisioned state of the resource. Possible values include:
24462446
"Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving", "Canceled".
24472447
:vartype provisioning_state: str or ~azure.mgmt.synapse.models.ResourceProvisioningState
2448+
:param managed_identity_resource_id: The resource ID of a managed identity (system or user
2449+
assigned) to be used to authenticate with event hub.
2450+
:type managed_identity_resource_id: str
24482451
"""
24492452

24502453
_validation = {
@@ -2471,6 +2474,7 @@ class EventHubDataConnection(DataConnection):
24712474
'event_system_properties': {'key': 'properties.eventSystemProperties', 'type': '[str]'},
24722475
'compression': {'key': 'properties.compression', 'type': 'str'},
24732476
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
2477+
'managed_identity_resource_id': {'key': 'properties.managedIdentityResourceId', 'type': 'str'},
24742478
}
24752479

24762480
def __init__(
@@ -2484,6 +2488,7 @@ def __init__(
24842488
data_format: Optional[Union[str, "EventHubDataFormat"]] = None,
24852489
event_system_properties: Optional[List[str]] = None,
24862490
compression: Optional[Union[str, "Compression"]] = None,
2491+
managed_identity_resource_id: Optional[str] = None,
24872492
**kwargs
24882493
):
24892494
super(EventHubDataConnection, self).__init__(location=location, **kwargs)
@@ -2496,6 +2501,7 @@ def __init__(
24962501
self.event_system_properties = event_system_properties
24972502
self.compression = compression
24982503
self.provisioning_state = None
2504+
self.managed_identity_resource_id = managed_identity_resource_id
24992505

25002506

25012507
class ExtendedServerBlobAuditingPolicy(ProxyResource):

0 commit comments

Comments
 (0)