From 7cbaf9cbb7a419544414e95c10c597cc07a573ec Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Mon, 17 Aug 2020 13:50:26 +0000 Subject: [PATCH] Update from master --- .../mgmt/appconfiguration/_configuration.py | 2 +- .../mgmt/appconfiguration/_metadata.json | 4 +- .../azure/mgmt/appconfiguration/_version.py | 2 +- .../aio/_configuration_async.py | 2 +- .../_configuration_stores_operations_async.py | 80 +++++++++---------- .../aio/operations_async/_operations_async.py | 17 ++-- ...e_endpoint_connections_operations_async.py | 36 ++++----- ...private_link_resources_operations_async.py | 17 ++-- .../_configuration_stores_operations.py | 68 +++++++--------- .../operations/_operations.py | 17 ++-- ...private_endpoint_connections_operations.py | 28 +++---- .../_private_link_resources_operations.py | 17 ++-- 12 files changed, 131 insertions(+), 159 deletions(-) diff --git a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/_configuration.py b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/_configuration.py index 5eb57d1e1aa6..d99090d22b3c 100644 --- a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/_configuration.py +++ b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/_configuration.py @@ -47,7 +47,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2019-11-01-preview" + self.api_version = "2020-06-01" self.credential_scopes = ['https://management.azure.com/.default'] self.credential_scopes.extend(kwargs.pop('credential_scopes', [])) kwargs.setdefault('sdk_moniker', 'mgmt-appconfiguration/{}'.format(VERSION)) diff --git a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/_metadata.json b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/_metadata.json index da2081174409..be7d68bcf35a 100644 --- a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/_metadata.json +++ b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/_metadata.json @@ -1,6 +1,6 @@ { - "chosen_version": "2019-11-01-preview", - "total_api_version_list": ["2019-11-01-preview"], + "chosen_version": "2020-06-01", + "total_api_version_list": ["2020-06-01"], "client": { "name": "AppConfigurationManagementClient", "filename": "_app_configuration_management_client", diff --git a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/_version.py b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/_version.py index e5754a47ce68..eae7c95b6fbd 100644 --- a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/_version.py +++ b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b1" +VERSION = "0.1.0" diff --git a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/aio/_configuration_async.py b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/aio/_configuration_async.py index cde6efa24eba..a58aa8c2e3d4 100644 --- a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/aio/_configuration_async.py +++ b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/aio/_configuration_async.py @@ -44,7 +44,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2019-11-01-preview" + self.api_version = "2020-06-01" self.credential_scopes = ['https://management.azure.com/.default'] self.credential_scopes.extend(kwargs.pop('credential_scopes', [])) kwargs.setdefault('sdk_moniker', 'mgmt-appconfiguration/{}'.format(VERSION)) diff --git a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/aio/operations_async/_configuration_stores_operations_async.py b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/aio/operations_async/_configuration_stores_operations_async.py index 370de91c916d..b5a146be0d3c 100644 --- a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/aio/operations_async/_configuration_stores_operations_async.py +++ b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/aio/operations_async/_configuration_stores_operations_async.py @@ -63,9 +63,13 @@ def list( cls = kwargs.pop('cls', None) # type: ClsType["models.ConfigurationStoreListResult"] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2020-06-01" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + if not next_link: # Construct URL url = self.list.metadata['url'] # type: ignore @@ -79,15 +83,11 @@ def prepare_request(next_link=None): if skip_token is not None: query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link query_parameters = {} # type: Dict[str, Any] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): @@ -139,9 +139,13 @@ def list_by_resource_group( cls = kwargs.pop('cls', None) # type: ClsType["models.ConfigurationStoreListResult"] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2020-06-01" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] # type: ignore @@ -156,15 +160,11 @@ def prepare_request(next_link=None): if skip_token is not None: query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link query_parameters = {} # type: Dict[str, Any] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): @@ -213,7 +213,7 @@ async def get( cls = kwargs.pop('cls', None) # type: ClsType["models.ConfigurationStore"] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2020-06-01" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -232,7 +232,6 @@ async def get( header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = 'application/json' - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -260,7 +259,7 @@ async def _create_initial( cls = kwargs.pop('cls', None) # type: ClsType["models.ConfigurationStore"] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2020-06-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -281,7 +280,6 @@ async def _create_initial( header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = 'application/json' - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(config_store_creation_parameters, 'ConfigurationStore') body_content_kwargs['content'] = body_content @@ -295,7 +293,6 @@ async def _create_initial( error = self._deserialize(models.Error, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('ConfigurationStore', pipeline_response) @@ -314,7 +311,7 @@ async def begin_create( config_store_name: str, config_store_creation_parameters: "models.ConfigurationStore", **kwargs - ) -> "models.ConfigurationStore": + ) -> AsyncLROPoller["models.ConfigurationStore"]: """Creates a configuration store with the specified parameters. :param resource_group_name: The name of the resource group to which the container registry @@ -330,8 +327,8 @@ async def begin_create( polling object for 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: ConfigurationStore, or the result of cls(response) - :rtype: ~app_configuration_management_client.models.ConfigurationStore + :return: An instance of AsyncLROPoller that returns either ConfigurationStore or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~app_configuration_management_client.models.ConfigurationStore] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -383,7 +380,7 @@ async def _delete_initial( cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2020-06-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -401,7 +398,6 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -421,7 +417,7 @@ async def begin_delete( resource_group_name: str, config_store_name: str, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """Deletes a configuration store. :param resource_group_name: The name of the resource group to which the container registry @@ -435,8 +431,8 @@ async def begin_delete( polling object for 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: None, or the result of cls(response) - :rtype: None + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -485,7 +481,7 @@ async def _update_initial( cls = kwargs.pop('cls', None) # type: ClsType["models.ConfigurationStore"] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2020-06-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -506,7 +502,6 @@ async def _update_initial( header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = 'application/json' - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(config_store_update_parameters, 'ConfigurationStoreUpdateParameters') body_content_kwargs['content'] = body_content @@ -520,7 +515,6 @@ async def _update_initial( error = self._deserialize(models.Error, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('ConfigurationStore', pipeline_response) @@ -539,7 +533,7 @@ async def begin_update( config_store_name: str, config_store_update_parameters: "models.ConfigurationStoreUpdateParameters", **kwargs - ) -> "models.ConfigurationStore": + ) -> AsyncLROPoller["models.ConfigurationStore"]: """Updates a configuration store with the specified parameters. :param resource_group_name: The name of the resource group to which the container registry @@ -555,8 +549,8 @@ async def begin_update( polling object for 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: ConfigurationStore, or the result of cls(response) - :rtype: ~app_configuration_management_client.models.ConfigurationStore + :return: An instance of AsyncLROPoller that returns either ConfigurationStore or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~app_configuration_management_client.models.ConfigurationStore] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -626,9 +620,13 @@ def list_keys( cls = kwargs.pop('cls', None) # type: ClsType["models.ApiKeyListResult"] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2020-06-01" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + if not next_link: # Construct URL url = self.list_keys.metadata['url'] # type: ignore @@ -644,15 +642,11 @@ def prepare_request(next_link=None): if skip_token is not None: query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + request = self._client.post(url, query_parameters, header_parameters) else: url = next_link query_parameters = {} # type: Dict[str, Any] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): @@ -704,7 +698,7 @@ async def regenerate_key( cls = kwargs.pop('cls', None) # type: ClsType["models.ApiKey"] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2020-06-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -725,7 +719,6 @@ async def regenerate_key( header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = 'application/json' - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(regenerate_key_parameters, 'RegenerateKeyParameters') body_content_kwargs['content'] = body_content @@ -771,7 +764,7 @@ async def list_key_value( cls = kwargs.pop('cls', None) # type: ClsType["models.KeyValue"] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2020-06-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -792,7 +785,6 @@ async def list_key_value( header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = 'application/json' - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(list_key_value_parameters, 'ListKeyValueParameters') body_content_kwargs['content'] = body_content diff --git a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/aio/operations_async/_operations_async.py b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/aio/operations_async/_operations_async.py index a506909a9f92..543f7d7eca56 100644 --- a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/aio/operations_async/_operations_async.py +++ b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/aio/operations_async/_operations_async.py @@ -59,7 +59,7 @@ async def check_name_availability( cls = kwargs.pop('cls', None) # type: ClsType["models.NameAvailabilityStatus"] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2020-06-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -78,7 +78,6 @@ async def check_name_availability( header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = 'application/json' - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(check_name_availability_parameters, 'CheckNameAvailabilityParameters') body_content_kwargs['content'] = body_content @@ -120,9 +119,13 @@ def list( cls = kwargs.pop('cls', None) # type: ClsType["models.OperationDefinitionListResult"] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2020-06-01" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + if not next_link: # Construct URL url = self.list.metadata['url'] # type: ignore @@ -132,15 +135,11 @@ def prepare_request(next_link=None): if skip_token is not None: query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link query_parameters = {} # type: Dict[str, Any] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): diff --git a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/aio/operations_async/_private_endpoint_connections_operations_async.py b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/aio/operations_async/_private_endpoint_connections_operations_async.py index 3ef13f029fb6..df1db8a2dadf 100644 --- a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/aio/operations_async/_private_endpoint_connections_operations_async.py +++ b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/aio/operations_async/_private_endpoint_connections_operations_async.py @@ -64,9 +64,13 @@ def list_by_configuration_store( cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnectionListResult"] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2020-06-01" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + if not next_link: # Construct URL url = self.list_by_configuration_store.metadata['url'] # type: ignore @@ -80,15 +84,11 @@ def prepare_request(next_link=None): query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link query_parameters = {} # type: Dict[str, Any] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): @@ -140,7 +140,7 @@ async def get( cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2020-06-01" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -160,7 +160,6 @@ async def get( header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = 'application/json' - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -189,7 +188,7 @@ async def _create_or_update_initial( cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2020-06-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -211,7 +210,6 @@ async def _create_or_update_initial( header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = 'application/json' - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(private_endpoint_connection, 'PrivateEndpointConnection') body_content_kwargs['content'] = body_content @@ -225,7 +223,6 @@ async def _create_or_update_initial( error = self._deserialize(models.Error, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) @@ -245,7 +242,7 @@ async def begin_create_or_update( private_endpoint_connection_name: str, private_endpoint_connection: "models.PrivateEndpointConnection", **kwargs - ) -> "models.PrivateEndpointConnection": + ) -> AsyncLROPoller["models.PrivateEndpointConnection"]: """Update the state of the specified private endpoint connection associated with the configuration store. @@ -264,8 +261,8 @@ async def begin_create_or_update( polling object for 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: PrivateEndpointConnection, or the result of cls(response) - :rtype: ~app_configuration_management_client.models.PrivateEndpointConnection + :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~app_configuration_management_client.models.PrivateEndpointConnection] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -319,7 +316,7 @@ async def _delete_initial( cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2020-06-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -338,7 +335,6 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -359,7 +355,7 @@ async def begin_delete( config_store_name: str, private_endpoint_connection_name: str, **kwargs - ) -> None: + ) -> AsyncLROPoller[None]: """Deletes a private endpoint connection. :param resource_group_name: The name of the resource group to which the container registry @@ -375,8 +371,8 @@ async def begin_delete( polling object for 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: None, or the result of cls(response) - :rtype: None + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] diff --git a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/aio/operations_async/_private_link_resources_operations_async.py b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/aio/operations_async/_private_link_resources_operations_async.py index 488d8dad289c..1570331b1250 100644 --- a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/aio/operations_async/_private_link_resources_operations_async.py +++ b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/aio/operations_async/_private_link_resources_operations_async.py @@ -62,9 +62,13 @@ def list_by_configuration_store( cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateLinkResourceListResult"] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2020-06-01" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + if not next_link: # Construct URL url = self.list_by_configuration_store.metadata['url'] # type: ignore @@ -78,15 +82,11 @@ def prepare_request(next_link=None): query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link query_parameters = {} # type: Dict[str, Any] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): @@ -138,7 +138,7 @@ async def get( cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateLinkResource"] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2020-06-01" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -158,7 +158,6 @@ async def get( header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = 'application/json' - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response diff --git a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_configuration_stores_operations.py b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_configuration_stores_operations.py index 145f4969edc3..e06d8317d9b3 100644 --- a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_configuration_stores_operations.py +++ b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_configuration_stores_operations.py @@ -68,9 +68,13 @@ def list( cls = kwargs.pop('cls', None) # type: ClsType["models.ConfigurationStoreListResult"] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2020-06-01" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + if not next_link: # Construct URL url = self.list.metadata['url'] # type: ignore @@ -84,15 +88,11 @@ def prepare_request(next_link=None): if skip_token is not None: query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link query_parameters = {} # type: Dict[str, Any] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): @@ -145,9 +145,13 @@ def list_by_resource_group( cls = kwargs.pop('cls', None) # type: ClsType["models.ConfigurationStoreListResult"] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2020-06-01" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] # type: ignore @@ -162,15 +166,11 @@ def prepare_request(next_link=None): if skip_token is not None: query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link query_parameters = {} # type: Dict[str, Any] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): @@ -220,7 +220,7 @@ def get( cls = kwargs.pop('cls', None) # type: ClsType["models.ConfigurationStore"] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2020-06-01" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -239,7 +239,6 @@ def get( header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = 'application/json' - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -268,7 +267,7 @@ def _create_initial( cls = kwargs.pop('cls', None) # type: ClsType["models.ConfigurationStore"] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2020-06-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -289,7 +288,6 @@ def _create_initial( header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = 'application/json' - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(config_store_creation_parameters, 'ConfigurationStore') body_content_kwargs['content'] = body_content @@ -303,7 +301,6 @@ def _create_initial( error = self._deserialize(models.Error, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('ConfigurationStore', pipeline_response) @@ -323,7 +320,7 @@ def begin_create( config_store_creation_parameters, # type: "models.ConfigurationStore" **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.ConfigurationStore"] """Creates a configuration store with the specified parameters. :param resource_group_name: The name of the resource group to which the container registry @@ -393,7 +390,7 @@ def _delete_initial( cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2020-06-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -411,7 +408,6 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -432,7 +428,7 @@ def begin_delete( config_store_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[None] """Deletes a configuration store. :param resource_group_name: The name of the resource group to which the container registry @@ -497,7 +493,7 @@ def _update_initial( cls = kwargs.pop('cls', None) # type: ClsType["models.ConfigurationStore"] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2020-06-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -518,7 +514,6 @@ def _update_initial( header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = 'application/json' - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(config_store_update_parameters, 'ConfigurationStoreUpdateParameters') body_content_kwargs['content'] = body_content @@ -532,7 +527,6 @@ def _update_initial( error = self._deserialize(models.Error, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('ConfigurationStore', pipeline_response) @@ -552,7 +546,7 @@ def begin_update( config_store_update_parameters, # type: "models.ConfigurationStoreUpdateParameters" **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.ConfigurationStore"] """Updates a configuration store with the specified parameters. :param resource_group_name: The name of the resource group to which the container registry @@ -640,9 +634,13 @@ def list_keys( cls = kwargs.pop('cls', None) # type: ClsType["models.ApiKeyListResult"] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2020-06-01" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + if not next_link: # Construct URL url = self.list_keys.metadata['url'] # type: ignore @@ -658,15 +656,11 @@ def prepare_request(next_link=None): if skip_token is not None: query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + request = self._client.post(url, query_parameters, header_parameters) else: url = next_link query_parameters = {} # type: Dict[str, Any] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): @@ -719,7 +713,7 @@ def regenerate_key( cls = kwargs.pop('cls', None) # type: ClsType["models.ApiKey"] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2020-06-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -740,7 +734,6 @@ def regenerate_key( header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = 'application/json' - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(regenerate_key_parameters, 'RegenerateKeyParameters') body_content_kwargs['content'] = body_content @@ -787,7 +780,7 @@ def list_key_value( cls = kwargs.pop('cls', None) # type: ClsType["models.KeyValue"] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2020-06-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -808,7 +801,6 @@ def list_key_value( header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = 'application/json' - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(list_key_value_parameters, 'ListKeyValueParameters') body_content_kwargs['content'] = body_content diff --git a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_operations.py b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_operations.py index ca9147a51697..94e45496d298 100644 --- a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_operations.py +++ b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_operations.py @@ -64,7 +64,7 @@ def check_name_availability( cls = kwargs.pop('cls', None) # type: ClsType["models.NameAvailabilityStatus"] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2020-06-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -83,7 +83,6 @@ def check_name_availability( header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = 'application/json' - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(check_name_availability_parameters, 'CheckNameAvailabilityParameters') body_content_kwargs['content'] = body_content @@ -126,9 +125,13 @@ def list( cls = kwargs.pop('cls', None) # type: ClsType["models.OperationDefinitionListResult"] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2020-06-01" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + if not next_link: # Construct URL url = self.list.metadata['url'] # type: ignore @@ -138,15 +141,11 @@ def prepare_request(next_link=None): if skip_token is not None: query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link query_parameters = {} # type: Dict[str, Any] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): diff --git a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_private_endpoint_connections_operations.py b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_private_endpoint_connections_operations.py index 48f646c5dd56..651d348dce2f 100644 --- a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_private_endpoint_connections_operations.py +++ b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_private_endpoint_connections_operations.py @@ -69,9 +69,13 @@ def list_by_configuration_store( cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnectionListResult"] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2020-06-01" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + if not next_link: # Construct URL url = self.list_by_configuration_store.metadata['url'] # type: ignore @@ -85,15 +89,11 @@ def prepare_request(next_link=None): query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link query_parameters = {} # type: Dict[str, Any] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): @@ -146,7 +146,7 @@ def get( cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2020-06-01" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -166,7 +166,6 @@ def get( header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = 'application/json' - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -196,7 +195,7 @@ def _create_or_update_initial( cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2020-06-01" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -218,7 +217,6 @@ def _create_or_update_initial( header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = 'application/json' - # Construct and send request body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(private_endpoint_connection, 'PrivateEndpointConnection') body_content_kwargs['content'] = body_content @@ -232,7 +230,6 @@ def _create_or_update_initial( error = self._deserialize(models.Error, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) @@ -253,7 +250,7 @@ def begin_create_or_update( private_endpoint_connection, # type: "models.PrivateEndpointConnection" **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller["models.PrivateEndpointConnection"] """Update the state of the specified private endpoint connection associated with the configuration store. @@ -328,7 +325,7 @@ def _delete_initial( cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2020-06-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -347,7 +344,6 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -369,7 +365,7 @@ def begin_delete( private_endpoint_connection_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller + # type: (...) -> LROPoller[None] """Deletes a private endpoint connection. :param resource_group_name: The name of the resource group to which the container registry diff --git a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_private_link_resources_operations.py b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_private_link_resources_operations.py index 20feb4554a19..3a4da3e6490d 100644 --- a/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_private_link_resources_operations.py +++ b/sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/operations/_private_link_resources_operations.py @@ -67,9 +67,13 @@ def list_by_configuration_store( cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateLinkResourceListResult"] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2020-06-01" def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + if not next_link: # Construct URL url = self.list_by_configuration_store.metadata['url'] # type: ignore @@ -83,15 +87,11 @@ def prepare_request(next_link=None): query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request = self._client.get(url, query_parameters, header_parameters) else: url = next_link query_parameters = {} # type: Dict[str, Any] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): @@ -144,7 +144,7 @@ def get( cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateLinkResource"] error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-11-01-preview" + api_version = "2020-06-01" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -164,7 +164,6 @@ def get( header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = 'application/json' - # Construct and send request request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response