Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR track2_azure-mgmt-synapse] Added DW Gen3 SqlPool Pause and Resume swagger #5536

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions sdk/synapse/azure-mgmt-synapse/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"autorest": "3.0.6369",
"use": "@autorest/[email protected]",
"commit": "e6a01441f54c719b8713490ee37e51d6220073c2",
"autorest": "3.4.2",
"use": [
"@autorest/[email protected]",
"@autorest/[email protected]"
],
"commit": "a5c6c34ac7be6ec3f874053cca5d53f14b3b5e9c",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"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",
"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",
"readme": "specification/synapse/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2021-03-01"
self.api_version = "2021-05-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-synapse/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
14 changes: 4 additions & 10 deletions sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"chosen_version": "2021-03-01",
"total_api_version_list": ["2021-03-01"],
"chosen_version": "2021-05-01",
"total_api_version_list": ["2021-05-01"],
"client": {
"name": "SynapseManagementClient",
"filename": "_synapse_management_client",
Expand All @@ -10,8 +10,8 @@
"azure_arm": true,
"has_lro_operations": true,
"client_side_validation": false,
"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\"]}}}",
"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\"]}}}"
"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\"]}}}",
"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\"]}}}"
},
"global_parameters": {
"sync": {
Expand Down Expand Up @@ -159,11 +159,5 @@
"workspace_sql_aad_admins": "WorkspaceSqlAadAdminsOperations",
"workspace_managed_identity_sql_control_settings": "WorkspaceManagedIdentitySqlControlSettingsOperations",
"restorable_dropped_sql_pools": "RestorableDroppedSqlPoolsOperations"
},
"operation_mixins": {
"sync_imports": "None",
"async_imports": "None",
"operations": {
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from typing import Any, Optional

from azure.core.credentials import TokenCredential
from azure.core.pipeline.transport import HttpRequest, HttpResponse

from ._configuration import SynapseManagementClientConfiguration
from .operations import BigDataPoolsOperations
Expand Down Expand Up @@ -356,6 +357,24 @@ def __init__(
self.restorable_dropped_sql_pools = RestorableDroppedSqlPoolsOperations(
self._client, self._config, self._serialize, self._deserialize)

def _send_request(self, http_request, **kwargs):
# type: (HttpRequest, Any) -> HttpResponse
"""Runs the network request through the client's chained policies.

:param http_request: The network request you want to make. Required.
:type http_request: ~azure.core.pipeline.transport.HttpRequest
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
:return: The response of your network call. Does not do error handling on your response.
:rtype: ~azure.core.pipeline.transport.HttpResponse
"""
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
}
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
stream = kwargs.pop("stream", True)
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
return pipeline_response.http_response

def close(self):
# type: () -> None
self._client.close()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "2.0.0"
VERSION = "0.1.0"
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2021-03-01"
self.api_version = "2021-05-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-synapse/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from typing import Any, Optional, TYPE_CHECKING

from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from azure.mgmt.core import AsyncARMPipelineClient
from msrest import Deserializer, Serializer

Expand Down Expand Up @@ -353,6 +354,23 @@ def __init__(
self.restorable_dropped_sql_pools = RestorableDroppedSqlPoolsOperations(
self._client, self._config, self._serialize, self._deserialize)

async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:
"""Runs the network request through the client's chained policies.

:param http_request: The network request you want to make. Required.
:type http_request: ~azure.core.pipeline.transport.HttpRequest
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
:return: The response of your network call. Does not do error handling on your response.
:rtype: ~azure.core.pipeline.transport.AsyncHttpResponse
"""
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
}
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
stream = kwargs.pop("stream", True)
pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs)
return pipeline_response.http_response

async def close(self) -> None:
await self._client.close()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async def get(
resource_group_name: str,
workspace_name: str,
big_data_pool_name: str,
**kwargs
**kwargs: Any
) -> "_models.BigDataPoolResourceInfo":
"""Get Big Data pool.

Expand All @@ -70,7 +70,7 @@ async def get(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-03-01"
api_version = "2021-05-01"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -114,7 +114,7 @@ async def update(
workspace_name: str,
big_data_pool_name: str,
big_data_pool_patch_info: "_models.BigDataPoolPatchInfo",
**kwargs
**kwargs: Any
) -> "_models.BigDataPoolResourceInfo":
"""Update a Big Data pool.

Expand All @@ -138,7 +138,7 @@ async def update(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-03-01"
api_version = "2021-05-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down Expand Up @@ -188,14 +188,14 @@ async def _create_or_update_initial(
big_data_pool_name: str,
big_data_pool_info: "_models.BigDataPoolResourceInfo",
force: Optional[bool] = False,
**kwargs
**kwargs: Any
) -> "_models.BigDataPoolResourceInfo":
cls = kwargs.pop('cls', None) # type: ClsType["_models.BigDataPoolResourceInfo"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-03-01"
api_version = "2021-05-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down Expand Up @@ -251,7 +251,7 @@ async def begin_create_or_update(
big_data_pool_name: str,
big_data_pool_info: "_models.BigDataPoolResourceInfo",
force: Optional[bool] = False,
**kwargs
**kwargs: Any
) -> AsyncLROPoller["_models.BigDataPoolResourceInfo"]:
"""Create a Big Data pool.

Expand All @@ -269,8 +269,8 @@ async def begin_create_or_update(
:type force: bool
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: Pass in True if you'd like the AsyncARMPolling polling method,
False for no polling, or your own initialized polling object for a personal polling strategy.
:keyword polling: By default, your polling method will be AsyncARMPolling.
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of AsyncLROPoller that returns either BigDataPoolResourceInfo or the result of cls(response)
Expand Down Expand Up @@ -331,14 +331,14 @@ async def _delete_initial(
resource_group_name: str,
workspace_name: str,
big_data_pool_name: str,
**kwargs
) -> Optional[object]:
cls = kwargs.pop('cls', None) # type: ClsType[Optional[object]]
**kwargs: Any
) -> Optional[Any]:
cls = kwargs.pop('cls', None) # type: ClsType[Optional[Any]]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-03-01"
api_version = "2021-05-01"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -386,8 +386,8 @@ async def begin_delete(
resource_group_name: str,
workspace_name: str,
big_data_pool_name: str,
**kwargs
) -> AsyncLROPoller[object]:
**kwargs: Any
) -> AsyncLROPoller[Any]:
"""Delete a Big Data pool.

Delete a Big Data pool from the workspace.
Expand All @@ -400,16 +400,16 @@ async def begin_delete(
:type big_data_pool_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: Pass in True if you'd like the AsyncARMPolling polling method,
False for no polling, or your own initialized polling object for a personal polling strategy.
:keyword polling: By default, your polling method will be AsyncARMPolling.
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of AsyncLROPoller that returns either object or the result of cls(response)
:rtype: ~azure.core.polling.AsyncLROPoller[object]
:return: An instance of AsyncLROPoller that returns either any or the result of cls(response)
:rtype: ~azure.core.polling.AsyncLROPoller[any]
:raises ~azure.core.exceptions.HttpResponseError:
"""
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType[object]
cls = kwargs.pop('cls', None) # type: ClsType[Any]
lro_delay = kwargs.pop(
'polling_interval',
self._config.polling_interval
Expand Down Expand Up @@ -459,7 +459,7 @@ def list_by_workspace(
self,
resource_group_name: str,
workspace_name: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.BigDataPoolResourceInfoListResult"]:
"""List the Big Data pools in a workspace.

Expand All @@ -479,7 +479,7 @@ def list_by_workspace(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-03-01"
api_version = "2021-05-01"
accept = "application/json"

def prepare_request(next_link=None):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async def create_or_update(
workspace_name: str,
sql_pool_name: str,
parameters: "_models.DataMaskingPolicy",
**kwargs
**kwargs: Any
) -> "_models.DataMaskingPolicy":
"""Creates or updates a Sql pool data masking policy.

Expand All @@ -68,7 +68,7 @@ async def create_or_update(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-03-01"
api_version = "2021-05-01"
data_masking_policy_name = "Default"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
Expand Down Expand Up @@ -118,7 +118,7 @@ async def get(
resource_group_name: str,
workspace_name: str,
sql_pool_name: str,
**kwargs
**kwargs: Any
) -> "_models.DataMaskingPolicy":
"""Gets a Sql pool data masking policy.

Expand All @@ -138,7 +138,7 @@ async def get(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-03-01"
api_version = "2021-05-01"
data_masking_policy_name = "Default"
accept = "application/json"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async def create_or_update(
sql_pool_name: str,
data_masking_rule_name: str,
parameters: "_models.DataMaskingRule",
**kwargs
**kwargs: Any
) -> "_models.DataMaskingRule":
"""Creates or updates a Sql pool data masking rule.

Expand All @@ -72,7 +72,7 @@ async def create_or_update(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-03-01"
api_version = "2021-05-01"
data_masking_policy_name = "Default"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
Expand Down Expand Up @@ -128,7 +128,7 @@ async def get(
workspace_name: str,
sql_pool_name: str,
data_masking_rule_name: str,
**kwargs
**kwargs: Any
) -> "_models.DataMaskingRule":
"""Gets the specific Sql pool data masking rule.

Expand All @@ -150,7 +150,7 @@ async def get(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-03-01"
api_version = "2021-05-01"
data_masking_policy_name = "Default"
accept = "application/json"

Expand Down Expand Up @@ -196,7 +196,7 @@ def list_by_sql_pool(
resource_group_name: str,
workspace_name: str,
sql_pool_name: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.DataMaskingRuleListResult"]:
"""Gets a list of Sql pool data masking rules.

Expand All @@ -216,7 +216,7 @@ def list_by_sql_pool(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-03-01"
api_version = "2021-05-01"
data_masking_policy_name = "Default"
accept = "application/json"

Expand Down
Loading