Skip to content

Commit 63082d7

Browse files
Azure CLI BotSDKAutomarkcowl
authored
[AutoRelease] t2-synapse-2021-11-08-68636 (Azure#21640)
* CodeGen from PR 16581 in Azure/azure-rest-api-specs [Synapse]Add auto gen readme files for cli kusto support (Azure#16581) * Add blockchain to latest profile * Add additional types * addclikustosupportautogenfiles * removealias * addrepo Co-authored-by: Mark Cowlishaw <markcowl@microsoft.com> * version,CHANGELOG Co-authored-by: SDKAuto <sdkautomation@microsoft.com> Co-authored-by: Mark Cowlishaw <markcowl@microsoft.com> Co-authored-by: PythonSdkPipelines <PythonSdkPipelines>
1 parent e4767e9 commit 63082d7

File tree

14 files changed

+159
-240
lines changed

14 files changed

+159
-240
lines changed

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

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

3+
## 2.1.0b3 (2021-11-08)
4+
5+
**Features**
6+
7+
- Model EventHubDataConnection has a new parameter managed_identity_resource_id
8+
- Added operation KustoPoolsOperations.list_skus
9+
10+
**Breaking changes**
11+
12+
- Removed operation group KustoPoolOperations
13+
314
## 2.1.0b2 (2021-10-09)
415

516
**Features**

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/python@5.8.4",
55
"@autorest/modelerfour@4.19.2"
66
],
7-
"commit": "f8aa8bcbac3d389a1ed5b9c77f1bcb6cc2074a7d",
7+
"commit": "64b91c09704b103f1a98719300b47c413c75bbe3",
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/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --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 = "2.1.0b3"

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):

0 commit comments

Comments
 (0)