Skip to content

Commit 2a9681f

Browse files
author
SDKAuto
committed
CodeGen from PR 14605 in Azure/azure-rest-api-specs
Merge 2191b165f1b96334a4d822a82c9197cdfe0e9413 into bf2b044
1 parent f559b78 commit 2a9681f

File tree

133 files changed

+1190
-936
lines changed

Some content is hidden

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

133 files changed

+1190
-936
lines changed
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
{
2-
"autorest": "3.0.6369",
3-
"use": "@autorest/[email protected]",
4-
"commit": "e6a01441f54c719b8713490ee37e51d6220073c2",
2+
"autorest": "3.4.2",
3+
"use": [
4+
"@autorest/[email protected]",
5+
"@autorest/[email protected]"
6+
],
7+
"commit": "8db9a621382acada862891c3c7f58f823f968ac3",
58
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
6-
"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/python@5.6.2 --version=3.0.6369",
9+
"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/python@5.8.0 --use=@autorest/[email protected].2 --version=3.4.2",
710
"readme": "specification/synapse/resource-manager/readme.md"
811
}

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

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

4949
self.credential = credential
5050
self.subscription_id = subscription_id
51-
self.api_version = "2021-03-01"
51+
self.api_version = "2021-05-01"
5252
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5353
kwargs.setdefault('sdk_moniker', 'mgmt-synapse/{}'.format(VERSION))
5454
self._configure(**kwargs)

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

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"chosen_version": "2021-03-01",
3-
"total_api_version_list": ["2021-03-01"],
2+
"chosen_version": "2021-05-01",
3+
"total_api_version_list": ["2021-05-01"],
44
"client": {
55
"name": "SynapseManagementClient",
66
"filename": "_synapse_management_client",
@@ -10,8 +10,8 @@
1010
"azure_arm": true,
1111
"has_lro_operations": true,
1212
"client_side_validation": false,
13-
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"SynapseManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}",
14-
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"SynapseManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}"
13+
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"SynapseManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}",
14+
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"SynapseManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
1515
},
1616
"global_parameters": {
1717
"sync": {
@@ -159,11 +159,5 @@
159159
"workspace_sql_aad_admins": "WorkspaceSqlAadAdminsOperations",
160160
"workspace_managed_identity_sql_control_settings": "WorkspaceManagedIdentitySqlControlSettingsOperations",
161161
"restorable_dropped_sql_pools": "RestorableDroppedSqlPoolsOperations"
162-
},
163-
"operation_mixins": {
164-
"sync_imports": "None",
165-
"async_imports": "None",
166-
"operations": {
167-
}
168162
}
169163
}

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from typing import Any, Optional
1717

1818
from azure.core.credentials import TokenCredential
19+
from azure.core.pipeline.transport import HttpRequest, HttpResponse
1920

2021
from ._configuration import SynapseManagementClientConfiguration
2122
from .operations import BigDataPoolsOperations
@@ -356,6 +357,24 @@ def __init__(
356357
self.restorable_dropped_sql_pools = RestorableDroppedSqlPoolsOperations(
357358
self._client, self._config, self._serialize, self._deserialize)
358359

360+
def _send_request(self, http_request, **kwargs):
361+
# type: (HttpRequest, Any) -> HttpResponse
362+
"""Runs the network request through the client's chained policies.
363+
364+
:param http_request: The network request you want to make. Required.
365+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
366+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
367+
:return: The response of your network call. Does not do error handling on your response.
368+
:rtype: ~azure.core.pipeline.transport.HttpResponse
369+
"""
370+
path_format_arguments = {
371+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
372+
}
373+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
374+
stream = kwargs.pop("stream", True)
375+
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
376+
return pipeline_response.http_response
377+
359378
def close(self):
360379
# type: () -> None
361380
self._client.close()

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.0.0"
9+
VERSION = "0.1.0"

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

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

4646
self.credential = credential
4747
self.subscription_id = subscription_id
48-
self.api_version = "2021-03-01"
48+
self.api_version = "2021-05-01"
4949
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5050
kwargs.setdefault('sdk_moniker', 'mgmt-synapse/{}'.format(VERSION))
5151
self._configure(**kwargs)

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from typing import Any, Optional, TYPE_CHECKING
1010

11+
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
1112
from azure.mgmt.core import AsyncARMPipelineClient
1213
from msrest import Deserializer, Serializer
1314

@@ -353,6 +354,23 @@ def __init__(
353354
self.restorable_dropped_sql_pools = RestorableDroppedSqlPoolsOperations(
354355
self._client, self._config, self._serialize, self._deserialize)
355356

357+
async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:
358+
"""Runs the network request through the client's chained policies.
359+
360+
:param http_request: The network request you want to make. Required.
361+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
362+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
363+
:return: The response of your network call. Does not do error handling on your response.
364+
:rtype: ~azure.core.pipeline.transport.AsyncHttpResponse
365+
"""
366+
path_format_arguments = {
367+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
368+
}
369+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
370+
stream = kwargs.pop("stream", True)
371+
pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs)
372+
return pipeline_response.http_response
373+
356374
async def close(self) -> None:
357375
await self._client.close()
358376

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

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ async def get(
4848
resource_group_name: str,
4949
workspace_name: str,
5050
big_data_pool_name: str,
51-
**kwargs
51+
**kwargs: Any
5252
) -> "_models.BigDataPoolResourceInfo":
5353
"""Get Big Data pool.
5454
@@ -70,7 +70,7 @@ async def get(
7070
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
7171
}
7272
error_map.update(kwargs.pop('error_map', {}))
73-
api_version = "2021-03-01"
73+
api_version = "2021-05-01"
7474
accept = "application/json"
7575

7676
# Construct URL
@@ -114,7 +114,7 @@ async def update(
114114
workspace_name: str,
115115
big_data_pool_name: str,
116116
big_data_pool_patch_info: "_models.BigDataPoolPatchInfo",
117-
**kwargs
117+
**kwargs: Any
118118
) -> "_models.BigDataPoolResourceInfo":
119119
"""Update a Big Data pool.
120120
@@ -138,7 +138,7 @@ async def update(
138138
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
139139
}
140140
error_map.update(kwargs.pop('error_map', {}))
141-
api_version = "2021-03-01"
141+
api_version = "2021-05-01"
142142
content_type = kwargs.pop("content_type", "application/json")
143143
accept = "application/json"
144144

@@ -188,14 +188,14 @@ async def _create_or_update_initial(
188188
big_data_pool_name: str,
189189
big_data_pool_info: "_models.BigDataPoolResourceInfo",
190190
force: Optional[bool] = False,
191-
**kwargs
191+
**kwargs: Any
192192
) -> "_models.BigDataPoolResourceInfo":
193193
cls = kwargs.pop('cls', None) # type: ClsType["_models.BigDataPoolResourceInfo"]
194194
error_map = {
195195
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
196196
}
197197
error_map.update(kwargs.pop('error_map', {}))
198-
api_version = "2021-03-01"
198+
api_version = "2021-05-01"
199199
content_type = kwargs.pop("content_type", "application/json")
200200
accept = "application/json"
201201

@@ -251,7 +251,7 @@ async def begin_create_or_update(
251251
big_data_pool_name: str,
252252
big_data_pool_info: "_models.BigDataPoolResourceInfo",
253253
force: Optional[bool] = False,
254-
**kwargs
254+
**kwargs: Any
255255
) -> AsyncLROPoller["_models.BigDataPoolResourceInfo"]:
256256
"""Create a Big Data pool.
257257
@@ -269,8 +269,8 @@ async def begin_create_or_update(
269269
:type force: bool
270270
:keyword callable cls: A custom type or function that will be passed the direct response
271271
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
272-
:keyword polling: Pass in True if you'd like the AsyncARMPolling polling method,
273-
False for no polling, or your own initialized polling object for a personal polling strategy.
272+
:keyword polling: By default, your polling method will be AsyncARMPolling.
273+
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
274274
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
275275
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
276276
:return: An instance of AsyncLROPoller that returns either BigDataPoolResourceInfo or the result of cls(response)
@@ -331,14 +331,14 @@ async def _delete_initial(
331331
resource_group_name: str,
332332
workspace_name: str,
333333
big_data_pool_name: str,
334-
**kwargs
335-
) -> Optional[object]:
336-
cls = kwargs.pop('cls', None) # type: ClsType[Optional[object]]
334+
**kwargs: Any
335+
) -> Optional[Any]:
336+
cls = kwargs.pop('cls', None) # type: ClsType[Optional[Any]]
337337
error_map = {
338338
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
339339
}
340340
error_map.update(kwargs.pop('error_map', {}))
341-
api_version = "2021-03-01"
341+
api_version = "2021-05-01"
342342
accept = "application/json"
343343

344344
# Construct URL
@@ -386,8 +386,8 @@ async def begin_delete(
386386
resource_group_name: str,
387387
workspace_name: str,
388388
big_data_pool_name: str,
389-
**kwargs
390-
) -> AsyncLROPoller[object]:
389+
**kwargs: Any
390+
) -> AsyncLROPoller[Any]:
391391
"""Delete a Big Data pool.
392392
393393
Delete a Big Data pool from the workspace.
@@ -400,16 +400,16 @@ async def begin_delete(
400400
:type big_data_pool_name: str
401401
:keyword callable cls: A custom type or function that will be passed the direct response
402402
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
403-
:keyword polling: Pass in True if you'd like the AsyncARMPolling polling method,
404-
False for no polling, or your own initialized polling object for a personal polling strategy.
403+
:keyword polling: By default, your polling method will be AsyncARMPolling.
404+
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
405405
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
406406
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
407-
:return: An instance of AsyncLROPoller that returns either object or the result of cls(response)
408-
:rtype: ~azure.core.polling.AsyncLROPoller[object]
407+
:return: An instance of AsyncLROPoller that returns either any or the result of cls(response)
408+
:rtype: ~azure.core.polling.AsyncLROPoller[any]
409409
:raises ~azure.core.exceptions.HttpResponseError:
410410
"""
411411
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
412-
cls = kwargs.pop('cls', None) # type: ClsType[object]
412+
cls = kwargs.pop('cls', None) # type: ClsType[Any]
413413
lro_delay = kwargs.pop(
414414
'polling_interval',
415415
self._config.polling_interval
@@ -459,7 +459,7 @@ def list_by_workspace(
459459
self,
460460
resource_group_name: str,
461461
workspace_name: str,
462-
**kwargs
462+
**kwargs: Any
463463
) -> AsyncIterable["_models.BigDataPoolResourceInfoListResult"]:
464464
"""List the Big Data pools in a workspace.
465465
@@ -479,7 +479,7 @@ def list_by_workspace(
479479
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
480480
}
481481
error_map.update(kwargs.pop('error_map', {}))
482-
api_version = "2021-03-01"
482+
api_version = "2021-05-01"
483483
accept = "application/json"
484484

485485
def prepare_request(next_link=None):

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ async def create_or_update(
4646
workspace_name: str,
4747
sql_pool_name: str,
4848
parameters: "_models.DataMaskingPolicy",
49-
**kwargs
49+
**kwargs: Any
5050
) -> "_models.DataMaskingPolicy":
5151
"""Creates or updates a Sql pool data masking policy.
5252
@@ -68,7 +68,7 @@ async def create_or_update(
6868
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
6969
}
7070
error_map.update(kwargs.pop('error_map', {}))
71-
api_version = "2021-03-01"
71+
api_version = "2021-05-01"
7272
data_masking_policy_name = "Default"
7373
content_type = kwargs.pop("content_type", "application/json")
7474
accept = "application/json"
@@ -118,7 +118,7 @@ async def get(
118118
resource_group_name: str,
119119
workspace_name: str,
120120
sql_pool_name: str,
121-
**kwargs
121+
**kwargs: Any
122122
) -> "_models.DataMaskingPolicy":
123123
"""Gets a Sql pool data masking policy.
124124
@@ -138,7 +138,7 @@ async def get(
138138
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
139139
}
140140
error_map.update(kwargs.pop('error_map', {}))
141-
api_version = "2021-03-01"
141+
api_version = "2021-05-01"
142142
data_masking_policy_name = "Default"
143143
accept = "application/json"
144144

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ async def create_or_update(
4848
sql_pool_name: str,
4949
data_masking_rule_name: str,
5050
parameters: "_models.DataMaskingRule",
51-
**kwargs
51+
**kwargs: Any
5252
) -> "_models.DataMaskingRule":
5353
"""Creates or updates a Sql pool data masking rule.
5454
@@ -72,7 +72,7 @@ async def create_or_update(
7272
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
7373
}
7474
error_map.update(kwargs.pop('error_map', {}))
75-
api_version = "2021-03-01"
75+
api_version = "2021-05-01"
7676
data_masking_policy_name = "Default"
7777
content_type = kwargs.pop("content_type", "application/json")
7878
accept = "application/json"
@@ -128,7 +128,7 @@ async def get(
128128
workspace_name: str,
129129
sql_pool_name: str,
130130
data_masking_rule_name: str,
131-
**kwargs
131+
**kwargs: Any
132132
) -> "_models.DataMaskingRule":
133133
"""Gets the specific Sql pool data masking rule.
134134
@@ -150,7 +150,7 @@ async def get(
150150
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
151151
}
152152
error_map.update(kwargs.pop('error_map', {}))
153-
api_version = "2021-03-01"
153+
api_version = "2021-05-01"
154154
data_masking_policy_name = "Default"
155155
accept = "application/json"
156156

@@ -196,7 +196,7 @@ def list_by_sql_pool(
196196
resource_group_name: str,
197197
workspace_name: str,
198198
sql_pool_name: str,
199-
**kwargs
199+
**kwargs: Any
200200
) -> AsyncIterable["_models.DataMaskingRuleListResult"]:
201201
"""Gets a list of Sql pool data masking rules.
202202
@@ -216,7 +216,7 @@ def list_by_sql_pool(
216216
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
217217
}
218218
error_map.update(kwargs.pop('error_map', {}))
219-
api_version = "2021-03-01"
219+
api_version = "2021-05-01"
220220
data_masking_policy_name = "Default"
221221
accept = "application/json"
222222

0 commit comments

Comments
 (0)