diff --git a/sdk/rdbms/azure-mgmt-rdbms/CHANGELOG.md b/sdk/rdbms/azure-mgmt-rdbms/CHANGELOG.md index 886e8cae4e1b..0da773b0e53a 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/CHANGELOG.md +++ b/sdk/rdbms/azure-mgmt-rdbms/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History +## 8.0.0 (2020-12-28) + +- GA release + ## 8.0.0b1 (2020-11-05) This is beta preview version. diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure-mgmt-rdbms-1.9.0.zip b/sdk/rdbms/azure-mgmt-rdbms/azure-mgmt-rdbms-1.9.0.zip deleted file mode 100644 index d15f2456b682..000000000000 Binary files a/sdk/rdbms/azure-mgmt-rdbms/azure-mgmt-rdbms-1.9.0.zip and /dev/null differ diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure-mgmt-rdbms-2.0.0.zip b/sdk/rdbms/azure-mgmt-rdbms/azure-mgmt-rdbms-2.0.0.zip deleted file mode 100644 index f85ab4de229a..000000000000 Binary files a/sdk/rdbms/azure-mgmt-rdbms/azure-mgmt-rdbms-2.0.0.zip and /dev/null differ diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/_version.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/_version.py index 82b28d01aba7..b56384cd4633 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/_version.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/_version.py @@ -5,4 +5,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "8.0.0b1" +VERSION = "8.0.0" diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/_maria_db_management_client.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/_maria_db_management_client.py index 269909418414..1f4921e7f690 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/_maria_db_management_client.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/_maria_db_management_client.py @@ -24,15 +24,18 @@ from .operations import VirtualNetworkRulesOperations from .operations import DatabasesOperations from .operations import ConfigurationsOperations +from .operations import ServerParametersOperations from .operations import LogFilesOperations +from .operations import RecoverableServersOperations +from .operations import ServerBasedPerformanceTierOperations from .operations import LocationBasedPerformanceTierOperations from .operations import CheckNameAvailabilityOperations from .operations import Operations from .operations import QueryTextsOperations from .operations import TopQueryStatisticsOperations from .operations import WaitStatisticsOperations -from .operations import AdvisorsOperations from .operations import MariaDBManagementClientOperationsMixin +from .operations import AdvisorsOperations from .operations import RecommendedActionsOperations from .operations import LocationBasedRecommendedActionSessionsOperationStatusOperations from .operations import LocationBasedRecommendedActionSessionsResultOperations @@ -46,45 +49,51 @@ class MariaDBManagementClient(MariaDBManagementClientOperationsMixin): """The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MariaDB resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business model. :ivar servers: ServersOperations operations - :vartype servers: maria_db_management_client.operations.ServersOperations + :vartype servers: azure.mgmt.rdbms.mariadb.operations.ServersOperations :ivar replicas: ReplicasOperations operations - :vartype replicas: maria_db_management_client.operations.ReplicasOperations + :vartype replicas: azure.mgmt.rdbms.mariadb.operations.ReplicasOperations :ivar firewall_rules: FirewallRulesOperations operations - :vartype firewall_rules: maria_db_management_client.operations.FirewallRulesOperations + :vartype firewall_rules: azure.mgmt.rdbms.mariadb.operations.FirewallRulesOperations :ivar virtual_network_rules: VirtualNetworkRulesOperations operations - :vartype virtual_network_rules: maria_db_management_client.operations.VirtualNetworkRulesOperations + :vartype virtual_network_rules: azure.mgmt.rdbms.mariadb.operations.VirtualNetworkRulesOperations :ivar databases: DatabasesOperations operations - :vartype databases: maria_db_management_client.operations.DatabasesOperations + :vartype databases: azure.mgmt.rdbms.mariadb.operations.DatabasesOperations :ivar configurations: ConfigurationsOperations operations - :vartype configurations: maria_db_management_client.operations.ConfigurationsOperations + :vartype configurations: azure.mgmt.rdbms.mariadb.operations.ConfigurationsOperations + :ivar server_parameters: ServerParametersOperations operations + :vartype server_parameters: azure.mgmt.rdbms.mariadb.operations.ServerParametersOperations :ivar log_files: LogFilesOperations operations - :vartype log_files: maria_db_management_client.operations.LogFilesOperations + :vartype log_files: azure.mgmt.rdbms.mariadb.operations.LogFilesOperations + :ivar recoverable_servers: RecoverableServersOperations operations + :vartype recoverable_servers: azure.mgmt.rdbms.mariadb.operations.RecoverableServersOperations + :ivar server_based_performance_tier: ServerBasedPerformanceTierOperations operations + :vartype server_based_performance_tier: azure.mgmt.rdbms.mariadb.operations.ServerBasedPerformanceTierOperations :ivar location_based_performance_tier: LocationBasedPerformanceTierOperations operations - :vartype location_based_performance_tier: maria_db_management_client.operations.LocationBasedPerformanceTierOperations + :vartype location_based_performance_tier: azure.mgmt.rdbms.mariadb.operations.LocationBasedPerformanceTierOperations :ivar check_name_availability: CheckNameAvailabilityOperations operations - :vartype check_name_availability: maria_db_management_client.operations.CheckNameAvailabilityOperations + :vartype check_name_availability: azure.mgmt.rdbms.mariadb.operations.CheckNameAvailabilityOperations :ivar operations: Operations operations - :vartype operations: maria_db_management_client.operations.Operations + :vartype operations: azure.mgmt.rdbms.mariadb.operations.Operations :ivar query_texts: QueryTextsOperations operations - :vartype query_texts: maria_db_management_client.operations.QueryTextsOperations + :vartype query_texts: azure.mgmt.rdbms.mariadb.operations.QueryTextsOperations :ivar top_query_statistics: TopQueryStatisticsOperations operations - :vartype top_query_statistics: maria_db_management_client.operations.TopQueryStatisticsOperations + :vartype top_query_statistics: azure.mgmt.rdbms.mariadb.operations.TopQueryStatisticsOperations :ivar wait_statistics: WaitStatisticsOperations operations - :vartype wait_statistics: maria_db_management_client.operations.WaitStatisticsOperations + :vartype wait_statistics: azure.mgmt.rdbms.mariadb.operations.WaitStatisticsOperations :ivar advisors: AdvisorsOperations operations - :vartype advisors: maria_db_management_client.operations.AdvisorsOperations + :vartype advisors: azure.mgmt.rdbms.mariadb.operations.AdvisorsOperations :ivar recommended_actions: RecommendedActionsOperations operations - :vartype recommended_actions: maria_db_management_client.operations.RecommendedActionsOperations + :vartype recommended_actions: azure.mgmt.rdbms.mariadb.operations.RecommendedActionsOperations :ivar location_based_recommended_action_sessions_operation_status: LocationBasedRecommendedActionSessionsOperationStatusOperations operations - :vartype location_based_recommended_action_sessions_operation_status: maria_db_management_client.operations.LocationBasedRecommendedActionSessionsOperationStatusOperations + :vartype location_based_recommended_action_sessions_operation_status: azure.mgmt.rdbms.mariadb.operations.LocationBasedRecommendedActionSessionsOperationStatusOperations :ivar location_based_recommended_action_sessions_result: LocationBasedRecommendedActionSessionsResultOperations operations - :vartype location_based_recommended_action_sessions_result: maria_db_management_client.operations.LocationBasedRecommendedActionSessionsResultOperations + :vartype location_based_recommended_action_sessions_result: azure.mgmt.rdbms.mariadb.operations.LocationBasedRecommendedActionSessionsResultOperations :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations - :vartype private_endpoint_connections: maria_db_management_client.operations.PrivateEndpointConnectionsOperations + :vartype private_endpoint_connections: azure.mgmt.rdbms.mariadb.operations.PrivateEndpointConnectionsOperations :ivar private_link_resources: PrivateLinkResourcesOperations operations - :vartype private_link_resources: maria_db_management_client.operations.PrivateLinkResourcesOperations + :vartype private_link_resources: azure.mgmt.rdbms.mariadb.operations.PrivateLinkResourcesOperations :ivar server_security_alert_policies: ServerSecurityAlertPoliciesOperations operations - :vartype server_security_alert_policies: maria_db_management_client.operations.ServerSecurityAlertPoliciesOperations + :vartype server_security_alert_policies: azure.mgmt.rdbms.mariadb.operations.ServerSecurityAlertPoliciesOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. @@ -123,8 +132,14 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.configurations = ConfigurationsOperations( self._client, self._config, self._serialize, self._deserialize) + self.server_parameters = ServerParametersOperations( + self._client, self._config, self._serialize, self._deserialize) self.log_files = LogFilesOperations( self._client, self._config, self._serialize, self._deserialize) + self.recoverable_servers = RecoverableServersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.server_based_performance_tier = ServerBasedPerformanceTierOperations( + self._client, self._config, self._serialize, self._deserialize) self.location_based_performance_tier = LocationBasedPerformanceTierOperations( self._client, self._config, self._serialize, self._deserialize) self.check_name_availability = CheckNameAvailabilityOperations( diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/_version.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/_version.py deleted file mode 100644 index 7cf3ebf6b364..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/_version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "8.0.0b1" - diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/_maria_db_management_client.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/_maria_db_management_client.py index 24874235ede1..0e15a045002a 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/_maria_db_management_client.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/_maria_db_management_client.py @@ -22,15 +22,18 @@ from .operations import VirtualNetworkRulesOperations from .operations import DatabasesOperations from .operations import ConfigurationsOperations +from .operations import ServerParametersOperations from .operations import LogFilesOperations +from .operations import RecoverableServersOperations +from .operations import ServerBasedPerformanceTierOperations from .operations import LocationBasedPerformanceTierOperations from .operations import CheckNameAvailabilityOperations from .operations import Operations from .operations import QueryTextsOperations from .operations import TopQueryStatisticsOperations from .operations import WaitStatisticsOperations -from .operations import AdvisorsOperations from .operations import MariaDBManagementClientOperationsMixin +from .operations import AdvisorsOperations from .operations import RecommendedActionsOperations from .operations import LocationBasedRecommendedActionSessionsOperationStatusOperations from .operations import LocationBasedRecommendedActionSessionsResultOperations @@ -44,45 +47,51 @@ class MariaDBManagementClient(MariaDBManagementClientOperationsMixin): """The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MariaDB resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business model. :ivar servers: ServersOperations operations - :vartype servers: maria_db_management_client.aio.operations.ServersOperations + :vartype servers: azure.mgmt.rdbms.mariadb.aio.operations.ServersOperations :ivar replicas: ReplicasOperations operations - :vartype replicas: maria_db_management_client.aio.operations.ReplicasOperations + :vartype replicas: azure.mgmt.rdbms.mariadb.aio.operations.ReplicasOperations :ivar firewall_rules: FirewallRulesOperations operations - :vartype firewall_rules: maria_db_management_client.aio.operations.FirewallRulesOperations + :vartype firewall_rules: azure.mgmt.rdbms.mariadb.aio.operations.FirewallRulesOperations :ivar virtual_network_rules: VirtualNetworkRulesOperations operations - :vartype virtual_network_rules: maria_db_management_client.aio.operations.VirtualNetworkRulesOperations + :vartype virtual_network_rules: azure.mgmt.rdbms.mariadb.aio.operations.VirtualNetworkRulesOperations :ivar databases: DatabasesOperations operations - :vartype databases: maria_db_management_client.aio.operations.DatabasesOperations + :vartype databases: azure.mgmt.rdbms.mariadb.aio.operations.DatabasesOperations :ivar configurations: ConfigurationsOperations operations - :vartype configurations: maria_db_management_client.aio.operations.ConfigurationsOperations + :vartype configurations: azure.mgmt.rdbms.mariadb.aio.operations.ConfigurationsOperations + :ivar server_parameters: ServerParametersOperations operations + :vartype server_parameters: azure.mgmt.rdbms.mariadb.aio.operations.ServerParametersOperations :ivar log_files: LogFilesOperations operations - :vartype log_files: maria_db_management_client.aio.operations.LogFilesOperations + :vartype log_files: azure.mgmt.rdbms.mariadb.aio.operations.LogFilesOperations + :ivar recoverable_servers: RecoverableServersOperations operations + :vartype recoverable_servers: azure.mgmt.rdbms.mariadb.aio.operations.RecoverableServersOperations + :ivar server_based_performance_tier: ServerBasedPerformanceTierOperations operations + :vartype server_based_performance_tier: azure.mgmt.rdbms.mariadb.aio.operations.ServerBasedPerformanceTierOperations :ivar location_based_performance_tier: LocationBasedPerformanceTierOperations operations - :vartype location_based_performance_tier: maria_db_management_client.aio.operations.LocationBasedPerformanceTierOperations + :vartype location_based_performance_tier: azure.mgmt.rdbms.mariadb.aio.operations.LocationBasedPerformanceTierOperations :ivar check_name_availability: CheckNameAvailabilityOperations operations - :vartype check_name_availability: maria_db_management_client.aio.operations.CheckNameAvailabilityOperations + :vartype check_name_availability: azure.mgmt.rdbms.mariadb.aio.operations.CheckNameAvailabilityOperations :ivar operations: Operations operations - :vartype operations: maria_db_management_client.aio.operations.Operations + :vartype operations: azure.mgmt.rdbms.mariadb.aio.operations.Operations :ivar query_texts: QueryTextsOperations operations - :vartype query_texts: maria_db_management_client.aio.operations.QueryTextsOperations + :vartype query_texts: azure.mgmt.rdbms.mariadb.aio.operations.QueryTextsOperations :ivar top_query_statistics: TopQueryStatisticsOperations operations - :vartype top_query_statistics: maria_db_management_client.aio.operations.TopQueryStatisticsOperations + :vartype top_query_statistics: azure.mgmt.rdbms.mariadb.aio.operations.TopQueryStatisticsOperations :ivar wait_statistics: WaitStatisticsOperations operations - :vartype wait_statistics: maria_db_management_client.aio.operations.WaitStatisticsOperations + :vartype wait_statistics: azure.mgmt.rdbms.mariadb.aio.operations.WaitStatisticsOperations :ivar advisors: AdvisorsOperations operations - :vartype advisors: maria_db_management_client.aio.operations.AdvisorsOperations + :vartype advisors: azure.mgmt.rdbms.mariadb.aio.operations.AdvisorsOperations :ivar recommended_actions: RecommendedActionsOperations operations - :vartype recommended_actions: maria_db_management_client.aio.operations.RecommendedActionsOperations + :vartype recommended_actions: azure.mgmt.rdbms.mariadb.aio.operations.RecommendedActionsOperations :ivar location_based_recommended_action_sessions_operation_status: LocationBasedRecommendedActionSessionsOperationStatusOperations operations - :vartype location_based_recommended_action_sessions_operation_status: maria_db_management_client.aio.operations.LocationBasedRecommendedActionSessionsOperationStatusOperations + :vartype location_based_recommended_action_sessions_operation_status: azure.mgmt.rdbms.mariadb.aio.operations.LocationBasedRecommendedActionSessionsOperationStatusOperations :ivar location_based_recommended_action_sessions_result: LocationBasedRecommendedActionSessionsResultOperations operations - :vartype location_based_recommended_action_sessions_result: maria_db_management_client.aio.operations.LocationBasedRecommendedActionSessionsResultOperations + :vartype location_based_recommended_action_sessions_result: azure.mgmt.rdbms.mariadb.aio.operations.LocationBasedRecommendedActionSessionsResultOperations :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations - :vartype private_endpoint_connections: maria_db_management_client.aio.operations.PrivateEndpointConnectionsOperations + :vartype private_endpoint_connections: azure.mgmt.rdbms.mariadb.aio.operations.PrivateEndpointConnectionsOperations :ivar private_link_resources: PrivateLinkResourcesOperations operations - :vartype private_link_resources: maria_db_management_client.aio.operations.PrivateLinkResourcesOperations + :vartype private_link_resources: azure.mgmt.rdbms.mariadb.aio.operations.PrivateLinkResourcesOperations :ivar server_security_alert_policies: ServerSecurityAlertPoliciesOperations operations - :vartype server_security_alert_policies: maria_db_management_client.aio.operations.ServerSecurityAlertPoliciesOperations + :vartype server_security_alert_policies: azure.mgmt.rdbms.mariadb.aio.operations.ServerSecurityAlertPoliciesOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. @@ -120,8 +129,14 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.configurations = ConfigurationsOperations( self._client, self._config, self._serialize, self._deserialize) + self.server_parameters = ServerParametersOperations( + self._client, self._config, self._serialize, self._deserialize) self.log_files = LogFilesOperations( self._client, self._config, self._serialize, self._deserialize) + self.recoverable_servers = RecoverableServersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.server_based_performance_tier = ServerBasedPerformanceTierOperations( + self._client, self._config, self._serialize, self._deserialize) self.location_based_performance_tier = LocationBasedPerformanceTierOperations( self._client, self._config, self._serialize, self._deserialize) self.check_name_availability = CheckNameAvailabilityOperations( diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/__init__.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/__init__.py index 61910e206185..33ffedbabf7f 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/__init__.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/__init__.py @@ -12,15 +12,18 @@ from ._virtual_network_rules_operations import VirtualNetworkRulesOperations from ._databases_operations import DatabasesOperations from ._configurations_operations import ConfigurationsOperations +from ._server_parameters_operations import ServerParametersOperations from ._log_files_operations import LogFilesOperations +from ._recoverable_servers_operations import RecoverableServersOperations +from ._server_based_performance_tier_operations import ServerBasedPerformanceTierOperations from ._location_based_performance_tier_operations import LocationBasedPerformanceTierOperations from ._check_name_availability_operations import CheckNameAvailabilityOperations from ._operations import Operations from ._query_texts_operations import QueryTextsOperations from ._top_query_statistics_operations import TopQueryStatisticsOperations from ._wait_statistics_operations import WaitStatisticsOperations -from ._advisors_operations import AdvisorsOperations from ._maria_db_management_client_operations import MariaDBManagementClientOperationsMixin +from ._advisors_operations import AdvisorsOperations from ._recommended_actions_operations import RecommendedActionsOperations from ._location_based_recommended_action_sessions_operation_status_operations import LocationBasedRecommendedActionSessionsOperationStatusOperations from ._location_based_recommended_action_sessions_result_operations import LocationBasedRecommendedActionSessionsResultOperations @@ -35,15 +38,18 @@ 'VirtualNetworkRulesOperations', 'DatabasesOperations', 'ConfigurationsOperations', + 'ServerParametersOperations', 'LogFilesOperations', + 'RecoverableServersOperations', + 'ServerBasedPerformanceTierOperations', 'LocationBasedPerformanceTierOperations', 'CheckNameAvailabilityOperations', 'Operations', 'QueryTextsOperations', 'TopQueryStatisticsOperations', 'WaitStatisticsOperations', - 'AdvisorsOperations', 'MariaDBManagementClientOperationsMixin', + 'AdvisorsOperations', 'RecommendedActionsOperations', 'LocationBasedRecommendedActionSessionsOperationStatusOperations', 'LocationBasedRecommendedActionSessionsResultOperations', diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_advisors_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_advisors_operations.py index 7eb3c67dbcde..84d6e6c921e9 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_advisors_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_advisors_operations.py @@ -26,7 +26,7 @@ class AdvisorsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -58,7 +58,7 @@ async def get( :type advisor_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Advisor, or the result of cls(response) - :rtype: ~maria_db_management_client.models.Advisor + :rtype: ~azure.mgmt.rdbms.mariadb.models.Advisor :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Advisor"] @@ -117,7 +117,7 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AdvisorsResultList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~maria_db_management_client.models.AdvisorsResultList] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mariadb.models.AdvisorsResultList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AdvisorsResultList"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_check_name_availability_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_check_name_availability_operations.py index 8325a183fb95..fe80dcee5104 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_check_name_availability_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_check_name_availability_operations.py @@ -25,7 +25,7 @@ class CheckNameAvailabilityOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -49,10 +49,10 @@ async def execute( :param name_availability_request: The required parameters for checking if resource name is available. - :type name_availability_request: ~maria_db_management_client.models.NameAvailabilityRequest + :type name_availability_request: ~azure.mgmt.rdbms.mariadb.models.NameAvailabilityRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: NameAvailability, or the result of cls(response) - :rtype: ~maria_db_management_client.models.NameAvailability + :rtype: ~azure.mgmt.rdbms.mariadb.models.NameAvailability :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NameAvailability"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_configurations_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_configurations_operations.py index 48aa2a324053..35a100435eb2 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_configurations_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_configurations_operations.py @@ -28,7 +28,7 @@ class ConfigurationsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -117,7 +117,7 @@ async def begin_create_or_update( :param configuration_name: The name of the server configuration. :type configuration_name: str :param parameters: The required parameters for updating a server configuration. - :type parameters: ~maria_db_management_client.models.Configuration + :type parameters: ~azure.mgmt.rdbms.mariadb.models.Configuration :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: True for ARMPolling, False for no polling, or a @@ -125,7 +125,7 @@ async def begin_create_or_update( :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 Configuration or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~maria_db_management_client.models.Configuration] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mariadb.models.Configuration] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -193,7 +193,7 @@ async def get( :type configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Configuration, or the result of cls(response) - :rtype: ~maria_db_management_client.models.Configuration + :rtype: ~azure.mgmt.rdbms.mariadb.models.Configuration :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Configuration"] @@ -252,7 +252,7 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ConfigurationListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~maria_db_management_client.models.ConfigurationListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mariadb.models.ConfigurationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfigurationListResult"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_databases_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_databases_operations.py index 81bb137b06f8..da11cbfa53ec 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_databases_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_databases_operations.py @@ -28,7 +28,7 @@ class DatabasesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -120,7 +120,7 @@ async def begin_create_or_update( :param database_name: The name of the database. :type database_name: str :param parameters: The required parameters for creating or updating a database. - :type parameters: ~maria_db_management_client.models.Database + :type parameters: ~azure.mgmt.rdbms.mariadb.models.Database :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: True for ARMPolling, False for no polling, or a @@ -128,7 +128,7 @@ async def begin_create_or_update( :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 Database or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~maria_db_management_client.models.Database] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mariadb.models.Database] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -311,7 +311,7 @@ async def get( :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Database, or the result of cls(response) - :rtype: ~maria_db_management_client.models.Database + :rtype: ~azure.mgmt.rdbms.mariadb.models.Database :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Database"] @@ -370,7 +370,7 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DatabaseListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~maria_db_management_client.models.DatabaseListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mariadb.models.DatabaseListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseListResult"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_firewall_rules_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_firewall_rules_operations.py index bafa48421023..f21d0d1de644 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_firewall_rules_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_firewall_rules_operations.py @@ -28,7 +28,7 @@ class FirewallRulesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -120,7 +120,7 @@ async def begin_create_or_update( :param firewall_rule_name: The name of the server firewall rule. :type firewall_rule_name: str :param parameters: The required parameters for creating or updating a firewall rule. - :type parameters: ~maria_db_management_client.models.FirewallRule + :type parameters: ~azure.mgmt.rdbms.mariadb.models.FirewallRule :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: True for ARMPolling, False for no polling, or a @@ -128,7 +128,7 @@ async def begin_create_or_update( :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 FirewallRule or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~maria_db_management_client.models.FirewallRule] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mariadb.models.FirewallRule] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -311,7 +311,7 @@ async def get( :type firewall_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: FirewallRule, or the result of cls(response) - :rtype: ~maria_db_management_client.models.FirewallRule + :rtype: ~azure.mgmt.rdbms.mariadb.models.FirewallRule :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRule"] @@ -370,7 +370,7 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either FirewallRuleListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~maria_db_management_client.models.FirewallRuleListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mariadb.models.FirewallRuleListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRuleListResult"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_location_based_performance_tier_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_location_based_performance_tier_operations.py index c27d73ae4af9..9fa3e18ac34a 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_location_based_performance_tier_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_location_based_performance_tier_operations.py @@ -26,7 +26,7 @@ class LocationBasedPerformanceTierOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -52,7 +52,7 @@ def list( :type location_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerformanceTierListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~maria_db_management_client.models.PerformanceTierListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mariadb.models.PerformanceTierListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PerformanceTierListResult"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_location_based_recommended_action_sessions_operation_status_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_location_based_recommended_action_sessions_operation_status_operations.py index 590482485b79..ecdf27415255 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_location_based_recommended_action_sessions_operation_status_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_location_based_recommended_action_sessions_operation_status_operations.py @@ -25,7 +25,7 @@ class LocationBasedRecommendedActionSessionsOperationStatusOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -54,7 +54,7 @@ async def get( :type operation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendedActionSessionsOperationStatus, or the result of cls(response) - :rtype: ~maria_db_management_client.models.RecommendedActionSessionsOperationStatus + :rtype: ~azure.mgmt.rdbms.mariadb.models.RecommendedActionSessionsOperationStatus :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendedActionSessionsOperationStatus"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_location_based_recommended_action_sessions_result_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_location_based_recommended_action_sessions_result_operations.py index 7abacab8a998..8b3ab71b5590 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_location_based_recommended_action_sessions_result_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_location_based_recommended_action_sessions_result_operations.py @@ -26,7 +26,7 @@ class LocationBasedRecommendedActionSessionsResultOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -55,7 +55,7 @@ def list( :type operation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationActionsResultList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~maria_db_management_client.models.RecommendationActionsResultListor ~maria_db_management_client.models.RecommendationActionsResultList] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mariadb.models.RecommendationActionsResultListor ~azure.mgmt.rdbms.mariadb.models.RecommendationActionsResultList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationActionsResultList"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_log_files_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_log_files_operations.py index 63a92af8f275..39f44a9e768d 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_log_files_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_log_files_operations.py @@ -26,7 +26,7 @@ class LogFilesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -55,7 +55,7 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either LogFileListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~maria_db_management_client.models.LogFileListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mariadb.models.LogFileListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.LogFileListResult"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_maria_db_management_client_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_maria_db_management_client_operations.py index 736872281df2..2d3b99b523b1 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_maria_db_management_client_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_maria_db_management_client_operations.py @@ -22,6 +22,64 @@ class MariaDBManagementClientOperationsMixin: + async def reset_query_performance_insight_data( + self, + resource_group_name: str, + server_name: str, + **kwargs + ) -> "_models.QueryPerformanceInsightResetDataResult": + """Reset data for Query Performance Insight. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: QueryPerformanceInsightResetDataResult, or the result of cls(response) + :rtype: ~azure.mgmt.rdbms.mariadb.models.QueryPerformanceInsightResetDataResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.QueryPerformanceInsightResetDataResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2018-06-01" + accept = "application/json" + + # Construct URL + url = self.reset_query_performance_insight_data.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('QueryPerformanceInsightResetDataResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + reset_query_performance_insight_data.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/resetQueryPerformanceInsightData'} # type: ignore + async def _create_recommended_action_session_initial( self, resource_group_name: str, diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_operations.py index 6a7d54bef070..fc3837f14471 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_operations.py @@ -25,7 +25,7 @@ class Operations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -48,7 +48,7 @@ async def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: OperationListResult, or the result of cls(response) - :rtype: ~maria_db_management_client.models.OperationListResult + :rtype: ~azure.mgmt.rdbms.mariadb.models.OperationListResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_private_endpoint_connections_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_private_endpoint_connections_operations.py index b07a793aa3b9..d89fdbe5f841 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_private_endpoint_connections_operations.py @@ -28,7 +28,7 @@ class PrivateEndpointConnectionsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -60,7 +60,7 @@ async def get( :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PrivateEndpointConnection, or the result of cls(response) - :rtype: ~maria_db_management_client.models.PrivateEndpointConnection + :rtype: ~azure.mgmt.rdbms.mariadb.models.PrivateEndpointConnection :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] @@ -179,7 +179,7 @@ async def begin_create_or_update( :param private_endpoint_connection_name: :type private_endpoint_connection_name: str :param parameters: - :type parameters: ~maria_db_management_client.models.PrivateEndpointConnection + :type parameters: ~azure.mgmt.rdbms.mariadb.models.PrivateEndpointConnection :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: True for ARMPolling, False for no polling, or a @@ -187,7 +187,7 @@ async def begin_create_or_update( :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 PrivateEndpointConnection or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~maria_db_management_client.models.PrivateEndpointConnection] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mariadb.models.PrivateEndpointConnection] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -428,7 +428,7 @@ async def begin_update_tags( :type private_endpoint_connection_name: str :param parameters: Parameters supplied to the Update private endpoint connection Tags operation. - :type parameters: ~maria_db_management_client.models.TagsObject + :type parameters: ~azure.mgmt.rdbms.mariadb.models.TagsObject :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: True for ARMPolling, False for no polling, or a @@ -436,7 +436,7 @@ async def begin_update_tags( :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 PrivateEndpointConnection or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~maria_db_management_client.models.PrivateEndpointConnection] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mariadb.models.PrivateEndpointConnection] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -501,7 +501,7 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~maria_db_management_client.models.PrivateEndpointConnectionListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mariadb.models.PrivateEndpointConnectionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_private_link_resources_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_private_link_resources_operations.py index 95f8c439d59d..9457e80ac678 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_private_link_resources_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_private_link_resources_operations.py @@ -26,7 +26,7 @@ class PrivateLinkResourcesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -55,7 +55,7 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PrivateLinkResourceListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~maria_db_management_client.models.PrivateLinkResourceListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mariadb.models.PrivateLinkResourceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] @@ -132,7 +132,7 @@ async def get( :type group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PrivateLinkResource, or the result of cls(response) - :rtype: ~maria_db_management_client.models.PrivateLinkResource + :rtype: ~azure.mgmt.rdbms.mariadb.models.PrivateLinkResource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResource"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_query_texts_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_query_texts_operations.py index c78c1799b5f9..02f7c105c91e 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_query_texts_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_query_texts_operations.py @@ -26,7 +26,7 @@ class QueryTextsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -58,7 +58,7 @@ async def get( :type query_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: QueryText, or the result of cls(response) - :rtype: ~maria_db_management_client.models.QueryText + :rtype: ~azure.mgmt.rdbms.mariadb.models.QueryText :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.QueryText"] @@ -120,7 +120,7 @@ def list_by_server( :type query_ids: list[str] :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either QueryTextsResultList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~maria_db_management_client.models.QueryTextsResultList] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mariadb.models.QueryTextsResultList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.QueryTextsResultList"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_recommended_actions_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_recommended_actions_operations.py index 0ec0b4d002ae..2a6cfb3f9f8e 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_recommended_actions_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_recommended_actions_operations.py @@ -26,7 +26,7 @@ class RecommendedActionsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -61,7 +61,7 @@ async def get( :type recommended_action_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationAction, or the result of cls(response) - :rtype: ~maria_db_management_client.models.RecommendationAction + :rtype: ~azure.mgmt.rdbms.mariadb.models.RecommendationAction :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationAction"] @@ -127,7 +127,7 @@ def list_by_server( :type session_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationActionsResultList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~maria_db_management_client.models.RecommendationActionsResultList] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mariadb.models.RecommendationActionsResultList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationActionsResultList"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_recoverable_servers_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_recoverable_servers_operations.py new file mode 100644 index 000000000000..1fb5755fd096 --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_recoverable_servers_operations.py @@ -0,0 +1,99 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class RecoverableServersOperations: + """RecoverableServersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.rdbms.mariadb.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + server_name: str, + **kwargs + ) -> "_models.RecoverableServerResource": + """Gets a recoverable MariaDB Server. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RecoverableServerResource, or the result of cls(response) + :rtype: ~azure.mgmt.rdbms.mariadb.models.RecoverableServerResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecoverableServerResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2018-06-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RecoverableServerResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB/servers/{serverName}/recoverableServers'} # type: ignore diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_replicas_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_replicas_operations.py index e0cc3d953b2b..f9d81b942732 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_replicas_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_replicas_operations.py @@ -26,7 +26,7 @@ class ReplicasOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -55,7 +55,7 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~maria_db_management_client.models.ServerListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mariadb.models.ServerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerListResult"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_server_based_performance_tier_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_server_based_performance_tier_operations.py new file mode 100644 index 000000000000..863c4ae41900 --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_server_based_performance_tier_operations.py @@ -0,0 +1,116 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ServerBasedPerformanceTierOperations: + """ServerBasedPerformanceTierOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.rdbms.mariadb.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + server_name: str, + **kwargs + ) -> AsyncIterable["_models.PerformanceTierListResult"]: + """List all the performance tiers for a MariaDB server. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PerformanceTierListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mariadb.models.PerformanceTierListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerformanceTierListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2018-06-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + 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] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('PerformanceTierListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB/servers/{serverName}/performanceTiers'} # type: ignore diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_server_parameters_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_server_parameters_operations.py new file mode 100644 index 000000000000..e0a4937d7995 --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_server_parameters_operations.py @@ -0,0 +1,169 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ServerParametersOperations: + """ServerParametersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.rdbms.mariadb.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _list_update_configurations_initial( + self, + resource_group_name: str, + server_name: str, + value: "_models.ConfigurationListResult", + **kwargs + ) -> Optional["_models.ConfigurationListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ConfigurationListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2018-06-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._list_update_configurations_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(value, 'ConfigurationListResult') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConfigurationListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _list_update_configurations_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB/servers/{serverName}/updateConfigurations'} # type: ignore + + async def begin_list_update_configurations( + self, + resource_group_name: str, + server_name: str, + value: "_models.ConfigurationListResult", + **kwargs + ) -> AsyncLROPoller["_models.ConfigurationListResult"]: + """Update a list of configurations in a given server. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param value: The parameters for updating a list of server configuration. + :type value: ~azure.mgmt.rdbms.mariadb.models.ConfigurationListResult + :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: True for ARMPolling, False for no polling, or a + 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: An instance of AsyncLROPoller that returns either ConfigurationListResult or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mariadb.models.ConfigurationListResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfigurationListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._list_update_configurations_initial( + resource_group_name=resource_group_name, + server_name=server_name, + value=value, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ConfigurationListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_list_update_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB/servers/{serverName}/updateConfigurations'} # type: ignore diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_server_security_alert_policies_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_server_security_alert_policies_operations.py index 1b41ff214798..bfb9e1f20363 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_server_security_alert_policies_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_server_security_alert_policies_operations.py @@ -27,7 +27,7 @@ class ServerSecurityAlertPoliciesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -56,10 +56,10 @@ async def get( :param server_name: The name of the server. :type server_name: str :param security_alert_policy_name: The name of the security alert policy. - :type security_alert_policy_name: str or ~maria_db_management_client.models.SecurityAlertPolicyName + :type security_alert_policy_name: str or ~azure.mgmt.rdbms.mariadb.models.SecurityAlertPolicyName :keyword callable cls: A custom type or function that will be passed the direct response :return: ServerSecurityAlertPolicy, or the result of cls(response) - :rtype: ~maria_db_management_client.models.ServerSecurityAlertPolicy + :rtype: ~azure.mgmt.rdbms.mariadb.models.ServerSecurityAlertPolicy :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerSecurityAlertPolicy"] @@ -176,9 +176,9 @@ async def begin_create_or_update( :param server_name: The name of the server. :type server_name: str :param security_alert_policy_name: The name of the threat detection policy. - :type security_alert_policy_name: str or ~maria_db_management_client.models.SecurityAlertPolicyName + :type security_alert_policy_name: str or ~azure.mgmt.rdbms.mariadb.models.SecurityAlertPolicyName :param parameters: The server security alert policy. - :type parameters: ~maria_db_management_client.models.ServerSecurityAlertPolicy + :type parameters: ~azure.mgmt.rdbms.mariadb.models.ServerSecurityAlertPolicy :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: True for ARMPolling, False for no polling, or a @@ -186,7 +186,7 @@ async def begin_create_or_update( :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 ServerSecurityAlertPolicy or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~maria_db_management_client.models.ServerSecurityAlertPolicy] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mariadb.models.ServerSecurityAlertPolicy] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_servers_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_servers_operations.py index 6ef792324046..69f60469e1fb 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_servers_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_servers_operations.py @@ -28,7 +28,7 @@ class ServersOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -116,7 +116,7 @@ async def begin_create( :param server_name: The name of the server. :type server_name: str :param parameters: The required parameters for creating or updating a server. - :type parameters: ~maria_db_management_client.models.ServerForCreate + :type parameters: ~azure.mgmt.rdbms.mariadb.models.ServerForCreate :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: True for ARMPolling, False for no polling, or a @@ -124,7 +124,7 @@ async def begin_create( :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 Server or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~maria_db_management_client.models.Server] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mariadb.models.Server] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -243,7 +243,7 @@ async def begin_update( :param server_name: The name of the server. :type server_name: str :param parameters: The required parameters for updating a server. - :type parameters: ~maria_db_management_client.models.ServerUpdateParameters + :type parameters: ~azure.mgmt.rdbms.mariadb.models.ServerUpdateParameters :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: True for ARMPolling, False for no polling, or a @@ -251,7 +251,7 @@ async def begin_update( :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 Server or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~maria_db_management_client.models.Server] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mariadb.models.Server] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -422,7 +422,7 @@ async def get( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Server, or the result of cls(response) - :rtype: ~maria_db_management_client.models.Server + :rtype: ~azure.mgmt.rdbms.mariadb.models.Server :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Server"] @@ -477,7 +477,7 @@ def list_by_resource_group( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~maria_db_management_client.models.ServerListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mariadb.models.ServerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerListResult"] @@ -544,7 +544,7 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~maria_db_management_client.models.ServerListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mariadb.models.ServerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerListResult"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_top_query_statistics_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_top_query_statistics_operations.py index f06e544cb14a..7c67b5a302a4 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_top_query_statistics_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_top_query_statistics_operations.py @@ -26,7 +26,7 @@ class TopQueryStatisticsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -58,7 +58,7 @@ async def get( :type query_statistic_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: QueryStatistic, or the result of cls(response) - :rtype: ~maria_db_management_client.models.QueryStatistic + :rtype: ~azure.mgmt.rdbms.mariadb.models.QueryStatistic :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.QueryStatistic"] @@ -117,10 +117,10 @@ def list_by_server( :param server_name: The name of the server. :type server_name: str :param parameters: The required parameters for retrieving top query statistics. - :type parameters: ~maria_db_management_client.models.TopQueryStatisticsInput + :type parameters: ~azure.mgmt.rdbms.mariadb.models.TopQueryStatisticsInput :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either TopQueryStatisticsResultList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~maria_db_management_client.models.TopQueryStatisticsResultList] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mariadb.models.TopQueryStatisticsResultList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.TopQueryStatisticsResultList"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_virtual_network_rules_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_virtual_network_rules_operations.py index 7db3056e3cda..f930458d539b 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_virtual_network_rules_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_virtual_network_rules_operations.py @@ -28,7 +28,7 @@ class VirtualNetworkRulesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -60,7 +60,7 @@ async def get( :type virtual_network_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualNetworkRule, or the result of cls(response) - :rtype: ~maria_db_management_client.models.VirtualNetworkRule + :rtype: ~azure.mgmt.rdbms.mariadb.models.VirtualNetworkRule :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkRule"] @@ -182,7 +182,7 @@ async def begin_create_or_update( :param virtual_network_rule_name: The name of the virtual network rule. :type virtual_network_rule_name: str :param parameters: The requested virtual Network Rule Resource state. - :type parameters: ~maria_db_management_client.models.VirtualNetworkRule + :type parameters: ~azure.mgmt.rdbms.mariadb.models.VirtualNetworkRule :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: True for ARMPolling, False for no polling, or a @@ -190,7 +190,7 @@ async def begin_create_or_update( :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 VirtualNetworkRule or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~maria_db_management_client.models.VirtualNetworkRule] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mariadb.models.VirtualNetworkRule] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -368,7 +368,7 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualNetworkRuleListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~maria_db_management_client.models.VirtualNetworkRuleListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mariadb.models.VirtualNetworkRuleListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkRuleListResult"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_wait_statistics_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_wait_statistics_operations.py index 2da183d1fe4e..aea27c85500e 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_wait_statistics_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_wait_statistics_operations.py @@ -26,7 +26,7 @@ class WaitStatisticsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -58,7 +58,7 @@ async def get( :type wait_statistics_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: WaitStatistic, or the result of cls(response) - :rtype: ~maria_db_management_client.models.WaitStatistic + :rtype: ~azure.mgmt.rdbms.mariadb.models.WaitStatistic :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.WaitStatistic"] @@ -117,10 +117,10 @@ def list_by_server( :param server_name: The name of the server. :type server_name: str :param parameters: The required parameters for retrieving wait statistics. - :type parameters: ~maria_db_management_client.models.WaitStatisticsInput + :type parameters: ~azure.mgmt.rdbms.mariadb.models.WaitStatisticsInput :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WaitStatisticsResultList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~maria_db_management_client.models.WaitStatisticsResultList] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mariadb.models.WaitStatisticsResultList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.WaitStatisticsResultList"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/__init__.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/__init__.py index a530aaf8ae7d..97fd21465cac 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/__init__.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/__init__.py @@ -36,12 +36,14 @@ from ._models_py3 import PrivateLinkResourceProperties from ._models_py3 import PrivateLinkServiceConnectionStateProperty from ._models_py3 import ProxyResource + from ._models_py3 import QueryPerformanceInsightResetDataResult from ._models_py3 import QueryStatistic from ._models_py3 import QueryText from ._models_py3 import QueryTextsResultList from ._models_py3 import RecommendationAction from ._models_py3 import RecommendationActionsResultList from ._models_py3 import RecommendedActionSessionsOperationStatus + from ._models_py3 import RecoverableServerResource from ._models_py3 import Resource from ._models_py3 import Server from ._models_py3 import ServerForCreate @@ -97,12 +99,14 @@ from ._models import PrivateLinkResourceProperties # type: ignore from ._models import PrivateLinkServiceConnectionStateProperty # type: ignore from ._models import ProxyResource # type: ignore + from ._models import QueryPerformanceInsightResetDataResult # type: ignore from ._models import QueryStatistic # type: ignore from ._models import QueryText # type: ignore from ._models import QueryTextsResultList # type: ignore from ._models import RecommendationAction # type: ignore from ._models import RecommendationActionsResultList # type: ignore from ._models import RecommendedActionSessionsOperationStatus # type: ignore + from ._models import RecoverableServerResource # type: ignore from ._models import Resource # type: ignore from ._models import Server # type: ignore from ._models import ServerForCreate # type: ignore @@ -137,6 +141,7 @@ PrivateLinkServiceConnectionStateActionsRequire, PrivateLinkServiceConnectionStateStatus, PublicNetworkAccessEnum, + QueryPerformanceInsightResetDataResultState, SecurityAlertPolicyName, ServerSecurityAlertPolicyState, ServerState, @@ -177,12 +182,14 @@ 'PrivateLinkResourceProperties', 'PrivateLinkServiceConnectionStateProperty', 'ProxyResource', + 'QueryPerformanceInsightResetDataResult', 'QueryStatistic', 'QueryText', 'QueryTextsResultList', 'RecommendationAction', 'RecommendationActionsResultList', 'RecommendedActionSessionsOperationStatus', + 'RecoverableServerResource', 'Resource', 'Server', 'ServerForCreate', @@ -215,6 +222,7 @@ 'PrivateLinkServiceConnectionStateActionsRequire', 'PrivateLinkServiceConnectionStateStatus', 'PublicNetworkAccessEnum', + 'QueryPerformanceInsightResetDataResultState', 'SecurityAlertPolicyName', 'ServerSecurityAlertPolicyState', 'ServerState', diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_maria_db_management_client_enums.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_maria_db_management_client_enums.py index 5be7485c9a19..c39df09b0bc1 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_maria_db_management_client_enums.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_maria_db_management_client_enums.py @@ -83,6 +83,13 @@ class PublicNetworkAccessEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum ENABLED = "Enabled" DISABLED = "Disabled" +class QueryPerformanceInsightResetDataResultState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Indicates result of the operation. + """ + + SUCCEEDED = "Succeeded" + FAILED = "Failed" + class SecurityAlertPolicyName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): DEFAULT = "Default" diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_models.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_models.py index 49d278f4f2c0..63b4475667cd 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_models.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_models.py @@ -11,17 +11,17 @@ class Resource(msrest.serialization.Model): - """Resource. + """Common fields that are returned in the response for all Azure Resource Manager resources. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str """ @@ -52,13 +52,13 @@ class Advisor(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param properties: The properties of a recommendation action advisor. :type properties: object @@ -91,7 +91,7 @@ class AdvisorsResultList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of recommendation action advisors. - :vartype value: list[~maria_db_management_client.models.Advisor] + :vartype value: list[~azure.mgmt.rdbms.mariadb.models.Advisor] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -119,7 +119,7 @@ class CloudErrorAutoGenerated(msrest.serialization.Model): """An error response from the Batch service. :param error: Error message. - :type error: ~maria_db_management_client.models.ErrorResponse + :type error: ~azure.mgmt.rdbms.mariadb.models.ErrorResponse """ _attribute_map = { @@ -139,13 +139,13 @@ class Configuration(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param value: Value of the configuration. :type value: str @@ -200,7 +200,7 @@ class ConfigurationListResult(msrest.serialization.Model): """A list of server configurations. :param value: The list of server configurations. - :type value: list[~maria_db_management_client.models.Configuration] + :type value: list[~azure.mgmt.rdbms.mariadb.models.Configuration] """ _attribute_map = { @@ -220,13 +220,13 @@ class Database(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param charset: The charset of the database. :type charset: str @@ -261,7 +261,7 @@ class DatabaseListResult(msrest.serialization.Model): """A List of databases. :param value: The list of databases housed in a server. - :type value: list[~maria_db_management_client.models.Database] + :type value: list[~azure.mgmt.rdbms.mariadb.models.Database] """ _attribute_map = { @@ -307,7 +307,7 @@ def __init__( class ErrorResponse(msrest.serialization.Model): - """The resource management error response. + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). Variables are only populated by the server, and will be ignored when sending a request. @@ -318,9 +318,9 @@ class ErrorResponse(msrest.serialization.Model): :ivar target: The error target. :vartype target: str :ivar details: The error details. - :vartype details: list[~maria_db_management_client.models.ErrorResponse] + :vartype details: list[~azure.mgmt.rdbms.mariadb.models.ErrorResponse] :ivar additional_info: The error additional info. - :vartype additional_info: list[~maria_db_management_client.models.ErrorAdditionalInfo] + :vartype additional_info: list[~azure.mgmt.rdbms.mariadb.models.ErrorAdditionalInfo] """ _validation = { @@ -358,13 +358,13 @@ class FirewallRule(Resource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param start_ip_address: Required. The start IP address of the server firewall rule. Must be IPv4 format. @@ -403,7 +403,7 @@ class FirewallRuleListResult(msrest.serialization.Model): """A list of firewall rules. :param value: The list of firewall rules in a server. - :type value: list[~maria_db_management_client.models.FirewallRule] + :type value: list[~azure.mgmt.rdbms.mariadb.models.FirewallRule] """ _attribute_map = { @@ -423,13 +423,13 @@ class LogFile(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param size_in_kb: Size of the log file. :type size_in_kb: long @@ -479,7 +479,7 @@ class LogFileListResult(msrest.serialization.Model): """A list of log files. :param value: The list of log files. - :type value: list[~maria_db_management_client.models.LogFile] + :type value: list[~azure.mgmt.rdbms.mariadb.models.LogFile] """ _attribute_map = { @@ -558,10 +558,10 @@ class Operation(msrest.serialization.Model): :ivar name: The name of the operation being performed on this particular object. :vartype name: str :ivar display: The localized display information for this particular operation or action. - :vartype display: ~maria_db_management_client.models.OperationDisplay + :vartype display: ~azure.mgmt.rdbms.mariadb.models.OperationDisplay :ivar origin: The intended executor of the operation. Possible values include: "NotSpecified", "user", "system". - :vartype origin: str or ~maria_db_management_client.models.OperationOrigin + :vartype origin: str or ~azure.mgmt.rdbms.mariadb.models.OperationOrigin :ivar properties: Additional descriptions for the operation. :vartype properties: dict[str, object] """ @@ -635,7 +635,7 @@ class OperationListResult(msrest.serialization.Model): """A list of resource provider operations. :param value: The list of resource provider operations. - :type value: list[~maria_db_management_client.models.Operation] + :type value: list[~azure.mgmt.rdbms.mariadb.models.Operation] """ _attribute_map = { @@ -654,7 +654,7 @@ class PerformanceTierListResult(msrest.serialization.Model): """A list of performance tiers. :param value: The list of performance tiers. - :type value: list[~maria_db_management_client.models.PerformanceTierProperties] + :type value: list[~azure.mgmt.rdbms.mariadb.models.PerformanceTierProperties] """ _attribute_map = { @@ -674,13 +674,33 @@ class PerformanceTierProperties(msrest.serialization.Model): :param id: ID of the performance tier. :type id: str + :param max_backup_retention_days: Maximum Backup retention in days for the performance tier + edition. + :type max_backup_retention_days: int + :param min_backup_retention_days: Minimum Backup retention in days for the performance tier + edition. + :type min_backup_retention_days: int + :param max_storage_mb: Max storage allowed for a server. + :type max_storage_mb: int + :param min_large_storage_mb: Max storage allowed for a server. + :type min_large_storage_mb: int + :param max_large_storage_mb: Max storage allowed for a server. + :type max_large_storage_mb: int + :param min_storage_mb: Max storage allowed for a server. + :type min_storage_mb: int :param service_level_objectives: Service level objectives associated with the performance tier. :type service_level_objectives: - list[~maria_db_management_client.models.PerformanceTierServiceLevelObjectives] + list[~azure.mgmt.rdbms.mariadb.models.PerformanceTierServiceLevelObjectives] """ _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'max_backup_retention_days': {'key': 'maxBackupRetentionDays', 'type': 'int'}, + 'min_backup_retention_days': {'key': 'minBackupRetentionDays', 'type': 'int'}, + 'max_storage_mb': {'key': 'maxStorageMB', 'type': 'int'}, + 'min_large_storage_mb': {'key': 'minLargeStorageMB', 'type': 'int'}, + 'max_large_storage_mb': {'key': 'maxLargeStorageMB', 'type': 'int'}, + 'min_storage_mb': {'key': 'minStorageMB', 'type': 'int'}, 'service_level_objectives': {'key': 'serviceLevelObjectives', 'type': '[PerformanceTierServiceLevelObjectives]'}, } @@ -690,6 +710,12 @@ def __init__( ): super(PerformanceTierProperties, self).__init__(**kwargs) self.id = kwargs.get('id', None) + self.max_backup_retention_days = kwargs.get('max_backup_retention_days', None) + self.min_backup_retention_days = kwargs.get('min_backup_retention_days', None) + self.max_storage_mb = kwargs.get('max_storage_mb', None) + self.min_large_storage_mb = kwargs.get('min_large_storage_mb', None) + self.max_large_storage_mb = kwargs.get('max_large_storage_mb', None) + self.min_storage_mb = kwargs.get('min_storage_mb', None) self.service_level_objectives = kwargs.get('service_level_objectives', None) @@ -747,20 +773,20 @@ class PrivateEndpointConnection(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param private_endpoint: Private endpoint which the connection belongs to. - :type private_endpoint: ~maria_db_management_client.models.PrivateEndpointProperty + :type private_endpoint: ~azure.mgmt.rdbms.mariadb.models.PrivateEndpointProperty :param private_link_service_connection_state: Connection state of the private endpoint connection. :type private_link_service_connection_state: - ~maria_db_management_client.models.PrivateLinkServiceConnectionStateProperty + ~azure.mgmt.rdbms.mariadb.models.PrivateLinkServiceConnectionStateProperty :ivar provisioning_state: State of the private endpoint connection. :vartype provisioning_state: str """ @@ -797,7 +823,7 @@ class PrivateEndpointConnectionListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: Array of results. - :vartype value: list[~maria_db_management_client.models.PrivateEndpointConnection] + :vartype value: list[~azure.mgmt.rdbms.mariadb.models.PrivateEndpointConnection] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -845,16 +871,16 @@ class PrivateLinkResource(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar properties: The private link resource group id. - :vartype properties: ~maria_db_management_client.models.PrivateLinkResourceProperties + :vartype properties: ~azure.mgmt.rdbms.mariadb.models.PrivateLinkResourceProperties """ _validation = { @@ -885,7 +911,7 @@ class PrivateLinkResourceListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: Array of results. - :vartype value: list[~maria_db_management_client.models.PrivateLinkResource] + :vartype value: list[~azure.mgmt.rdbms.mariadb.models.PrivateLinkResource] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -977,17 +1003,17 @@ def __init__( class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have everything other than required location and tags. + """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str """ @@ -1010,18 +1036,43 @@ def __init__( super(ProxyResource, self).__init__(**kwargs) +class QueryPerformanceInsightResetDataResult(msrest.serialization.Model): + """Result of Query Performance Insight data reset. + + :param status: Indicates result of the operation. Possible values include: "Succeeded", + "Failed". + :type status: str or + ~azure.mgmt.rdbms.mariadb.models.QueryPerformanceInsightResetDataResultState + :param message: operation message. + :type message: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(QueryPerformanceInsightResetDataResult, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.message = kwargs.get('message', None) + + class QueryStatistic(Resource): """Represents a Query Statistic. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param query_id: Database query identifier. :type query_id: str @@ -1089,13 +1140,13 @@ class QueryText(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param query_id: Query identifier unique to the server. :type query_id: str @@ -1132,7 +1183,7 @@ class QueryTextsResultList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of query texts. - :vartype value: list[~maria_db_management_client.models.QueryText] + :vartype value: list[~azure.mgmt.rdbms.mariadb.models.QueryText] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -1161,13 +1212,13 @@ class RecommendationAction(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param advisor_name: Advisor name. :type advisor_name: str @@ -1228,7 +1279,7 @@ class RecommendationActionsResultList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of recommendation action advisors. - :vartype value: list[~maria_db_management_client.models.RecommendationAction] + :vartype value: list[~azure.mgmt.rdbms.mariadb.models.RecommendationAction] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -1279,20 +1330,84 @@ def __init__( self.status = kwargs.get('status', None) +class RecoverableServerResource(Resource): + """A recoverable server resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar last_available_backup_date_time: The last available backup date time. + :vartype last_available_backup_date_time: str + :ivar service_level_objective: The service level objective. + :vartype service_level_objective: str + :ivar edition: Edition of the performance tier. + :vartype edition: str + :ivar v_core: vCore associated with the service level objective. + :vartype v_core: int + :ivar hardware_generation: Hardware generation associated with the service level objective. + :vartype hardware_generation: str + :ivar version: The MariaDB version. + :vartype version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_available_backup_date_time': {'readonly': True}, + 'service_level_objective': {'readonly': True}, + 'edition': {'readonly': True}, + 'v_core': {'readonly': True}, + 'hardware_generation': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'last_available_backup_date_time': {'key': 'properties.lastAvailableBackupDateTime', 'type': 'str'}, + 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, + 'edition': {'key': 'properties.edition', 'type': 'str'}, + 'v_core': {'key': 'properties.vCore', 'type': 'int'}, + 'hardware_generation': {'key': 'properties.hardwareGeneration', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RecoverableServerResource, self).__init__(**kwargs) + self.last_available_backup_date_time = None + self.service_level_objective = None + self.edition = None + self.v_core = None + self.hardware_generation = None + self.version = None + + class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. + """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] @@ -1331,37 +1446,37 @@ class Server(TrackedResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param location: Required. The geo-location where the resource lives. :type location: str :param sku: The SKU (pricing tier) of the server. - :type sku: ~maria_db_management_client.models.Sku + :type sku: ~azure.mgmt.rdbms.mariadb.models.Sku :param administrator_login: The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). :type administrator_login: str :param version: Server version. Possible values include: "5.6", "5.7". - :type version: str or ~maria_db_management_client.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or ~maria_db_management_client.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum :param user_visible_state: A state of a server that is visible to user. Possible values include: "Ready", "Dropping", "Disabled". - :type user_visible_state: str or ~maria_db_management_client.models.ServerState + :type user_visible_state: str or ~azure.mgmt.rdbms.mariadb.models.ServerState :param fully_qualified_domain_name: The fully qualified domain name of a server. :type fully_qualified_domain_name: str :param earliest_restore_date: Earliest restore point creation time (ISO8601 format). :type earliest_restore_date: ~datetime.datetime :param storage_profile: Storage profile of a server. - :type storage_profile: ~maria_db_management_client.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile :param replication_role: The replication role of the server. :type replication_role: str :param master_server_id: The master server id of a replica server. @@ -1371,10 +1486,10 @@ class Server(TrackedResource): :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or ~maria_db_management_client.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.mariadb.models.PublicNetworkAccessEnum :ivar private_endpoint_connections: List of private endpoint connections on a server. :vartype private_endpoint_connections: - list[~maria_db_management_client.models.ServerPrivateEndpointConnection] + list[~azure.mgmt.rdbms.mariadb.models.ServerPrivateEndpointConnection] """ _validation = { @@ -1433,9 +1548,9 @@ class ServerForCreate(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param sku: The SKU (pricing tier) of the server. - :type sku: ~maria_db_management_client.models.Sku + :type sku: ~azure.mgmt.rdbms.mariadb.models.Sku :param properties: Required. Properties of the server. - :type properties: ~maria_db_management_client.models.ServerPropertiesForCreate + :type properties: ~azure.mgmt.rdbms.mariadb.models.ServerPropertiesForCreate :param location: Required. The location the resource resides in. :type location: str :param tags: A set of tags. Application-specific metadata in the form of key-value pairs. @@ -1469,7 +1584,7 @@ class ServerListResult(msrest.serialization.Model): """A list of servers. :param value: The list of servers. - :type value: list[~maria_db_management_client.models.Server] + :type value: list[~azure.mgmt.rdbms.mariadb.models.Server] """ _attribute_map = { @@ -1492,8 +1607,7 @@ class ServerPrivateEndpointConnection(msrest.serialization.Model): :ivar id: Resource Id of the private endpoint connection. :vartype id: str :ivar properties: Private endpoint connection properties. - :vartype properties: - ~maria_db_management_client.models.ServerPrivateEndpointConnectionProperties + :vartype properties: ~azure.mgmt.rdbms.mariadb.models.ServerPrivateEndpointConnectionProperties """ _validation = { @@ -1521,15 +1635,15 @@ class ServerPrivateEndpointConnectionProperties(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :param private_endpoint: Private endpoint which the connection belongs to. - :type private_endpoint: ~maria_db_management_client.models.PrivateEndpointProperty + :type private_endpoint: ~azure.mgmt.rdbms.mariadb.models.PrivateEndpointProperty :param private_link_service_connection_state: Connection state of the private endpoint connection. :type private_link_service_connection_state: - ~maria_db_management_client.models.ServerPrivateLinkServiceConnectionStateProperty + ~azure.mgmt.rdbms.mariadb.models.ServerPrivateLinkServiceConnectionStateProperty :ivar provisioning_state: State of the private endpoint connection. Possible values include: "Approving", "Ready", "Dropping", "Failed", "Rejecting". :vartype provisioning_state: str or - ~maria_db_management_client.models.PrivateEndpointProvisioningState + ~azure.mgmt.rdbms.mariadb.models.PrivateEndpointProvisioningState """ _validation = { @@ -1561,13 +1675,13 @@ class ServerPrivateLinkServiceConnectionStateProperty(msrest.serialization.Model :param status: Required. The private link service connection status. Possible values include: "Approved", "Pending", "Rejected", "Disconnected". - :type status: str or ~maria_db_management_client.models.PrivateLinkServiceConnectionStateStatus + :type status: str or ~azure.mgmt.rdbms.mariadb.models.PrivateLinkServiceConnectionStateStatus :param description: Required. The private link service connection description. :type description: str :ivar actions_required: The actions required for private link service connection. Possible values include: "None". :vartype actions_required: str or - ~maria_db_management_client.models.PrivateLinkServiceConnectionStateActionsRequire + ~azure.mgmt.rdbms.mariadb.models.PrivateLinkServiceConnectionStateActionsRequire """ _validation = { @@ -1601,19 +1715,19 @@ class ServerPropertiesForCreate(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param version: Server version. Possible values include: "5.6", "5.7". - :type version: str or ~maria_db_management_client.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or ~maria_db_management_client.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or ~maria_db_management_client.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.mariadb.models.PublicNetworkAccessEnum :param storage_profile: Storage profile of a server. - :type storage_profile: ~maria_db_management_client.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile :param create_mode: Required. The mode to create a new server.Constant filled by server. Possible values include: "Default", "PointInTimeRestore", "GeoRestore", "Replica". - :type create_mode: str or ~maria_db_management_client.models.CreateMode + :type create_mode: str or ~azure.mgmt.rdbms.mariadb.models.CreateMode """ _validation = { @@ -1650,19 +1764,19 @@ class ServerPropertiesForDefaultCreate(ServerPropertiesForCreate): All required parameters must be populated in order to send to Azure. :param version: Server version. Possible values include: "5.6", "5.7". - :type version: str or ~maria_db_management_client.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or ~maria_db_management_client.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or ~maria_db_management_client.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.mariadb.models.PublicNetworkAccessEnum :param storage_profile: Storage profile of a server. - :type storage_profile: ~maria_db_management_client.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile :param create_mode: Required. The mode to create a new server.Constant filled by server. Possible values include: "Default", "PointInTimeRestore", "GeoRestore", "Replica". - :type create_mode: str or ~maria_db_management_client.models.CreateMode + :type create_mode: str or ~azure.mgmt.rdbms.mariadb.models.CreateMode :param administrator_login: Required. The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). :type administrator_login: str @@ -1702,19 +1816,19 @@ class ServerPropertiesForGeoRestore(ServerPropertiesForCreate): All required parameters must be populated in order to send to Azure. :param version: Server version. Possible values include: "5.6", "5.7". - :type version: str or ~maria_db_management_client.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or ~maria_db_management_client.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or ~maria_db_management_client.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.mariadb.models.PublicNetworkAccessEnum :param storage_profile: Storage profile of a server. - :type storage_profile: ~maria_db_management_client.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile :param create_mode: Required. The mode to create a new server.Constant filled by server. Possible values include: "Default", "PointInTimeRestore", "GeoRestore", "Replica". - :type create_mode: str or ~maria_db_management_client.models.CreateMode + :type create_mode: str or ~azure.mgmt.rdbms.mariadb.models.CreateMode :param source_server_id: Required. The source server id to restore from. :type source_server_id: str """ @@ -1748,19 +1862,19 @@ class ServerPropertiesForReplica(ServerPropertiesForCreate): All required parameters must be populated in order to send to Azure. :param version: Server version. Possible values include: "5.6", "5.7". - :type version: str or ~maria_db_management_client.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or ~maria_db_management_client.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or ~maria_db_management_client.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.mariadb.models.PublicNetworkAccessEnum :param storage_profile: Storage profile of a server. - :type storage_profile: ~maria_db_management_client.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile :param create_mode: Required. The mode to create a new server.Constant filled by server. Possible values include: "Default", "PointInTimeRestore", "GeoRestore", "Replica". - :type create_mode: str or ~maria_db_management_client.models.CreateMode + :type create_mode: str or ~azure.mgmt.rdbms.mariadb.models.CreateMode :param source_server_id: Required. The master server id to create replica from. :type source_server_id: str """ @@ -1794,19 +1908,19 @@ class ServerPropertiesForRestore(ServerPropertiesForCreate): All required parameters must be populated in order to send to Azure. :param version: Server version. Possible values include: "5.6", "5.7". - :type version: str or ~maria_db_management_client.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or ~maria_db_management_client.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or ~maria_db_management_client.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.mariadb.models.PublicNetworkAccessEnum :param storage_profile: Storage profile of a server. - :type storage_profile: ~maria_db_management_client.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile :param create_mode: Required. The mode to create a new server.Constant filled by server. Possible values include: "Default", "PointInTimeRestore", "GeoRestore", "Replica". - :type create_mode: str or ~maria_db_management_client.models.CreateMode + :type create_mode: str or ~azure.mgmt.rdbms.mariadb.models.CreateMode :param source_server_id: Required. The source server id to restore from. :type source_server_id: str :param restore_point_in_time: Required. Restore point creation time (ISO8601 format), @@ -1845,17 +1959,17 @@ class ServerSecurityAlertPolicy(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param state: Specifies the state of the policy, whether it is enabled or disabled. Possible values include: "Enabled", "Disabled". - :type state: str or ~maria_db_management_client.models.ServerSecurityAlertPolicyState + :type state: str or ~azure.mgmt.rdbms.mariadb.models.ServerSecurityAlertPolicyState :param disabled_alerts: Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly. :type disabled_alerts: list[str] @@ -1911,22 +2025,22 @@ class ServerUpdateParameters(msrest.serialization.Model): """Parameters allowed to update for a server. :param sku: The SKU (pricing tier) of the server. - :type sku: ~maria_db_management_client.models.Sku + :type sku: ~azure.mgmt.rdbms.mariadb.models.Sku :param tags: A set of tags. Application-specific metadata in the form of key-value pairs. :type tags: dict[str, str] :param storage_profile: Storage profile of a server. - :type storage_profile: ~maria_db_management_client.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile :param administrator_login_password: The password of the administrator login. :type administrator_login_password: str :param version: The version of a server. Possible values include: "5.6", "5.7". - :type version: str or ~maria_db_management_client.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or ~maria_db_management_client.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or ~maria_db_management_client.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.mariadb.models.PublicNetworkAccessEnum :param replication_role: The replication role of the server. :type replication_role: str """ @@ -1967,7 +2081,7 @@ class Sku(msrest.serialization.Model): :type name: str :param tier: The tier of the particular SKU, e.g. Basic. Possible values include: "Basic", "GeneralPurpose", "MemoryOptimized". - :type tier: str or ~maria_db_management_client.models.SkuTier + :type tier: str or ~azure.mgmt.rdbms.mariadb.models.SkuTier :param capacity: The scale up/out capacity, representing server's compute units. :type capacity: int :param size: The size code, to be interpreted by resource as appropriate. @@ -2008,12 +2122,12 @@ class StorageProfile(msrest.serialization.Model): :type backup_retention_days: int :param geo_redundant_backup: Enable Geo-redundant or not for server backup. Possible values include: "Enabled", "Disabled". - :type geo_redundant_backup: str or ~maria_db_management_client.models.GeoRedundantBackup + :type geo_redundant_backup: str or ~azure.mgmt.rdbms.mariadb.models.GeoRedundantBackup :param storage_mb: Max storage allowed for a server. :type storage_mb: int :param storage_autogrow: Enable Storage Auto Grow. Possible values include: "Enabled", "Disabled". - :type storage_autogrow: str or ~maria_db_management_client.models.StorageAutogrow + :type storage_autogrow: str or ~azure.mgmt.rdbms.mariadb.models.StorageAutogrow """ _attribute_map = { @@ -2109,7 +2223,7 @@ class TopQueryStatisticsResultList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of top query statistics. - :vartype value: list[~maria_db_management_client.models.QueryStatistic] + :vartype value: list[~azure.mgmt.rdbms.mariadb.models.QueryStatistic] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -2138,13 +2252,13 @@ class VirtualNetworkRule(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param virtual_network_subnet_id: The ARM resource id of the virtual network subnet. :type virtual_network_subnet_id: str @@ -2153,7 +2267,7 @@ class VirtualNetworkRule(Resource): :type ignore_missing_vnet_service_endpoint: bool :ivar state: Virtual Network Rule State. Possible values include: "Initializing", "InProgress", "Ready", "Deleting", "Unknown". - :vartype state: str or ~maria_db_management_client.models.VirtualNetworkRuleState + :vartype state: str or ~azure.mgmt.rdbms.mariadb.models.VirtualNetworkRuleState """ _validation = { @@ -2188,7 +2302,7 @@ class VirtualNetworkRuleListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: Array of results. - :vartype value: list[~maria_db_management_client.models.VirtualNetworkRule] + :vartype value: list[~azure.mgmt.rdbms.mariadb.models.VirtualNetworkRule] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -2217,13 +2331,13 @@ class WaitStatistic(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param start_time: Observation start time. :type start_time: ~datetime.datetime @@ -2323,7 +2437,7 @@ class WaitStatisticsResultList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of wait statistics. - :vartype value: list[~maria_db_management_client.models.WaitStatistic] + :vartype value: list[~azure.mgmt.rdbms.mariadb.models.WaitStatistic] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_models_py3.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_models_py3.py index c744020bec9a..750eecbf360a 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_models_py3.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/_models_py3.py @@ -16,17 +16,17 @@ class Resource(msrest.serialization.Model): - """Resource. + """Common fields that are returned in the response for all Azure Resource Manager resources. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str """ @@ -57,13 +57,13 @@ class Advisor(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param properties: The properties of a recommendation action advisor. :type properties: object @@ -98,7 +98,7 @@ class AdvisorsResultList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of recommendation action advisors. - :vartype value: list[~maria_db_management_client.models.Advisor] + :vartype value: list[~azure.mgmt.rdbms.mariadb.models.Advisor] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -126,7 +126,7 @@ class CloudErrorAutoGenerated(msrest.serialization.Model): """An error response from the Batch service. :param error: Error message. - :type error: ~maria_db_management_client.models.ErrorResponse + :type error: ~azure.mgmt.rdbms.mariadb.models.ErrorResponse """ _attribute_map = { @@ -148,13 +148,13 @@ class Configuration(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param value: Value of the configuration. :type value: str @@ -212,7 +212,7 @@ class ConfigurationListResult(msrest.serialization.Model): """A list of server configurations. :param value: The list of server configurations. - :type value: list[~maria_db_management_client.models.Configuration] + :type value: list[~azure.mgmt.rdbms.mariadb.models.Configuration] """ _attribute_map = { @@ -234,13 +234,13 @@ class Database(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param charset: The charset of the database. :type charset: str @@ -278,7 +278,7 @@ class DatabaseListResult(msrest.serialization.Model): """A List of databases. :param value: The list of databases housed in a server. - :type value: list[~maria_db_management_client.models.Database] + :type value: list[~azure.mgmt.rdbms.mariadb.models.Database] """ _attribute_map = { @@ -326,7 +326,7 @@ def __init__( class ErrorResponse(msrest.serialization.Model): - """The resource management error response. + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). Variables are only populated by the server, and will be ignored when sending a request. @@ -337,9 +337,9 @@ class ErrorResponse(msrest.serialization.Model): :ivar target: The error target. :vartype target: str :ivar details: The error details. - :vartype details: list[~maria_db_management_client.models.ErrorResponse] + :vartype details: list[~azure.mgmt.rdbms.mariadb.models.ErrorResponse] :ivar additional_info: The error additional info. - :vartype additional_info: list[~maria_db_management_client.models.ErrorAdditionalInfo] + :vartype additional_info: list[~azure.mgmt.rdbms.mariadb.models.ErrorAdditionalInfo] """ _validation = { @@ -377,13 +377,13 @@ class FirewallRule(Resource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param start_ip_address: Required. The start IP address of the server firewall rule. Must be IPv4 format. @@ -425,7 +425,7 @@ class FirewallRuleListResult(msrest.serialization.Model): """A list of firewall rules. :param value: The list of firewall rules in a server. - :type value: list[~maria_db_management_client.models.FirewallRule] + :type value: list[~azure.mgmt.rdbms.mariadb.models.FirewallRule] """ _attribute_map = { @@ -447,13 +447,13 @@ class LogFile(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param size_in_kb: Size of the log file. :type size_in_kb: long @@ -506,7 +506,7 @@ class LogFileListResult(msrest.serialization.Model): """A list of log files. :param value: The list of log files. - :type value: list[~maria_db_management_client.models.LogFile] + :type value: list[~azure.mgmt.rdbms.mariadb.models.LogFile] """ _attribute_map = { @@ -594,10 +594,10 @@ class Operation(msrest.serialization.Model): :ivar name: The name of the operation being performed on this particular object. :vartype name: str :ivar display: The localized display information for this particular operation or action. - :vartype display: ~maria_db_management_client.models.OperationDisplay + :vartype display: ~azure.mgmt.rdbms.mariadb.models.OperationDisplay :ivar origin: The intended executor of the operation. Possible values include: "NotSpecified", "user", "system". - :vartype origin: str or ~maria_db_management_client.models.OperationOrigin + :vartype origin: str or ~azure.mgmt.rdbms.mariadb.models.OperationOrigin :ivar properties: Additional descriptions for the operation. :vartype properties: dict[str, object] """ @@ -671,7 +671,7 @@ class OperationListResult(msrest.serialization.Model): """A list of resource provider operations. :param value: The list of resource provider operations. - :type value: list[~maria_db_management_client.models.Operation] + :type value: list[~azure.mgmt.rdbms.mariadb.models.Operation] """ _attribute_map = { @@ -692,7 +692,7 @@ class PerformanceTierListResult(msrest.serialization.Model): """A list of performance tiers. :param value: The list of performance tiers. - :type value: list[~maria_db_management_client.models.PerformanceTierProperties] + :type value: list[~azure.mgmt.rdbms.mariadb.models.PerformanceTierProperties] """ _attribute_map = { @@ -714,13 +714,33 @@ class PerformanceTierProperties(msrest.serialization.Model): :param id: ID of the performance tier. :type id: str + :param max_backup_retention_days: Maximum Backup retention in days for the performance tier + edition. + :type max_backup_retention_days: int + :param min_backup_retention_days: Minimum Backup retention in days for the performance tier + edition. + :type min_backup_retention_days: int + :param max_storage_mb: Max storage allowed for a server. + :type max_storage_mb: int + :param min_large_storage_mb: Max storage allowed for a server. + :type min_large_storage_mb: int + :param max_large_storage_mb: Max storage allowed for a server. + :type max_large_storage_mb: int + :param min_storage_mb: Max storage allowed for a server. + :type min_storage_mb: int :param service_level_objectives: Service level objectives associated with the performance tier. :type service_level_objectives: - list[~maria_db_management_client.models.PerformanceTierServiceLevelObjectives] + list[~azure.mgmt.rdbms.mariadb.models.PerformanceTierServiceLevelObjectives] """ _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'max_backup_retention_days': {'key': 'maxBackupRetentionDays', 'type': 'int'}, + 'min_backup_retention_days': {'key': 'minBackupRetentionDays', 'type': 'int'}, + 'max_storage_mb': {'key': 'maxStorageMB', 'type': 'int'}, + 'min_large_storage_mb': {'key': 'minLargeStorageMB', 'type': 'int'}, + 'max_large_storage_mb': {'key': 'maxLargeStorageMB', 'type': 'int'}, + 'min_storage_mb': {'key': 'minStorageMB', 'type': 'int'}, 'service_level_objectives': {'key': 'serviceLevelObjectives', 'type': '[PerformanceTierServiceLevelObjectives]'}, } @@ -728,11 +748,23 @@ def __init__( self, *, id: Optional[str] = None, + max_backup_retention_days: Optional[int] = None, + min_backup_retention_days: Optional[int] = None, + max_storage_mb: Optional[int] = None, + min_large_storage_mb: Optional[int] = None, + max_large_storage_mb: Optional[int] = None, + min_storage_mb: Optional[int] = None, service_level_objectives: Optional[List["PerformanceTierServiceLevelObjectives"]] = None, **kwargs ): super(PerformanceTierProperties, self).__init__(**kwargs) self.id = id + self.max_backup_retention_days = max_backup_retention_days + self.min_backup_retention_days = min_backup_retention_days + self.max_storage_mb = max_storage_mb + self.min_large_storage_mb = min_large_storage_mb + self.max_large_storage_mb = max_large_storage_mb + self.min_storage_mb = min_storage_mb self.service_level_objectives = service_level_objectives @@ -799,20 +831,20 @@ class PrivateEndpointConnection(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param private_endpoint: Private endpoint which the connection belongs to. - :type private_endpoint: ~maria_db_management_client.models.PrivateEndpointProperty + :type private_endpoint: ~azure.mgmt.rdbms.mariadb.models.PrivateEndpointProperty :param private_link_service_connection_state: Connection state of the private endpoint connection. :type private_link_service_connection_state: - ~maria_db_management_client.models.PrivateLinkServiceConnectionStateProperty + ~azure.mgmt.rdbms.mariadb.models.PrivateLinkServiceConnectionStateProperty :ivar provisioning_state: State of the private endpoint connection. :vartype provisioning_state: str """ @@ -852,7 +884,7 @@ class PrivateEndpointConnectionListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: Array of results. - :vartype value: list[~maria_db_management_client.models.PrivateEndpointConnection] + :vartype value: list[~azure.mgmt.rdbms.mariadb.models.PrivateEndpointConnection] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -902,16 +934,16 @@ class PrivateLinkResource(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar properties: The private link resource group id. - :vartype properties: ~maria_db_management_client.models.PrivateLinkResourceProperties + :vartype properties: ~azure.mgmt.rdbms.mariadb.models.PrivateLinkResourceProperties """ _validation = { @@ -942,7 +974,7 @@ class PrivateLinkResourceListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: Array of results. - :vartype value: list[~maria_db_management_client.models.PrivateLinkResource] + :vartype value: list[~azure.mgmt.rdbms.mariadb.models.PrivateLinkResource] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -1037,17 +1069,17 @@ def __init__( class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have everything other than required location and tags. + """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str """ @@ -1070,18 +1102,46 @@ def __init__( super(ProxyResource, self).__init__(**kwargs) +class QueryPerformanceInsightResetDataResult(msrest.serialization.Model): + """Result of Query Performance Insight data reset. + + :param status: Indicates result of the operation. Possible values include: "Succeeded", + "Failed". + :type status: str or + ~azure.mgmt.rdbms.mariadb.models.QueryPerformanceInsightResetDataResultState + :param message: operation message. + :type message: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Optional[Union[str, "QueryPerformanceInsightResetDataResultState"]] = None, + message: Optional[str] = None, + **kwargs + ): + super(QueryPerformanceInsightResetDataResult, self).__init__(**kwargs) + self.status = status + self.message = message + + class QueryStatistic(Resource): """Represents a Query Statistic. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param query_id: Database query identifier. :type query_id: str @@ -1160,13 +1220,13 @@ class QueryText(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param query_id: Query identifier unique to the server. :type query_id: str @@ -1206,7 +1266,7 @@ class QueryTextsResultList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of query texts. - :vartype value: list[~maria_db_management_client.models.QueryText] + :vartype value: list[~azure.mgmt.rdbms.mariadb.models.QueryText] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -1235,13 +1295,13 @@ class RecommendationAction(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param advisor_name: Advisor name. :type advisor_name: str @@ -1311,7 +1371,7 @@ class RecommendationActionsResultList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of recommendation action advisors. - :vartype value: list[~maria_db_management_client.models.RecommendationAction] + :vartype value: list[~azure.mgmt.rdbms.mariadb.models.RecommendationAction] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -1366,20 +1426,84 @@ def __init__( self.status = status +class RecoverableServerResource(Resource): + """A recoverable server resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar last_available_backup_date_time: The last available backup date time. + :vartype last_available_backup_date_time: str + :ivar service_level_objective: The service level objective. + :vartype service_level_objective: str + :ivar edition: Edition of the performance tier. + :vartype edition: str + :ivar v_core: vCore associated with the service level objective. + :vartype v_core: int + :ivar hardware_generation: Hardware generation associated with the service level objective. + :vartype hardware_generation: str + :ivar version: The MariaDB version. + :vartype version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_available_backup_date_time': {'readonly': True}, + 'service_level_objective': {'readonly': True}, + 'edition': {'readonly': True}, + 'v_core': {'readonly': True}, + 'hardware_generation': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'last_available_backup_date_time': {'key': 'properties.lastAvailableBackupDateTime', 'type': 'str'}, + 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, + 'edition': {'key': 'properties.edition', 'type': 'str'}, + 'v_core': {'key': 'properties.vCore', 'type': 'int'}, + 'hardware_generation': {'key': 'properties.hardwareGeneration', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RecoverableServerResource, self).__init__(**kwargs) + self.last_available_backup_date_time = None + self.service_level_objective = None + self.edition = None + self.v_core = None + self.hardware_generation = None + self.version = None + + class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. + """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] @@ -1421,37 +1545,37 @@ class Server(TrackedResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param location: Required. The geo-location where the resource lives. :type location: str :param sku: The SKU (pricing tier) of the server. - :type sku: ~maria_db_management_client.models.Sku + :type sku: ~azure.mgmt.rdbms.mariadb.models.Sku :param administrator_login: The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). :type administrator_login: str :param version: Server version. Possible values include: "5.6", "5.7". - :type version: str or ~maria_db_management_client.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or ~maria_db_management_client.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum :param user_visible_state: A state of a server that is visible to user. Possible values include: "Ready", "Dropping", "Disabled". - :type user_visible_state: str or ~maria_db_management_client.models.ServerState + :type user_visible_state: str or ~azure.mgmt.rdbms.mariadb.models.ServerState :param fully_qualified_domain_name: The fully qualified domain name of a server. :type fully_qualified_domain_name: str :param earliest_restore_date: Earliest restore point creation time (ISO8601 format). :type earliest_restore_date: ~datetime.datetime :param storage_profile: Storage profile of a server. - :type storage_profile: ~maria_db_management_client.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile :param replication_role: The replication role of the server. :type replication_role: str :param master_server_id: The master server id of a replica server. @@ -1461,10 +1585,10 @@ class Server(TrackedResource): :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or ~maria_db_management_client.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.mariadb.models.PublicNetworkAccessEnum :ivar private_endpoint_connections: List of private endpoint connections on a server. :vartype private_endpoint_connections: - list[~maria_db_management_client.models.ServerPrivateEndpointConnection] + list[~azure.mgmt.rdbms.mariadb.models.ServerPrivateEndpointConnection] """ _validation = { @@ -1538,9 +1662,9 @@ class ServerForCreate(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param sku: The SKU (pricing tier) of the server. - :type sku: ~maria_db_management_client.models.Sku + :type sku: ~azure.mgmt.rdbms.mariadb.models.Sku :param properties: Required. Properties of the server. - :type properties: ~maria_db_management_client.models.ServerPropertiesForCreate + :type properties: ~azure.mgmt.rdbms.mariadb.models.ServerPropertiesForCreate :param location: Required. The location the resource resides in. :type location: str :param tags: A set of tags. Application-specific metadata in the form of key-value pairs. @@ -1579,7 +1703,7 @@ class ServerListResult(msrest.serialization.Model): """A list of servers. :param value: The list of servers. - :type value: list[~maria_db_management_client.models.Server] + :type value: list[~azure.mgmt.rdbms.mariadb.models.Server] """ _attribute_map = { @@ -1604,8 +1728,7 @@ class ServerPrivateEndpointConnection(msrest.serialization.Model): :ivar id: Resource Id of the private endpoint connection. :vartype id: str :ivar properties: Private endpoint connection properties. - :vartype properties: - ~maria_db_management_client.models.ServerPrivateEndpointConnectionProperties + :vartype properties: ~azure.mgmt.rdbms.mariadb.models.ServerPrivateEndpointConnectionProperties """ _validation = { @@ -1633,15 +1756,15 @@ class ServerPrivateEndpointConnectionProperties(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :param private_endpoint: Private endpoint which the connection belongs to. - :type private_endpoint: ~maria_db_management_client.models.PrivateEndpointProperty + :type private_endpoint: ~azure.mgmt.rdbms.mariadb.models.PrivateEndpointProperty :param private_link_service_connection_state: Connection state of the private endpoint connection. :type private_link_service_connection_state: - ~maria_db_management_client.models.ServerPrivateLinkServiceConnectionStateProperty + ~azure.mgmt.rdbms.mariadb.models.ServerPrivateLinkServiceConnectionStateProperty :ivar provisioning_state: State of the private endpoint connection. Possible values include: "Approving", "Ready", "Dropping", "Failed", "Rejecting". :vartype provisioning_state: str or - ~maria_db_management_client.models.PrivateEndpointProvisioningState + ~azure.mgmt.rdbms.mariadb.models.PrivateEndpointProvisioningState """ _validation = { @@ -1676,13 +1799,13 @@ class ServerPrivateLinkServiceConnectionStateProperty(msrest.serialization.Model :param status: Required. The private link service connection status. Possible values include: "Approved", "Pending", "Rejected", "Disconnected". - :type status: str or ~maria_db_management_client.models.PrivateLinkServiceConnectionStateStatus + :type status: str or ~azure.mgmt.rdbms.mariadb.models.PrivateLinkServiceConnectionStateStatus :param description: Required. The private link service connection description. :type description: str :ivar actions_required: The actions required for private link service connection. Possible values include: "None". :vartype actions_required: str or - ~maria_db_management_client.models.PrivateLinkServiceConnectionStateActionsRequire + ~azure.mgmt.rdbms.mariadb.models.PrivateLinkServiceConnectionStateActionsRequire """ _validation = { @@ -1719,19 +1842,19 @@ class ServerPropertiesForCreate(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param version: Server version. Possible values include: "5.6", "5.7". - :type version: str or ~maria_db_management_client.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or ~maria_db_management_client.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or ~maria_db_management_client.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.mariadb.models.PublicNetworkAccessEnum :param storage_profile: Storage profile of a server. - :type storage_profile: ~maria_db_management_client.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile :param create_mode: Required. The mode to create a new server.Constant filled by server. Possible values include: "Default", "PointInTimeRestore", "GeoRestore", "Replica". - :type create_mode: str or ~maria_db_management_client.models.CreateMode + :type create_mode: str or ~azure.mgmt.rdbms.mariadb.models.CreateMode """ _validation = { @@ -1773,19 +1896,19 @@ class ServerPropertiesForDefaultCreate(ServerPropertiesForCreate): All required parameters must be populated in order to send to Azure. :param version: Server version. Possible values include: "5.6", "5.7". - :type version: str or ~maria_db_management_client.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or ~maria_db_management_client.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or ~maria_db_management_client.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.mariadb.models.PublicNetworkAccessEnum :param storage_profile: Storage profile of a server. - :type storage_profile: ~maria_db_management_client.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile :param create_mode: Required. The mode to create a new server.Constant filled by server. Possible values include: "Default", "PointInTimeRestore", "GeoRestore", "Replica". - :type create_mode: str or ~maria_db_management_client.models.CreateMode + :type create_mode: str or ~azure.mgmt.rdbms.mariadb.models.CreateMode :param administrator_login: Required. The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). :type administrator_login: str @@ -1832,19 +1955,19 @@ class ServerPropertiesForGeoRestore(ServerPropertiesForCreate): All required parameters must be populated in order to send to Azure. :param version: Server version. Possible values include: "5.6", "5.7". - :type version: str or ~maria_db_management_client.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or ~maria_db_management_client.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or ~maria_db_management_client.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.mariadb.models.PublicNetworkAccessEnum :param storage_profile: Storage profile of a server. - :type storage_profile: ~maria_db_management_client.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile :param create_mode: Required. The mode to create a new server.Constant filled by server. Possible values include: "Default", "PointInTimeRestore", "GeoRestore", "Replica". - :type create_mode: str or ~maria_db_management_client.models.CreateMode + :type create_mode: str or ~azure.mgmt.rdbms.mariadb.models.CreateMode :param source_server_id: Required. The source server id to restore from. :type source_server_id: str """ @@ -1884,19 +2007,19 @@ class ServerPropertiesForReplica(ServerPropertiesForCreate): All required parameters must be populated in order to send to Azure. :param version: Server version. Possible values include: "5.6", "5.7". - :type version: str or ~maria_db_management_client.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or ~maria_db_management_client.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or ~maria_db_management_client.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.mariadb.models.PublicNetworkAccessEnum :param storage_profile: Storage profile of a server. - :type storage_profile: ~maria_db_management_client.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile :param create_mode: Required. The mode to create a new server.Constant filled by server. Possible values include: "Default", "PointInTimeRestore", "GeoRestore", "Replica". - :type create_mode: str or ~maria_db_management_client.models.CreateMode + :type create_mode: str or ~azure.mgmt.rdbms.mariadb.models.CreateMode :param source_server_id: Required. The master server id to create replica from. :type source_server_id: str """ @@ -1936,19 +2059,19 @@ class ServerPropertiesForRestore(ServerPropertiesForCreate): All required parameters must be populated in order to send to Azure. :param version: Server version. Possible values include: "5.6", "5.7". - :type version: str or ~maria_db_management_client.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or ~maria_db_management_client.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or ~maria_db_management_client.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.mariadb.models.PublicNetworkAccessEnum :param storage_profile: Storage profile of a server. - :type storage_profile: ~maria_db_management_client.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile :param create_mode: Required. The mode to create a new server.Constant filled by server. Possible values include: "Default", "PointInTimeRestore", "GeoRestore", "Replica". - :type create_mode: str or ~maria_db_management_client.models.CreateMode + :type create_mode: str or ~azure.mgmt.rdbms.mariadb.models.CreateMode :param source_server_id: Required. The source server id to restore from. :type source_server_id: str :param restore_point_in_time: Required. Restore point creation time (ISO8601 format), @@ -1994,17 +2117,17 @@ class ServerSecurityAlertPolicy(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param state: Specifies the state of the policy, whether it is enabled or disabled. Possible values include: "Enabled", "Disabled". - :type state: str or ~maria_db_management_client.models.ServerSecurityAlertPolicyState + :type state: str or ~azure.mgmt.rdbms.mariadb.models.ServerSecurityAlertPolicyState :param disabled_alerts: Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly. :type disabled_alerts: list[str] @@ -2068,22 +2191,22 @@ class ServerUpdateParameters(msrest.serialization.Model): """Parameters allowed to update for a server. :param sku: The SKU (pricing tier) of the server. - :type sku: ~maria_db_management_client.models.Sku + :type sku: ~azure.mgmt.rdbms.mariadb.models.Sku :param tags: A set of tags. Application-specific metadata in the form of key-value pairs. :type tags: dict[str, str] :param storage_profile: Storage profile of a server. - :type storage_profile: ~maria_db_management_client.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile :param administrator_login_password: The password of the administrator login. :type administrator_login_password: str :param version: The version of a server. Possible values include: "5.6", "5.7". - :type version: str or ~maria_db_management_client.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or ~maria_db_management_client.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or ~maria_db_management_client.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.mariadb.models.PublicNetworkAccessEnum :param replication_role: The replication role of the server. :type replication_role: str """ @@ -2133,7 +2256,7 @@ class Sku(msrest.serialization.Model): :type name: str :param tier: The tier of the particular SKU, e.g. Basic. Possible values include: "Basic", "GeneralPurpose", "MemoryOptimized". - :type tier: str or ~maria_db_management_client.models.SkuTier + :type tier: str or ~azure.mgmt.rdbms.mariadb.models.SkuTier :param capacity: The scale up/out capacity, representing server's compute units. :type capacity: int :param size: The size code, to be interpreted by resource as appropriate. @@ -2180,12 +2303,12 @@ class StorageProfile(msrest.serialization.Model): :type backup_retention_days: int :param geo_redundant_backup: Enable Geo-redundant or not for server backup. Possible values include: "Enabled", "Disabled". - :type geo_redundant_backup: str or ~maria_db_management_client.models.GeoRedundantBackup + :type geo_redundant_backup: str or ~azure.mgmt.rdbms.mariadb.models.GeoRedundantBackup :param storage_mb: Max storage allowed for a server. :type storage_mb: int :param storage_autogrow: Enable Storage Auto Grow. Possible values include: "Enabled", "Disabled". - :type storage_autogrow: str or ~maria_db_management_client.models.StorageAutogrow + :type storage_autogrow: str or ~azure.mgmt.rdbms.mariadb.models.StorageAutogrow """ _attribute_map = { @@ -2295,7 +2418,7 @@ class TopQueryStatisticsResultList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of top query statistics. - :vartype value: list[~maria_db_management_client.models.QueryStatistic] + :vartype value: list[~azure.mgmt.rdbms.mariadb.models.QueryStatistic] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -2324,13 +2447,13 @@ class VirtualNetworkRule(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param virtual_network_subnet_id: The ARM resource id of the virtual network subnet. :type virtual_network_subnet_id: str @@ -2339,7 +2462,7 @@ class VirtualNetworkRule(Resource): :type ignore_missing_vnet_service_endpoint: bool :ivar state: Virtual Network Rule State. Possible values include: "Initializing", "InProgress", "Ready", "Deleting", "Unknown". - :vartype state: str or ~maria_db_management_client.models.VirtualNetworkRuleState + :vartype state: str or ~azure.mgmt.rdbms.mariadb.models.VirtualNetworkRuleState """ _validation = { @@ -2377,7 +2500,7 @@ class VirtualNetworkRuleListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: Array of results. - :vartype value: list[~maria_db_management_client.models.VirtualNetworkRule] + :vartype value: list[~azure.mgmt.rdbms.mariadb.models.VirtualNetworkRule] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -2406,13 +2529,13 @@ class WaitStatistic(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param start_time: Observation start time. :type start_time: ~datetime.datetime @@ -2526,7 +2649,7 @@ class WaitStatisticsResultList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of wait statistics. - :vartype value: list[~maria_db_management_client.models.WaitStatistic] + :vartype value: list[~azure.mgmt.rdbms.mariadb.models.WaitStatistic] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/__init__.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/__init__.py index 61910e206185..33ffedbabf7f 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/__init__.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/__init__.py @@ -12,15 +12,18 @@ from ._virtual_network_rules_operations import VirtualNetworkRulesOperations from ._databases_operations import DatabasesOperations from ._configurations_operations import ConfigurationsOperations +from ._server_parameters_operations import ServerParametersOperations from ._log_files_operations import LogFilesOperations +from ._recoverable_servers_operations import RecoverableServersOperations +from ._server_based_performance_tier_operations import ServerBasedPerformanceTierOperations from ._location_based_performance_tier_operations import LocationBasedPerformanceTierOperations from ._check_name_availability_operations import CheckNameAvailabilityOperations from ._operations import Operations from ._query_texts_operations import QueryTextsOperations from ._top_query_statistics_operations import TopQueryStatisticsOperations from ._wait_statistics_operations import WaitStatisticsOperations -from ._advisors_operations import AdvisorsOperations from ._maria_db_management_client_operations import MariaDBManagementClientOperationsMixin +from ._advisors_operations import AdvisorsOperations from ._recommended_actions_operations import RecommendedActionsOperations from ._location_based_recommended_action_sessions_operation_status_operations import LocationBasedRecommendedActionSessionsOperationStatusOperations from ._location_based_recommended_action_sessions_result_operations import LocationBasedRecommendedActionSessionsResultOperations @@ -35,15 +38,18 @@ 'VirtualNetworkRulesOperations', 'DatabasesOperations', 'ConfigurationsOperations', + 'ServerParametersOperations', 'LogFilesOperations', + 'RecoverableServersOperations', + 'ServerBasedPerformanceTierOperations', 'LocationBasedPerformanceTierOperations', 'CheckNameAvailabilityOperations', 'Operations', 'QueryTextsOperations', 'TopQueryStatisticsOperations', 'WaitStatisticsOperations', - 'AdvisorsOperations', 'MariaDBManagementClientOperationsMixin', + 'AdvisorsOperations', 'RecommendedActionsOperations', 'LocationBasedRecommendedActionSessionsOperationStatusOperations', 'LocationBasedRecommendedActionSessionsResultOperations', diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_advisors_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_advisors_operations.py index 57de0b31fe67..708e89d315b0 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_advisors_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_advisors_operations.py @@ -30,7 +30,7 @@ class AdvisorsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -63,7 +63,7 @@ def get( :type advisor_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Advisor, or the result of cls(response) - :rtype: ~maria_db_management_client.models.Advisor + :rtype: ~azure.mgmt.rdbms.mariadb.models.Advisor :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Advisor"] @@ -123,7 +123,7 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AdvisorsResultList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~maria_db_management_client.models.AdvisorsResultList] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mariadb.models.AdvisorsResultList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AdvisorsResultList"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_check_name_availability_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_check_name_availability_operations.py index a29ba3dfe25c..d94451aa2332 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_check_name_availability_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_check_name_availability_operations.py @@ -29,7 +29,7 @@ class CheckNameAvailabilityOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -54,10 +54,10 @@ def execute( :param name_availability_request: The required parameters for checking if resource name is available. - :type name_availability_request: ~maria_db_management_client.models.NameAvailabilityRequest + :type name_availability_request: ~azure.mgmt.rdbms.mariadb.models.NameAvailabilityRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: NameAvailability, or the result of cls(response) - :rtype: ~maria_db_management_client.models.NameAvailability + :rtype: ~azure.mgmt.rdbms.mariadb.models.NameAvailability :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NameAvailability"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_configurations_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_configurations_operations.py index 36afba0f97bc..1deec716484a 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_configurations_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_configurations_operations.py @@ -32,7 +32,7 @@ class ConfigurationsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -123,7 +123,7 @@ def begin_create_or_update( :param configuration_name: The name of the server configuration. :type configuration_name: str :param parameters: The required parameters for updating a server configuration. - :type parameters: ~maria_db_management_client.models.Configuration + :type parameters: ~azure.mgmt.rdbms.mariadb.models.Configuration :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: True for ARMPolling, False for no polling, or a @@ -131,7 +131,7 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Configuration or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~maria_db_management_client.models.Configuration] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mariadb.models.Configuration] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -200,7 +200,7 @@ def get( :type configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Configuration, or the result of cls(response) - :rtype: ~maria_db_management_client.models.Configuration + :rtype: ~azure.mgmt.rdbms.mariadb.models.Configuration :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Configuration"] @@ -260,7 +260,7 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ConfigurationListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~maria_db_management_client.models.ConfigurationListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mariadb.models.ConfigurationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfigurationListResult"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_databases_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_databases_operations.py index 7b396a0fd3c8..bf1eecad5ffc 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_databases_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_databases_operations.py @@ -32,7 +32,7 @@ class DatabasesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -126,7 +126,7 @@ def begin_create_or_update( :param database_name: The name of the database. :type database_name: str :param parameters: The required parameters for creating or updating a database. - :type parameters: ~maria_db_management_client.models.Database + :type parameters: ~azure.mgmt.rdbms.mariadb.models.Database :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: True for ARMPolling, False for no polling, or a @@ -134,7 +134,7 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Database or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~maria_db_management_client.models.Database] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mariadb.models.Database] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -320,7 +320,7 @@ def get( :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Database, or the result of cls(response) - :rtype: ~maria_db_management_client.models.Database + :rtype: ~azure.mgmt.rdbms.mariadb.models.Database :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Database"] @@ -380,7 +380,7 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DatabaseListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~maria_db_management_client.models.DatabaseListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mariadb.models.DatabaseListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseListResult"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_firewall_rules_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_firewall_rules_operations.py index 90d49ed2487a..db9d9854f058 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_firewall_rules_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_firewall_rules_operations.py @@ -32,7 +32,7 @@ class FirewallRulesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -126,7 +126,7 @@ def begin_create_or_update( :param firewall_rule_name: The name of the server firewall rule. :type firewall_rule_name: str :param parameters: The required parameters for creating or updating a firewall rule. - :type parameters: ~maria_db_management_client.models.FirewallRule + :type parameters: ~azure.mgmt.rdbms.mariadb.models.FirewallRule :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: True for ARMPolling, False for no polling, or a @@ -134,7 +134,7 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either FirewallRule or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~maria_db_management_client.models.FirewallRule] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mariadb.models.FirewallRule] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -320,7 +320,7 @@ def get( :type firewall_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: FirewallRule, or the result of cls(response) - :rtype: ~maria_db_management_client.models.FirewallRule + :rtype: ~azure.mgmt.rdbms.mariadb.models.FirewallRule :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRule"] @@ -380,7 +380,7 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either FirewallRuleListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~maria_db_management_client.models.FirewallRuleListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mariadb.models.FirewallRuleListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRuleListResult"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_location_based_performance_tier_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_location_based_performance_tier_operations.py index 73cb4707a2c7..d721ed5a36b9 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_location_based_performance_tier_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_location_based_performance_tier_operations.py @@ -30,7 +30,7 @@ class LocationBasedPerformanceTierOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -57,7 +57,7 @@ def list( :type location_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerformanceTierListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~maria_db_management_client.models.PerformanceTierListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mariadb.models.PerformanceTierListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PerformanceTierListResult"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_location_based_recommended_action_sessions_operation_status_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_location_based_recommended_action_sessions_operation_status_operations.py index c0b4d2408401..e62d7533cd56 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_location_based_recommended_action_sessions_operation_status_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_location_based_recommended_action_sessions_operation_status_operations.py @@ -29,7 +29,7 @@ class LocationBasedRecommendedActionSessionsOperationStatusOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -59,7 +59,7 @@ def get( :type operation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendedActionSessionsOperationStatus, or the result of cls(response) - :rtype: ~maria_db_management_client.models.RecommendedActionSessionsOperationStatus + :rtype: ~azure.mgmt.rdbms.mariadb.models.RecommendedActionSessionsOperationStatus :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendedActionSessionsOperationStatus"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_location_based_recommended_action_sessions_result_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_location_based_recommended_action_sessions_result_operations.py index ae506e1b5c76..343ae273be33 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_location_based_recommended_action_sessions_result_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_location_based_recommended_action_sessions_result_operations.py @@ -30,7 +30,7 @@ class LocationBasedRecommendedActionSessionsResultOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -60,7 +60,7 @@ def list( :type operation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationActionsResultList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~maria_db_management_client.models.RecommendationActionsResultListor ~maria_db_management_client.models.RecommendationActionsResultList] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mariadb.models.RecommendationActionsResultListor ~azure.mgmt.rdbms.mariadb.models.RecommendationActionsResultList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationActionsResultList"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_log_files_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_log_files_operations.py index d9dc934ddb65..1d608a74e608 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_log_files_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_log_files_operations.py @@ -30,7 +30,7 @@ class LogFilesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -60,7 +60,7 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either LogFileListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~maria_db_management_client.models.LogFileListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mariadb.models.LogFileListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.LogFileListResult"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_maria_db_management_client_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_maria_db_management_client_operations.py index d286528c6100..7f538959c85e 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_maria_db_management_client_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_maria_db_management_client_operations.py @@ -26,6 +26,65 @@ class MariaDBManagementClientOperationsMixin(object): + def reset_query_performance_insight_data( + self, + resource_group_name, # type: str + server_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.QueryPerformanceInsightResetDataResult" + """Reset data for Query Performance Insight. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: QueryPerformanceInsightResetDataResult, or the result of cls(response) + :rtype: ~azure.mgmt.rdbms.mariadb.models.QueryPerformanceInsightResetDataResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.QueryPerformanceInsightResetDataResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2018-06-01" + accept = "application/json" + + # Construct URL + url = self.reset_query_performance_insight_data.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('QueryPerformanceInsightResetDataResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + reset_query_performance_insight_data.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/resetQueryPerformanceInsightData'} # type: ignore + def _create_recommended_action_session_initial( self, resource_group_name, # type: str diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_operations.py index ab485587205a..07746642fa6b 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_operations.py @@ -29,7 +29,7 @@ class Operations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -53,7 +53,7 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: OperationListResult, or the result of cls(response) - :rtype: ~maria_db_management_client.models.OperationListResult + :rtype: ~azure.mgmt.rdbms.mariadb.models.OperationListResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_private_endpoint_connections_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_private_endpoint_connections_operations.py index 238569ddb605..1541d0718c8e 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_private_endpoint_connections_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_private_endpoint_connections_operations.py @@ -32,7 +32,7 @@ class PrivateEndpointConnectionsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -65,7 +65,7 @@ def get( :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PrivateEndpointConnection, or the result of cls(response) - :rtype: ~maria_db_management_client.models.PrivateEndpointConnection + :rtype: ~azure.mgmt.rdbms.mariadb.models.PrivateEndpointConnection :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] @@ -186,7 +186,7 @@ def begin_create_or_update( :param private_endpoint_connection_name: :type private_endpoint_connection_name: str :param parameters: - :type parameters: ~maria_db_management_client.models.PrivateEndpointConnection + :type parameters: ~azure.mgmt.rdbms.mariadb.models.PrivateEndpointConnection :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: True for ARMPolling, False for no polling, or a @@ -194,7 +194,7 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~maria_db_management_client.models.PrivateEndpointConnection] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mariadb.models.PrivateEndpointConnection] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -439,7 +439,7 @@ def begin_update_tags( :type private_endpoint_connection_name: str :param parameters: Parameters supplied to the Update private endpoint connection Tags operation. - :type parameters: ~maria_db_management_client.models.TagsObject + :type parameters: ~azure.mgmt.rdbms.mariadb.models.TagsObject :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: True for ARMPolling, False for no polling, or a @@ -447,7 +447,7 @@ def begin_update_tags( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~maria_db_management_client.models.PrivateEndpointConnection] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mariadb.models.PrivateEndpointConnection] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -513,7 +513,7 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~maria_db_management_client.models.PrivateEndpointConnectionListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mariadb.models.PrivateEndpointConnectionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_private_link_resources_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_private_link_resources_operations.py index 61ab097dc23b..56891f30503e 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_private_link_resources_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_private_link_resources_operations.py @@ -30,7 +30,7 @@ class PrivateLinkResourcesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -60,7 +60,7 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PrivateLinkResourceListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~maria_db_management_client.models.PrivateLinkResourceListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mariadb.models.PrivateLinkResourceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] @@ -138,7 +138,7 @@ def get( :type group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PrivateLinkResource, or the result of cls(response) - :rtype: ~maria_db_management_client.models.PrivateLinkResource + :rtype: ~azure.mgmt.rdbms.mariadb.models.PrivateLinkResource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResource"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_query_texts_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_query_texts_operations.py index 0e010b617735..7d363e73cae3 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_query_texts_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_query_texts_operations.py @@ -30,7 +30,7 @@ class QueryTextsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -63,7 +63,7 @@ def get( :type query_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: QueryText, or the result of cls(response) - :rtype: ~maria_db_management_client.models.QueryText + :rtype: ~azure.mgmt.rdbms.mariadb.models.QueryText :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.QueryText"] @@ -126,7 +126,7 @@ def list_by_server( :type query_ids: list[str] :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either QueryTextsResultList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~maria_db_management_client.models.QueryTextsResultList] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mariadb.models.QueryTextsResultList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.QueryTextsResultList"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_recommended_actions_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_recommended_actions_operations.py index d232795a51cf..be8c818d1042 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_recommended_actions_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_recommended_actions_operations.py @@ -30,7 +30,7 @@ class RecommendedActionsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -66,7 +66,7 @@ def get( :type recommended_action_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationAction, or the result of cls(response) - :rtype: ~maria_db_management_client.models.RecommendationAction + :rtype: ~azure.mgmt.rdbms.mariadb.models.RecommendationAction :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationAction"] @@ -133,7 +133,7 @@ def list_by_server( :type session_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationActionsResultList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~maria_db_management_client.models.RecommendationActionsResultList] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mariadb.models.RecommendationActionsResultList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationActionsResultList"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_recoverable_servers_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_recoverable_servers_operations.py new file mode 100644 index 000000000000..c7dc536fcd76 --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_recoverable_servers_operations.py @@ -0,0 +1,104 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class RecoverableServersOperations(object): + """RecoverableServersOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.rdbms.mariadb.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + server_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.RecoverableServerResource" + """Gets a recoverable MariaDB Server. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RecoverableServerResource, or the result of cls(response) + :rtype: ~azure.mgmt.rdbms.mariadb.models.RecoverableServerResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecoverableServerResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2018-06-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RecoverableServerResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB/servers/{serverName}/recoverableServers'} # type: ignore diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_replicas_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_replicas_operations.py index 6d15221692ee..835a4ba48fa0 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_replicas_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_replicas_operations.py @@ -30,7 +30,7 @@ class ReplicasOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -60,7 +60,7 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~maria_db_management_client.models.ServerListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mariadb.models.ServerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerListResult"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_server_based_performance_tier_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_server_based_performance_tier_operations.py new file mode 100644 index 000000000000..d0adae4a1938 --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_server_based_performance_tier_operations.py @@ -0,0 +1,121 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ServerBasedPerformanceTierOperations(object): + """ServerBasedPerformanceTierOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.rdbms.mariadb.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + server_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PerformanceTierListResult"] + """List all the performance tiers for a MariaDB server. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PerformanceTierListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mariadb.models.PerformanceTierListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerformanceTierListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2018-06-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + 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] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('PerformanceTierListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB/servers/{serverName}/performanceTiers'} # type: ignore diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_server_parameters_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_server_parameters_operations.py new file mode 100644 index 000000000000..c66b89aa5595 --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_server_parameters_operations.py @@ -0,0 +1,175 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ServerParametersOperations(object): + """ServerParametersOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.rdbms.mariadb.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _list_update_configurations_initial( + self, + resource_group_name, # type: str + server_name, # type: str + value, # type: "_models.ConfigurationListResult" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ConfigurationListResult"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ConfigurationListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2018-06-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._list_update_configurations_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(value, 'ConfigurationListResult') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConfigurationListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _list_update_configurations_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB/servers/{serverName}/updateConfigurations'} # type: ignore + + def begin_list_update_configurations( + self, + resource_group_name, # type: str + server_name, # type: str + value, # type: "_models.ConfigurationListResult" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ConfigurationListResult"] + """Update a list of configurations in a given server. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param value: The parameters for updating a list of server configuration. + :type value: ~azure.mgmt.rdbms.mariadb.models.ConfigurationListResult + :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: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ConfigurationListResult or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mariadb.models.ConfigurationListResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfigurationListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._list_update_configurations_initial( + resource_group_name=resource_group_name, + server_name=server_name, + value=value, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ConfigurationListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_list_update_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB/servers/{serverName}/updateConfigurations'} # type: ignore diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_server_security_alert_policies_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_server_security_alert_policies_operations.py index a60fd69ff75c..e4024d9760dd 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_server_security_alert_policies_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_server_security_alert_policies_operations.py @@ -31,7 +31,7 @@ class ServerSecurityAlertPoliciesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -61,10 +61,10 @@ def get( :param server_name: The name of the server. :type server_name: str :param security_alert_policy_name: The name of the security alert policy. - :type security_alert_policy_name: str or ~maria_db_management_client.models.SecurityAlertPolicyName + :type security_alert_policy_name: str or ~azure.mgmt.rdbms.mariadb.models.SecurityAlertPolicyName :keyword callable cls: A custom type or function that will be passed the direct response :return: ServerSecurityAlertPolicy, or the result of cls(response) - :rtype: ~maria_db_management_client.models.ServerSecurityAlertPolicy + :rtype: ~azure.mgmt.rdbms.mariadb.models.ServerSecurityAlertPolicy :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerSecurityAlertPolicy"] @@ -183,9 +183,9 @@ def begin_create_or_update( :param server_name: The name of the server. :type server_name: str :param security_alert_policy_name: The name of the threat detection policy. - :type security_alert_policy_name: str or ~maria_db_management_client.models.SecurityAlertPolicyName + :type security_alert_policy_name: str or ~azure.mgmt.rdbms.mariadb.models.SecurityAlertPolicyName :param parameters: The server security alert policy. - :type parameters: ~maria_db_management_client.models.ServerSecurityAlertPolicy + :type parameters: ~azure.mgmt.rdbms.mariadb.models.ServerSecurityAlertPolicy :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: True for ARMPolling, False for no polling, or a @@ -193,7 +193,7 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ServerSecurityAlertPolicy or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~maria_db_management_client.models.ServerSecurityAlertPolicy] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mariadb.models.ServerSecurityAlertPolicy] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_servers_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_servers_operations.py index 820246d1ac0f..ca23ee7ddff8 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_servers_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_servers_operations.py @@ -32,7 +32,7 @@ class ServersOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -122,7 +122,7 @@ def begin_create( :param server_name: The name of the server. :type server_name: str :param parameters: The required parameters for creating or updating a server. - :type parameters: ~maria_db_management_client.models.ServerForCreate + :type parameters: ~azure.mgmt.rdbms.mariadb.models.ServerForCreate :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: True for ARMPolling, False for no polling, or a @@ -130,7 +130,7 @@ def begin_create( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Server or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~maria_db_management_client.models.Server] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mariadb.models.Server] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -251,7 +251,7 @@ def begin_update( :param server_name: The name of the server. :type server_name: str :param parameters: The required parameters for updating a server. - :type parameters: ~maria_db_management_client.models.ServerUpdateParameters + :type parameters: ~azure.mgmt.rdbms.mariadb.models.ServerUpdateParameters :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: True for ARMPolling, False for no polling, or a @@ -259,7 +259,7 @@ def begin_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Server or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~maria_db_management_client.models.Server] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mariadb.models.Server] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -433,7 +433,7 @@ def get( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Server, or the result of cls(response) - :rtype: ~maria_db_management_client.models.Server + :rtype: ~azure.mgmt.rdbms.mariadb.models.Server :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Server"] @@ -489,7 +489,7 @@ def list_by_resource_group( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~maria_db_management_client.models.ServerListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mariadb.models.ServerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerListResult"] @@ -557,7 +557,7 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~maria_db_management_client.models.ServerListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mariadb.models.ServerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerListResult"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_top_query_statistics_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_top_query_statistics_operations.py index be29b785e75e..fc86c83c2e9f 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_top_query_statistics_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_top_query_statistics_operations.py @@ -30,7 +30,7 @@ class TopQueryStatisticsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -63,7 +63,7 @@ def get( :type query_statistic_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: QueryStatistic, or the result of cls(response) - :rtype: ~maria_db_management_client.models.QueryStatistic + :rtype: ~azure.mgmt.rdbms.mariadb.models.QueryStatistic :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.QueryStatistic"] @@ -123,10 +123,10 @@ def list_by_server( :param server_name: The name of the server. :type server_name: str :param parameters: The required parameters for retrieving top query statistics. - :type parameters: ~maria_db_management_client.models.TopQueryStatisticsInput + :type parameters: ~azure.mgmt.rdbms.mariadb.models.TopQueryStatisticsInput :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either TopQueryStatisticsResultList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~maria_db_management_client.models.TopQueryStatisticsResultList] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mariadb.models.TopQueryStatisticsResultList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.TopQueryStatisticsResultList"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_virtual_network_rules_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_virtual_network_rules_operations.py index dad618d156cb..86c1831df57e 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_virtual_network_rules_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_virtual_network_rules_operations.py @@ -32,7 +32,7 @@ class VirtualNetworkRulesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -65,7 +65,7 @@ def get( :type virtual_network_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualNetworkRule, or the result of cls(response) - :rtype: ~maria_db_management_client.models.VirtualNetworkRule + :rtype: ~azure.mgmt.rdbms.mariadb.models.VirtualNetworkRule :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkRule"] @@ -189,7 +189,7 @@ def begin_create_or_update( :param virtual_network_rule_name: The name of the virtual network rule. :type virtual_network_rule_name: str :param parameters: The requested virtual Network Rule Resource state. - :type parameters: ~maria_db_management_client.models.VirtualNetworkRule + :type parameters: ~azure.mgmt.rdbms.mariadb.models.VirtualNetworkRule :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: True for ARMPolling, False for no polling, or a @@ -197,7 +197,7 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either VirtualNetworkRule or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~maria_db_management_client.models.VirtualNetworkRule] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mariadb.models.VirtualNetworkRule] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -378,7 +378,7 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualNetworkRuleListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~maria_db_management_client.models.VirtualNetworkRuleListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mariadb.models.VirtualNetworkRuleListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkRuleListResult"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_wait_statistics_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_wait_statistics_operations.py index 08bc20619928..b831b22b214e 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_wait_statistics_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_wait_statistics_operations.py @@ -30,7 +30,7 @@ class WaitStatisticsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~maria_db_management_client.models + :type models: ~azure.mgmt.rdbms.mariadb.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -63,7 +63,7 @@ def get( :type wait_statistics_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: WaitStatistic, or the result of cls(response) - :rtype: ~maria_db_management_client.models.WaitStatistic + :rtype: ~azure.mgmt.rdbms.mariadb.models.WaitStatistic :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.WaitStatistic"] @@ -123,10 +123,10 @@ def list_by_server( :param server_name: The name of the server. :type server_name: str :param parameters: The required parameters for retrieving wait statistics. - :type parameters: ~maria_db_management_client.models.WaitStatisticsInput + :type parameters: ~azure.mgmt.rdbms.mariadb.models.WaitStatisticsInput :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WaitStatisticsResultList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~maria_db_management_client.models.WaitStatisticsResultList] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mariadb.models.WaitStatisticsResultList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.WaitStatisticsResultList"] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/_configuration.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/_configuration.py index c324e1c6a278..25e6b7e14e60 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/_configuration.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/_configuration.py @@ -1,21 +1,24 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any + +from typing import TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy -from ._version import VERSION +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential +VERSION = "unknown" class MySQLManagementClientConfiguration(Configuration): """Configuration for MySQLManagementClient. @@ -45,7 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'azure-mgmt-rdbms/{}'.format(VERSION)) + kwargs.setdefault('sdk_moniker', 'mgmt-rdbms/{}'.format(VERSION)) self._configure(**kwargs) def _configure( diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/_my_sql_management_client.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/_my_sql_management_client.py index abfa2d305350..87b183885a53 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/_my_sql_management_client.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/_my_sql_management_client.py @@ -1,437 +1,191 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + from azure.mgmt.core import ARMPipelineClient -from msrest import Serializer, Deserializer +from msrest import Deserializer, Serializer -from azure.profiles import KnownProfiles, ProfileDefinition -from azure.profiles.multiapiclient import MultiApiClientMixin -from ._configuration import MySQLManagementClientConfiguration -from ._operations_mixin import MySQLManagementClientOperationsMixin -class _SDKClient(object): - def __init__(self, *args, **kwargs): - """This is a fake class to support current implemetation of MultiApiClientMixin." - Will be removed in final version of multiapi azure-core based client - """ - pass +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional -class MySQLManagementClient(MySQLManagementClientOperationsMixin, MultiApiClientMixin, _SDKClient): - """The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business model. + from azure.core.credentials import TokenCredential - This ready contains multiple API versions, to help you deal with all of the Azure clouds - (Azure Stack, Azure Government, Azure China, etc.). - By default, it uses the latest API version available on public Azure. - For production, you should stick to a particular api-version and/or profile. - The profile sets a mapping between an operation group and its API version. - The api-version parameter sets the default API version if the operation - group is not described in the profile. +from ._configuration import MySQLManagementClientConfiguration +from .operations import ServersOperations +from .operations import ReplicasOperations +from .operations import FirewallRulesOperations +from .operations import VirtualNetworkRulesOperations +from .operations import DatabasesOperations +from .operations import ConfigurationsOperations +from .operations import ServerParametersOperations +from .operations import LogFilesOperations +from .operations import ServerAdministratorsOperations +from .operations import RecoverableServersOperations +from .operations import ServerBasedPerformanceTierOperations +from .operations import LocationBasedPerformanceTierOperations +from .operations import CheckNameAvailabilityOperations +from .operations import Operations +from .operations import ServerSecurityAlertPoliciesOperations +from .operations import QueryTextsOperations +from .operations import TopQueryStatisticsOperations +from .operations import WaitStatisticsOperations +from .operations import MySQLManagementClientOperationsMixin +from .operations import AdvisorsOperations +from .operations import RecommendedActionsOperations +from .operations import LocationBasedRecommendedActionSessionsOperationStatusOperations +from .operations import LocationBasedRecommendedActionSessionsResultOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations +from .operations import ServerKeysOperations +from . import models + + +class MySQLManagementClient(MySQLManagementClientOperationsMixin): + """The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business model. + :ivar servers: ServersOperations operations + :vartype servers: azure.mgmt.rdbms.mysql.operations.ServersOperations + :ivar replicas: ReplicasOperations operations + :vartype replicas: azure.mgmt.rdbms.mysql.operations.ReplicasOperations + :ivar firewall_rules: FirewallRulesOperations operations + :vartype firewall_rules: azure.mgmt.rdbms.mysql.operations.FirewallRulesOperations + :ivar virtual_network_rules: VirtualNetworkRulesOperations operations + :vartype virtual_network_rules: azure.mgmt.rdbms.mysql.operations.VirtualNetworkRulesOperations + :ivar databases: DatabasesOperations operations + :vartype databases: azure.mgmt.rdbms.mysql.operations.DatabasesOperations + :ivar configurations: ConfigurationsOperations operations + :vartype configurations: azure.mgmt.rdbms.mysql.operations.ConfigurationsOperations + :ivar server_parameters: ServerParametersOperations operations + :vartype server_parameters: azure.mgmt.rdbms.mysql.operations.ServerParametersOperations + :ivar log_files: LogFilesOperations operations + :vartype log_files: azure.mgmt.rdbms.mysql.operations.LogFilesOperations + :ivar server_administrators: ServerAdministratorsOperations operations + :vartype server_administrators: azure.mgmt.rdbms.mysql.operations.ServerAdministratorsOperations + :ivar recoverable_servers: RecoverableServersOperations operations + :vartype recoverable_servers: azure.mgmt.rdbms.mysql.operations.RecoverableServersOperations + :ivar server_based_performance_tier: ServerBasedPerformanceTierOperations operations + :vartype server_based_performance_tier: azure.mgmt.rdbms.mysql.operations.ServerBasedPerformanceTierOperations + :ivar location_based_performance_tier: LocationBasedPerformanceTierOperations operations + :vartype location_based_performance_tier: azure.mgmt.rdbms.mysql.operations.LocationBasedPerformanceTierOperations + :ivar check_name_availability: CheckNameAvailabilityOperations operations + :vartype check_name_availability: azure.mgmt.rdbms.mysql.operations.CheckNameAvailabilityOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.rdbms.mysql.operations.Operations + :ivar server_security_alert_policies: ServerSecurityAlertPoliciesOperations operations + :vartype server_security_alert_policies: azure.mgmt.rdbms.mysql.operations.ServerSecurityAlertPoliciesOperations + :ivar query_texts: QueryTextsOperations operations + :vartype query_texts: azure.mgmt.rdbms.mysql.operations.QueryTextsOperations + :ivar top_query_statistics: TopQueryStatisticsOperations operations + :vartype top_query_statistics: azure.mgmt.rdbms.mysql.operations.TopQueryStatisticsOperations + :ivar wait_statistics: WaitStatisticsOperations operations + :vartype wait_statistics: azure.mgmt.rdbms.mysql.operations.WaitStatisticsOperations + :ivar advisors: AdvisorsOperations operations + :vartype advisors: azure.mgmt.rdbms.mysql.operations.AdvisorsOperations + :ivar recommended_actions: RecommendedActionsOperations operations + :vartype recommended_actions: azure.mgmt.rdbms.mysql.operations.RecommendedActionsOperations + :ivar location_based_recommended_action_sessions_operation_status: LocationBasedRecommendedActionSessionsOperationStatusOperations operations + :vartype location_based_recommended_action_sessions_operation_status: azure.mgmt.rdbms.mysql.operations.LocationBasedRecommendedActionSessionsOperationStatusOperations + :ivar location_based_recommended_action_sessions_result: LocationBasedRecommendedActionSessionsResultOperations operations + :vartype location_based_recommended_action_sessions_result: azure.mgmt.rdbms.mysql.operations.LocationBasedRecommendedActionSessionsResultOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: azure.mgmt.rdbms.mysql.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: azure.mgmt.rdbms.mysql.operations.PrivateLinkResourcesOperations + :ivar server_keys: ServerKeysOperations operations + :vartype server_keys: azure.mgmt.rdbms.mysql.operations.ServerKeysOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. :type subscription_id: str - :param str api_version: API version to use if no profile is provided, or if - missing in profile. :param str base_url: Service URL - :param profile: A profile definition, from KnownProfiles to dict. - :type profile: azure.profiles.KnownProfiles :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ - DEFAULT_API_VERSION = '2020-01-01' - _PROFILE_TAG = "azure.mgmt.rdbms.MySQLManagementClient" - LATEST_PROFILE = ProfileDefinition({ - _PROFILE_TAG: { - None: DEFAULT_API_VERSION, - }}, - _PROFILE_TAG + " latest" - ) - def __init__( self, credential, # type: "TokenCredential" subscription_id, # type: str - api_version=None, - base_url=None, - profile=KnownProfiles.default, + base_url=None, # type: Optional[str] **kwargs # type: Any ): + # type: (...) -> None if not base_url: base_url = 'https://management.azure.com' self._config = MySQLManagementClientConfiguration(credential, subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) - super(MySQLManagementClient, self).__init__( - api_version=api_version, - profile=profile - ) - - @classmethod - def _models_dict(cls, api_version): - return {k: v for k, v in cls.models(api_version).__dict__.items() if isinstance(v, type)} - - @classmethod - def models(cls, api_version=DEFAULT_API_VERSION): - """Module depends on the API version: - - * 2020-01-01: :mod:`v2020_01_01.models` - * 2020-07-01-privatepreview: :mod:`v2020_07_01_privatepreview.models` - """ - if api_version == '2020-01-01': - from .v2020_01_01 import models - return models - elif api_version == '2020-07-01-privatepreview': - from .v2020_07_01_privatepreview import models - return models - raise ValueError("API version {} is not available".format(api_version)) - - @property - def advisors(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`AdvisorsOperations` - """ - api_version = self._get_api_version('advisors') - if api_version == '2020-01-01': - from .v2020_01_01.operations import AdvisorsOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'advisors'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def check_name_availability(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`CheckNameAvailabilityOperations` - * 2020-07-01-privatepreview: :class:`CheckNameAvailabilityOperations` - """ - api_version = self._get_api_version('check_name_availability') - if api_version == '2020-01-01': - from .v2020_01_01.operations import CheckNameAvailabilityOperations as OperationClass - elif api_version == '2020-07-01-privatepreview': - from .v2020_07_01_privatepreview.operations import CheckNameAvailabilityOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'check_name_availability'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def check_virtual_network_subnet_usage(self): - """Instance depends on the API version: - - * 2020-07-01-privatepreview: :class:`CheckVirtualNetworkSubnetUsageOperations` - """ - api_version = self._get_api_version('check_virtual_network_subnet_usage') - if api_version == '2020-07-01-privatepreview': - from .v2020_07_01_privatepreview.operations import CheckVirtualNetworkSubnetUsageOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'check_virtual_network_subnet_usage'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def configurations(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`ConfigurationsOperations` - * 2020-07-01-privatepreview: :class:`ConfigurationsOperations` - """ - api_version = self._get_api_version('configurations') - if api_version == '2020-01-01': - from .v2020_01_01.operations import ConfigurationsOperations as OperationClass - elif api_version == '2020-07-01-privatepreview': - from .v2020_07_01_privatepreview.operations import ConfigurationsOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'configurations'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def databases(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`DatabasesOperations` - * 2020-07-01-privatepreview: :class:`DatabasesOperations` - """ - api_version = self._get_api_version('databases') - if api_version == '2020-01-01': - from .v2020_01_01.operations import DatabasesOperations as OperationClass - elif api_version == '2020-07-01-privatepreview': - from .v2020_07_01_privatepreview.operations import DatabasesOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'databases'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def firewall_rules(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`FirewallRulesOperations` - * 2020-07-01-privatepreview: :class:`FirewallRulesOperations` - """ - api_version = self._get_api_version('firewall_rules') - if api_version == '2020-01-01': - from .v2020_01_01.operations import FirewallRulesOperations as OperationClass - elif api_version == '2020-07-01-privatepreview': - from .v2020_07_01_privatepreview.operations import FirewallRulesOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'firewall_rules'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def location_based_capabilities(self): - """Instance depends on the API version: - - * 2020-07-01-privatepreview: :class:`LocationBasedCapabilitiesOperations` - """ - api_version = self._get_api_version('location_based_capabilities') - if api_version == '2020-07-01-privatepreview': - from .v2020_07_01_privatepreview.operations import LocationBasedCapabilitiesOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'location_based_capabilities'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def location_based_performance_tier(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`LocationBasedPerformanceTierOperations` - """ - api_version = self._get_api_version('location_based_performance_tier') - if api_version == '2020-01-01': - from .v2020_01_01.operations import LocationBasedPerformanceTierOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'location_based_performance_tier'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def location_based_recommended_action_sessions_operation_status(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`LocationBasedRecommendedActionSessionsOperationStatusOperations` - """ - api_version = self._get_api_version('location_based_recommended_action_sessions_operation_status') - if api_version == '2020-01-01': - from .v2020_01_01.operations import LocationBasedRecommendedActionSessionsOperationStatusOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'location_based_recommended_action_sessions_operation_status'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def location_based_recommended_action_sessions_result(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`LocationBasedRecommendedActionSessionsResultOperations` - """ - api_version = self._get_api_version('location_based_recommended_action_sessions_result') - if api_version == '2020-01-01': - from .v2020_01_01.operations import LocationBasedRecommendedActionSessionsResultOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'location_based_recommended_action_sessions_result'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - @property - def log_files(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`LogFilesOperations` - """ - api_version = self._get_api_version('log_files') - if api_version == '2020-01-01': - from .v2020_01_01.operations import LogFilesOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'log_files'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def operations(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`Operations` - * 2020-07-01-privatepreview: :class:`Operations` - """ - api_version = self._get_api_version('operations') - if api_version == '2020-01-01': - from .v2020_01_01.operations import Operations as OperationClass - elif api_version == '2020-07-01-privatepreview': - from .v2020_07_01_privatepreview.operations import Operations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def private_endpoint_connections(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`PrivateEndpointConnectionsOperations` - """ - api_version = self._get_api_version('private_endpoint_connections') - if api_version == '2020-01-01': - from .v2020_01_01.operations import PrivateEndpointConnectionsOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def private_link_resources(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`PrivateLinkResourcesOperations` - """ - api_version = self._get_api_version('private_link_resources') - if api_version == '2020-01-01': - from .v2020_01_01.operations import PrivateLinkResourcesOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'private_link_resources'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def query_texts(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`QueryTextsOperations` - """ - api_version = self._get_api_version('query_texts') - if api_version == '2020-01-01': - from .v2020_01_01.operations import QueryTextsOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'query_texts'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def recommended_actions(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`RecommendedActionsOperations` - """ - api_version = self._get_api_version('recommended_actions') - if api_version == '2020-01-01': - from .v2020_01_01.operations import RecommendedActionsOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'recommended_actions'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def replicas(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`ReplicasOperations` - * 2020-07-01-privatepreview: :class:`ReplicasOperations` - """ - api_version = self._get_api_version('replicas') - if api_version == '2020-01-01': - from .v2020_01_01.operations import ReplicasOperations as OperationClass - elif api_version == '2020-07-01-privatepreview': - from .v2020_07_01_privatepreview.operations import ReplicasOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'replicas'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def server_administrators(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`ServerAdministratorsOperations` - """ - api_version = self._get_api_version('server_administrators') - if api_version == '2020-01-01': - from .v2020_01_01.operations import ServerAdministratorsOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'server_administrators'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def server_keys(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`ServerKeysOperations` - * 2020-07-01-privatepreview: :class:`ServerKeysOperations` - """ - api_version = self._get_api_version('server_keys') - if api_version == '2020-01-01': - from .v2020_01_01.operations import ServerKeysOperations as OperationClass - elif api_version == '2020-07-01-privatepreview': - from .v2020_07_01_privatepreview.operations import ServerKeysOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'server_keys'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def server_security_alert_policies(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`ServerSecurityAlertPoliciesOperations` - """ - api_version = self._get_api_version('server_security_alert_policies') - if api_version == '2020-01-01': - from .v2020_01_01.operations import ServerSecurityAlertPoliciesOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'server_security_alert_policies'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def servers(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`ServersOperations` - * 2020-07-01-privatepreview: :class:`ServersOperations` - """ - api_version = self._get_api_version('servers') - if api_version == '2020-01-01': - from .v2020_01_01.operations import ServersOperations as OperationClass - elif api_version == '2020-07-01-privatepreview': - from .v2020_07_01_privatepreview.operations import ServersOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'servers'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def top_query_statistics(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`TopQueryStatisticsOperations` - """ - api_version = self._get_api_version('top_query_statistics') - if api_version == '2020-01-01': - from .v2020_01_01.operations import TopQueryStatisticsOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'top_query_statistics'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def virtual_network_rules(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`VirtualNetworkRulesOperations` - """ - api_version = self._get_api_version('virtual_network_rules') - if api_version == '2020-01-01': - from .v2020_01_01.operations import VirtualNetworkRulesOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'virtual_network_rules'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def wait_statistics(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`WaitStatisticsOperations` - """ - api_version = self._get_api_version('wait_statistics') - if api_version == '2020-01-01': - from .v2020_01_01.operations import WaitStatisticsOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'wait_statistics'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.servers = ServersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.replicas = ReplicasOperations( + self._client, self._config, self._serialize, self._deserialize) + self.firewall_rules = FirewallRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_network_rules = VirtualNetworkRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.databases = DatabasesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.configurations = ConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.server_parameters = ServerParametersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.log_files = LogFilesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.server_administrators = ServerAdministratorsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.recoverable_servers = RecoverableServersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.server_based_performance_tier = ServerBasedPerformanceTierOperations( + self._client, self._config, self._serialize, self._deserialize) + self.location_based_performance_tier = LocationBasedPerformanceTierOperations( + self._client, self._config, self._serialize, self._deserialize) + self.check_name_availability = CheckNameAvailabilityOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.server_security_alert_policies = ServerSecurityAlertPoliciesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.query_texts = QueryTextsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.top_query_statistics = TopQueryStatisticsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.wait_statistics = WaitStatisticsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.advisors = AdvisorsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.recommended_actions = RecommendedActionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.location_based_recommended_action_sessions_operation_status = LocationBasedRecommendedActionSessionsOperationStatusOperations( + self._client, self._config, self._serialize, self._deserialize) + self.location_based_recommended_action_sessions_result = LocationBasedRecommendedActionSessionsResultOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.server_keys = ServerKeysOperations( + self._client, self._config, self._serialize, self._deserialize) def close(self): + # type: () -> None self._client.close() + def __enter__(self): + # type: () -> MySQLManagementClient self._client.__enter__() return self + def __exit__(self, *exc_details): + # type: (Any) -> None self._client.__exit__(*exc_details) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/_operations_mixin.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/_operations_mixin.py deleted file mode 100644 index dbad3a723605..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/_operations_mixin.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrest import Serializer, Deserializer -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union - - -class MySQLManagementClientOperationsMixin(object): - - def begin_create_recommended_action_session( - self, - resource_group_name, # type: str - server_name, # type: str - advisor_name, # type: str - database_name, # type: str - **kwargs # type: Any - ): - """Create recommendation action session for the advisor. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param advisor_name: The advisor name for recommendation action. - :type advisor_name: str - :param database_name: The name of the database. - :type database_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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - api_version = self._get_api_version('begin_create_recommended_action_session') - if api_version == '2020-01-01': - from .v2020_01_01.operations import MySQLManagementClientOperationsMixin as OperationClass - else: - raise ValueError("API version {} does not have operation 'begin_create_recommended_action_session'".format(api_version)) - mixin_instance = OperationClass() - mixin_instance._client = self._client - mixin_instance._config = self._config - mixin_instance._serialize = Serializer(self._models_dict(api_version)) - mixin_instance._serialize.client_side_validation = False - mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - return mixin_instance.begin_create_recommended_action_session(resource_group_name, server_name, advisor_name, database_name, **kwargs) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/_version.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/_version.py deleted file mode 100644 index 7cf3ebf6b364..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/_version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "8.0.0b1" - diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/_configuration.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/_configuration.py index 3c1996b35a85..2064e0ed43b6 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/_configuration.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/_configuration.py @@ -1,21 +1,22 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any + +from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy -from .._version import VERSION +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential +VERSION = "unknown" class MySQLManagementClientConfiguration(Configuration): """Configuration for MySQLManagementClient. @@ -31,9 +32,9 @@ class MySQLManagementClientConfiguration(Configuration): def __init__( self, - credential, # type: "AsyncTokenCredential" - subscription_id, # type: str - **kwargs # type: Any + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any ) -> None: if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -44,7 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'azure-mgmt-rdbms/{}'.format(VERSION)) + kwargs.setdefault('sdk_moniker', 'mgmt-rdbms/{}'.format(VERSION)) self._configure(**kwargs) def _configure( diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/_my_sql_management_client.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/_my_sql_management_client.py index 5926b546b393..fef3807df432 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/_my_sql_management_client.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/_my_sql_management_client.py @@ -1,437 +1,185 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import Any, Optional, TYPE_CHECKING + from azure.mgmt.core import AsyncARMPipelineClient -from msrest import Serializer, Deserializer +from msrest import Deserializer, Serializer -from azure.profiles import KnownProfiles, ProfileDefinition -from azure.profiles.multiapiclient import MultiApiClientMixin -from ._configuration import MySQLManagementClientConfiguration -from ._operations_mixin import MySQLManagementClientOperationsMixin -class _SDKClient(object): - def __init__(self, *args, **kwargs): - """This is a fake class to support current implemetation of MultiApiClientMixin." - Will be removed in final version of multiapi azure-core based client - """ - pass +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential -class MySQLManagementClient(MySQLManagementClientOperationsMixin, MultiApiClientMixin, _SDKClient): +from ._configuration import MySQLManagementClientConfiguration +from .operations import ServersOperations +from .operations import ReplicasOperations +from .operations import FirewallRulesOperations +from .operations import VirtualNetworkRulesOperations +from .operations import DatabasesOperations +from .operations import ConfigurationsOperations +from .operations import ServerParametersOperations +from .operations import LogFilesOperations +from .operations import ServerAdministratorsOperations +from .operations import RecoverableServersOperations +from .operations import ServerBasedPerformanceTierOperations +from .operations import LocationBasedPerformanceTierOperations +from .operations import CheckNameAvailabilityOperations +from .operations import Operations +from .operations import ServerSecurityAlertPoliciesOperations +from .operations import QueryTextsOperations +from .operations import TopQueryStatisticsOperations +from .operations import WaitStatisticsOperations +from .operations import MySQLManagementClientOperationsMixin +from .operations import AdvisorsOperations +from .operations import RecommendedActionsOperations +from .operations import LocationBasedRecommendedActionSessionsOperationStatusOperations +from .operations import LocationBasedRecommendedActionSessionsResultOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations +from .operations import ServerKeysOperations +from .. import models + + +class MySQLManagementClient(MySQLManagementClientOperationsMixin): """The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business model. - This ready contains multiple API versions, to help you deal with all of the Azure clouds - (Azure Stack, Azure Government, Azure China, etc.). - By default, it uses the latest API version available on public Azure. - For production, you should stick to a particular api-version and/or profile. - The profile sets a mapping between an operation group and its API version. - The api-version parameter sets the default API version if the operation - group is not described in the profile. - + :ivar servers: ServersOperations operations + :vartype servers: azure.mgmt.rdbms.mysql.aio.operations.ServersOperations + :ivar replicas: ReplicasOperations operations + :vartype replicas: azure.mgmt.rdbms.mysql.aio.operations.ReplicasOperations + :ivar firewall_rules: FirewallRulesOperations operations + :vartype firewall_rules: azure.mgmt.rdbms.mysql.aio.operations.FirewallRulesOperations + :ivar virtual_network_rules: VirtualNetworkRulesOperations operations + :vartype virtual_network_rules: azure.mgmt.rdbms.mysql.aio.operations.VirtualNetworkRulesOperations + :ivar databases: DatabasesOperations operations + :vartype databases: azure.mgmt.rdbms.mysql.aio.operations.DatabasesOperations + :ivar configurations: ConfigurationsOperations operations + :vartype configurations: azure.mgmt.rdbms.mysql.aio.operations.ConfigurationsOperations + :ivar server_parameters: ServerParametersOperations operations + :vartype server_parameters: azure.mgmt.rdbms.mysql.aio.operations.ServerParametersOperations + :ivar log_files: LogFilesOperations operations + :vartype log_files: azure.mgmt.rdbms.mysql.aio.operations.LogFilesOperations + :ivar server_administrators: ServerAdministratorsOperations operations + :vartype server_administrators: azure.mgmt.rdbms.mysql.aio.operations.ServerAdministratorsOperations + :ivar recoverable_servers: RecoverableServersOperations operations + :vartype recoverable_servers: azure.mgmt.rdbms.mysql.aio.operations.RecoverableServersOperations + :ivar server_based_performance_tier: ServerBasedPerformanceTierOperations operations + :vartype server_based_performance_tier: azure.mgmt.rdbms.mysql.aio.operations.ServerBasedPerformanceTierOperations + :ivar location_based_performance_tier: LocationBasedPerformanceTierOperations operations + :vartype location_based_performance_tier: azure.mgmt.rdbms.mysql.aio.operations.LocationBasedPerformanceTierOperations + :ivar check_name_availability: CheckNameAvailabilityOperations operations + :vartype check_name_availability: azure.mgmt.rdbms.mysql.aio.operations.CheckNameAvailabilityOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.rdbms.mysql.aio.operations.Operations + :ivar server_security_alert_policies: ServerSecurityAlertPoliciesOperations operations + :vartype server_security_alert_policies: azure.mgmt.rdbms.mysql.aio.operations.ServerSecurityAlertPoliciesOperations + :ivar query_texts: QueryTextsOperations operations + :vartype query_texts: azure.mgmt.rdbms.mysql.aio.operations.QueryTextsOperations + :ivar top_query_statistics: TopQueryStatisticsOperations operations + :vartype top_query_statistics: azure.mgmt.rdbms.mysql.aio.operations.TopQueryStatisticsOperations + :ivar wait_statistics: WaitStatisticsOperations operations + :vartype wait_statistics: azure.mgmt.rdbms.mysql.aio.operations.WaitStatisticsOperations + :ivar advisors: AdvisorsOperations operations + :vartype advisors: azure.mgmt.rdbms.mysql.aio.operations.AdvisorsOperations + :ivar recommended_actions: RecommendedActionsOperations operations + :vartype recommended_actions: azure.mgmt.rdbms.mysql.aio.operations.RecommendedActionsOperations + :ivar location_based_recommended_action_sessions_operation_status: LocationBasedRecommendedActionSessionsOperationStatusOperations operations + :vartype location_based_recommended_action_sessions_operation_status: azure.mgmt.rdbms.mysql.aio.operations.LocationBasedRecommendedActionSessionsOperationStatusOperations + :ivar location_based_recommended_action_sessions_result: LocationBasedRecommendedActionSessionsResultOperations operations + :vartype location_based_recommended_action_sessions_result: azure.mgmt.rdbms.mysql.aio.operations.LocationBasedRecommendedActionSessionsResultOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: azure.mgmt.rdbms.mysql.aio.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: azure.mgmt.rdbms.mysql.aio.operations.PrivateLinkResourcesOperations + :ivar server_keys: ServerKeysOperations operations + :vartype server_keys: azure.mgmt.rdbms.mysql.aio.operations.ServerKeysOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. :type subscription_id: str - :param str api_version: API version to use if no profile is provided, or if - missing in profile. :param str base_url: Service URL - :param profile: A profile definition, from KnownProfiles to dict. - :type profile: azure.profiles.KnownProfiles :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ - DEFAULT_API_VERSION = '2020-01-01' - _PROFILE_TAG = "azure.mgmt.rdbms.MySQLManagementClient" - LATEST_PROFILE = ProfileDefinition({ - _PROFILE_TAG: { - None: DEFAULT_API_VERSION, - }}, - _PROFILE_TAG + " latest" - ) - def __init__( self, - credential, # type: "AsyncTokenCredential" - subscription_id, # type: str - api_version=None, - base_url=None, - profile=KnownProfiles.default, - **kwargs # type: Any + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any ) -> None: if not base_url: base_url = 'https://management.azure.com' self._config = MySQLManagementClientConfiguration(credential, subscription_id, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) - super(MySQLManagementClient, self).__init__( - api_version=api_version, - profile=profile - ) - - @classmethod - def _models_dict(cls, api_version): - return {k: v for k, v in cls.models(api_version).__dict__.items() if isinstance(v, type)} - - @classmethod - def models(cls, api_version=DEFAULT_API_VERSION): - """Module depends on the API version: - - * 2020-01-01: :mod:`v2020_01_01.models` - * 2020-07-01-privatepreview: :mod:`v2020_07_01_privatepreview.models` - """ - if api_version == '2020-01-01': - from ..v2020_01_01 import models - return models - elif api_version == '2020-07-01-privatepreview': - from ..v2020_07_01_privatepreview import models - return models - raise ValueError("API version {} is not available".format(api_version)) - - @property - def advisors(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`AdvisorsOperations` - """ - api_version = self._get_api_version('advisors') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import AdvisorsOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'advisors'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def check_name_availability(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`CheckNameAvailabilityOperations` - * 2020-07-01-privatepreview: :class:`CheckNameAvailabilityOperations` - """ - api_version = self._get_api_version('check_name_availability') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import CheckNameAvailabilityOperations as OperationClass - elif api_version == '2020-07-01-privatepreview': - from ..v2020_07_01_privatepreview.aio.operations import CheckNameAvailabilityOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'check_name_availability'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def check_virtual_network_subnet_usage(self): - """Instance depends on the API version: - - * 2020-07-01-privatepreview: :class:`CheckVirtualNetworkSubnetUsageOperations` - """ - api_version = self._get_api_version('check_virtual_network_subnet_usage') - if api_version == '2020-07-01-privatepreview': - from ..v2020_07_01_privatepreview.aio.operations import CheckVirtualNetworkSubnetUsageOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'check_virtual_network_subnet_usage'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def configurations(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`ConfigurationsOperations` - * 2020-07-01-privatepreview: :class:`ConfigurationsOperations` - """ - api_version = self._get_api_version('configurations') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import ConfigurationsOperations as OperationClass - elif api_version == '2020-07-01-privatepreview': - from ..v2020_07_01_privatepreview.aio.operations import ConfigurationsOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'configurations'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def databases(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`DatabasesOperations` - * 2020-07-01-privatepreview: :class:`DatabasesOperations` - """ - api_version = self._get_api_version('databases') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import DatabasesOperations as OperationClass - elif api_version == '2020-07-01-privatepreview': - from ..v2020_07_01_privatepreview.aio.operations import DatabasesOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'databases'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def firewall_rules(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`FirewallRulesOperations` - * 2020-07-01-privatepreview: :class:`FirewallRulesOperations` - """ - api_version = self._get_api_version('firewall_rules') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import FirewallRulesOperations as OperationClass - elif api_version == '2020-07-01-privatepreview': - from ..v2020_07_01_privatepreview.aio.operations import FirewallRulesOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'firewall_rules'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def location_based_capabilities(self): - """Instance depends on the API version: - - * 2020-07-01-privatepreview: :class:`LocationBasedCapabilitiesOperations` - """ - api_version = self._get_api_version('location_based_capabilities') - if api_version == '2020-07-01-privatepreview': - from ..v2020_07_01_privatepreview.aio.operations import LocationBasedCapabilitiesOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'location_based_capabilities'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def location_based_performance_tier(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`LocationBasedPerformanceTierOperations` - """ - api_version = self._get_api_version('location_based_performance_tier') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import LocationBasedPerformanceTierOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'location_based_performance_tier'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def location_based_recommended_action_sessions_operation_status(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`LocationBasedRecommendedActionSessionsOperationStatusOperations` - """ - api_version = self._get_api_version('location_based_recommended_action_sessions_operation_status') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import LocationBasedRecommendedActionSessionsOperationStatusOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'location_based_recommended_action_sessions_operation_status'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def location_based_recommended_action_sessions_result(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`LocationBasedRecommendedActionSessionsResultOperations` - """ - api_version = self._get_api_version('location_based_recommended_action_sessions_result') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import LocationBasedRecommendedActionSessionsResultOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'location_based_recommended_action_sessions_result'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def log_files(self): - """Instance depends on the API version: - * 2020-01-01: :class:`LogFilesOperations` - """ - api_version = self._get_api_version('log_files') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import LogFilesOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'log_files'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def operations(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`Operations` - * 2020-07-01-privatepreview: :class:`Operations` - """ - api_version = self._get_api_version('operations') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import Operations as OperationClass - elif api_version == '2020-07-01-privatepreview': - from ..v2020_07_01_privatepreview.aio.operations import Operations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def private_endpoint_connections(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`PrivateEndpointConnectionsOperations` - """ - api_version = self._get_api_version('private_endpoint_connections') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import PrivateEndpointConnectionsOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def private_link_resources(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`PrivateLinkResourcesOperations` - """ - api_version = self._get_api_version('private_link_resources') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import PrivateLinkResourcesOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'private_link_resources'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def query_texts(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`QueryTextsOperations` - """ - api_version = self._get_api_version('query_texts') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import QueryTextsOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'query_texts'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def recommended_actions(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`RecommendedActionsOperations` - """ - api_version = self._get_api_version('recommended_actions') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import RecommendedActionsOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'recommended_actions'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def replicas(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`ReplicasOperations` - * 2020-07-01-privatepreview: :class:`ReplicasOperations` - """ - api_version = self._get_api_version('replicas') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import ReplicasOperations as OperationClass - elif api_version == '2020-07-01-privatepreview': - from ..v2020_07_01_privatepreview.aio.operations import ReplicasOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'replicas'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def server_administrators(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`ServerAdministratorsOperations` - """ - api_version = self._get_api_version('server_administrators') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import ServerAdministratorsOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'server_administrators'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def server_keys(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`ServerKeysOperations` - * 2020-07-01-privatepreview: :class:`ServerKeysOperations` - """ - api_version = self._get_api_version('server_keys') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import ServerKeysOperations as OperationClass - elif api_version == '2020-07-01-privatepreview': - from ..v2020_07_01_privatepreview.aio.operations import ServerKeysOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'server_keys'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def server_security_alert_policies(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`ServerSecurityAlertPoliciesOperations` - """ - api_version = self._get_api_version('server_security_alert_policies') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import ServerSecurityAlertPoliciesOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'server_security_alert_policies'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def servers(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`ServersOperations` - * 2020-07-01-privatepreview: :class:`ServersOperations` - """ - api_version = self._get_api_version('servers') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import ServersOperations as OperationClass - elif api_version == '2020-07-01-privatepreview': - from ..v2020_07_01_privatepreview.aio.operations import ServersOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'servers'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def top_query_statistics(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`TopQueryStatisticsOperations` - """ - api_version = self._get_api_version('top_query_statistics') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import TopQueryStatisticsOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'top_query_statistics'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def virtual_network_rules(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`VirtualNetworkRulesOperations` - """ - api_version = self._get_api_version('virtual_network_rules') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import VirtualNetworkRulesOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'virtual_network_rules'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def wait_statistics(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`WaitStatisticsOperations` - """ - api_version = self._get_api_version('wait_statistics') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import WaitStatisticsOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'wait_statistics'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - async def close(self): + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.servers = ServersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.replicas = ReplicasOperations( + self._client, self._config, self._serialize, self._deserialize) + self.firewall_rules = FirewallRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_network_rules = VirtualNetworkRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.databases = DatabasesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.configurations = ConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.server_parameters = ServerParametersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.log_files = LogFilesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.server_administrators = ServerAdministratorsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.recoverable_servers = RecoverableServersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.server_based_performance_tier = ServerBasedPerformanceTierOperations( + self._client, self._config, self._serialize, self._deserialize) + self.location_based_performance_tier = LocationBasedPerformanceTierOperations( + self._client, self._config, self._serialize, self._deserialize) + self.check_name_availability = CheckNameAvailabilityOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.server_security_alert_policies = ServerSecurityAlertPoliciesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.query_texts = QueryTextsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.top_query_statistics = TopQueryStatisticsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.wait_statistics = WaitStatisticsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.advisors = AdvisorsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.recommended_actions = RecommendedActionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.location_based_recommended_action_sessions_operation_status = LocationBasedRecommendedActionSessionsOperationStatusOperations( + self._client, self._config, self._serialize, self._deserialize) + self.location_based_recommended_action_sessions_result = LocationBasedRecommendedActionSessionsResultOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.server_keys = ServerKeysOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def close(self) -> None: await self._client.close() - async def __aenter__(self): + + async def __aenter__(self) -> "MySQLManagementClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details): + + async def __aexit__(self, *exc_details) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/_operations_mixin.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/_operations_mixin.py deleted file mode 100644 index 24b42fe2dd02..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/_operations_mixin.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrest import Serializer, Deserializer -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - - -class MySQLManagementClientOperationsMixin(object): - - async def begin_create_recommended_action_session( - self, - resource_group_name: str, - server_name: str, - advisor_name: str, - database_name: str, - **kwargs - ) -> AsyncLROPoller[None]: - """Create recommendation action session for the advisor. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param server_name: The name of the server. - :type server_name: str - :param advisor_name: The advisor name for recommendation action. - :type advisor_name: str - :param database_name: The name of the database. - :type database_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: True for ARMPolling, False for no polling, or a - 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: 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: - """ - api_version = self._get_api_version('begin_create_recommended_action_session') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import MySQLManagementClientOperationsMixin as OperationClass - else: - raise ValueError("API version {} does not have operation 'begin_create_recommended_action_session'".format(api_version)) - mixin_instance = OperationClass() - mixin_instance._client = self._client - mixin_instance._config = self._config - mixin_instance._serialize = Serializer(self._models_dict(api_version)) - mixin_instance._serialize.client_side_validation = False - mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) - return await mixin_instance.begin_create_recommended_action_session(resource_group_name, server_name, advisor_name, database_name, **kwargs) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/__init__.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/__init__.py similarity index 89% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/__init__.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/__init__.py index ddb06e36b730..5c44d71d2baa 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/__init__.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/__init__.py @@ -12,8 +12,11 @@ from ._virtual_network_rules_operations import VirtualNetworkRulesOperations from ._databases_operations import DatabasesOperations from ._configurations_operations import ConfigurationsOperations +from ._server_parameters_operations import ServerParametersOperations from ._log_files_operations import LogFilesOperations from ._server_administrators_operations import ServerAdministratorsOperations +from ._recoverable_servers_operations import RecoverableServersOperations +from ._server_based_performance_tier_operations import ServerBasedPerformanceTierOperations from ._location_based_performance_tier_operations import LocationBasedPerformanceTierOperations from ._check_name_availability_operations import CheckNameAvailabilityOperations from ._operations import Operations @@ -21,8 +24,8 @@ from ._query_texts_operations import QueryTextsOperations from ._top_query_statistics_operations import TopQueryStatisticsOperations from ._wait_statistics_operations import WaitStatisticsOperations -from ._advisors_operations import AdvisorsOperations from ._my_sql_management_client_operations import MySQLManagementClientOperationsMixin +from ._advisors_operations import AdvisorsOperations from ._recommended_actions_operations import RecommendedActionsOperations from ._location_based_recommended_action_sessions_operation_status_operations import LocationBasedRecommendedActionSessionsOperationStatusOperations from ._location_based_recommended_action_sessions_result_operations import LocationBasedRecommendedActionSessionsResultOperations @@ -37,8 +40,11 @@ 'VirtualNetworkRulesOperations', 'DatabasesOperations', 'ConfigurationsOperations', + 'ServerParametersOperations', 'LogFilesOperations', 'ServerAdministratorsOperations', + 'RecoverableServersOperations', + 'ServerBasedPerformanceTierOperations', 'LocationBasedPerformanceTierOperations', 'CheckNameAvailabilityOperations', 'Operations', @@ -46,8 +52,8 @@ 'QueryTextsOperations', 'TopQueryStatisticsOperations', 'WaitStatisticsOperations', - 'AdvisorsOperations', 'MySQLManagementClientOperationsMixin', + 'AdvisorsOperations', 'RecommendedActionsOperations', 'LocationBasedRecommendedActionSessionsOperationStatusOperations', 'LocationBasedRecommendedActionSessionsResultOperations', diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_advisors_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_advisors_operations.py similarity index 94% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_advisors_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_advisors_operations.py index 400c61ca3008..6e16186630d2 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_advisors_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_advisors_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -26,14 +26,14 @@ class AdvisorsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -47,7 +47,7 @@ async def get( server_name: str, advisor_name: str, **kwargs - ) -> "models.Advisor": + ) -> "_models.Advisor": """Get a recommendation action advisor. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -58,10 +58,10 @@ async def get( :type advisor_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Advisor, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.Advisor + :rtype: ~azure.mgmt.rdbms.mysql.models.Advisor :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Advisor"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Advisor"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -108,7 +108,7 @@ def list_by_server( resource_group_name: str, server_name: str, **kwargs - ) -> AsyncIterable["models.AdvisorsResultList"]: + ) -> AsyncIterable["_models.AdvisorsResultList"]: """List recommendation action advisors. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -117,10 +117,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AdvisorsResultList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.AdvisorsResultList] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.models.AdvisorsResultList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.AdvisorsResultList"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AdvisorsResultList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_check_name_availability_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_check_name_availability_operations.py similarity index 91% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_check_name_availability_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_check_name_availability_operations.py index 7d5f6e013b1e..808b5faf697b 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_check_name_availability_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_check_name_availability_operations.py @@ -13,7 +13,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -25,14 +25,14 @@ class CheckNameAvailabilityOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -42,20 +42,20 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def execute( self, - name_availability_request: "models.NameAvailabilityRequest", + name_availability_request: "_models.NameAvailabilityRequest", **kwargs - ) -> "models.NameAvailability": + ) -> "_models.NameAvailability": """Check the availability of name for resource. :param name_availability_request: The required parameters for checking if resource name is available. - :type name_availability_request: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.NameAvailabilityRequest + :type name_availability_request: ~azure.mgmt.rdbms.mysql.models.NameAvailabilityRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: NameAvailability, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.NameAvailability + :rtype: ~azure.mgmt.rdbms.mysql.models.NameAvailability :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.NameAvailability"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NameAvailability"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_configurations_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_configurations_operations.py similarity index 94% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_configurations_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_configurations_operations.py index 3aa34ae9d54e..69eabde5b25c 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_configurations_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_configurations_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -28,14 +28,14 @@ class ConfigurationsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -48,10 +48,10 @@ async def _create_or_update_initial( resource_group_name: str, server_name: str, configuration_name: str, - parameters: "models.Configuration", + parameters: "_models.Configuration", **kwargs - ) -> Optional["models.Configuration"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Configuration"]] + ) -> Optional["_models.Configuration"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Configuration"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -105,9 +105,9 @@ async def begin_create_or_update( resource_group_name: str, server_name: str, configuration_name: str, - parameters: "models.Configuration", + parameters: "_models.Configuration", **kwargs - ) -> AsyncLROPoller["models.Configuration"]: + ) -> AsyncLROPoller["_models.Configuration"]: """Updates a configuration of a server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -117,7 +117,7 @@ async def begin_create_or_update( :param configuration_name: The name of the server configuration. :type configuration_name: str :param parameters: The required parameters for updating a server configuration. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.Configuration + :type parameters: ~azure.mgmt.rdbms.mysql.models.Configuration :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: True for ARMPolling, False for no polling, or a @@ -125,11 +125,11 @@ async def begin_create_or_update( :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 Configuration or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql.v2020_01_01.models.Configuration] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql.models.Configuration] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.Configuration"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Configuration"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -182,7 +182,7 @@ async def get( server_name: str, configuration_name: str, **kwargs - ) -> "models.Configuration": + ) -> "_models.Configuration": """Gets information about a configuration of server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -193,10 +193,10 @@ async def get( :type configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Configuration, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.Configuration + :rtype: ~azure.mgmt.rdbms.mysql.models.Configuration :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Configuration"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Configuration"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -243,7 +243,7 @@ def list_by_server( resource_group_name: str, server_name: str, **kwargs - ) -> AsyncIterable["models.ConfigurationListResult"]: + ) -> AsyncIterable["_models.ConfigurationListResult"]: """List all the configurations in a given server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -252,10 +252,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ConfigurationListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.ConfigurationListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.models.ConfigurationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ConfigurationListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfigurationListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_databases_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_databases_operations.py similarity index 96% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_databases_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_databases_operations.py index 3e92f8a8385f..c65b9cc4af76 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_databases_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_databases_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -28,14 +28,14 @@ class DatabasesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -48,10 +48,10 @@ async def _create_or_update_initial( resource_group_name: str, server_name: str, database_name: str, - parameters: "models.Database", + parameters: "_models.Database", **kwargs - ) -> Optional["models.Database"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Database"]] + ) -> Optional["_models.Database"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Database"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -108,9 +108,9 @@ async def begin_create_or_update( resource_group_name: str, server_name: str, database_name: str, - parameters: "models.Database", + parameters: "_models.Database", **kwargs - ) -> AsyncLROPoller["models.Database"]: + ) -> AsyncLROPoller["_models.Database"]: """Creates a new database or updates an existing database. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -120,7 +120,7 @@ async def begin_create_or_update( :param database_name: The name of the database. :type database_name: str :param parameters: The required parameters for creating or updating a database. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.Database + :type parameters: ~azure.mgmt.rdbms.mysql.models.Database :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: True for ARMPolling, False for no polling, or a @@ -128,11 +128,11 @@ async def begin_create_or_update( :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 Database or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql.v2020_01_01.models.Database] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql.models.Database] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.Database"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Database"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -298,7 +298,7 @@ async def get( server_name: str, database_name: str, **kwargs - ) -> "models.Database": + ) -> "_models.Database": """Gets information about a database. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -309,10 +309,10 @@ async def get( :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Database, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.Database + :rtype: ~azure.mgmt.rdbms.mysql.models.Database :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Database"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Database"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -359,7 +359,7 @@ def list_by_server( resource_group_name: str, server_name: str, **kwargs - ) -> AsyncIterable["models.DatabaseListResult"]: + ) -> AsyncIterable["_models.DatabaseListResult"]: """List all the databases in a given server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -368,10 +368,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DatabaseListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.DatabaseListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.models.DatabaseListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.DatabaseListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_firewall_rules_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_firewall_rules_operations.py similarity index 95% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_firewall_rules_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_firewall_rules_operations.py index ede8bb53ebc0..3aafc737507e 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_firewall_rules_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_firewall_rules_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -28,14 +28,14 @@ class FirewallRulesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -48,10 +48,10 @@ async def _create_or_update_initial( resource_group_name: str, server_name: str, firewall_rule_name: str, - parameters: "models.FirewallRule", + parameters: "_models.FirewallRule", **kwargs - ) -> Optional["models.FirewallRule"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.FirewallRule"]] + ) -> Optional["_models.FirewallRule"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.FirewallRule"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -108,9 +108,9 @@ async def begin_create_or_update( resource_group_name: str, server_name: str, firewall_rule_name: str, - parameters: "models.FirewallRule", + parameters: "_models.FirewallRule", **kwargs - ) -> AsyncLROPoller["models.FirewallRule"]: + ) -> AsyncLROPoller["_models.FirewallRule"]: """Creates a new firewall rule or updates an existing firewall rule. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -120,7 +120,7 @@ async def begin_create_or_update( :param firewall_rule_name: The name of the server firewall rule. :type firewall_rule_name: str :param parameters: The required parameters for creating or updating a firewall rule. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.FirewallRule + :type parameters: ~azure.mgmt.rdbms.mysql.models.FirewallRule :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: True for ARMPolling, False for no polling, or a @@ -128,11 +128,11 @@ async def begin_create_or_update( :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 FirewallRule or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql.v2020_01_01.models.FirewallRule] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql.models.FirewallRule] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.FirewallRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRule"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -298,7 +298,7 @@ async def get( server_name: str, firewall_rule_name: str, **kwargs - ) -> "models.FirewallRule": + ) -> "_models.FirewallRule": """Gets information about a server firewall rule. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -309,10 +309,10 @@ async def get( :type firewall_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: FirewallRule, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.FirewallRule + :rtype: ~azure.mgmt.rdbms.mysql.models.FirewallRule :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.FirewallRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRule"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -359,7 +359,7 @@ def list_by_server( resource_group_name: str, server_name: str, **kwargs - ) -> AsyncIterable["models.FirewallRuleListResult"]: + ) -> AsyncIterable["_models.FirewallRuleListResult"]: """List all the firewall rules in a given server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -368,10 +368,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either FirewallRuleListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.FirewallRuleListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.models.FirewallRuleListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.FirewallRuleListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRuleListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_location_based_performance_tier_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_location_based_performance_tier_operations.py similarity index 94% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_location_based_performance_tier_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_location_based_performance_tier_operations.py index c826c6b4a631..197f853228f9 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_location_based_performance_tier_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_location_based_performance_tier_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -26,14 +26,14 @@ class LocationBasedPerformanceTierOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -45,17 +45,17 @@ def list( self, location_name: str, **kwargs - ) -> AsyncIterable["models.PerformanceTierListResult"]: + ) -> AsyncIterable["_models.PerformanceTierListResult"]: """List all the performance tiers at specified location in a given subscription. :param location_name: The name of the location. :type location_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerformanceTierListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.PerformanceTierListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.models.PerformanceTierListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.PerformanceTierListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerformanceTierListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_location_based_recommended_action_sessions_operation_status_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_location_based_recommended_action_sessions_operation_status_operations.py similarity index 92% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_location_based_recommended_action_sessions_operation_status_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_location_based_recommended_action_sessions_operation_status_operations.py index 8c285d9ef1a9..8b99bdc16714 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_location_based_recommended_action_sessions_operation_status_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_location_based_recommended_action_sessions_operation_status_operations.py @@ -13,7 +13,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -25,14 +25,14 @@ class LocationBasedRecommendedActionSessionsOperationStatusOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -45,7 +45,7 @@ async def get( location_name: str, operation_id: str, **kwargs - ) -> "models.RecommendedActionSessionsOperationStatus": + ) -> "_models.RecommendedActionSessionsOperationStatus": """Recommendation action session operation status. :param location_name: The name of the location. @@ -54,10 +54,10 @@ async def get( :type operation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendedActionSessionsOperationStatus, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.RecommendedActionSessionsOperationStatus + :rtype: ~azure.mgmt.rdbms.mysql.models.RecommendedActionSessionsOperationStatus :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.RecommendedActionSessionsOperationStatus"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendedActionSessionsOperationStatus"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_location_based_recommended_action_sessions_result_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_location_based_recommended_action_sessions_result_operations.py similarity index 92% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_location_based_recommended_action_sessions_result_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_location_based_recommended_action_sessions_result_operations.py index eacaee70b7b9..b1ce96e6b3ee 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_location_based_recommended_action_sessions_result_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_location_based_recommended_action_sessions_result_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -26,14 +26,14 @@ class LocationBasedRecommendedActionSessionsResultOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -46,7 +46,7 @@ def list( location_name: str, operation_id: str, **kwargs - ) -> AsyncIterable["models.RecommendationActionsResultList"]: + ) -> AsyncIterable["_models.RecommendationActionsResultList"]: """Recommendation action session operation result. :param location_name: The name of the location. @@ -55,10 +55,10 @@ def list( :type operation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationActionsResultList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.RecommendationActionsResultListor ~azure.mgmt.rdbms.mysql.v2020_01_01.models.RecommendationActionsResultList] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.models.RecommendationActionsResultListor ~azure.mgmt.rdbms.mysql.models.RecommendationActionsResultList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.RecommendationActionsResultList"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationActionsResultList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_log_files_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_log_files_operations.py similarity index 94% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_log_files_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_log_files_operations.py index ee5c1895be6c..71b28bc7d2a8 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_log_files_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_log_files_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -26,14 +26,14 @@ class LogFilesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -46,7 +46,7 @@ def list_by_server( resource_group_name: str, server_name: str, **kwargs - ) -> AsyncIterable["models.LogFileListResult"]: + ) -> AsyncIterable["_models.LogFileListResult"]: """List all the log files in a given server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -55,10 +55,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either LogFileListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.LogFileListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.models.LogFileListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.LogFileListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.LogFileListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_my_sql_management_client_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_my_sql_management_client_operations.py similarity index 70% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_my_sql_management_client_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_my_sql_management_client_operations.py index fb521ab5efa5..d74e6820eede 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_my_sql_management_client_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_my_sql_management_client_operations.py @@ -15,13 +15,71 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] class MySQLManagementClientOperationsMixin: + async def reset_query_performance_insight_data( + self, + resource_group_name: str, + server_name: str, + **kwargs + ) -> "_models.QueryPerformanceInsightResetDataResult": + """Reset data for Query Performance Insight. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: QueryPerformanceInsightResetDataResult, or the result of cls(response) + :rtype: ~azure.mgmt.rdbms.mysql.models.QueryPerformanceInsightResetDataResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.QueryPerformanceInsightResetDataResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2018-06-01" + accept = "application/json" + + # Construct URL + url = self.reset_query_performance_insight_data.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('QueryPerformanceInsightResetDataResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + reset_query_performance_insight_data.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/resetQueryPerformanceInsightData'} # type: ignore + async def _create_recommended_action_session_initial( self, resource_group_name: str, diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_operations.py similarity index 91% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_operations.py index 3e7db99a144a..871660e4ff80 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_operations.py @@ -13,7 +13,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -25,14 +25,14 @@ class Operations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -43,15 +43,15 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def list( self, **kwargs - ) -> "models.OperationListResult": + ) -> "_models.OperationListResult": """Lists all of the available REST API operations. :keyword callable cls: A custom type or function that will be passed the direct response :return: OperationListResult, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.OperationListResult + :rtype: ~azure.mgmt.rdbms.mysql.models.OperationListResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.OperationListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_private_endpoint_connections_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_private_endpoint_connections_operations.py similarity index 94% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_private_endpoint_connections_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_private_endpoint_connections_operations.py index ebad315c951f..282c909134b0 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_private_endpoint_connections_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -28,14 +28,14 @@ class PrivateEndpointConnectionsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -49,7 +49,7 @@ async def get( server_name: str, private_endpoint_connection_name: str, **kwargs - ) -> "models.PrivateEndpointConnection": + ) -> "_models.PrivateEndpointConnection": """Gets a private endpoint connection. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -60,10 +60,10 @@ async def get( :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PrivateEndpointConnection, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.PrivateEndpointConnection + :rtype: ~azure.mgmt.rdbms.mysql.models.PrivateEndpointConnection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -110,10 +110,10 @@ async def _create_or_update_initial( resource_group_name: str, server_name: str, private_endpoint_connection_name: str, - parameters: "models.PrivateEndpointConnection", + parameters: "_models.PrivateEndpointConnection", **kwargs - ) -> Optional["models.PrivateEndpointConnection"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.PrivateEndpointConnection"]] + ) -> Optional["_models.PrivateEndpointConnection"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PrivateEndpointConnection"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -167,9 +167,9 @@ async def begin_create_or_update( resource_group_name: str, server_name: str, private_endpoint_connection_name: str, - parameters: "models.PrivateEndpointConnection", + parameters: "_models.PrivateEndpointConnection", **kwargs - ) -> AsyncLROPoller["models.PrivateEndpointConnection"]: + ) -> AsyncLROPoller["_models.PrivateEndpointConnection"]: """Approve or reject a private endpoint connection with a given name. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -179,7 +179,7 @@ async def begin_create_or_update( :param private_endpoint_connection_name: :type private_endpoint_connection_name: str :param parameters: - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.PrivateEndpointConnection + :type parameters: ~azure.mgmt.rdbms.mysql.models.PrivateEndpointConnection :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: True for ARMPolling, False for no polling, or a @@ -187,11 +187,11 @@ async def begin_create_or_update( :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 PrivateEndpointConnection or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql.v2020_01_01.models.PrivateEndpointConnection] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql.models.PrivateEndpointConnection] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -358,10 +358,10 @@ async def _update_tags_initial( resource_group_name: str, server_name: str, private_endpoint_connection_name: str, - parameters: "models.TagsObject", + parameters: "_models.TagsObject", **kwargs - ) -> "models.PrivateEndpointConnection": - cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"] + ) -> "_models.PrivateEndpointConnection": + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -413,9 +413,9 @@ async def begin_update_tags( resource_group_name: str, server_name: str, private_endpoint_connection_name: str, - parameters: "models.TagsObject", + parameters: "_models.TagsObject", **kwargs - ) -> AsyncLROPoller["models.PrivateEndpointConnection"]: + ) -> AsyncLROPoller["_models.PrivateEndpointConnection"]: """Updates tags on private endpoint connection. Updates private endpoint connection with the specified tags. @@ -428,7 +428,7 @@ async def begin_update_tags( :type private_endpoint_connection_name: str :param parameters: Parameters supplied to the Update private endpoint connection Tags operation. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.TagsObject + :type parameters: ~azure.mgmt.rdbms.mysql.models.TagsObject :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: True for ARMPolling, False for no polling, or a @@ -436,11 +436,11 @@ async def begin_update_tags( :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 PrivateEndpointConnection or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql.v2020_01_01.models.PrivateEndpointConnection] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql.models.PrivateEndpointConnection] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -492,7 +492,7 @@ def list_by_server( resource_group_name: str, server_name: str, **kwargs - ) -> AsyncIterable["models.PrivateEndpointConnectionListResult"]: + ) -> AsyncIterable["_models.PrivateEndpointConnectionListResult"]: """Gets all private endpoint connections on a server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -501,10 +501,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.PrivateEndpointConnectionListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.models.PrivateEndpointConnectionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnectionListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_private_link_resources_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_private_link_resources_operations.py similarity index 93% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_private_link_resources_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_private_link_resources_operations.py index 61276b5b1115..aed44da2b537 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_private_link_resources_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_private_link_resources_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -26,14 +26,14 @@ class PrivateLinkResourcesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -46,7 +46,7 @@ def list_by_server( resource_group_name: str, server_name: str, **kwargs - ) -> AsyncIterable["models.PrivateLinkResourceListResult"]: + ) -> AsyncIterable["_models.PrivateLinkResourceListResult"]: """Gets the private link resources for MySQL server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -55,10 +55,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PrivateLinkResourceListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.PrivateLinkResourceListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.models.PrivateLinkResourceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateLinkResourceListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -121,7 +121,7 @@ async def get( server_name: str, group_name: str, **kwargs - ) -> "models.PrivateLinkResource": + ) -> "_models.PrivateLinkResource": """Gets a private link resource for MySQL server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -132,10 +132,10 @@ async def get( :type group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PrivateLinkResource, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.PrivateLinkResource + :rtype: ~azure.mgmt.rdbms.mysql.models.PrivateLinkResource :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateLinkResource"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResource"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_query_texts_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_query_texts_operations.py similarity index 94% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_query_texts_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_query_texts_operations.py index 2a91d12028a5..2abd23d985d3 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_query_texts_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_query_texts_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -26,14 +26,14 @@ class QueryTextsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -47,7 +47,7 @@ async def get( server_name: str, query_id: str, **kwargs - ) -> "models.QueryText": + ) -> "_models.QueryText": """Retrieve the Query-Store query texts for the queryId. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -58,10 +58,10 @@ async def get( :type query_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: QueryText, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.QueryText + :rtype: ~azure.mgmt.rdbms.mysql.models.QueryText :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.QueryText"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.QueryText"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -109,7 +109,7 @@ def list_by_server( server_name: str, query_ids: List[str], **kwargs - ) -> AsyncIterable["models.QueryTextsResultList"]: + ) -> AsyncIterable["_models.QueryTextsResultList"]: """Retrieve the Query-Store query texts for specified queryIds. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -120,10 +120,10 @@ def list_by_server( :type query_ids: list[str] :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either QueryTextsResultList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.QueryTextsResultList] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.models.QueryTextsResultList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.QueryTextsResultList"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.QueryTextsResultList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_recommended_actions_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_recommended_actions_operations.py similarity index 94% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_recommended_actions_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_recommended_actions_operations.py index 20b33ffd3158..6e916d628ae8 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_recommended_actions_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_recommended_actions_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -26,14 +26,14 @@ class RecommendedActionsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -48,7 +48,7 @@ async def get( advisor_name: str, recommended_action_name: str, **kwargs - ) -> "models.RecommendationAction": + ) -> "_models.RecommendationAction": """Retrieve recommended actions from the advisor. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -61,10 +61,10 @@ async def get( :type recommended_action_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationAction, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.RecommendationAction + :rtype: ~azure.mgmt.rdbms.mysql.models.RecommendationAction :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.RecommendationAction"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationAction"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -114,7 +114,7 @@ def list_by_server( advisor_name: str, session_id: Optional[str] = None, **kwargs - ) -> AsyncIterable["models.RecommendationActionsResultList"]: + ) -> AsyncIterable["_models.RecommendationActionsResultList"]: """Retrieve recommended actions from the advisor. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -127,10 +127,10 @@ def list_by_server( :type session_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationActionsResultList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.RecommendationActionsResultList] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.models.RecommendationActionsResultList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.RecommendationActionsResultList"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationActionsResultList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_recoverable_servers_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_recoverable_servers_operations.py new file mode 100644 index 000000000000..dd514a4f8daa --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_recoverable_servers_operations.py @@ -0,0 +1,99 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class RecoverableServersOperations: + """RecoverableServersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.rdbms.mysql.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + server_name: str, + **kwargs + ) -> "_models.RecoverableServerResource": + """Gets a recoverable MySQL Server. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RecoverableServerResource, or the result of cls(response) + :rtype: ~azure.mgmt.rdbms.mysql.models.RecoverableServerResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecoverableServerResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-12-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RecoverableServerResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/recoverableServers'} # type: ignore diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_replicas_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_replicas_operations.py similarity index 94% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_replicas_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_replicas_operations.py index f46255e9f9e1..a09e02cbc1a8 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_replicas_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_replicas_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -26,14 +26,14 @@ class ReplicasOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -46,7 +46,7 @@ def list_by_server( resource_group_name: str, server_name: str, **kwargs - ) -> AsyncIterable["models.ServerListResult"]: + ) -> AsyncIterable["_models.ServerListResult"]: """List all the replicas for a given server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -55,10 +55,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.models.ServerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_server_administrators_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_server_administrators_operations.py similarity index 94% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_server_administrators_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_server_administrators_operations.py index 2b735c2f8590..a203fb25dd6b 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_server_administrators_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_server_administrators_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -28,14 +28,14 @@ class ServerAdministratorsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -48,7 +48,7 @@ async def get( resource_group_name: str, server_name: str, **kwargs - ) -> "models.ServerAdministratorResource": + ) -> "_models.ServerAdministratorResource": """Gets information about a AAD server administrator. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -57,10 +57,10 @@ async def get( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ServerAdministratorResource, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerAdministratorResource + :rtype: ~azure.mgmt.rdbms.mysql.models.ServerAdministratorResource :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerAdministratorResource"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerAdministratorResource"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -105,10 +105,10 @@ async def _create_or_update_initial( self, resource_group_name: str, server_name: str, - properties: "models.ServerAdministratorResource", + properties: "_models.ServerAdministratorResource", **kwargs - ) -> "models.ServerAdministratorResource": - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerAdministratorResource"] + ) -> "_models.ServerAdministratorResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerAdministratorResource"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -162,9 +162,9 @@ async def begin_create_or_update( self, resource_group_name: str, server_name: str, - properties: "models.ServerAdministratorResource", + properties: "_models.ServerAdministratorResource", **kwargs - ) -> AsyncLROPoller["models.ServerAdministratorResource"]: + ) -> AsyncLROPoller["_models.ServerAdministratorResource"]: """Creates or update active directory administrator on an existing server. The update action will overwrite the existing administrator. @@ -174,7 +174,7 @@ async def begin_create_or_update( :type server_name: str :param properties: The required parameters for creating or updating an AAD server administrator. - :type properties: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerAdministratorResource + :type properties: ~azure.mgmt.rdbms.mysql.models.ServerAdministratorResource :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: True for ARMPolling, False for no polling, or a @@ -182,11 +182,11 @@ async def begin_create_or_update( :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 ServerAdministratorResource or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerAdministratorResource] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql.models.ServerAdministratorResource] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerAdministratorResource"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerAdministratorResource"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -344,7 +344,7 @@ def list( resource_group_name: str, server_name: str, **kwargs - ) -> AsyncIterable["models.ServerAdministratorResourceListResult"]: + ) -> AsyncIterable["_models.ServerAdministratorResourceListResult"]: """Returns a list of server Administrators. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -353,10 +353,10 @@ def list( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerAdministratorResourceListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerAdministratorResourceListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.models.ServerAdministratorResourceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerAdministratorResourceListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerAdministratorResourceListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_server_based_performance_tier_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_server_based_performance_tier_operations.py new file mode 100644 index 000000000000..984bc0c7f960 --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_server_based_performance_tier_operations.py @@ -0,0 +1,116 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ServerBasedPerformanceTierOperations: + """ServerBasedPerformanceTierOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.rdbms.mysql.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + server_name: str, + **kwargs + ) -> AsyncIterable["_models.PerformanceTierListResult"]: + """List all the performance tiers for a MySQL server. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PerformanceTierListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.models.PerformanceTierListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerformanceTierListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + 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] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('PerformanceTierListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/performanceTiers'} # type: ignore diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_server_keys_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_server_keys_operations.py similarity index 95% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_server_keys_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_server_keys_operations.py index 3fdbee80a425..e0bb4a68aa21 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_server_keys_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_server_keys_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -28,14 +28,14 @@ class ServerKeysOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -48,7 +48,7 @@ def list( resource_group_name: str, server_name: str, **kwargs - ) -> AsyncIterable["models.ServerKeyListResult"]: + ) -> AsyncIterable["_models.ServerKeyListResult"]: """Gets a list of Server keys. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -57,10 +57,10 @@ def list( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerKeyListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerKeyListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.models.ServerKeyListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerKeyListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerKeyListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -123,7 +123,7 @@ async def get( server_name: str, key_name: str, **kwargs - ) -> "models.ServerKey": + ) -> "_models.ServerKey": """Gets a MySQL Server key. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -134,10 +134,10 @@ async def get( :type key_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ServerKey, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerKey + :rtype: ~azure.mgmt.rdbms.mysql.models.ServerKey :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerKey"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerKey"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -184,10 +184,10 @@ async def _create_or_update_initial( server_name: str, key_name: str, resource_group_name: str, - parameters: "models.ServerKey", + parameters: "_models.ServerKey", **kwargs - ) -> "models.ServerKey": - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerKey"] + ) -> "_models.ServerKey": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerKey"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -243,9 +243,9 @@ async def begin_create_or_update( server_name: str, key_name: str, resource_group_name: str, - parameters: "models.ServerKey", + parameters: "_models.ServerKey", **kwargs - ) -> AsyncLROPoller["models.ServerKey"]: + ) -> AsyncLROPoller["_models.ServerKey"]: """Creates or updates a MySQL Server key. :param server_name: The name of the server. @@ -255,7 +255,7 @@ async def begin_create_or_update( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param parameters: The requested MySQL Server key resource state. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerKey + :type parameters: ~azure.mgmt.rdbms.mysql.models.ServerKey :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: True for ARMPolling, False for no polling, or a @@ -263,11 +263,11 @@ async def begin_create_or_update( :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 ServerKey or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerKey] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql.models.ServerKey] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerKey"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerKey"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_server_parameters_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_server_parameters_operations.py new file mode 100644 index 000000000000..fe25a9939fe1 --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_server_parameters_operations.py @@ -0,0 +1,169 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ServerParametersOperations: + """ServerParametersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.rdbms.mysql.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _list_update_configurations_initial( + self, + resource_group_name: str, + server_name: str, + value: "_models.ConfigurationListResult", + **kwargs + ) -> Optional["_models.ConfigurationListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ConfigurationListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._list_update_configurations_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(value, 'ConfigurationListResult') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConfigurationListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _list_update_configurations_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/updateConfigurations'} # type: ignore + + async def begin_list_update_configurations( + self, + resource_group_name: str, + server_name: str, + value: "_models.ConfigurationListResult", + **kwargs + ) -> AsyncLROPoller["_models.ConfigurationListResult"]: + """Update a list of configurations in a given server. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param value: The parameters for updating a list of server configuration. + :type value: ~azure.mgmt.rdbms.mysql.models.ConfigurationListResult + :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: True for ARMPolling, False for no polling, or a + 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: An instance of AsyncLROPoller that returns either ConfigurationListResult or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql.models.ConfigurationListResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfigurationListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._list_update_configurations_initial( + resource_group_name=resource_group_name, + server_name=server_name, + value=value, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ConfigurationListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_list_update_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/updateConfigurations'} # type: ignore diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_server_security_alert_policies_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_server_security_alert_policies_operations.py similarity index 90% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_server_security_alert_policies_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_server_security_alert_policies_operations.py index e849ef10cf77..a8a15c37bafa 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_server_security_alert_policies_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_server_security_alert_policies_operations.py @@ -15,7 +15,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -27,14 +27,14 @@ class ServerSecurityAlertPoliciesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -46,9 +46,9 @@ async def get( self, resource_group_name: str, server_name: str, - security_alert_policy_name: Union[str, "models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], **kwargs - ) -> "models.ServerSecurityAlertPolicy": + ) -> "_models.ServerSecurityAlertPolicy": """Get a server's security alert policy. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -56,13 +56,13 @@ async def get( :param server_name: The name of the server. :type server_name: str :param security_alert_policy_name: The name of the security alert policy. - :type security_alert_policy_name: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.SecurityAlertPolicyName + :type security_alert_policy_name: str or ~azure.mgmt.rdbms.mysql.models.SecurityAlertPolicyName :keyword callable cls: A custom type or function that will be passed the direct response :return: ServerSecurityAlertPolicy, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerSecurityAlertPolicy + :rtype: ~azure.mgmt.rdbms.mysql.models.ServerSecurityAlertPolicy :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerSecurityAlertPolicy"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerSecurityAlertPolicy"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -108,11 +108,11 @@ async def _create_or_update_initial( self, resource_group_name: str, server_name: str, - security_alert_policy_name: Union[str, "models.SecurityAlertPolicyName"], - parameters: "models.ServerSecurityAlertPolicy", + security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + parameters: "_models.ServerSecurityAlertPolicy", **kwargs - ) -> Optional["models.ServerSecurityAlertPolicy"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.ServerSecurityAlertPolicy"]] + ) -> Optional["_models.ServerSecurityAlertPolicy"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ServerSecurityAlertPolicy"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -165,10 +165,10 @@ async def begin_create_or_update( self, resource_group_name: str, server_name: str, - security_alert_policy_name: Union[str, "models.SecurityAlertPolicyName"], - parameters: "models.ServerSecurityAlertPolicy", + security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + parameters: "_models.ServerSecurityAlertPolicy", **kwargs - ) -> AsyncLROPoller["models.ServerSecurityAlertPolicy"]: + ) -> AsyncLROPoller["_models.ServerSecurityAlertPolicy"]: """Creates or updates a threat detection policy. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -176,9 +176,9 @@ async def begin_create_or_update( :param server_name: The name of the server. :type server_name: str :param security_alert_policy_name: The name of the threat detection policy. - :type security_alert_policy_name: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.SecurityAlertPolicyName + :type security_alert_policy_name: str or ~azure.mgmt.rdbms.mysql.models.SecurityAlertPolicyName :param parameters: The server security alert policy. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerSecurityAlertPolicy + :type parameters: ~azure.mgmt.rdbms.mysql.models.ServerSecurityAlertPolicy :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: True for ARMPolling, False for no polling, or a @@ -186,11 +186,11 @@ async def begin_create_or_update( :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 ServerSecurityAlertPolicy or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerSecurityAlertPolicy] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql.models.ServerSecurityAlertPolicy] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerSecurityAlertPolicy"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerSecurityAlertPolicy"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_servers_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_servers_operations.py similarity index 96% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_servers_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_servers_operations.py index 1792026988e0..ffefab191f49 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_servers_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_servers_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -28,14 +28,14 @@ class ServersOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -47,10 +47,10 @@ async def _create_initial( self, resource_group_name: str, server_name: str, - parameters: "models.ServerForCreate", + parameters: "_models.ServerForCreate", **kwargs - ) -> Optional["models.Server"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Server"]] + ) -> Optional["_models.Server"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Server"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -105,9 +105,9 @@ async def begin_create( self, resource_group_name: str, server_name: str, - parameters: "models.ServerForCreate", + parameters: "_models.ServerForCreate", **kwargs - ) -> AsyncLROPoller["models.Server"]: + ) -> AsyncLROPoller["_models.Server"]: """Creates a new server or updates an existing server. The update action will overwrite the existing server. @@ -116,7 +116,7 @@ async def begin_create( :param server_name: The name of the server. :type server_name: str :param parameters: The required parameters for creating or updating a server. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerForCreate + :type parameters: ~azure.mgmt.rdbms.mysql.models.ServerForCreate :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: True for ARMPolling, False for no polling, or a @@ -124,11 +124,11 @@ async def begin_create( :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 Server or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql.v2020_01_01.models.Server] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql.models.Server] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.Server"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Server"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -177,10 +177,10 @@ async def _update_initial( self, resource_group_name: str, server_name: str, - parameters: "models.ServerUpdateParameters", + parameters: "_models.ServerUpdateParameters", **kwargs - ) -> Optional["models.Server"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Server"]] + ) -> Optional["_models.Server"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Server"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -232,9 +232,9 @@ async def begin_update( self, resource_group_name: str, server_name: str, - parameters: "models.ServerUpdateParameters", + parameters: "_models.ServerUpdateParameters", **kwargs - ) -> AsyncLROPoller["models.Server"]: + ) -> AsyncLROPoller["_models.Server"]: """Updates an existing server. The request body can contain one to many of the properties present in the normal server definition. @@ -243,7 +243,7 @@ async def begin_update( :param server_name: The name of the server. :type server_name: str :param parameters: The required parameters for updating a server. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerUpdateParameters + :type parameters: ~azure.mgmt.rdbms.mysql.models.ServerUpdateParameters :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: True for ARMPolling, False for no polling, or a @@ -251,11 +251,11 @@ async def begin_update( :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 Server or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql.v2020_01_01.models.Server] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql.models.Server] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.Server"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Server"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -411,7 +411,7 @@ async def get( resource_group_name: str, server_name: str, **kwargs - ) -> "models.Server": + ) -> "_models.Server": """Gets information about a server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -420,10 +420,10 @@ async def get( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Server, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.Server + :rtype: ~azure.mgmt.rdbms.mysql.models.Server :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Server"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Server"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -468,17 +468,17 @@ def list_by_resource_group( self, resource_group_name: str, **kwargs - ) -> AsyncIterable["models.ServerListResult"]: + ) -> AsyncIterable["_models.ServerListResult"]: """List all the servers in a given resource group. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.models.ServerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -537,15 +537,15 @@ async def get_next(next_link=None): def list( self, **kwargs - ) -> AsyncIterable["models.ServerListResult"]: + ) -> AsyncIterable["_models.ServerListResult"]: """List all the servers in a given subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.models.ServerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -745,7 +745,7 @@ async def _start_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.CloudErrorAutoGenerated, response) + error = self._deserialize(_models.CloudErrorAutoGenerated, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -854,7 +854,7 @@ async def _stop_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.CloudErrorAutoGenerated, response) + error = self._deserialize(_models.CloudErrorAutoGenerated, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -930,7 +930,7 @@ async def _upgrade_initial( self, resource_group_name: str, server_name: str, - parameters: "models.ServerUpgradeParameters", + parameters: "_models.ServerUpgradeParameters", **kwargs ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] @@ -969,7 +969,7 @@ async def _upgrade_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.CloudErrorAutoGenerated, response) + error = self._deserialize(_models.CloudErrorAutoGenerated, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -981,7 +981,7 @@ async def begin_upgrade( self, resource_group_name: str, server_name: str, - parameters: "models.ServerUpgradeParameters", + parameters: "_models.ServerUpgradeParameters", **kwargs ) -> AsyncLROPoller[None]: """Upgrade server version. @@ -991,7 +991,7 @@ async def begin_upgrade( :param server_name: The name of the server. :type server_name: str :param parameters: The required parameters for updating a server. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerUpgradeParameters + :type parameters: ~azure.mgmt.rdbms.mysql.models.ServerUpgradeParameters :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: True for ARMPolling, False for no polling, or a diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_top_query_statistics_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_top_query_statistics_operations.py similarity index 93% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_top_query_statistics_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_top_query_statistics_operations.py index 109537338483..93d66a0818de 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_top_query_statistics_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_top_query_statistics_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -26,14 +26,14 @@ class TopQueryStatisticsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -47,7 +47,7 @@ async def get( server_name: str, query_statistic_id: str, **kwargs - ) -> "models.QueryStatistic": + ) -> "_models.QueryStatistic": """Retrieve the query statistic for specified identifier. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -58,10 +58,10 @@ async def get( :type query_statistic_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: QueryStatistic, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.QueryStatistic + :rtype: ~azure.mgmt.rdbms.mysql.models.QueryStatistic :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.QueryStatistic"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.QueryStatistic"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -107,9 +107,9 @@ def list_by_server( self, resource_group_name: str, server_name: str, - parameters: "models.TopQueryStatisticsInput", + parameters: "_models.TopQueryStatisticsInput", **kwargs - ) -> AsyncIterable["models.TopQueryStatisticsResultList"]: + ) -> AsyncIterable["_models.TopQueryStatisticsResultList"]: """Retrieve the Query-Store top queries for specified metric and aggregation. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -117,13 +117,13 @@ def list_by_server( :param server_name: The name of the server. :type server_name: str :param parameters: The required parameters for retrieving top query statistics. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.TopQueryStatisticsInput + :type parameters: ~azure.mgmt.rdbms.mysql.models.TopQueryStatisticsInput :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either TopQueryStatisticsResultList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.TopQueryStatisticsResultList] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.models.TopQueryStatisticsResultList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.TopQueryStatisticsResultList"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.TopQueryStatisticsResultList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_virtual_network_rules_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_virtual_network_rules_operations.py similarity index 95% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_virtual_network_rules_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_virtual_network_rules_operations.py index a9455a9f5ecf..90707a01ef9b 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_virtual_network_rules_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_virtual_network_rules_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -28,14 +28,14 @@ class VirtualNetworkRulesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -49,7 +49,7 @@ async def get( server_name: str, virtual_network_rule_name: str, **kwargs - ) -> "models.VirtualNetworkRule": + ) -> "_models.VirtualNetworkRule": """Gets a virtual network rule. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -60,10 +60,10 @@ async def get( :type virtual_network_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualNetworkRule, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.VirtualNetworkRule + :rtype: ~azure.mgmt.rdbms.mysql.models.VirtualNetworkRule :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.VirtualNetworkRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkRule"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -110,10 +110,10 @@ async def _create_or_update_initial( resource_group_name: str, server_name: str, virtual_network_rule_name: str, - parameters: "models.VirtualNetworkRule", + parameters: "_models.VirtualNetworkRule", **kwargs - ) -> Optional["models.VirtualNetworkRule"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.VirtualNetworkRule"]] + ) -> Optional["_models.VirtualNetworkRule"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VirtualNetworkRule"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -170,9 +170,9 @@ async def begin_create_or_update( resource_group_name: str, server_name: str, virtual_network_rule_name: str, - parameters: "models.VirtualNetworkRule", + parameters: "_models.VirtualNetworkRule", **kwargs - ) -> AsyncLROPoller["models.VirtualNetworkRule"]: + ) -> AsyncLROPoller["_models.VirtualNetworkRule"]: """Creates or updates an existing virtual network rule. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -182,7 +182,7 @@ async def begin_create_or_update( :param virtual_network_rule_name: The name of the virtual network rule. :type virtual_network_rule_name: str :param parameters: The requested virtual Network Rule Resource state. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.VirtualNetworkRule + :type parameters: ~azure.mgmt.rdbms.mysql.models.VirtualNetworkRule :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: True for ARMPolling, False for no polling, or a @@ -190,11 +190,11 @@ async def begin_create_or_update( :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 VirtualNetworkRule or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql.v2020_01_01.models.VirtualNetworkRule] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql.models.VirtualNetworkRule] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.VirtualNetworkRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkRule"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -359,7 +359,7 @@ def list_by_server( resource_group_name: str, server_name: str, **kwargs - ) -> AsyncIterable["models.VirtualNetworkRuleListResult"]: + ) -> AsyncIterable["_models.VirtualNetworkRuleListResult"]: """Gets a list of virtual network rules in a server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -368,10 +368,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualNetworkRuleListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.VirtualNetworkRuleListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.models.VirtualNetworkRuleListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.VirtualNetworkRuleListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkRuleListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_wait_statistics_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_wait_statistics_operations.py similarity index 93% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_wait_statistics_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_wait_statistics_operations.py index 2d66a65a85d2..fe79b3ccd249 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/_wait_statistics_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/aio/operations/_wait_statistics_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -26,14 +26,14 @@ class WaitStatisticsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -47,7 +47,7 @@ async def get( server_name: str, wait_statistics_id: str, **kwargs - ) -> "models.WaitStatistic": + ) -> "_models.WaitStatistic": """Retrieve wait statistics for specified identifier. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -58,10 +58,10 @@ async def get( :type wait_statistics_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: WaitStatistic, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.WaitStatistic + :rtype: ~azure.mgmt.rdbms.mysql.models.WaitStatistic :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WaitStatistic"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.WaitStatistic"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -107,9 +107,9 @@ def list_by_server( self, resource_group_name: str, server_name: str, - parameters: "models.WaitStatisticsInput", + parameters: "_models.WaitStatisticsInput", **kwargs - ) -> AsyncIterable["models.WaitStatisticsResultList"]: + ) -> AsyncIterable["_models.WaitStatisticsResultList"]: """Retrieve wait statistics for specified aggregation window. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -117,13 +117,13 @@ def list_by_server( :param server_name: The name of the server. :type server_name: str :param parameters: The required parameters for retrieving wait statistics. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.WaitStatisticsInput + :type parameters: ~azure.mgmt.rdbms.mysql.models.WaitStatisticsInput :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WaitStatisticsResultList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.WaitStatisticsResultList] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.models.WaitStatisticsResultList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WaitStatisticsResultList"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.WaitStatisticsResultList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models.py deleted file mode 100644 index db21579cbfbc..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models.py +++ /dev/null @@ -1,7 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -------------------------------------------------------------------------- -from .v2020_01_01.models import * diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/models/__init__.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/__init__.py similarity index 96% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/models/__init__.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/__init__.py index 30d9b1451351..9a15c5f5e4b4 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/models/__init__.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/__init__.py @@ -36,12 +36,14 @@ from ._models_py3 import PrivateLinkResourceProperties from ._models_py3 import PrivateLinkServiceConnectionStateProperty from ._models_py3 import ProxyResource + from ._models_py3 import QueryPerformanceInsightResetDataResult from ._models_py3 import QueryStatistic from ._models_py3 import QueryText from ._models_py3 import QueryTextsResultList from ._models_py3 import RecommendationAction from ._models_py3 import RecommendationActionsResultList from ._models_py3 import RecommendedActionSessionsOperationStatus + from ._models_py3 import RecoverableServerResource from ._models_py3 import Resource from ._models_py3 import ResourceIdentity from ._models_py3 import Server @@ -103,12 +105,14 @@ from ._models import PrivateLinkResourceProperties # type: ignore from ._models import PrivateLinkServiceConnectionStateProperty # type: ignore from ._models import ProxyResource # type: ignore + from ._models import QueryPerformanceInsightResetDataResult # type: ignore from ._models import QueryStatistic # type: ignore from ._models import QueryText # type: ignore from ._models import QueryTextsResultList # type: ignore from ._models import RecommendationAction # type: ignore from ._models import RecommendationActionsResultList # type: ignore from ._models import RecommendedActionSessionsOperationStatus # type: ignore + from ._models import RecoverableServerResource # type: ignore from ._models import Resource # type: ignore from ._models import ResourceIdentity # type: ignore from ._models import Server # type: ignore @@ -152,6 +156,7 @@ PrivateLinkServiceConnectionStateActionsRequire, PrivateLinkServiceConnectionStateStatus, PublicNetworkAccessEnum, + QueryPerformanceInsightResetDataResultState, SecurityAlertPolicyName, ServerKeyType, ServerSecurityAlertPolicyState, @@ -193,12 +198,14 @@ 'PrivateLinkResourceProperties', 'PrivateLinkServiceConnectionStateProperty', 'ProxyResource', + 'QueryPerformanceInsightResetDataResult', 'QueryStatistic', 'QueryText', 'QueryTextsResultList', 'RecommendationAction', 'RecommendationActionsResultList', 'RecommendedActionSessionsOperationStatus', + 'RecoverableServerResource', 'Resource', 'ResourceIdentity', 'Server', @@ -240,6 +247,7 @@ 'PrivateLinkServiceConnectionStateActionsRequire', 'PrivateLinkServiceConnectionStateStatus', 'PublicNetworkAccessEnum', + 'QueryPerformanceInsightResetDataResultState', 'SecurityAlertPolicyName', 'ServerKeyType', 'ServerSecurityAlertPolicyState', diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/models/_models.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/_models.py similarity index 84% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/models/_models.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/_models.py index 5b8fb80ef239..0a8c0d063dca 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/models/_models.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/_models.py @@ -11,17 +11,17 @@ class Resource(msrest.serialization.Model): - """Resource. + """Common fields that are returned in the response for all Azure Resource Manager resources. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str """ @@ -52,13 +52,13 @@ class Advisor(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param properties: The properties of a recommendation action advisor. :type properties: object @@ -91,7 +91,7 @@ class AdvisorsResultList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of recommendation action advisors. - :vartype value: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.Advisor] + :vartype value: list[~azure.mgmt.rdbms.mysql.models.Advisor] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -119,7 +119,7 @@ class CloudErrorAutoGenerated(msrest.serialization.Model): """An error response from the Batch service. :param error: Error message. - :type error: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ErrorResponse + :type error: ~azure.mgmt.rdbms.mysql.models.ErrorResponse """ _attribute_map = { @@ -139,13 +139,13 @@ class Configuration(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param value: Value of the configuration. :type value: str @@ -200,7 +200,7 @@ class ConfigurationListResult(msrest.serialization.Model): """A list of server configurations. :param value: The list of server configurations. - :type value: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.Configuration] + :type value: list[~azure.mgmt.rdbms.mysql.models.Configuration] """ _attribute_map = { @@ -220,13 +220,13 @@ class Database(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param charset: The charset of the database. :type charset: str @@ -261,7 +261,7 @@ class DatabaseListResult(msrest.serialization.Model): """A List of databases. :param value: The list of databases housed in a server. - :type value: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.Database] + :type value: list[~azure.mgmt.rdbms.mysql.models.Database] """ _attribute_map = { @@ -307,7 +307,7 @@ def __init__( class ErrorResponse(msrest.serialization.Model): - """The resource management error response. + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). Variables are only populated by the server, and will be ignored when sending a request. @@ -318,9 +318,9 @@ class ErrorResponse(msrest.serialization.Model): :ivar target: The error target. :vartype target: str :ivar details: The error details. - :vartype details: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.ErrorResponse] + :vartype details: list[~azure.mgmt.rdbms.mysql.models.ErrorResponse] :ivar additional_info: The error additional info. - :vartype additional_info: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.ErrorAdditionalInfo] + :vartype additional_info: list[~azure.mgmt.rdbms.mysql.models.ErrorAdditionalInfo] """ _validation = { @@ -358,13 +358,13 @@ class FirewallRule(Resource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param start_ip_address: Required. The start IP address of the server firewall rule. Must be IPv4 format. @@ -403,7 +403,7 @@ class FirewallRuleListResult(msrest.serialization.Model): """A list of firewall rules. :param value: The list of firewall rules in a server. - :type value: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.FirewallRule] + :type value: list[~azure.mgmt.rdbms.mysql.models.FirewallRule] """ _attribute_map = { @@ -423,13 +423,13 @@ class LogFile(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param size_in_kb: Size of the log file. :type size_in_kb: long @@ -478,7 +478,7 @@ class LogFileListResult(msrest.serialization.Model): """A list of log files. :param value: The list of log files. - :type value: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.LogFile] + :type value: list[~azure.mgmt.rdbms.mysql.models.LogFile] """ _attribute_map = { @@ -557,10 +557,10 @@ class Operation(msrest.serialization.Model): :ivar name: The name of the operation being performed on this particular object. :vartype name: str :ivar display: The localized display information for this particular operation or action. - :vartype display: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.OperationDisplay + :vartype display: ~azure.mgmt.rdbms.mysql.models.OperationDisplay :ivar origin: The intended executor of the operation. Possible values include: "NotSpecified", "user", "system". - :vartype origin: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.OperationOrigin + :vartype origin: str or ~azure.mgmt.rdbms.mysql.models.OperationOrigin :ivar properties: Additional descriptions for the operation. :vartype properties: dict[str, object] """ @@ -634,7 +634,7 @@ class OperationListResult(msrest.serialization.Model): """A list of resource provider operations. :param value: The list of resource provider operations. - :type value: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.Operation] + :type value: list[~azure.mgmt.rdbms.mysql.models.Operation] """ _attribute_map = { @@ -653,7 +653,7 @@ class PerformanceTierListResult(msrest.serialization.Model): """A list of performance tiers. :param value: The list of performance tiers. - :type value: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.PerformanceTierProperties] + :type value: list[~azure.mgmt.rdbms.mysql.models.PerformanceTierProperties] """ _attribute_map = { @@ -673,13 +673,33 @@ class PerformanceTierProperties(msrest.serialization.Model): :param id: ID of the performance tier. :type id: str + :param max_backup_retention_days: Maximum Backup retention in days for the performance tier + edition. + :type max_backup_retention_days: int + :param min_backup_retention_days: Minimum Backup retention in days for the performance tier + edition. + :type min_backup_retention_days: int + :param max_storage_mb: Max storage allowed for a server. + :type max_storage_mb: int + :param min_large_storage_mb: Max storage allowed for a server. + :type min_large_storage_mb: int + :param max_large_storage_mb: Max storage allowed for a server. + :type max_large_storage_mb: int + :param min_storage_mb: Max storage allowed for a server. + :type min_storage_mb: int :param service_level_objectives: Service level objectives associated with the performance tier. :type service_level_objectives: - list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.PerformanceTierServiceLevelObjectives] + list[~azure.mgmt.rdbms.mysql.models.PerformanceTierServiceLevelObjectives] """ _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'max_backup_retention_days': {'key': 'maxBackupRetentionDays', 'type': 'int'}, + 'min_backup_retention_days': {'key': 'minBackupRetentionDays', 'type': 'int'}, + 'max_storage_mb': {'key': 'maxStorageMB', 'type': 'int'}, + 'min_large_storage_mb': {'key': 'minLargeStorageMB', 'type': 'int'}, + 'max_large_storage_mb': {'key': 'maxLargeStorageMB', 'type': 'int'}, + 'min_storage_mb': {'key': 'minStorageMB', 'type': 'int'}, 'service_level_objectives': {'key': 'serviceLevelObjectives', 'type': '[PerformanceTierServiceLevelObjectives]'}, } @@ -689,6 +709,12 @@ def __init__( ): super(PerformanceTierProperties, self).__init__(**kwargs) self.id = kwargs.get('id', None) + self.max_backup_retention_days = kwargs.get('max_backup_retention_days', None) + self.min_backup_retention_days = kwargs.get('min_backup_retention_days', None) + self.max_storage_mb = kwargs.get('max_storage_mb', None) + self.min_large_storage_mb = kwargs.get('min_large_storage_mb', None) + self.max_large_storage_mb = kwargs.get('max_large_storage_mb', None) + self.min_storage_mb = kwargs.get('min_storage_mb', None) self.service_level_objectives = kwargs.get('service_level_objectives', None) @@ -746,20 +772,20 @@ class PrivateEndpointConnection(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param private_endpoint: Private endpoint which the connection belongs to. - :type private_endpoint: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.PrivateEndpointProperty + :type private_endpoint: ~azure.mgmt.rdbms.mysql.models.PrivateEndpointProperty :param private_link_service_connection_state: Connection state of the private endpoint connection. :type private_link_service_connection_state: - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.PrivateLinkServiceConnectionStateProperty + ~azure.mgmt.rdbms.mysql.models.PrivateLinkServiceConnectionStateProperty :ivar provisioning_state: State of the private endpoint connection. :vartype provisioning_state: str """ @@ -796,7 +822,7 @@ class PrivateEndpointConnectionListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: Array of results. - :vartype value: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.PrivateEndpointConnection] + :vartype value: list[~azure.mgmt.rdbms.mysql.models.PrivateEndpointConnection] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -844,16 +870,16 @@ class PrivateLinkResource(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar properties: The private link resource group id. - :vartype properties: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.PrivateLinkResourceProperties + :vartype properties: ~azure.mgmt.rdbms.mysql.models.PrivateLinkResourceProperties """ _validation = { @@ -884,7 +910,7 @@ class PrivateLinkResourceListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: Array of results. - :vartype value: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.PrivateLinkResource] + :vartype value: list[~azure.mgmt.rdbms.mysql.models.PrivateLinkResource] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -976,17 +1002,17 @@ def __init__( class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have everything other than required location and tags. + """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str """ @@ -1009,18 +1035,42 @@ def __init__( super(ProxyResource, self).__init__(**kwargs) +class QueryPerformanceInsightResetDataResult(msrest.serialization.Model): + """Result of Query Performance Insight data reset. + + :param status: Indicates result of the operation. Possible values include: "Succeeded", + "Failed". + :type status: str or ~azure.mgmt.rdbms.mysql.models.QueryPerformanceInsightResetDataResultState + :param message: operation message. + :type message: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(QueryPerformanceInsightResetDataResult, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.message = kwargs.get('message', None) + + class QueryStatistic(Resource): """Represents a Query Statistic. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param query_id: Database query identifier. :type query_id: str @@ -1088,13 +1138,13 @@ class QueryText(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param query_id: Query identifier unique to the server. :type query_id: str @@ -1131,7 +1181,7 @@ class QueryTextsResultList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of query texts. - :vartype value: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.QueryText] + :vartype value: list[~azure.mgmt.rdbms.mysql.models.QueryText] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -1160,13 +1210,13 @@ class RecommendationAction(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param advisor_name: Advisor name. :type advisor_name: str @@ -1227,7 +1277,7 @@ class RecommendationActionsResultList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of recommendation action advisors. - :vartype value: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.RecommendationAction] + :vartype value: list[~azure.mgmt.rdbms.mysql.models.RecommendationAction] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -1278,6 +1328,70 @@ def __init__( self.status = kwargs.get('status', None) +class RecoverableServerResource(Resource): + """A recoverable server resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar last_available_backup_date_time: The last available backup date time. + :vartype last_available_backup_date_time: str + :ivar service_level_objective: The service level objective. + :vartype service_level_objective: str + :ivar edition: Edition of the performance tier. + :vartype edition: str + :ivar v_core: vCore associated with the service level objective. + :vartype v_core: int + :ivar hardware_generation: Hardware generation associated with the service level objective. + :vartype hardware_generation: str + :ivar version: The MySQL version. + :vartype version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_available_backup_date_time': {'readonly': True}, + 'service_level_objective': {'readonly': True}, + 'edition': {'readonly': True}, + 'v_core': {'readonly': True}, + 'hardware_generation': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'last_available_backup_date_time': {'key': 'properties.lastAvailableBackupDateTime', 'type': 'str'}, + 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, + 'edition': {'key': 'properties.edition', 'type': 'str'}, + 'v_core': {'key': 'properties.vCore', 'type': 'int'}, + 'hardware_generation': {'key': 'properties.hardwareGeneration', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RecoverableServerResource, self).__init__(**kwargs) + self.last_available_backup_date_time = None + self.service_level_objective = None + self.edition = None + self.v_core = None + self.hardware_generation = None + self.version = None + + class ResourceIdentity(msrest.serialization.Model): """Azure Active Directory identity configuration for a resource. @@ -1288,7 +1402,7 @@ class ResourceIdentity(msrest.serialization.Model): :param type: The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource. Possible values include: "SystemAssigned". - :type type: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.IdentityType + :type type: str or ~azure.mgmt.rdbms.mysql.models.IdentityType :ivar tenant_id: The Azure Active Directory tenant id. :vartype tenant_id: str """ @@ -1315,19 +1429,19 @@ def __init__( class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. + """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] @@ -1366,50 +1480,48 @@ class Server(TrackedResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param location: Required. The geo-location where the resource lives. :type location: str :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ResourceIdentity + :type identity: ~azure.mgmt.rdbms.mysql.models.ResourceIdentity :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.Sku + :type sku: ~azure.mgmt.rdbms.mysql.models.Sku :param administrator_login: The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). :type administrator_login: str :param version: Server version. Possible values include: "5.6", "5.7", "8.0". - :type version: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.mysql.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.mysql.models.SslEnforcementEnum :param minimal_tls_version: Enforce a minimal Tls version for the server. Possible values include: "TLS1_0", "TLS1_1", "TLS1_2", "TLSEnforcementDisabled". - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.MinimalTlsVersionEnum + :type minimal_tls_version: str or ~azure.mgmt.rdbms.mysql.models.MinimalTlsVersionEnum :ivar byok_enforcement: Status showing whether the server data encryption is enabled with customer-managed keys. :vartype byok_enforcement: str :param infrastructure_encryption: Status showing whether the server enabled infrastructure encryption. Possible values include: "Enabled", "Disabled". - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.InfrastructureEncryption + :type infrastructure_encryption: str or ~azure.mgmt.rdbms.mysql.models.InfrastructureEncryption :param user_visible_state: A state of a server that is visible to user. Possible values include: "Ready", "Dropping", "Disabled", "Inaccessible". - :type user_visible_state: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerState + :type user_visible_state: str or ~azure.mgmt.rdbms.mysql.models.ServerState :param fully_qualified_domain_name: The fully qualified domain name of a server. :type fully_qualified_domain_name: str :param earliest_restore_date: Earliest restore point creation time (ISO8601 format). :type earliest_restore_date: ~datetime.datetime :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.mysql.models.StorageProfile :param replication_role: The replication role of the server. :type replication_role: str :param master_server_id: The master server id of a replica server. @@ -1419,11 +1531,10 @@ class Server(TrackedResource): :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.mysql.models.PublicNetworkAccessEnum :ivar private_endpoint_connections: List of private endpoint connections on a server. :vartype private_endpoint_connections: - list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerPrivateEndpointConnection] + list[~azure.mgmt.rdbms.mysql.models.ServerPrivateEndpointConnection] """ _validation = { @@ -1490,13 +1601,13 @@ class ServerAdministratorResource(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar administrator_type: The type of administrator. Default value: "ActiveDirectory". :vartype administrator_type: str @@ -1541,7 +1652,7 @@ class ServerAdministratorResourceListResult(msrest.serialization.Model): """The response to a list Active Directory Administrators request. :param value: The list of server Active Directory Administrators for the server. - :type value: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerAdministratorResource] + :type value: list[~azure.mgmt.rdbms.mysql.models.ServerAdministratorResource] """ _attribute_map = { @@ -1562,11 +1673,11 @@ class ServerForCreate(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ResourceIdentity + :type identity: ~azure.mgmt.rdbms.mysql.models.ResourceIdentity :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.Sku + :type sku: ~azure.mgmt.rdbms.mysql.models.Sku :param properties: Required. Properties of the server. - :type properties: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerPropertiesForCreate + :type properties: ~azure.mgmt.rdbms.mysql.models.ServerPropertiesForCreate :param location: Required. The location the resource resides in. :type location: str :param tags: A set of tags. Application-specific metadata in the form of key-value pairs. @@ -1603,19 +1714,19 @@ class ServerKey(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar kind: Kind of encryption protector used to protect the key. :vartype kind: str :param server_key_type: The key type like 'AzureKeyVault'. Possible values include: "AzureKeyVault". - :type server_key_type: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerKeyType + :type server_key_type: str or ~azure.mgmt.rdbms.mysql.models.ServerKeyType :param uri: The URI of the key. :type uri: str :ivar creation_date: The key creation date. @@ -1657,7 +1768,7 @@ class ServerKeyListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: A list of MySQL Server keys. - :vartype value: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerKey] + :vartype value: list[~azure.mgmt.rdbms.mysql.models.ServerKey] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -1685,7 +1796,7 @@ class ServerListResult(msrest.serialization.Model): """A list of servers. :param value: The list of servers. - :type value: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.Server] + :type value: list[~azure.mgmt.rdbms.mysql.models.Server] """ _attribute_map = { @@ -1708,8 +1819,7 @@ class ServerPrivateEndpointConnection(msrest.serialization.Model): :ivar id: Resource Id of the private endpoint connection. :vartype id: str :ivar properties: Private endpoint connection properties. - :vartype properties: - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerPrivateEndpointConnectionProperties + :vartype properties: ~azure.mgmt.rdbms.mysql.models.ServerPrivateEndpointConnectionProperties """ _validation = { @@ -1737,15 +1847,15 @@ class ServerPrivateEndpointConnectionProperties(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :param private_endpoint: Private endpoint which the connection belongs to. - :type private_endpoint: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.PrivateEndpointProperty + :type private_endpoint: ~azure.mgmt.rdbms.mysql.models.PrivateEndpointProperty :param private_link_service_connection_state: Connection state of the private endpoint connection. :type private_link_service_connection_state: - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerPrivateLinkServiceConnectionStateProperty + ~azure.mgmt.rdbms.mysql.models.ServerPrivateLinkServiceConnectionStateProperty :ivar provisioning_state: State of the private endpoint connection. Possible values include: "Approving", "Ready", "Dropping", "Failed", "Rejecting". :vartype provisioning_state: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.PrivateEndpointProvisioningState + ~azure.mgmt.rdbms.mysql.models.PrivateEndpointProvisioningState """ _validation = { @@ -1777,14 +1887,13 @@ class ServerPrivateLinkServiceConnectionStateProperty(msrest.serialization.Model :param status: Required. The private link service connection status. Possible values include: "Approved", "Pending", "Rejected", "Disconnected". - :type status: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.PrivateLinkServiceConnectionStateStatus + :type status: str or ~azure.mgmt.rdbms.mysql.models.PrivateLinkServiceConnectionStateStatus :param description: Required. The private link service connection description. :type description: str :ivar actions_required: The actions required for private link service connection. Possible values include: "None". :vartype actions_required: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.PrivateLinkServiceConnectionStateActionsRequire + ~azure.mgmt.rdbms.mysql.models.PrivateLinkServiceConnectionStateActionsRequire """ _validation = { @@ -1818,28 +1927,25 @@ class ServerPropertiesForCreate(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param version: Server version. Possible values include: "5.6", "5.7", "8.0". - :type version: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.mysql.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.mysql.models.SslEnforcementEnum :param minimal_tls_version: Enforce a minimal Tls version for the server. Possible values include: "TLS1_0", "TLS1_1", "TLS1_2", "TLSEnforcementDisabled". - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.MinimalTlsVersionEnum + :type minimal_tls_version: str or ~azure.mgmt.rdbms.mysql.models.MinimalTlsVersionEnum :param infrastructure_encryption: Status showing whether the server enabled infrastructure encryption. Possible values include: "Enabled", "Disabled". - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.InfrastructureEncryption + :type infrastructure_encryption: str or ~azure.mgmt.rdbms.mysql.models.InfrastructureEncryption :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.mysql.models.PublicNetworkAccessEnum :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.mysql.models.StorageProfile :param create_mode: Required. The mode to create a new server.Constant filled by server. Possible values include: "Default", "PointInTimeRestore", "GeoRestore", "Replica". - :type create_mode: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.CreateMode + :type create_mode: str or ~azure.mgmt.rdbms.mysql.models.CreateMode """ _validation = { @@ -1880,28 +1986,25 @@ class ServerPropertiesForDefaultCreate(ServerPropertiesForCreate): All required parameters must be populated in order to send to Azure. :param version: Server version. Possible values include: "5.6", "5.7", "8.0". - :type version: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.mysql.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.mysql.models.SslEnforcementEnum :param minimal_tls_version: Enforce a minimal Tls version for the server. Possible values include: "TLS1_0", "TLS1_1", "TLS1_2", "TLSEnforcementDisabled". - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.MinimalTlsVersionEnum + :type minimal_tls_version: str or ~azure.mgmt.rdbms.mysql.models.MinimalTlsVersionEnum :param infrastructure_encryption: Status showing whether the server enabled infrastructure encryption. Possible values include: "Enabled", "Disabled". - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.InfrastructureEncryption + :type infrastructure_encryption: str or ~azure.mgmt.rdbms.mysql.models.InfrastructureEncryption :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.mysql.models.PublicNetworkAccessEnum :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.mysql.models.StorageProfile :param create_mode: Required. The mode to create a new server.Constant filled by server. Possible values include: "Default", "PointInTimeRestore", "GeoRestore", "Replica". - :type create_mode: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.CreateMode + :type create_mode: str or ~azure.mgmt.rdbms.mysql.models.CreateMode :param administrator_login: Required. The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). :type administrator_login: str @@ -1943,28 +2046,25 @@ class ServerPropertiesForGeoRestore(ServerPropertiesForCreate): All required parameters must be populated in order to send to Azure. :param version: Server version. Possible values include: "5.6", "5.7", "8.0". - :type version: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.mysql.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.mysql.models.SslEnforcementEnum :param minimal_tls_version: Enforce a minimal Tls version for the server. Possible values include: "TLS1_0", "TLS1_1", "TLS1_2", "TLSEnforcementDisabled". - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.MinimalTlsVersionEnum + :type minimal_tls_version: str or ~azure.mgmt.rdbms.mysql.models.MinimalTlsVersionEnum :param infrastructure_encryption: Status showing whether the server enabled infrastructure encryption. Possible values include: "Enabled", "Disabled". - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.InfrastructureEncryption + :type infrastructure_encryption: str or ~azure.mgmt.rdbms.mysql.models.InfrastructureEncryption :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.mysql.models.PublicNetworkAccessEnum :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.mysql.models.StorageProfile :param create_mode: Required. The mode to create a new server.Constant filled by server. Possible values include: "Default", "PointInTimeRestore", "GeoRestore", "Replica". - :type create_mode: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.CreateMode + :type create_mode: str or ~azure.mgmt.rdbms.mysql.models.CreateMode :param source_server_id: Required. The source server id to restore from. :type source_server_id: str """ @@ -2000,28 +2100,25 @@ class ServerPropertiesForReplica(ServerPropertiesForCreate): All required parameters must be populated in order to send to Azure. :param version: Server version. Possible values include: "5.6", "5.7", "8.0". - :type version: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.mysql.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.mysql.models.SslEnforcementEnum :param minimal_tls_version: Enforce a minimal Tls version for the server. Possible values include: "TLS1_0", "TLS1_1", "TLS1_2", "TLSEnforcementDisabled". - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.MinimalTlsVersionEnum + :type minimal_tls_version: str or ~azure.mgmt.rdbms.mysql.models.MinimalTlsVersionEnum :param infrastructure_encryption: Status showing whether the server enabled infrastructure encryption. Possible values include: "Enabled", "Disabled". - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.InfrastructureEncryption + :type infrastructure_encryption: str or ~azure.mgmt.rdbms.mysql.models.InfrastructureEncryption :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.mysql.models.PublicNetworkAccessEnum :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.mysql.models.StorageProfile :param create_mode: Required. The mode to create a new server.Constant filled by server. Possible values include: "Default", "PointInTimeRestore", "GeoRestore", "Replica". - :type create_mode: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.CreateMode + :type create_mode: str or ~azure.mgmt.rdbms.mysql.models.CreateMode :param source_server_id: Required. The master server id to create replica from. :type source_server_id: str """ @@ -2057,28 +2154,25 @@ class ServerPropertiesForRestore(ServerPropertiesForCreate): All required parameters must be populated in order to send to Azure. :param version: Server version. Possible values include: "5.6", "5.7", "8.0". - :type version: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.mysql.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.mysql.models.SslEnforcementEnum :param minimal_tls_version: Enforce a minimal Tls version for the server. Possible values include: "TLS1_0", "TLS1_1", "TLS1_2", "TLSEnforcementDisabled". - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.MinimalTlsVersionEnum + :type minimal_tls_version: str or ~azure.mgmt.rdbms.mysql.models.MinimalTlsVersionEnum :param infrastructure_encryption: Status showing whether the server enabled infrastructure encryption. Possible values include: "Enabled", "Disabled". - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.InfrastructureEncryption + :type infrastructure_encryption: str or ~azure.mgmt.rdbms.mysql.models.InfrastructureEncryption :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.mysql.models.PublicNetworkAccessEnum :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.mysql.models.StorageProfile :param create_mode: Required. The mode to create a new server.Constant filled by server. Possible values include: "Default", "PointInTimeRestore", "GeoRestore", "Replica". - :type create_mode: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.CreateMode + :type create_mode: str or ~azure.mgmt.rdbms.mysql.models.CreateMode :param source_server_id: Required. The source server id to restore from. :type source_server_id: str :param restore_point_in_time: Required. Restore point creation time (ISO8601 format), @@ -2119,17 +2213,17 @@ class ServerSecurityAlertPolicy(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param state: Specifies the state of the policy, whether it is enabled or disabled. Possible values include: "Enabled", "Disabled". - :type state: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerSecurityAlertPolicyState + :type state: str or ~azure.mgmt.rdbms.mysql.models.ServerSecurityAlertPolicyState :param disabled_alerts: Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly. :type disabled_alerts: list[str] @@ -2185,29 +2279,27 @@ class ServerUpdateParameters(msrest.serialization.Model): """Parameters allowed to update for a server. :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ResourceIdentity + :type identity: ~azure.mgmt.rdbms.mysql.models.ResourceIdentity :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.Sku + :type sku: ~azure.mgmt.rdbms.mysql.models.Sku :param tags: A set of tags. Application-specific metadata in the form of key-value pairs. :type tags: dict[str, str] :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.mysql.models.StorageProfile :param administrator_login_password: The password of the administrator login. :type administrator_login_password: str :param version: The version of a server. Possible values include: "5.6", "5.7", "8.0". - :type version: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.mysql.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.mysql.models.SslEnforcementEnum :param minimal_tls_version: Enforce a minimal Tls version for the server. Possible values include: "TLS1_0", "TLS1_1", "TLS1_2", "TLSEnforcementDisabled". - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.MinimalTlsVersionEnum + :type minimal_tls_version: str or ~azure.mgmt.rdbms.mysql.models.MinimalTlsVersionEnum :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.mysql.models.PublicNetworkAccessEnum :param replication_role: The replication role of the server. :type replication_role: str """ @@ -2271,7 +2363,7 @@ class Sku(msrest.serialization.Model): :type name: str :param tier: The tier of the particular SKU, e.g. Basic. Possible values include: "Basic", "GeneralPurpose", "MemoryOptimized". - :type tier: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.SkuTier + :type tier: str or ~azure.mgmt.rdbms.mysql.models.SkuTier :param capacity: The scale up/out capacity, representing server's compute units. :type capacity: int :param size: The size code, to be interpreted by resource as appropriate. @@ -2312,13 +2404,12 @@ class StorageProfile(msrest.serialization.Model): :type backup_retention_days: int :param geo_redundant_backup: Enable Geo-redundant or not for server backup. Possible values include: "Enabled", "Disabled". - :type geo_redundant_backup: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.GeoRedundantBackup + :type geo_redundant_backup: str or ~azure.mgmt.rdbms.mysql.models.GeoRedundantBackup :param storage_mb: Max storage allowed for a server. :type storage_mb: int :param storage_autogrow: Enable Storage Auto Grow. Possible values include: "Enabled", "Disabled". - :type storage_autogrow: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.StorageAutogrow + :type storage_autogrow: str or ~azure.mgmt.rdbms.mysql.models.StorageAutogrow """ _attribute_map = { @@ -2414,7 +2505,7 @@ class TopQueryStatisticsResultList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of top query statistics. - :vartype value: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.QueryStatistic] + :vartype value: list[~azure.mgmt.rdbms.mysql.models.QueryStatistic] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -2443,13 +2534,13 @@ class VirtualNetworkRule(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param virtual_network_subnet_id: The ARM resource id of the virtual network subnet. :type virtual_network_subnet_id: str @@ -2458,7 +2549,7 @@ class VirtualNetworkRule(Resource): :type ignore_missing_vnet_service_endpoint: bool :ivar state: Virtual Network Rule State. Possible values include: "Initializing", "InProgress", "Ready", "Deleting", "Unknown". - :vartype state: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.VirtualNetworkRuleState + :vartype state: str or ~azure.mgmt.rdbms.mysql.models.VirtualNetworkRuleState """ _validation = { @@ -2493,7 +2584,7 @@ class VirtualNetworkRuleListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: Array of results. - :vartype value: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.VirtualNetworkRule] + :vartype value: list[~azure.mgmt.rdbms.mysql.models.VirtualNetworkRule] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -2522,13 +2613,13 @@ class WaitStatistic(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param start_time: Observation start time. :type start_time: ~datetime.datetime @@ -2628,7 +2719,7 @@ class WaitStatisticsResultList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of wait statistics. - :vartype value: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.WaitStatistic] + :vartype value: list[~azure.mgmt.rdbms.mysql.models.WaitStatistic] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/models/_models_py3.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/_models_py3.py similarity index 85% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/models/_models_py3.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/_models_py3.py index 1b808b03c2d7..ee9fbde08535 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/models/_models_py3.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/_models_py3.py @@ -16,17 +16,17 @@ class Resource(msrest.serialization.Model): - """Resource. + """Common fields that are returned in the response for all Azure Resource Manager resources. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str """ @@ -57,13 +57,13 @@ class Advisor(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param properties: The properties of a recommendation action advisor. :type properties: object @@ -98,7 +98,7 @@ class AdvisorsResultList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of recommendation action advisors. - :vartype value: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.Advisor] + :vartype value: list[~azure.mgmt.rdbms.mysql.models.Advisor] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -126,7 +126,7 @@ class CloudErrorAutoGenerated(msrest.serialization.Model): """An error response from the Batch service. :param error: Error message. - :type error: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ErrorResponse + :type error: ~azure.mgmt.rdbms.mysql.models.ErrorResponse """ _attribute_map = { @@ -148,13 +148,13 @@ class Configuration(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param value: Value of the configuration. :type value: str @@ -212,7 +212,7 @@ class ConfigurationListResult(msrest.serialization.Model): """A list of server configurations. :param value: The list of server configurations. - :type value: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.Configuration] + :type value: list[~azure.mgmt.rdbms.mysql.models.Configuration] """ _attribute_map = { @@ -234,13 +234,13 @@ class Database(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param charset: The charset of the database. :type charset: str @@ -278,7 +278,7 @@ class DatabaseListResult(msrest.serialization.Model): """A List of databases. :param value: The list of databases housed in a server. - :type value: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.Database] + :type value: list[~azure.mgmt.rdbms.mysql.models.Database] """ _attribute_map = { @@ -326,7 +326,7 @@ def __init__( class ErrorResponse(msrest.serialization.Model): - """The resource management error response. + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). Variables are only populated by the server, and will be ignored when sending a request. @@ -337,9 +337,9 @@ class ErrorResponse(msrest.serialization.Model): :ivar target: The error target. :vartype target: str :ivar details: The error details. - :vartype details: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.ErrorResponse] + :vartype details: list[~azure.mgmt.rdbms.mysql.models.ErrorResponse] :ivar additional_info: The error additional info. - :vartype additional_info: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.ErrorAdditionalInfo] + :vartype additional_info: list[~azure.mgmt.rdbms.mysql.models.ErrorAdditionalInfo] """ _validation = { @@ -377,13 +377,13 @@ class FirewallRule(Resource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param start_ip_address: Required. The start IP address of the server firewall rule. Must be IPv4 format. @@ -425,7 +425,7 @@ class FirewallRuleListResult(msrest.serialization.Model): """A list of firewall rules. :param value: The list of firewall rules in a server. - :type value: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.FirewallRule] + :type value: list[~azure.mgmt.rdbms.mysql.models.FirewallRule] """ _attribute_map = { @@ -447,13 +447,13 @@ class LogFile(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param size_in_kb: Size of the log file. :type size_in_kb: long @@ -506,7 +506,7 @@ class LogFileListResult(msrest.serialization.Model): """A list of log files. :param value: The list of log files. - :type value: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.LogFile] + :type value: list[~azure.mgmt.rdbms.mysql.models.LogFile] """ _attribute_map = { @@ -594,10 +594,10 @@ class Operation(msrest.serialization.Model): :ivar name: The name of the operation being performed on this particular object. :vartype name: str :ivar display: The localized display information for this particular operation or action. - :vartype display: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.OperationDisplay + :vartype display: ~azure.mgmt.rdbms.mysql.models.OperationDisplay :ivar origin: The intended executor of the operation. Possible values include: "NotSpecified", "user", "system". - :vartype origin: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.OperationOrigin + :vartype origin: str or ~azure.mgmt.rdbms.mysql.models.OperationOrigin :ivar properties: Additional descriptions for the operation. :vartype properties: dict[str, object] """ @@ -671,7 +671,7 @@ class OperationListResult(msrest.serialization.Model): """A list of resource provider operations. :param value: The list of resource provider operations. - :type value: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.Operation] + :type value: list[~azure.mgmt.rdbms.mysql.models.Operation] """ _attribute_map = { @@ -692,7 +692,7 @@ class PerformanceTierListResult(msrest.serialization.Model): """A list of performance tiers. :param value: The list of performance tiers. - :type value: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.PerformanceTierProperties] + :type value: list[~azure.mgmt.rdbms.mysql.models.PerformanceTierProperties] """ _attribute_map = { @@ -714,13 +714,33 @@ class PerformanceTierProperties(msrest.serialization.Model): :param id: ID of the performance tier. :type id: str + :param max_backup_retention_days: Maximum Backup retention in days for the performance tier + edition. + :type max_backup_retention_days: int + :param min_backup_retention_days: Minimum Backup retention in days for the performance tier + edition. + :type min_backup_retention_days: int + :param max_storage_mb: Max storage allowed for a server. + :type max_storage_mb: int + :param min_large_storage_mb: Max storage allowed for a server. + :type min_large_storage_mb: int + :param max_large_storage_mb: Max storage allowed for a server. + :type max_large_storage_mb: int + :param min_storage_mb: Max storage allowed for a server. + :type min_storage_mb: int :param service_level_objectives: Service level objectives associated with the performance tier. :type service_level_objectives: - list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.PerformanceTierServiceLevelObjectives] + list[~azure.mgmt.rdbms.mysql.models.PerformanceTierServiceLevelObjectives] """ _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'max_backup_retention_days': {'key': 'maxBackupRetentionDays', 'type': 'int'}, + 'min_backup_retention_days': {'key': 'minBackupRetentionDays', 'type': 'int'}, + 'max_storage_mb': {'key': 'maxStorageMB', 'type': 'int'}, + 'min_large_storage_mb': {'key': 'minLargeStorageMB', 'type': 'int'}, + 'max_large_storage_mb': {'key': 'maxLargeStorageMB', 'type': 'int'}, + 'min_storage_mb': {'key': 'minStorageMB', 'type': 'int'}, 'service_level_objectives': {'key': 'serviceLevelObjectives', 'type': '[PerformanceTierServiceLevelObjectives]'}, } @@ -728,11 +748,23 @@ def __init__( self, *, id: Optional[str] = None, + max_backup_retention_days: Optional[int] = None, + min_backup_retention_days: Optional[int] = None, + max_storage_mb: Optional[int] = None, + min_large_storage_mb: Optional[int] = None, + max_large_storage_mb: Optional[int] = None, + min_storage_mb: Optional[int] = None, service_level_objectives: Optional[List["PerformanceTierServiceLevelObjectives"]] = None, **kwargs ): super(PerformanceTierProperties, self).__init__(**kwargs) self.id = id + self.max_backup_retention_days = max_backup_retention_days + self.min_backup_retention_days = min_backup_retention_days + self.max_storage_mb = max_storage_mb + self.min_large_storage_mb = min_large_storage_mb + self.max_large_storage_mb = max_large_storage_mb + self.min_storage_mb = min_storage_mb self.service_level_objectives = service_level_objectives @@ -799,20 +831,20 @@ class PrivateEndpointConnection(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param private_endpoint: Private endpoint which the connection belongs to. - :type private_endpoint: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.PrivateEndpointProperty + :type private_endpoint: ~azure.mgmt.rdbms.mysql.models.PrivateEndpointProperty :param private_link_service_connection_state: Connection state of the private endpoint connection. :type private_link_service_connection_state: - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.PrivateLinkServiceConnectionStateProperty + ~azure.mgmt.rdbms.mysql.models.PrivateLinkServiceConnectionStateProperty :ivar provisioning_state: State of the private endpoint connection. :vartype provisioning_state: str """ @@ -852,7 +884,7 @@ class PrivateEndpointConnectionListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: Array of results. - :vartype value: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.PrivateEndpointConnection] + :vartype value: list[~azure.mgmt.rdbms.mysql.models.PrivateEndpointConnection] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -902,16 +934,16 @@ class PrivateLinkResource(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar properties: The private link resource group id. - :vartype properties: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.PrivateLinkResourceProperties + :vartype properties: ~azure.mgmt.rdbms.mysql.models.PrivateLinkResourceProperties """ _validation = { @@ -942,7 +974,7 @@ class PrivateLinkResourceListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: Array of results. - :vartype value: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.PrivateLinkResource] + :vartype value: list[~azure.mgmt.rdbms.mysql.models.PrivateLinkResource] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -1037,17 +1069,17 @@ def __init__( class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have everything other than required location and tags. + """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str """ @@ -1070,18 +1102,45 @@ def __init__( super(ProxyResource, self).__init__(**kwargs) +class QueryPerformanceInsightResetDataResult(msrest.serialization.Model): + """Result of Query Performance Insight data reset. + + :param status: Indicates result of the operation. Possible values include: "Succeeded", + "Failed". + :type status: str or ~azure.mgmt.rdbms.mysql.models.QueryPerformanceInsightResetDataResultState + :param message: operation message. + :type message: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Optional[Union[str, "QueryPerformanceInsightResetDataResultState"]] = None, + message: Optional[str] = None, + **kwargs + ): + super(QueryPerformanceInsightResetDataResult, self).__init__(**kwargs) + self.status = status + self.message = message + + class QueryStatistic(Resource): """Represents a Query Statistic. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param query_id: Database query identifier. :type query_id: str @@ -1160,13 +1219,13 @@ class QueryText(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param query_id: Query identifier unique to the server. :type query_id: str @@ -1206,7 +1265,7 @@ class QueryTextsResultList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of query texts. - :vartype value: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.QueryText] + :vartype value: list[~azure.mgmt.rdbms.mysql.models.QueryText] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -1235,13 +1294,13 @@ class RecommendationAction(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param advisor_name: Advisor name. :type advisor_name: str @@ -1311,7 +1370,7 @@ class RecommendationActionsResultList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of recommendation action advisors. - :vartype value: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.RecommendationAction] + :vartype value: list[~azure.mgmt.rdbms.mysql.models.RecommendationAction] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -1366,6 +1425,70 @@ def __init__( self.status = status +class RecoverableServerResource(Resource): + """A recoverable server resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar last_available_backup_date_time: The last available backup date time. + :vartype last_available_backup_date_time: str + :ivar service_level_objective: The service level objective. + :vartype service_level_objective: str + :ivar edition: Edition of the performance tier. + :vartype edition: str + :ivar v_core: vCore associated with the service level objective. + :vartype v_core: int + :ivar hardware_generation: Hardware generation associated with the service level objective. + :vartype hardware_generation: str + :ivar version: The MySQL version. + :vartype version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_available_backup_date_time': {'readonly': True}, + 'service_level_objective': {'readonly': True}, + 'edition': {'readonly': True}, + 'v_core': {'readonly': True}, + 'hardware_generation': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'last_available_backup_date_time': {'key': 'properties.lastAvailableBackupDateTime', 'type': 'str'}, + 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, + 'edition': {'key': 'properties.edition', 'type': 'str'}, + 'v_core': {'key': 'properties.vCore', 'type': 'int'}, + 'hardware_generation': {'key': 'properties.hardwareGeneration', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RecoverableServerResource, self).__init__(**kwargs) + self.last_available_backup_date_time = None + self.service_level_objective = None + self.edition = None + self.v_core = None + self.hardware_generation = None + self.version = None + + class ResourceIdentity(msrest.serialization.Model): """Azure Active Directory identity configuration for a resource. @@ -1376,7 +1499,7 @@ class ResourceIdentity(msrest.serialization.Model): :param type: The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource. Possible values include: "SystemAssigned". - :type type: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.IdentityType + :type type: str or ~azure.mgmt.rdbms.mysql.models.IdentityType :ivar tenant_id: The Azure Active Directory tenant id. :vartype tenant_id: str """ @@ -1405,19 +1528,19 @@ def __init__( class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. + """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] @@ -1459,50 +1582,48 @@ class Server(TrackedResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param location: Required. The geo-location where the resource lives. :type location: str :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ResourceIdentity + :type identity: ~azure.mgmt.rdbms.mysql.models.ResourceIdentity :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.Sku + :type sku: ~azure.mgmt.rdbms.mysql.models.Sku :param administrator_login: The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). :type administrator_login: str :param version: Server version. Possible values include: "5.6", "5.7", "8.0". - :type version: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.mysql.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.mysql.models.SslEnforcementEnum :param minimal_tls_version: Enforce a minimal Tls version for the server. Possible values include: "TLS1_0", "TLS1_1", "TLS1_2", "TLSEnforcementDisabled". - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.MinimalTlsVersionEnum + :type minimal_tls_version: str or ~azure.mgmt.rdbms.mysql.models.MinimalTlsVersionEnum :ivar byok_enforcement: Status showing whether the server data encryption is enabled with customer-managed keys. :vartype byok_enforcement: str :param infrastructure_encryption: Status showing whether the server enabled infrastructure encryption. Possible values include: "Enabled", "Disabled". - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.InfrastructureEncryption + :type infrastructure_encryption: str or ~azure.mgmt.rdbms.mysql.models.InfrastructureEncryption :param user_visible_state: A state of a server that is visible to user. Possible values include: "Ready", "Dropping", "Disabled", "Inaccessible". - :type user_visible_state: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerState + :type user_visible_state: str or ~azure.mgmt.rdbms.mysql.models.ServerState :param fully_qualified_domain_name: The fully qualified domain name of a server. :type fully_qualified_domain_name: str :param earliest_restore_date: Earliest restore point creation time (ISO8601 format). :type earliest_restore_date: ~datetime.datetime :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.mysql.models.StorageProfile :param replication_role: The replication role of the server. :type replication_role: str :param master_server_id: The master server id of a replica server. @@ -1512,11 +1633,10 @@ class Server(TrackedResource): :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.mysql.models.PublicNetworkAccessEnum :ivar private_endpoint_connections: List of private endpoint connections on a server. :vartype private_endpoint_connections: - list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerPrivateEndpointConnection] + list[~azure.mgmt.rdbms.mysql.models.ServerPrivateEndpointConnection] """ _validation = { @@ -1601,13 +1721,13 @@ class ServerAdministratorResource(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar administrator_type: The type of administrator. Default value: "ActiveDirectory". :vartype administrator_type: str @@ -1656,7 +1776,7 @@ class ServerAdministratorResourceListResult(msrest.serialization.Model): """The response to a list Active Directory Administrators request. :param value: The list of server Active Directory Administrators for the server. - :type value: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerAdministratorResource] + :type value: list[~azure.mgmt.rdbms.mysql.models.ServerAdministratorResource] """ _attribute_map = { @@ -1679,11 +1799,11 @@ class ServerForCreate(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ResourceIdentity + :type identity: ~azure.mgmt.rdbms.mysql.models.ResourceIdentity :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.Sku + :type sku: ~azure.mgmt.rdbms.mysql.models.Sku :param properties: Required. Properties of the server. - :type properties: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerPropertiesForCreate + :type properties: ~azure.mgmt.rdbms.mysql.models.ServerPropertiesForCreate :param location: Required. The location the resource resides in. :type location: str :param tags: A set of tags. Application-specific metadata in the form of key-value pairs. @@ -1726,19 +1846,19 @@ class ServerKey(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar kind: Kind of encryption protector used to protect the key. :vartype kind: str :param server_key_type: The key type like 'AzureKeyVault'. Possible values include: "AzureKeyVault". - :type server_key_type: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerKeyType + :type server_key_type: str or ~azure.mgmt.rdbms.mysql.models.ServerKeyType :param uri: The URI of the key. :type uri: str :ivar creation_date: The key creation date. @@ -1783,7 +1903,7 @@ class ServerKeyListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: A list of MySQL Server keys. - :vartype value: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerKey] + :vartype value: list[~azure.mgmt.rdbms.mysql.models.ServerKey] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -1811,7 +1931,7 @@ class ServerListResult(msrest.serialization.Model): """A list of servers. :param value: The list of servers. - :type value: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.Server] + :type value: list[~azure.mgmt.rdbms.mysql.models.Server] """ _attribute_map = { @@ -1836,8 +1956,7 @@ class ServerPrivateEndpointConnection(msrest.serialization.Model): :ivar id: Resource Id of the private endpoint connection. :vartype id: str :ivar properties: Private endpoint connection properties. - :vartype properties: - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerPrivateEndpointConnectionProperties + :vartype properties: ~azure.mgmt.rdbms.mysql.models.ServerPrivateEndpointConnectionProperties """ _validation = { @@ -1865,15 +1984,15 @@ class ServerPrivateEndpointConnectionProperties(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :param private_endpoint: Private endpoint which the connection belongs to. - :type private_endpoint: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.PrivateEndpointProperty + :type private_endpoint: ~azure.mgmt.rdbms.mysql.models.PrivateEndpointProperty :param private_link_service_connection_state: Connection state of the private endpoint connection. :type private_link_service_connection_state: - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerPrivateLinkServiceConnectionStateProperty + ~azure.mgmt.rdbms.mysql.models.ServerPrivateLinkServiceConnectionStateProperty :ivar provisioning_state: State of the private endpoint connection. Possible values include: "Approving", "Ready", "Dropping", "Failed", "Rejecting". :vartype provisioning_state: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.PrivateEndpointProvisioningState + ~azure.mgmt.rdbms.mysql.models.PrivateEndpointProvisioningState """ _validation = { @@ -1908,14 +2027,13 @@ class ServerPrivateLinkServiceConnectionStateProperty(msrest.serialization.Model :param status: Required. The private link service connection status. Possible values include: "Approved", "Pending", "Rejected", "Disconnected". - :type status: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.PrivateLinkServiceConnectionStateStatus + :type status: str or ~azure.mgmt.rdbms.mysql.models.PrivateLinkServiceConnectionStateStatus :param description: Required. The private link service connection description. :type description: str :ivar actions_required: The actions required for private link service connection. Possible values include: "None". :vartype actions_required: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.PrivateLinkServiceConnectionStateActionsRequire + ~azure.mgmt.rdbms.mysql.models.PrivateLinkServiceConnectionStateActionsRequire """ _validation = { @@ -1952,28 +2070,25 @@ class ServerPropertiesForCreate(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param version: Server version. Possible values include: "5.6", "5.7", "8.0". - :type version: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.mysql.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.mysql.models.SslEnforcementEnum :param minimal_tls_version: Enforce a minimal Tls version for the server. Possible values include: "TLS1_0", "TLS1_1", "TLS1_2", "TLSEnforcementDisabled". - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.MinimalTlsVersionEnum + :type minimal_tls_version: str or ~azure.mgmt.rdbms.mysql.models.MinimalTlsVersionEnum :param infrastructure_encryption: Status showing whether the server enabled infrastructure encryption. Possible values include: "Enabled", "Disabled". - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.InfrastructureEncryption + :type infrastructure_encryption: str or ~azure.mgmt.rdbms.mysql.models.InfrastructureEncryption :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.mysql.models.PublicNetworkAccessEnum :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.mysql.models.StorageProfile :param create_mode: Required. The mode to create a new server.Constant filled by server. Possible values include: "Default", "PointInTimeRestore", "GeoRestore", "Replica". - :type create_mode: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.CreateMode + :type create_mode: str or ~azure.mgmt.rdbms.mysql.models.CreateMode """ _validation = { @@ -2021,28 +2136,25 @@ class ServerPropertiesForDefaultCreate(ServerPropertiesForCreate): All required parameters must be populated in order to send to Azure. :param version: Server version. Possible values include: "5.6", "5.7", "8.0". - :type version: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.mysql.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.mysql.models.SslEnforcementEnum :param minimal_tls_version: Enforce a minimal Tls version for the server. Possible values include: "TLS1_0", "TLS1_1", "TLS1_2", "TLSEnforcementDisabled". - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.MinimalTlsVersionEnum + :type minimal_tls_version: str or ~azure.mgmt.rdbms.mysql.models.MinimalTlsVersionEnum :param infrastructure_encryption: Status showing whether the server enabled infrastructure encryption. Possible values include: "Enabled", "Disabled". - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.InfrastructureEncryption + :type infrastructure_encryption: str or ~azure.mgmt.rdbms.mysql.models.InfrastructureEncryption :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.mysql.models.PublicNetworkAccessEnum :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.mysql.models.StorageProfile :param create_mode: Required. The mode to create a new server.Constant filled by server. Possible values include: "Default", "PointInTimeRestore", "GeoRestore", "Replica". - :type create_mode: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.CreateMode + :type create_mode: str or ~azure.mgmt.rdbms.mysql.models.CreateMode :param administrator_login: Required. The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). :type administrator_login: str @@ -2093,28 +2205,25 @@ class ServerPropertiesForGeoRestore(ServerPropertiesForCreate): All required parameters must be populated in order to send to Azure. :param version: Server version. Possible values include: "5.6", "5.7", "8.0". - :type version: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.mysql.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.mysql.models.SslEnforcementEnum :param minimal_tls_version: Enforce a minimal Tls version for the server. Possible values include: "TLS1_0", "TLS1_1", "TLS1_2", "TLSEnforcementDisabled". - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.MinimalTlsVersionEnum + :type minimal_tls_version: str or ~azure.mgmt.rdbms.mysql.models.MinimalTlsVersionEnum :param infrastructure_encryption: Status showing whether the server enabled infrastructure encryption. Possible values include: "Enabled", "Disabled". - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.InfrastructureEncryption + :type infrastructure_encryption: str or ~azure.mgmt.rdbms.mysql.models.InfrastructureEncryption :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.mysql.models.PublicNetworkAccessEnum :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.mysql.models.StorageProfile :param create_mode: Required. The mode to create a new server.Constant filled by server. Possible values include: "Default", "PointInTimeRestore", "GeoRestore", "Replica". - :type create_mode: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.CreateMode + :type create_mode: str or ~azure.mgmt.rdbms.mysql.models.CreateMode :param source_server_id: Required. The source server id to restore from. :type source_server_id: str """ @@ -2158,28 +2267,25 @@ class ServerPropertiesForReplica(ServerPropertiesForCreate): All required parameters must be populated in order to send to Azure. :param version: Server version. Possible values include: "5.6", "5.7", "8.0". - :type version: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.mysql.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.mysql.models.SslEnforcementEnum :param minimal_tls_version: Enforce a minimal Tls version for the server. Possible values include: "TLS1_0", "TLS1_1", "TLS1_2", "TLSEnforcementDisabled". - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.MinimalTlsVersionEnum + :type minimal_tls_version: str or ~azure.mgmt.rdbms.mysql.models.MinimalTlsVersionEnum :param infrastructure_encryption: Status showing whether the server enabled infrastructure encryption. Possible values include: "Enabled", "Disabled". - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.InfrastructureEncryption + :type infrastructure_encryption: str or ~azure.mgmt.rdbms.mysql.models.InfrastructureEncryption :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.mysql.models.PublicNetworkAccessEnum :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.mysql.models.StorageProfile :param create_mode: Required. The mode to create a new server.Constant filled by server. Possible values include: "Default", "PointInTimeRestore", "GeoRestore", "Replica". - :type create_mode: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.CreateMode + :type create_mode: str or ~azure.mgmt.rdbms.mysql.models.CreateMode :param source_server_id: Required. The master server id to create replica from. :type source_server_id: str """ @@ -2223,28 +2329,25 @@ class ServerPropertiesForRestore(ServerPropertiesForCreate): All required parameters must be populated in order to send to Azure. :param version: Server version. Possible values include: "5.6", "5.7", "8.0". - :type version: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.mysql.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.mysql.models.SslEnforcementEnum :param minimal_tls_version: Enforce a minimal Tls version for the server. Possible values include: "TLS1_0", "TLS1_1", "TLS1_2", "TLSEnforcementDisabled". - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.MinimalTlsVersionEnum + :type minimal_tls_version: str or ~azure.mgmt.rdbms.mysql.models.MinimalTlsVersionEnum :param infrastructure_encryption: Status showing whether the server enabled infrastructure encryption. Possible values include: "Enabled", "Disabled". - :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.InfrastructureEncryption + :type infrastructure_encryption: str or ~azure.mgmt.rdbms.mysql.models.InfrastructureEncryption :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.mysql.models.PublicNetworkAccessEnum :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.mysql.models.StorageProfile :param create_mode: Required. The mode to create a new server.Constant filled by server. Possible values include: "Default", "PointInTimeRestore", "GeoRestore", "Replica". - :type create_mode: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.CreateMode + :type create_mode: str or ~azure.mgmt.rdbms.mysql.models.CreateMode :param source_server_id: Required. The source server id to restore from. :type source_server_id: str :param restore_point_in_time: Required. Restore point creation time (ISO8601 format), @@ -2294,17 +2397,17 @@ class ServerSecurityAlertPolicy(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param state: Specifies the state of the policy, whether it is enabled or disabled. Possible values include: "Enabled", "Disabled". - :type state: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerSecurityAlertPolicyState + :type state: str or ~azure.mgmt.rdbms.mysql.models.ServerSecurityAlertPolicyState :param disabled_alerts: Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly. :type disabled_alerts: list[str] @@ -2368,29 +2471,27 @@ class ServerUpdateParameters(msrest.serialization.Model): """Parameters allowed to update for a server. :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ResourceIdentity + :type identity: ~azure.mgmt.rdbms.mysql.models.ResourceIdentity :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.Sku + :type sku: ~azure.mgmt.rdbms.mysql.models.Sku :param tags: A set of tags. Application-specific metadata in the form of key-value pairs. :type tags: dict[str, str] :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.mysql.models.StorageProfile :param administrator_login_password: The password of the administrator login. :type administrator_login_password: str :param version: The version of a server. Possible values include: "5.6", "5.7", "8.0". - :type version: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.mysql.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.mysql.models.SslEnforcementEnum :param minimal_tls_version: Enforce a minimal Tls version for the server. Possible values include: "TLS1_0", "TLS1_1", "TLS1_2", "TLSEnforcementDisabled". - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.MinimalTlsVersionEnum + :type minimal_tls_version: str or ~azure.mgmt.rdbms.mysql.models.MinimalTlsVersionEnum :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.mysql.models.PublicNetworkAccessEnum :param replication_role: The replication role of the server. :type replication_role: str """ @@ -2467,7 +2568,7 @@ class Sku(msrest.serialization.Model): :type name: str :param tier: The tier of the particular SKU, e.g. Basic. Possible values include: "Basic", "GeneralPurpose", "MemoryOptimized". - :type tier: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.SkuTier + :type tier: str or ~azure.mgmt.rdbms.mysql.models.SkuTier :param capacity: The scale up/out capacity, representing server's compute units. :type capacity: int :param size: The size code, to be interpreted by resource as appropriate. @@ -2514,13 +2615,12 @@ class StorageProfile(msrest.serialization.Model): :type backup_retention_days: int :param geo_redundant_backup: Enable Geo-redundant or not for server backup. Possible values include: "Enabled", "Disabled". - :type geo_redundant_backup: str or - ~azure.mgmt.rdbms.mysql.v2020_01_01.models.GeoRedundantBackup + :type geo_redundant_backup: str or ~azure.mgmt.rdbms.mysql.models.GeoRedundantBackup :param storage_mb: Max storage allowed for a server. :type storage_mb: int :param storage_autogrow: Enable Storage Auto Grow. Possible values include: "Enabled", "Disabled". - :type storage_autogrow: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.StorageAutogrow + :type storage_autogrow: str or ~azure.mgmt.rdbms.mysql.models.StorageAutogrow """ _attribute_map = { @@ -2630,7 +2730,7 @@ class TopQueryStatisticsResultList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of top query statistics. - :vartype value: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.QueryStatistic] + :vartype value: list[~azure.mgmt.rdbms.mysql.models.QueryStatistic] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -2659,13 +2759,13 @@ class VirtualNetworkRule(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param virtual_network_subnet_id: The ARM resource id of the virtual network subnet. :type virtual_network_subnet_id: str @@ -2674,7 +2774,7 @@ class VirtualNetworkRule(Resource): :type ignore_missing_vnet_service_endpoint: bool :ivar state: Virtual Network Rule State. Possible values include: "Initializing", "InProgress", "Ready", "Deleting", "Unknown". - :vartype state: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.VirtualNetworkRuleState + :vartype state: str or ~azure.mgmt.rdbms.mysql.models.VirtualNetworkRuleState """ _validation = { @@ -2712,7 +2812,7 @@ class VirtualNetworkRuleListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: Array of results. - :vartype value: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.VirtualNetworkRule] + :vartype value: list[~azure.mgmt.rdbms.mysql.models.VirtualNetworkRule] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -2741,13 +2841,13 @@ class WaitStatistic(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param start_time: Observation start time. :type start_time: ~datetime.datetime @@ -2861,7 +2961,7 @@ class WaitStatisticsResultList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of wait statistics. - :vartype value: list[~azure.mgmt.rdbms.mysql.v2020_01_01.models.WaitStatistic] + :vartype value: list[~azure.mgmt.rdbms.mysql.models.WaitStatistic] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/models/_my_sql_management_client_enums.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/_my_sql_management_client_enums.py similarity index 96% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/models/_my_sql_management_client_enums.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/_my_sql_management_client_enums.py index bc1037d79b93..2e8442f938ab 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/models/_my_sql_management_client_enums.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/_my_sql_management_client_enums.py @@ -108,6 +108,13 @@ class PublicNetworkAccessEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum ENABLED = "Enabled" DISABLED = "Disabled" +class QueryPerformanceInsightResetDataResultState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Indicates result of the operation. + """ + + SUCCEEDED = "Succeeded" + FAILED = "Failed" + class SecurityAlertPolicyName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): DEFAULT = "Default" diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/__init__.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/__init__.py similarity index 89% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/__init__.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/__init__.py index ddb06e36b730..5c44d71d2baa 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/operations/__init__.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/__init__.py @@ -12,8 +12,11 @@ from ._virtual_network_rules_operations import VirtualNetworkRulesOperations from ._databases_operations import DatabasesOperations from ._configurations_operations import ConfigurationsOperations +from ._server_parameters_operations import ServerParametersOperations from ._log_files_operations import LogFilesOperations from ._server_administrators_operations import ServerAdministratorsOperations +from ._recoverable_servers_operations import RecoverableServersOperations +from ._server_based_performance_tier_operations import ServerBasedPerformanceTierOperations from ._location_based_performance_tier_operations import LocationBasedPerformanceTierOperations from ._check_name_availability_operations import CheckNameAvailabilityOperations from ._operations import Operations @@ -21,8 +24,8 @@ from ._query_texts_operations import QueryTextsOperations from ._top_query_statistics_operations import TopQueryStatisticsOperations from ._wait_statistics_operations import WaitStatisticsOperations -from ._advisors_operations import AdvisorsOperations from ._my_sql_management_client_operations import MySQLManagementClientOperationsMixin +from ._advisors_operations import AdvisorsOperations from ._recommended_actions_operations import RecommendedActionsOperations from ._location_based_recommended_action_sessions_operation_status_operations import LocationBasedRecommendedActionSessionsOperationStatusOperations from ._location_based_recommended_action_sessions_result_operations import LocationBasedRecommendedActionSessionsResultOperations @@ -37,8 +40,11 @@ 'VirtualNetworkRulesOperations', 'DatabasesOperations', 'ConfigurationsOperations', + 'ServerParametersOperations', 'LogFilesOperations', 'ServerAdministratorsOperations', + 'RecoverableServersOperations', + 'ServerBasedPerformanceTierOperations', 'LocationBasedPerformanceTierOperations', 'CheckNameAvailabilityOperations', 'Operations', @@ -46,8 +52,8 @@ 'QueryTextsOperations', 'TopQueryStatisticsOperations', 'WaitStatisticsOperations', - 'AdvisorsOperations', 'MySQLManagementClientOperationsMixin', + 'AdvisorsOperations', 'RecommendedActionsOperations', 'LocationBasedRecommendedActionSessionsOperationStatusOperations', 'LocationBasedRecommendedActionSessionsResultOperations', diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_advisors_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_advisors_operations.py similarity index 94% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_advisors_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_advisors_operations.py index 4f413a043579..5ce992782180 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_advisors_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_advisors_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -30,14 +30,14 @@ class AdvisorsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,7 +52,7 @@ def get( advisor_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.Advisor" + # type: (...) -> "_models.Advisor" """Get a recommendation action advisor. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -63,10 +63,10 @@ def get( :type advisor_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Advisor, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.Advisor + :rtype: ~azure.mgmt.rdbms.mysql.models.Advisor :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Advisor"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Advisor"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -114,7 +114,7 @@ def list_by_server( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.AdvisorsResultList"] + # type: (...) -> Iterable["_models.AdvisorsResultList"] """List recommendation action advisors. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -123,10 +123,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AdvisorsResultList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.AdvisorsResultList] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.models.AdvisorsResultList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.AdvisorsResultList"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AdvisorsResultList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_check_name_availability_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_check_name_availability_operations.py similarity index 91% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_check_name_availability_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_check_name_availability_operations.py index 8c0f939742bc..fdf526776140 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_check_name_availability_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_check_name_availability_operations.py @@ -13,7 +13,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -29,14 +29,14 @@ class CheckNameAvailabilityOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -46,21 +46,21 @@ def __init__(self, client, config, serializer, deserializer): def execute( self, - name_availability_request, # type: "models.NameAvailabilityRequest" + name_availability_request, # type: "_models.NameAvailabilityRequest" **kwargs # type: Any ): - # type: (...) -> "models.NameAvailability" + # type: (...) -> "_models.NameAvailability" """Check the availability of name for resource. :param name_availability_request: The required parameters for checking if resource name is available. - :type name_availability_request: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.NameAvailabilityRequest + :type name_availability_request: ~azure.mgmt.rdbms.mysql.models.NameAvailabilityRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: NameAvailability, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.NameAvailability + :rtype: ~azure.mgmt.rdbms.mysql.models.NameAvailability :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.NameAvailability"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NameAvailability"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_configurations_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_configurations_operations.py similarity index 94% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_configurations_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_configurations_operations.py index 2a74329ac64b..514f1e58d86a 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_configurations_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_configurations_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -32,14 +32,14 @@ class ConfigurationsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,11 +52,11 @@ def _create_or_update_initial( resource_group_name, # type: str server_name, # type: str configuration_name, # type: str - parameters, # type: "models.Configuration" + parameters, # type: "_models.Configuration" **kwargs # type: Any ): - # type: (...) -> Optional["models.Configuration"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Configuration"]] + # type: (...) -> Optional["_models.Configuration"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Configuration"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -110,10 +110,10 @@ def begin_create_or_update( resource_group_name, # type: str server_name, # type: str configuration_name, # type: str - parameters, # type: "models.Configuration" + parameters, # type: "_models.Configuration" **kwargs # type: Any ): - # type: (...) -> LROPoller["models.Configuration"] + # type: (...) -> LROPoller["_models.Configuration"] """Updates a configuration of a server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -123,7 +123,7 @@ def begin_create_or_update( :param configuration_name: The name of the server configuration. :type configuration_name: str :param parameters: The required parameters for updating a server configuration. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.Configuration + :type parameters: ~azure.mgmt.rdbms.mysql.models.Configuration :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: True for ARMPolling, False for no polling, or a @@ -131,11 +131,11 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Configuration or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql.v2020_01_01.models.Configuration] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql.models.Configuration] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.Configuration"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Configuration"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -189,7 +189,7 @@ def get( configuration_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.Configuration" + # type: (...) -> "_models.Configuration" """Gets information about a configuration of server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -200,10 +200,10 @@ def get( :type configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Configuration, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.Configuration + :rtype: ~azure.mgmt.rdbms.mysql.models.Configuration :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Configuration"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Configuration"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -251,7 +251,7 @@ def list_by_server( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.ConfigurationListResult"] + # type: (...) -> Iterable["_models.ConfigurationListResult"] """List all the configurations in a given server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -260,10 +260,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ConfigurationListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.ConfigurationListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.models.ConfigurationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ConfigurationListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfigurationListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_databases_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_databases_operations.py similarity index 95% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_databases_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_databases_operations.py index dd474d0a5858..3198117d7248 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_databases_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_databases_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -32,14 +32,14 @@ class DatabasesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,11 +52,11 @@ def _create_or_update_initial( resource_group_name, # type: str server_name, # type: str database_name, # type: str - parameters, # type: "models.Database" + parameters, # type: "_models.Database" **kwargs # type: Any ): - # type: (...) -> Optional["models.Database"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Database"]] + # type: (...) -> Optional["_models.Database"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Database"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -113,10 +113,10 @@ def begin_create_or_update( resource_group_name, # type: str server_name, # type: str database_name, # type: str - parameters, # type: "models.Database" + parameters, # type: "_models.Database" **kwargs # type: Any ): - # type: (...) -> LROPoller["models.Database"] + # type: (...) -> LROPoller["_models.Database"] """Creates a new database or updates an existing database. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -126,7 +126,7 @@ def begin_create_or_update( :param database_name: The name of the database. :type database_name: str :param parameters: The required parameters for creating or updating a database. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.Database + :type parameters: ~azure.mgmt.rdbms.mysql.models.Database :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: True for ARMPolling, False for no polling, or a @@ -134,11 +134,11 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Database or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql.v2020_01_01.models.Database] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql.models.Database] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.Database"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Database"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -307,7 +307,7 @@ def get( database_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.Database" + # type: (...) -> "_models.Database" """Gets information about a database. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -318,10 +318,10 @@ def get( :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Database, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.Database + :rtype: ~azure.mgmt.rdbms.mysql.models.Database :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Database"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Database"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -369,7 +369,7 @@ def list_by_server( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.DatabaseListResult"] + # type: (...) -> Iterable["_models.DatabaseListResult"] """List all the databases in a given server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -378,10 +378,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DatabaseListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.DatabaseListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.models.DatabaseListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.DatabaseListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_firewall_rules_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_firewall_rules_operations.py similarity index 95% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_firewall_rules_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_firewall_rules_operations.py index c96b75789f9b..2e033b6e55ae 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_firewall_rules_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_firewall_rules_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -32,14 +32,14 @@ class FirewallRulesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,11 +52,11 @@ def _create_or_update_initial( resource_group_name, # type: str server_name, # type: str firewall_rule_name, # type: str - parameters, # type: "models.FirewallRule" + parameters, # type: "_models.FirewallRule" **kwargs # type: Any ): - # type: (...) -> Optional["models.FirewallRule"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.FirewallRule"]] + # type: (...) -> Optional["_models.FirewallRule"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.FirewallRule"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -113,10 +113,10 @@ def begin_create_or_update( resource_group_name, # type: str server_name, # type: str firewall_rule_name, # type: str - parameters, # type: "models.FirewallRule" + parameters, # type: "_models.FirewallRule" **kwargs # type: Any ): - # type: (...) -> LROPoller["models.FirewallRule"] + # type: (...) -> LROPoller["_models.FirewallRule"] """Creates a new firewall rule or updates an existing firewall rule. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -126,7 +126,7 @@ def begin_create_or_update( :param firewall_rule_name: The name of the server firewall rule. :type firewall_rule_name: str :param parameters: The required parameters for creating or updating a firewall rule. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.FirewallRule + :type parameters: ~azure.mgmt.rdbms.mysql.models.FirewallRule :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: True for ARMPolling, False for no polling, or a @@ -134,11 +134,11 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either FirewallRule or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql.v2020_01_01.models.FirewallRule] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql.models.FirewallRule] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.FirewallRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRule"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -307,7 +307,7 @@ def get( firewall_rule_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.FirewallRule" + # type: (...) -> "_models.FirewallRule" """Gets information about a server firewall rule. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -318,10 +318,10 @@ def get( :type firewall_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: FirewallRule, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.FirewallRule + :rtype: ~azure.mgmt.rdbms.mysql.models.FirewallRule :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.FirewallRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRule"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -369,7 +369,7 @@ def list_by_server( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.FirewallRuleListResult"] + # type: (...) -> Iterable["_models.FirewallRuleListResult"] """List all the firewall rules in a given server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -378,10 +378,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either FirewallRuleListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.FirewallRuleListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.models.FirewallRuleListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.FirewallRuleListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRuleListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_location_based_performance_tier_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_location_based_performance_tier_operations.py similarity index 94% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_location_based_performance_tier_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_location_based_performance_tier_operations.py index 206d72fdb78d..32256aeeb9c9 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_location_based_performance_tier_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_location_based_performance_tier_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -30,14 +30,14 @@ class LocationBasedPerformanceTierOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -50,17 +50,17 @@ def list( location_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.PerformanceTierListResult"] + # type: (...) -> Iterable["_models.PerformanceTierListResult"] """List all the performance tiers at specified location in a given subscription. :param location_name: The name of the location. :type location_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerformanceTierListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.PerformanceTierListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.models.PerformanceTierListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.PerformanceTierListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerformanceTierListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_location_based_recommended_action_sessions_operation_status_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_location_based_recommended_action_sessions_operation_status_operations.py similarity index 92% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_location_based_recommended_action_sessions_operation_status_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_location_based_recommended_action_sessions_operation_status_operations.py index cd7aca17ff09..629224c2ccf1 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_location_based_recommended_action_sessions_operation_status_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_location_based_recommended_action_sessions_operation_status_operations.py @@ -13,7 +13,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -29,14 +29,14 @@ class LocationBasedRecommendedActionSessionsOperationStatusOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -50,7 +50,7 @@ def get( operation_id, # type: str **kwargs # type: Any ): - # type: (...) -> "models.RecommendedActionSessionsOperationStatus" + # type: (...) -> "_models.RecommendedActionSessionsOperationStatus" """Recommendation action session operation status. :param location_name: The name of the location. @@ -59,10 +59,10 @@ def get( :type operation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendedActionSessionsOperationStatus, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.RecommendedActionSessionsOperationStatus + :rtype: ~azure.mgmt.rdbms.mysql.models.RecommendedActionSessionsOperationStatus :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.RecommendedActionSessionsOperationStatus"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendedActionSessionsOperationStatus"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_location_based_recommended_action_sessions_result_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_location_based_recommended_action_sessions_result_operations.py similarity index 92% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_location_based_recommended_action_sessions_result_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_location_based_recommended_action_sessions_result_operations.py index 1a2bf9d37daf..23c47da0824d 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_location_based_recommended_action_sessions_result_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_location_based_recommended_action_sessions_result_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -30,14 +30,14 @@ class LocationBasedRecommendedActionSessionsResultOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -51,7 +51,7 @@ def list( operation_id, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.RecommendationActionsResultList"] + # type: (...) -> Iterable["_models.RecommendationActionsResultList"] """Recommendation action session operation result. :param location_name: The name of the location. @@ -60,10 +60,10 @@ def list( :type operation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationActionsResultList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.RecommendationActionsResultListor ~azure.mgmt.rdbms.mysql.v2020_01_01.models.RecommendationActionsResultList] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.models.RecommendationActionsResultListor ~azure.mgmt.rdbms.mysql.models.RecommendationActionsResultList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.RecommendationActionsResultList"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationActionsResultList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_log_files_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_log_files_operations.py similarity index 94% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_log_files_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_log_files_operations.py index 491706b56f52..4b6662740902 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_log_files_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_log_files_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -30,14 +30,14 @@ class LogFilesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -51,7 +51,7 @@ def list_by_server( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.LogFileListResult"] + # type: (...) -> Iterable["_models.LogFileListResult"] """List all the log files in a given server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -60,10 +60,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either LogFileListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.LogFileListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.models.LogFileListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.LogFileListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.LogFileListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_my_sql_management_client_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_my_sql_management_client_operations.py similarity index 70% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_my_sql_management_client_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_my_sql_management_client_operations.py index 9e923d596c19..f80c6f5cdecf 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_my_sql_management_client_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_my_sql_management_client_operations.py @@ -15,7 +15,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -26,6 +26,65 @@ class MySQLManagementClientOperationsMixin(object): + def reset_query_performance_insight_data( + self, + resource_group_name, # type: str + server_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.QueryPerformanceInsightResetDataResult" + """Reset data for Query Performance Insight. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: QueryPerformanceInsightResetDataResult, or the result of cls(response) + :rtype: ~azure.mgmt.rdbms.mysql.models.QueryPerformanceInsightResetDataResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.QueryPerformanceInsightResetDataResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2018-06-01" + accept = "application/json" + + # Construct URL + url = self.reset_query_performance_insight_data.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('QueryPerformanceInsightResetDataResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + reset_query_performance_insight_data.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/resetQueryPerformanceInsightData'} # type: ignore + def _create_recommended_action_session_initial( self, resource_group_name, # type: str diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_operations.py similarity index 91% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_operations.py index a00de0fa34fd..66917bb9596c 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_operations.py @@ -13,7 +13,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -29,14 +29,14 @@ class Operations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -48,15 +48,15 @@ def list( self, **kwargs # type: Any ): - # type: (...) -> "models.OperationListResult" + # type: (...) -> "_models.OperationListResult" """Lists all of the available REST API operations. :keyword callable cls: A custom type or function that will be passed the direct response :return: OperationListResult, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.OperationListResult + :rtype: ~azure.mgmt.rdbms.mysql.models.OperationListResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.OperationListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_private_endpoint_connections_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_private_endpoint_connections_operations.py similarity index 94% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_private_endpoint_connections_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_private_endpoint_connections_operations.py index 2b626a0554a1..0c3289908ae7 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_private_endpoint_connections_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_private_endpoint_connections_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -32,14 +32,14 @@ class PrivateEndpointConnectionsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -54,7 +54,7 @@ def get( private_endpoint_connection_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.PrivateEndpointConnection" + # type: (...) -> "_models.PrivateEndpointConnection" """Gets a private endpoint connection. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -65,10 +65,10 @@ def get( :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PrivateEndpointConnection, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.PrivateEndpointConnection + :rtype: ~azure.mgmt.rdbms.mysql.models.PrivateEndpointConnection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -115,11 +115,11 @@ def _create_or_update_initial( resource_group_name, # type: str server_name, # type: str private_endpoint_connection_name, # type: str - parameters, # type: "models.PrivateEndpointConnection" + parameters, # type: "_models.PrivateEndpointConnection" **kwargs # type: Any ): - # type: (...) -> Optional["models.PrivateEndpointConnection"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.PrivateEndpointConnection"]] + # type: (...) -> Optional["_models.PrivateEndpointConnection"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PrivateEndpointConnection"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -173,10 +173,10 @@ def begin_create_or_update( resource_group_name, # type: str server_name, # type: str private_endpoint_connection_name, # type: str - parameters, # type: "models.PrivateEndpointConnection" + parameters, # type: "_models.PrivateEndpointConnection" **kwargs # type: Any ): - # type: (...) -> LROPoller["models.PrivateEndpointConnection"] + # type: (...) -> LROPoller["_models.PrivateEndpointConnection"] """Approve or reject a private endpoint connection with a given name. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -186,7 +186,7 @@ def begin_create_or_update( :param private_endpoint_connection_name: :type private_endpoint_connection_name: str :param parameters: - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.PrivateEndpointConnection + :type parameters: ~azure.mgmt.rdbms.mysql.models.PrivateEndpointConnection :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: True for ARMPolling, False for no polling, or a @@ -194,11 +194,11 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql.v2020_01_01.models.PrivateEndpointConnection] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql.models.PrivateEndpointConnection] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -367,11 +367,11 @@ def _update_tags_initial( resource_group_name, # type: str server_name, # type: str private_endpoint_connection_name, # type: str - parameters, # type: "models.TagsObject" + parameters, # type: "_models.TagsObject" **kwargs # type: Any ): - # type: (...) -> "models.PrivateEndpointConnection" - cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"] + # type: (...) -> "_models.PrivateEndpointConnection" + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -423,10 +423,10 @@ def begin_update_tags( resource_group_name, # type: str server_name, # type: str private_endpoint_connection_name, # type: str - parameters, # type: "models.TagsObject" + parameters, # type: "_models.TagsObject" **kwargs # type: Any ): - # type: (...) -> LROPoller["models.PrivateEndpointConnection"] + # type: (...) -> LROPoller["_models.PrivateEndpointConnection"] """Updates tags on private endpoint connection. Updates private endpoint connection with the specified tags. @@ -439,7 +439,7 @@ def begin_update_tags( :type private_endpoint_connection_name: str :param parameters: Parameters supplied to the Update private endpoint connection Tags operation. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.TagsObject + :type parameters: ~azure.mgmt.rdbms.mysql.models.TagsObject :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: True for ARMPolling, False for no polling, or a @@ -447,11 +447,11 @@ def begin_update_tags( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql.v2020_01_01.models.PrivateEndpointConnection] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql.models.PrivateEndpointConnection] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -504,7 +504,7 @@ def list_by_server( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.PrivateEndpointConnectionListResult"] + # type: (...) -> Iterable["_models.PrivateEndpointConnectionListResult"] """Gets all private endpoint connections on a server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -513,10 +513,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.PrivateEndpointConnectionListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.models.PrivateEndpointConnectionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnectionListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_private_link_resources_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_private_link_resources_operations.py similarity index 93% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_private_link_resources_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_private_link_resources_operations.py index fa73a5ebca1b..7b34f1735b8d 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_private_link_resources_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_private_link_resources_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -30,14 +30,14 @@ class PrivateLinkResourcesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -51,7 +51,7 @@ def list_by_server( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.PrivateLinkResourceListResult"] + # type: (...) -> Iterable["_models.PrivateLinkResourceListResult"] """Gets the private link resources for MySQL server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -60,10 +60,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PrivateLinkResourceListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.PrivateLinkResourceListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.models.PrivateLinkResourceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateLinkResourceListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -127,7 +127,7 @@ def get( group_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.PrivateLinkResource" + # type: (...) -> "_models.PrivateLinkResource" """Gets a private link resource for MySQL server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -138,10 +138,10 @@ def get( :type group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PrivateLinkResource, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.PrivateLinkResource + :rtype: ~azure.mgmt.rdbms.mysql.models.PrivateLinkResource :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateLinkResource"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResource"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_query_texts_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_query_texts_operations.py similarity index 94% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_query_texts_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_query_texts_operations.py index 85bc9491ccc7..0280d3bf1483 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_query_texts_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_query_texts_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -30,14 +30,14 @@ class QueryTextsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,7 +52,7 @@ def get( query_id, # type: str **kwargs # type: Any ): - # type: (...) -> "models.QueryText" + # type: (...) -> "_models.QueryText" """Retrieve the Query-Store query texts for the queryId. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -63,10 +63,10 @@ def get( :type query_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: QueryText, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.QueryText + :rtype: ~azure.mgmt.rdbms.mysql.models.QueryText :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.QueryText"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.QueryText"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -115,7 +115,7 @@ def list_by_server( query_ids, # type: List[str] **kwargs # type: Any ): - # type: (...) -> Iterable["models.QueryTextsResultList"] + # type: (...) -> Iterable["_models.QueryTextsResultList"] """Retrieve the Query-Store query texts for specified queryIds. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -126,10 +126,10 @@ def list_by_server( :type query_ids: list[str] :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either QueryTextsResultList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.QueryTextsResultList] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.models.QueryTextsResultList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.QueryTextsResultList"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.QueryTextsResultList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_recommended_actions_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_recommended_actions_operations.py similarity index 94% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_recommended_actions_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_recommended_actions_operations.py index a7ef893d98c7..4a215b559067 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_recommended_actions_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_recommended_actions_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -30,14 +30,14 @@ class RecommendedActionsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -53,7 +53,7 @@ def get( recommended_action_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.RecommendationAction" + # type: (...) -> "_models.RecommendationAction" """Retrieve recommended actions from the advisor. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -66,10 +66,10 @@ def get( :type recommended_action_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationAction, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.RecommendationAction + :rtype: ~azure.mgmt.rdbms.mysql.models.RecommendationAction :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.RecommendationAction"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationAction"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -120,7 +120,7 @@ def list_by_server( session_id=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> Iterable["models.RecommendationActionsResultList"] + # type: (...) -> Iterable["_models.RecommendationActionsResultList"] """Retrieve recommended actions from the advisor. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -133,10 +133,10 @@ def list_by_server( :type session_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationActionsResultList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.RecommendationActionsResultList] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.models.RecommendationActionsResultList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.RecommendationActionsResultList"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationActionsResultList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_recoverable_servers_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_recoverable_servers_operations.py new file mode 100644 index 000000000000..59caab0599c6 --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_recoverable_servers_operations.py @@ -0,0 +1,104 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class RecoverableServersOperations(object): + """RecoverableServersOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.rdbms.mysql.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + server_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.RecoverableServerResource" + """Gets a recoverable MySQL Server. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RecoverableServerResource, or the result of cls(response) + :rtype: ~azure.mgmt.rdbms.mysql.models.RecoverableServerResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecoverableServerResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-12-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RecoverableServerResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/recoverableServers'} # type: ignore diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_replicas_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_replicas_operations.py similarity index 94% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_replicas_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_replicas_operations.py index f1386198f344..46df48c8f7b6 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_replicas_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_replicas_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -30,14 +30,14 @@ class ReplicasOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -51,7 +51,7 @@ def list_by_server( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.ServerListResult"] + # type: (...) -> Iterable["_models.ServerListResult"] """List all the replicas for a given server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -60,10 +60,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.models.ServerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_server_administrators_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_server_administrators_operations.py similarity index 94% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_server_administrators_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_server_administrators_operations.py index 28f1d2761254..9b7ed62e3c71 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_server_administrators_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_server_administrators_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -32,14 +32,14 @@ class ServerAdministratorsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -53,7 +53,7 @@ def get( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.ServerAdministratorResource" + # type: (...) -> "_models.ServerAdministratorResource" """Gets information about a AAD server administrator. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -62,10 +62,10 @@ def get( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ServerAdministratorResource, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerAdministratorResource + :rtype: ~azure.mgmt.rdbms.mysql.models.ServerAdministratorResource :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerAdministratorResource"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerAdministratorResource"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -110,11 +110,11 @@ def _create_or_update_initial( self, resource_group_name, # type: str server_name, # type: str - properties, # type: "models.ServerAdministratorResource" + properties, # type: "_models.ServerAdministratorResource" **kwargs # type: Any ): - # type: (...) -> "models.ServerAdministratorResource" - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerAdministratorResource"] + # type: (...) -> "_models.ServerAdministratorResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerAdministratorResource"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -168,10 +168,10 @@ def begin_create_or_update( self, resource_group_name, # type: str server_name, # type: str - properties, # type: "models.ServerAdministratorResource" + properties, # type: "_models.ServerAdministratorResource" **kwargs # type: Any ): - # type: (...) -> LROPoller["models.ServerAdministratorResource"] + # type: (...) -> LROPoller["_models.ServerAdministratorResource"] """Creates or update active directory administrator on an existing server. The update action will overwrite the existing administrator. @@ -181,7 +181,7 @@ def begin_create_or_update( :type server_name: str :param properties: The required parameters for creating or updating an AAD server administrator. - :type properties: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerAdministratorResource + :type properties: ~azure.mgmt.rdbms.mysql.models.ServerAdministratorResource :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: True for ARMPolling, False for no polling, or a @@ -189,11 +189,11 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ServerAdministratorResource or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerAdministratorResource] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql.models.ServerAdministratorResource] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerAdministratorResource"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerAdministratorResource"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -354,7 +354,7 @@ def list( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.ServerAdministratorResourceListResult"] + # type: (...) -> Iterable["_models.ServerAdministratorResourceListResult"] """Returns a list of server Administrators. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -363,10 +363,10 @@ def list( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerAdministratorResourceListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerAdministratorResourceListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.models.ServerAdministratorResourceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerAdministratorResourceListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerAdministratorResourceListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_server_based_performance_tier_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_server_based_performance_tier_operations.py new file mode 100644 index 000000000000..8d2efed6a391 --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_server_based_performance_tier_operations.py @@ -0,0 +1,121 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ServerBasedPerformanceTierOperations(object): + """ServerBasedPerformanceTierOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.rdbms.mysql.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + server_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PerformanceTierListResult"] + """List all the performance tiers for a MySQL server. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PerformanceTierListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.models.PerformanceTierListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerformanceTierListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + 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] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('PerformanceTierListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/performanceTiers'} # type: ignore diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_server_keys_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_server_keys_operations.py similarity index 95% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_server_keys_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_server_keys_operations.py index ee68e9152402..922ec90a3629 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_server_keys_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_server_keys_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -32,14 +32,14 @@ class ServerKeysOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -53,7 +53,7 @@ def list( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.ServerKeyListResult"] + # type: (...) -> Iterable["_models.ServerKeyListResult"] """Gets a list of Server keys. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -62,10 +62,10 @@ def list( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerKeyListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerKeyListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.models.ServerKeyListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerKeyListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerKeyListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -129,7 +129,7 @@ def get( key_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.ServerKey" + # type: (...) -> "_models.ServerKey" """Gets a MySQL Server key. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -140,10 +140,10 @@ def get( :type key_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ServerKey, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerKey + :rtype: ~azure.mgmt.rdbms.mysql.models.ServerKey :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerKey"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerKey"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -190,11 +190,11 @@ def _create_or_update_initial( server_name, # type: str key_name, # type: str resource_group_name, # type: str - parameters, # type: "models.ServerKey" + parameters, # type: "_models.ServerKey" **kwargs # type: Any ): - # type: (...) -> "models.ServerKey" - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerKey"] + # type: (...) -> "_models.ServerKey" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerKey"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -250,10 +250,10 @@ def begin_create_or_update( server_name, # type: str key_name, # type: str resource_group_name, # type: str - parameters, # type: "models.ServerKey" + parameters, # type: "_models.ServerKey" **kwargs # type: Any ): - # type: (...) -> LROPoller["models.ServerKey"] + # type: (...) -> LROPoller["_models.ServerKey"] """Creates or updates a MySQL Server key. :param server_name: The name of the server. @@ -263,7 +263,7 @@ def begin_create_or_update( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param parameters: The requested MySQL Server key resource state. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerKey + :type parameters: ~azure.mgmt.rdbms.mysql.models.ServerKey :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: True for ARMPolling, False for no polling, or a @@ -271,11 +271,11 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ServerKey or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerKey] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql.models.ServerKey] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerKey"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerKey"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_server_parameters_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_server_parameters_operations.py new file mode 100644 index 000000000000..b66cb6c9a860 --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_server_parameters_operations.py @@ -0,0 +1,175 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ServerParametersOperations(object): + """ServerParametersOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.rdbms.mysql.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _list_update_configurations_initial( + self, + resource_group_name, # type: str + server_name, # type: str + value, # type: "_models.ConfigurationListResult" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ConfigurationListResult"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ConfigurationListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._list_update_configurations_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(value, 'ConfigurationListResult') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConfigurationListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _list_update_configurations_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/updateConfigurations'} # type: ignore + + def begin_list_update_configurations( + self, + resource_group_name, # type: str + server_name, # type: str + value, # type: "_models.ConfigurationListResult" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ConfigurationListResult"] + """Update a list of configurations in a given server. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param value: The parameters for updating a list of server configuration. + :type value: ~azure.mgmt.rdbms.mysql.models.ConfigurationListResult + :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: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ConfigurationListResult or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql.models.ConfigurationListResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfigurationListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._list_update_configurations_initial( + resource_group_name=resource_group_name, + server_name=server_name, + value=value, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ConfigurationListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_list_update_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/updateConfigurations'} # type: ignore diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_server_security_alert_policies_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_server_security_alert_policies_operations.py similarity index 90% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_server_security_alert_policies_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_server_security_alert_policies_operations.py index f1192779ad58..04510bf50db6 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_server_security_alert_policies_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_server_security_alert_policies_operations.py @@ -15,7 +15,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -31,14 +31,14 @@ class ServerSecurityAlertPoliciesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -50,10 +50,10 @@ def get( self, resource_group_name, # type: str server_name, # type: str - security_alert_policy_name, # type: Union[str, "models.SecurityAlertPolicyName"] + security_alert_policy_name, # type: Union[str, "_models.SecurityAlertPolicyName"] **kwargs # type: Any ): - # type: (...) -> "models.ServerSecurityAlertPolicy" + # type: (...) -> "_models.ServerSecurityAlertPolicy" """Get a server's security alert policy. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -61,13 +61,13 @@ def get( :param server_name: The name of the server. :type server_name: str :param security_alert_policy_name: The name of the security alert policy. - :type security_alert_policy_name: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.SecurityAlertPolicyName + :type security_alert_policy_name: str or ~azure.mgmt.rdbms.mysql.models.SecurityAlertPolicyName :keyword callable cls: A custom type or function that will be passed the direct response :return: ServerSecurityAlertPolicy, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerSecurityAlertPolicy + :rtype: ~azure.mgmt.rdbms.mysql.models.ServerSecurityAlertPolicy :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerSecurityAlertPolicy"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerSecurityAlertPolicy"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -113,12 +113,12 @@ def _create_or_update_initial( self, resource_group_name, # type: str server_name, # type: str - security_alert_policy_name, # type: Union[str, "models.SecurityAlertPolicyName"] - parameters, # type: "models.ServerSecurityAlertPolicy" + security_alert_policy_name, # type: Union[str, "_models.SecurityAlertPolicyName"] + parameters, # type: "_models.ServerSecurityAlertPolicy" **kwargs # type: Any ): - # type: (...) -> Optional["models.ServerSecurityAlertPolicy"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.ServerSecurityAlertPolicy"]] + # type: (...) -> Optional["_models.ServerSecurityAlertPolicy"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ServerSecurityAlertPolicy"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -171,11 +171,11 @@ def begin_create_or_update( self, resource_group_name, # type: str server_name, # type: str - security_alert_policy_name, # type: Union[str, "models.SecurityAlertPolicyName"] - parameters, # type: "models.ServerSecurityAlertPolicy" + security_alert_policy_name, # type: Union[str, "_models.SecurityAlertPolicyName"] + parameters, # type: "_models.ServerSecurityAlertPolicy" **kwargs # type: Any ): - # type: (...) -> LROPoller["models.ServerSecurityAlertPolicy"] + # type: (...) -> LROPoller["_models.ServerSecurityAlertPolicy"] """Creates or updates a threat detection policy. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -183,9 +183,9 @@ def begin_create_or_update( :param server_name: The name of the server. :type server_name: str :param security_alert_policy_name: The name of the threat detection policy. - :type security_alert_policy_name: str or ~azure.mgmt.rdbms.mysql.v2020_01_01.models.SecurityAlertPolicyName + :type security_alert_policy_name: str or ~azure.mgmt.rdbms.mysql.models.SecurityAlertPolicyName :param parameters: The server security alert policy. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerSecurityAlertPolicy + :type parameters: ~azure.mgmt.rdbms.mysql.models.ServerSecurityAlertPolicy :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: True for ARMPolling, False for no polling, or a @@ -193,11 +193,11 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ServerSecurityAlertPolicy or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerSecurityAlertPolicy] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql.models.ServerSecurityAlertPolicy] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerSecurityAlertPolicy"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerSecurityAlertPolicy"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_servers_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_servers_operations.py similarity index 96% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_servers_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_servers_operations.py index 8403810cb6ce..a38cf4834792 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_servers_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_servers_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -32,14 +32,14 @@ class ServersOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -51,11 +51,11 @@ def _create_initial( self, resource_group_name, # type: str server_name, # type: str - parameters, # type: "models.ServerForCreate" + parameters, # type: "_models.ServerForCreate" **kwargs # type: Any ): - # type: (...) -> Optional["models.Server"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Server"]] + # type: (...) -> Optional["_models.Server"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Server"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -110,10 +110,10 @@ def begin_create( self, resource_group_name, # type: str server_name, # type: str - parameters, # type: "models.ServerForCreate" + parameters, # type: "_models.ServerForCreate" **kwargs # type: Any ): - # type: (...) -> LROPoller["models.Server"] + # type: (...) -> LROPoller["_models.Server"] """Creates a new server or updates an existing server. The update action will overwrite the existing server. @@ -122,7 +122,7 @@ def begin_create( :param server_name: The name of the server. :type server_name: str :param parameters: The required parameters for creating or updating a server. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerForCreate + :type parameters: ~azure.mgmt.rdbms.mysql.models.ServerForCreate :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: True for ARMPolling, False for no polling, or a @@ -130,11 +130,11 @@ def begin_create( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Server or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql.v2020_01_01.models.Server] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql.models.Server] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.Server"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Server"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -183,11 +183,11 @@ def _update_initial( self, resource_group_name, # type: str server_name, # type: str - parameters, # type: "models.ServerUpdateParameters" + parameters, # type: "_models.ServerUpdateParameters" **kwargs # type: Any ): - # type: (...) -> Optional["models.Server"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Server"]] + # type: (...) -> Optional["_models.Server"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Server"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -239,10 +239,10 @@ def begin_update( self, resource_group_name, # type: str server_name, # type: str - parameters, # type: "models.ServerUpdateParameters" + parameters, # type: "_models.ServerUpdateParameters" **kwargs # type: Any ): - # type: (...) -> LROPoller["models.Server"] + # type: (...) -> LROPoller["_models.Server"] """Updates an existing server. The request body can contain one to many of the properties present in the normal server definition. @@ -251,7 +251,7 @@ def begin_update( :param server_name: The name of the server. :type server_name: str :param parameters: The required parameters for updating a server. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerUpdateParameters + :type parameters: ~azure.mgmt.rdbms.mysql.models.ServerUpdateParameters :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: True for ARMPolling, False for no polling, or a @@ -259,11 +259,11 @@ def begin_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Server or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql.v2020_01_01.models.Server] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql.models.Server] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.Server"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Server"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -422,7 +422,7 @@ def get( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.Server" + # type: (...) -> "_models.Server" """Gets information about a server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -431,10 +431,10 @@ def get( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Server, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.Server + :rtype: ~azure.mgmt.rdbms.mysql.models.Server :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Server"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Server"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -480,17 +480,17 @@ def list_by_resource_group( resource_group_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.ServerListResult"] + # type: (...) -> Iterable["_models.ServerListResult"] """List all the servers in a given resource group. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.models.ServerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -550,15 +550,15 @@ def list( self, **kwargs # type: Any ): - # type: (...) -> Iterable["models.ServerListResult"] + # type: (...) -> Iterable["_models.ServerListResult"] """List all the servers in a given subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.models.ServerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -761,7 +761,7 @@ def _start_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.CloudErrorAutoGenerated, response) + error = self._deserialize(_models.CloudErrorAutoGenerated, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -872,7 +872,7 @@ def _stop_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.CloudErrorAutoGenerated, response) + error = self._deserialize(_models.CloudErrorAutoGenerated, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -949,7 +949,7 @@ def _upgrade_initial( self, resource_group_name, # type: str server_name, # type: str - parameters, # type: "models.ServerUpgradeParameters" + parameters, # type: "_models.ServerUpgradeParameters" **kwargs # type: Any ): # type: (...) -> None @@ -989,7 +989,7 @@ def _upgrade_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.CloudErrorAutoGenerated, response) + error = self._deserialize(_models.CloudErrorAutoGenerated, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1001,7 +1001,7 @@ def begin_upgrade( self, resource_group_name, # type: str server_name, # type: str - parameters, # type: "models.ServerUpgradeParameters" + parameters, # type: "_models.ServerUpgradeParameters" **kwargs # type: Any ): # type: (...) -> LROPoller[None] @@ -1012,7 +1012,7 @@ def begin_upgrade( :param server_name: The name of the server. :type server_name: str :param parameters: The required parameters for updating a server. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.ServerUpgradeParameters + :type parameters: ~azure.mgmt.rdbms.mysql.models.ServerUpgradeParameters :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: True for ARMPolling, False for no polling, or a diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_top_query_statistics_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_top_query_statistics_operations.py similarity index 93% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_top_query_statistics_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_top_query_statistics_operations.py index 16924c273322..a4fddac23737 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_top_query_statistics_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_top_query_statistics_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -30,14 +30,14 @@ class TopQueryStatisticsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,7 +52,7 @@ def get( query_statistic_id, # type: str **kwargs # type: Any ): - # type: (...) -> "models.QueryStatistic" + # type: (...) -> "_models.QueryStatistic" """Retrieve the query statistic for specified identifier. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -63,10 +63,10 @@ def get( :type query_statistic_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: QueryStatistic, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.QueryStatistic + :rtype: ~azure.mgmt.rdbms.mysql.models.QueryStatistic :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.QueryStatistic"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.QueryStatistic"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -112,10 +112,10 @@ def list_by_server( self, resource_group_name, # type: str server_name, # type: str - parameters, # type: "models.TopQueryStatisticsInput" + parameters, # type: "_models.TopQueryStatisticsInput" **kwargs # type: Any ): - # type: (...) -> Iterable["models.TopQueryStatisticsResultList"] + # type: (...) -> Iterable["_models.TopQueryStatisticsResultList"] """Retrieve the Query-Store top queries for specified metric and aggregation. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -123,13 +123,13 @@ def list_by_server( :param server_name: The name of the server. :type server_name: str :param parameters: The required parameters for retrieving top query statistics. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.TopQueryStatisticsInput + :type parameters: ~azure.mgmt.rdbms.mysql.models.TopQueryStatisticsInput :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either TopQueryStatisticsResultList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.TopQueryStatisticsResultList] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.models.TopQueryStatisticsResultList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.TopQueryStatisticsResultList"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.TopQueryStatisticsResultList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_virtual_network_rules_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_virtual_network_rules_operations.py similarity index 95% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_virtual_network_rules_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_virtual_network_rules_operations.py index 8dce8456a97c..f4ce38075f19 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_virtual_network_rules_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_virtual_network_rules_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -32,14 +32,14 @@ class VirtualNetworkRulesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -54,7 +54,7 @@ def get( virtual_network_rule_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.VirtualNetworkRule" + # type: (...) -> "_models.VirtualNetworkRule" """Gets a virtual network rule. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -65,10 +65,10 @@ def get( :type virtual_network_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualNetworkRule, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.VirtualNetworkRule + :rtype: ~azure.mgmt.rdbms.mysql.models.VirtualNetworkRule :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.VirtualNetworkRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkRule"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -115,11 +115,11 @@ def _create_or_update_initial( resource_group_name, # type: str server_name, # type: str virtual_network_rule_name, # type: str - parameters, # type: "models.VirtualNetworkRule" + parameters, # type: "_models.VirtualNetworkRule" **kwargs # type: Any ): - # type: (...) -> Optional["models.VirtualNetworkRule"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.VirtualNetworkRule"]] + # type: (...) -> Optional["_models.VirtualNetworkRule"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VirtualNetworkRule"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -176,10 +176,10 @@ def begin_create_or_update( resource_group_name, # type: str server_name, # type: str virtual_network_rule_name, # type: str - parameters, # type: "models.VirtualNetworkRule" + parameters, # type: "_models.VirtualNetworkRule" **kwargs # type: Any ): - # type: (...) -> LROPoller["models.VirtualNetworkRule"] + # type: (...) -> LROPoller["_models.VirtualNetworkRule"] """Creates or updates an existing virtual network rule. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -189,7 +189,7 @@ def begin_create_or_update( :param virtual_network_rule_name: The name of the virtual network rule. :type virtual_network_rule_name: str :param parameters: The requested virtual Network Rule Resource state. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.VirtualNetworkRule + :type parameters: ~azure.mgmt.rdbms.mysql.models.VirtualNetworkRule :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: True for ARMPolling, False for no polling, or a @@ -197,11 +197,11 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either VirtualNetworkRule or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql.v2020_01_01.models.VirtualNetworkRule] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql.models.VirtualNetworkRule] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.VirtualNetworkRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkRule"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -369,7 +369,7 @@ def list_by_server( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.VirtualNetworkRuleListResult"] + # type: (...) -> Iterable["_models.VirtualNetworkRuleListResult"] """Gets a list of virtual network rules in a server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -378,10 +378,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualNetworkRuleListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.VirtualNetworkRuleListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.models.VirtualNetworkRuleListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.VirtualNetworkRuleListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkRuleListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_wait_statistics_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_wait_statistics_operations.py similarity index 93% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_wait_statistics_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_wait_statistics_operations.py index 99a10302b989..7b122bf329fe 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/operations/_wait_statistics_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/_wait_statistics_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -30,14 +30,14 @@ class WaitStatisticsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.mysql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,7 +52,7 @@ def get( wait_statistics_id, # type: str **kwargs # type: Any ): - # type: (...) -> "models.WaitStatistic" + # type: (...) -> "_models.WaitStatistic" """Retrieve wait statistics for specified identifier. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -63,10 +63,10 @@ def get( :type wait_statistics_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: WaitStatistic, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.WaitStatistic + :rtype: ~azure.mgmt.rdbms.mysql.models.WaitStatistic :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WaitStatistic"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.WaitStatistic"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -112,10 +112,10 @@ def list_by_server( self, resource_group_name, # type: str server_name, # type: str - parameters, # type: "models.WaitStatisticsInput" + parameters, # type: "_models.WaitStatisticsInput" **kwargs # type: Any ): - # type: (...) -> Iterable["models.WaitStatisticsResultList"] + # type: (...) -> Iterable["_models.WaitStatisticsResultList"] """Retrieve wait statistics for specified aggregation window. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -123,13 +123,13 @@ def list_by_server( :param server_name: The name of the server. :type server_name: str :param parameters: The required parameters for retrieving wait statistics. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_01_01.models.WaitStatisticsInput + :type parameters: ~azure.mgmt.rdbms.mysql.models.WaitStatisticsInput :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WaitStatisticsResultList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.v2020_01_01.models.WaitStatisticsResultList] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.models.WaitStatisticsResultList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WaitStatisticsResultList"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.WaitStatisticsResultList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/_metadata.json b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/_metadata.json deleted file mode 100644 index 35debcccff62..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/_metadata.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "chosen_version": "2020-01-01", - "total_api_version_list": ["2017-12-01", "2018-06-01", "2020-01-01"], - "client": { - "name": "MySQLManagementClient", - "filename": "_my_sql_management_client", - "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business model.", - "base_url": "\u0027https://management.azure.com\u0027", - "custom_base_url": null, - "azure_arm": true, - "has_lro_operations": true, - "client_side_validation": false - }, - "global_parameters": { - "sync": { - "credential": { - "signature": "credential, # type: \"TokenCredential\"", - "description": "Credential needed for the client to connect to Azure.", - "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true - }, - "subscription_id": { - "signature": "subscription_id, # type: str", - "description": "The ID of the target subscription.", - "docstring_type": "str", - "required": true - } - }, - "async": { - "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", - "description": "Credential needed for the client to connect to Azure.", - "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", - "required": true - }, - "subscription_id": { - "signature": "subscription_id, # type: str", - "description": "The ID of the target subscription.", - "docstring_type": "str", - "required": true - } - }, - "constant": { - }, - "call": "credential, subscription_id" - }, - "config": { - "credential": true, - "credential_scopes": ["https://management.azure.com/.default"], - "credential_default_policy_type": "BearerTokenCredentialPolicy", - "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null - }, - "operation_groups": { - "servers": "ServersOperations", - "replicas": "ReplicasOperations", - "firewall_rules": "FirewallRulesOperations", - "virtual_network_rules": "VirtualNetworkRulesOperations", - "databases": "DatabasesOperations", - "configurations": "ConfigurationsOperations", - "log_files": "LogFilesOperations", - "server_administrators": "ServerAdministratorsOperations", - "location_based_performance_tier": "LocationBasedPerformanceTierOperations", - "check_name_availability": "CheckNameAvailabilityOperations", - "operations": "Operations", - "server_security_alert_policies": "ServerSecurityAlertPoliciesOperations", - "query_texts": "QueryTextsOperations", - "top_query_statistics": "TopQueryStatisticsOperations", - "wait_statistics": "WaitStatisticsOperations", - "advisors": "AdvisorsOperations", - "recommended_actions": "RecommendedActionsOperations", - "location_based_recommended_action_sessions_operation_status": "LocationBasedRecommendedActionSessionsOperationStatusOperations", - "location_based_recommended_action_sessions_result": "LocationBasedRecommendedActionSessionsResultOperations", - "private_endpoint_connections": "PrivateEndpointConnectionsOperations", - "private_link_resources": "PrivateLinkResourcesOperations", - "server_keys": "ServerKeysOperations" - }, - "operation_mixins": { - "_create_recommended_action_session_initial" : { - "sync": { - "signature": "def _create_recommended_action_session_initial(\n self,\n resource_group_name, # type: str\n server_name, # type: str\n advisor_name, # type: str\n database_name, # type: str\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"\n\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param server_name: The name of the server.\n:type server_name: str\n:param advisor_name: The advisor name for recommendation action.\n:type advisor_name: str\n:param database_name: The name of the database.\n:type database_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def _create_recommended_action_session_initial(\n self,\n resource_group_name: str,\n server_name: str,\n advisor_name: str,\n database_name: str,\n **kwargs\n) -\u003e None:\n", - "doc": "\"\"\"\n\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param server_name: The name of the server.\n:type server_name: str\n:param advisor_name: The advisor name for recommendation action.\n:type advisor_name: str\n:param database_name: The name of the database.\n:type database_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "resource_group_name, server_name, advisor_name, database_name" - }, - "begin_create_recommended_action_session" : { - "sync": { - "signature": "def begin_create_recommended_action_session(\n self,\n resource_group_name, # type: str\n server_name, # type: str\n advisor_name, # type: str\n database_name, # type: str\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Create recommendation action session for the advisor.\n\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param server_name: The name of the server.\n:type server_name: str\n:param advisor_name: The advisor name for recommendation action.\n:type advisor_name: str\n:param database_name: The name of the database.\n:type database_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: True for ARMPolling, False for no polling, or a\n polling object for personal polling strategy\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def begin_create_recommended_action_session(\n self,\n resource_group_name: str,\n server_name: str,\n advisor_name: str,\n database_name: str,\n **kwargs\n) -\u003e AsyncLROPoller[None]:\n", - "doc": "\"\"\"Create recommendation action session for the advisor.\n\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param server_name: The name of the server.\n:type server_name: str\n:param advisor_name: The advisor name for recommendation action.\n:type advisor_name: str\n:param database_name: The name of the database.\n:type database_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: True for ARMPolling, False for no polling, or a\n polling object for personal polling strategy\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" - }, - "call": "resource_group_name, server_name, advisor_name, database_name" - } - }, - "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"], \"azure.core.polling\": [\"LROPoller\", \"NoPolling\", \"PollingMethod\"], \"azure.mgmt.core.polling.arm_polling\": [\"ARMPolling\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\", \"Union\"]}}}", - "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"], \"azure.core.polling\": [\"AsyncLROPoller\", \"AsyncNoPolling\", \"AsyncPollingMethod\"], \"azure.mgmt.core.polling.async_arm_polling\": [\"AsyncARMPolling\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\", \"Union\"]}}}" -} \ No newline at end of file diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/_my_sql_management_client.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/_my_sql_management_client.py deleted file mode 100644 index 8073c6951c6d..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/_my_sql_management_client.py +++ /dev/null @@ -1,176 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import TYPE_CHECKING - -from azure.mgmt.core import ARMPipelineClient -from msrest import Deserializer, Serializer - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Optional - - from azure.core.credentials import TokenCredential - -from ._configuration import MySQLManagementClientConfiguration -from .operations import ServersOperations -from .operations import ReplicasOperations -from .operations import FirewallRulesOperations -from .operations import VirtualNetworkRulesOperations -from .operations import DatabasesOperations -from .operations import ConfigurationsOperations -from .operations import LogFilesOperations -from .operations import ServerAdministratorsOperations -from .operations import LocationBasedPerformanceTierOperations -from .operations import CheckNameAvailabilityOperations -from .operations import Operations -from .operations import ServerSecurityAlertPoliciesOperations -from .operations import QueryTextsOperations -from .operations import TopQueryStatisticsOperations -from .operations import WaitStatisticsOperations -from .operations import AdvisorsOperations -from .operations import MySQLManagementClientOperationsMixin -from .operations import RecommendedActionsOperations -from .operations import LocationBasedRecommendedActionSessionsOperationStatusOperations -from .operations import LocationBasedRecommendedActionSessionsResultOperations -from .operations import PrivateEndpointConnectionsOperations -from .operations import PrivateLinkResourcesOperations -from .operations import ServerKeysOperations -from . import models - - -class MySQLManagementClient(MySQLManagementClientOperationsMixin): - """The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business model. - - :ivar servers: ServersOperations operations - :vartype servers: azure.mgmt.rdbms.mysql.v2020_01_01.operations.ServersOperations - :ivar replicas: ReplicasOperations operations - :vartype replicas: azure.mgmt.rdbms.mysql.v2020_01_01.operations.ReplicasOperations - :ivar firewall_rules: FirewallRulesOperations operations - :vartype firewall_rules: azure.mgmt.rdbms.mysql.v2020_01_01.operations.FirewallRulesOperations - :ivar virtual_network_rules: VirtualNetworkRulesOperations operations - :vartype virtual_network_rules: azure.mgmt.rdbms.mysql.v2020_01_01.operations.VirtualNetworkRulesOperations - :ivar databases: DatabasesOperations operations - :vartype databases: azure.mgmt.rdbms.mysql.v2020_01_01.operations.DatabasesOperations - :ivar configurations: ConfigurationsOperations operations - :vartype configurations: azure.mgmt.rdbms.mysql.v2020_01_01.operations.ConfigurationsOperations - :ivar log_files: LogFilesOperations operations - :vartype log_files: azure.mgmt.rdbms.mysql.v2020_01_01.operations.LogFilesOperations - :ivar server_administrators: ServerAdministratorsOperations operations - :vartype server_administrators: azure.mgmt.rdbms.mysql.v2020_01_01.operations.ServerAdministratorsOperations - :ivar location_based_performance_tier: LocationBasedPerformanceTierOperations operations - :vartype location_based_performance_tier: azure.mgmt.rdbms.mysql.v2020_01_01.operations.LocationBasedPerformanceTierOperations - :ivar check_name_availability: CheckNameAvailabilityOperations operations - :vartype check_name_availability: azure.mgmt.rdbms.mysql.v2020_01_01.operations.CheckNameAvailabilityOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.rdbms.mysql.v2020_01_01.operations.Operations - :ivar server_security_alert_policies: ServerSecurityAlertPoliciesOperations operations - :vartype server_security_alert_policies: azure.mgmt.rdbms.mysql.v2020_01_01.operations.ServerSecurityAlertPoliciesOperations - :ivar query_texts: QueryTextsOperations operations - :vartype query_texts: azure.mgmt.rdbms.mysql.v2020_01_01.operations.QueryTextsOperations - :ivar top_query_statistics: TopQueryStatisticsOperations operations - :vartype top_query_statistics: azure.mgmt.rdbms.mysql.v2020_01_01.operations.TopQueryStatisticsOperations - :ivar wait_statistics: WaitStatisticsOperations operations - :vartype wait_statistics: azure.mgmt.rdbms.mysql.v2020_01_01.operations.WaitStatisticsOperations - :ivar advisors: AdvisorsOperations operations - :vartype advisors: azure.mgmt.rdbms.mysql.v2020_01_01.operations.AdvisorsOperations - :ivar recommended_actions: RecommendedActionsOperations operations - :vartype recommended_actions: azure.mgmt.rdbms.mysql.v2020_01_01.operations.RecommendedActionsOperations - :ivar location_based_recommended_action_sessions_operation_status: LocationBasedRecommendedActionSessionsOperationStatusOperations operations - :vartype location_based_recommended_action_sessions_operation_status: azure.mgmt.rdbms.mysql.v2020_01_01.operations.LocationBasedRecommendedActionSessionsOperationStatusOperations - :ivar location_based_recommended_action_sessions_result: LocationBasedRecommendedActionSessionsResultOperations operations - :vartype location_based_recommended_action_sessions_result: azure.mgmt.rdbms.mysql.v2020_01_01.operations.LocationBasedRecommendedActionSessionsResultOperations - :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations - :vartype private_endpoint_connections: azure.mgmt.rdbms.mysql.v2020_01_01.operations.PrivateEndpointConnectionsOperations - :ivar private_link_resources: PrivateLinkResourcesOperations operations - :vartype private_link_resources: azure.mgmt.rdbms.mysql.v2020_01_01.operations.PrivateLinkResourcesOperations - :ivar server_keys: ServerKeysOperations operations - :vartype server_keys: azure.mgmt.rdbms.mysql.v2020_01_01.operations.ServerKeysOperations - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The ID of the target subscription. - :type subscription_id: str - :param str base_url: Service URL - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - """ - - def __init__( - self, - credential, # type: "TokenCredential" - subscription_id, # type: str - base_url=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> None - if not base_url: - base_url = 'https://management.azure.com' - self._config = MySQLManagementClientConfiguration(credential, subscription_id, **kwargs) - self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False - self._deserialize = Deserializer(client_models) - - self.servers = ServersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.replicas = ReplicasOperations( - self._client, self._config, self._serialize, self._deserialize) - self.firewall_rules = FirewallRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.virtual_network_rules = VirtualNetworkRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.databases = DatabasesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.configurations = ConfigurationsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.log_files = LogFilesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.server_administrators = ServerAdministratorsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.location_based_performance_tier = LocationBasedPerformanceTierOperations( - self._client, self._config, self._serialize, self._deserialize) - self.check_name_availability = CheckNameAvailabilityOperations( - self._client, self._config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self._config, self._serialize, self._deserialize) - self.server_security_alert_policies = ServerSecurityAlertPoliciesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.query_texts = QueryTextsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.top_query_statistics = TopQueryStatisticsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.wait_statistics = WaitStatisticsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.advisors = AdvisorsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.recommended_actions = RecommendedActionsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.location_based_recommended_action_sessions_operation_status = LocationBasedRecommendedActionSessionsOperationStatusOperations( - self._client, self._config, self._serialize, self._deserialize) - self.location_based_recommended_action_sessions_result = LocationBasedRecommendedActionSessionsResultOperations( - self._client, self._config, self._serialize, self._deserialize) - self.private_endpoint_connections = PrivateEndpointConnectionsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.private_link_resources = PrivateLinkResourcesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.server_keys = ServerKeysOperations( - self._client, self._config, self._serialize, self._deserialize) - - def close(self): - # type: () -> None - self._client.close() - - def __enter__(self): - # type: () -> MySQLManagementClient - self._client.__enter__() - return self - - def __exit__(self, *exc_details): - # type: (Any) -> None - self._client.__exit__(*exc_details) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/_my_sql_management_client.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/_my_sql_management_client.py deleted file mode 100644 index 2033e35cfe01..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/_my_sql_management_client.py +++ /dev/null @@ -1,170 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any, Optional, TYPE_CHECKING - -from azure.mgmt.core import AsyncARMPipelineClient -from msrest import Deserializer, Serializer - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from azure.core.credentials_async import AsyncTokenCredential - -from ._configuration import MySQLManagementClientConfiguration -from .operations import ServersOperations -from .operations import ReplicasOperations -from .operations import FirewallRulesOperations -from .operations import VirtualNetworkRulesOperations -from .operations import DatabasesOperations -from .operations import ConfigurationsOperations -from .operations import LogFilesOperations -from .operations import ServerAdministratorsOperations -from .operations import LocationBasedPerformanceTierOperations -from .operations import CheckNameAvailabilityOperations -from .operations import Operations -from .operations import ServerSecurityAlertPoliciesOperations -from .operations import QueryTextsOperations -from .operations import TopQueryStatisticsOperations -from .operations import WaitStatisticsOperations -from .operations import AdvisorsOperations -from .operations import MySQLManagementClientOperationsMixin -from .operations import RecommendedActionsOperations -from .operations import LocationBasedRecommendedActionSessionsOperationStatusOperations -from .operations import LocationBasedRecommendedActionSessionsResultOperations -from .operations import PrivateEndpointConnectionsOperations -from .operations import PrivateLinkResourcesOperations -from .operations import ServerKeysOperations -from .. import models - - -class MySQLManagementClient(MySQLManagementClientOperationsMixin): - """The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business model. - - :ivar servers: ServersOperations operations - :vartype servers: azure.mgmt.rdbms.mysql.v2020_01_01.aio.operations.ServersOperations - :ivar replicas: ReplicasOperations operations - :vartype replicas: azure.mgmt.rdbms.mysql.v2020_01_01.aio.operations.ReplicasOperations - :ivar firewall_rules: FirewallRulesOperations operations - :vartype firewall_rules: azure.mgmt.rdbms.mysql.v2020_01_01.aio.operations.FirewallRulesOperations - :ivar virtual_network_rules: VirtualNetworkRulesOperations operations - :vartype virtual_network_rules: azure.mgmt.rdbms.mysql.v2020_01_01.aio.operations.VirtualNetworkRulesOperations - :ivar databases: DatabasesOperations operations - :vartype databases: azure.mgmt.rdbms.mysql.v2020_01_01.aio.operations.DatabasesOperations - :ivar configurations: ConfigurationsOperations operations - :vartype configurations: azure.mgmt.rdbms.mysql.v2020_01_01.aio.operations.ConfigurationsOperations - :ivar log_files: LogFilesOperations operations - :vartype log_files: azure.mgmt.rdbms.mysql.v2020_01_01.aio.operations.LogFilesOperations - :ivar server_administrators: ServerAdministratorsOperations operations - :vartype server_administrators: azure.mgmt.rdbms.mysql.v2020_01_01.aio.operations.ServerAdministratorsOperations - :ivar location_based_performance_tier: LocationBasedPerformanceTierOperations operations - :vartype location_based_performance_tier: azure.mgmt.rdbms.mysql.v2020_01_01.aio.operations.LocationBasedPerformanceTierOperations - :ivar check_name_availability: CheckNameAvailabilityOperations operations - :vartype check_name_availability: azure.mgmt.rdbms.mysql.v2020_01_01.aio.operations.CheckNameAvailabilityOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.rdbms.mysql.v2020_01_01.aio.operations.Operations - :ivar server_security_alert_policies: ServerSecurityAlertPoliciesOperations operations - :vartype server_security_alert_policies: azure.mgmt.rdbms.mysql.v2020_01_01.aio.operations.ServerSecurityAlertPoliciesOperations - :ivar query_texts: QueryTextsOperations operations - :vartype query_texts: azure.mgmt.rdbms.mysql.v2020_01_01.aio.operations.QueryTextsOperations - :ivar top_query_statistics: TopQueryStatisticsOperations operations - :vartype top_query_statistics: azure.mgmt.rdbms.mysql.v2020_01_01.aio.operations.TopQueryStatisticsOperations - :ivar wait_statistics: WaitStatisticsOperations operations - :vartype wait_statistics: azure.mgmt.rdbms.mysql.v2020_01_01.aio.operations.WaitStatisticsOperations - :ivar advisors: AdvisorsOperations operations - :vartype advisors: azure.mgmt.rdbms.mysql.v2020_01_01.aio.operations.AdvisorsOperations - :ivar recommended_actions: RecommendedActionsOperations operations - :vartype recommended_actions: azure.mgmt.rdbms.mysql.v2020_01_01.aio.operations.RecommendedActionsOperations - :ivar location_based_recommended_action_sessions_operation_status: LocationBasedRecommendedActionSessionsOperationStatusOperations operations - :vartype location_based_recommended_action_sessions_operation_status: azure.mgmt.rdbms.mysql.v2020_01_01.aio.operations.LocationBasedRecommendedActionSessionsOperationStatusOperations - :ivar location_based_recommended_action_sessions_result: LocationBasedRecommendedActionSessionsResultOperations operations - :vartype location_based_recommended_action_sessions_result: azure.mgmt.rdbms.mysql.v2020_01_01.aio.operations.LocationBasedRecommendedActionSessionsResultOperations - :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations - :vartype private_endpoint_connections: azure.mgmt.rdbms.mysql.v2020_01_01.aio.operations.PrivateEndpointConnectionsOperations - :ivar private_link_resources: PrivateLinkResourcesOperations operations - :vartype private_link_resources: azure.mgmt.rdbms.mysql.v2020_01_01.aio.operations.PrivateLinkResourcesOperations - :ivar server_keys: ServerKeysOperations operations - :vartype server_keys: azure.mgmt.rdbms.mysql.v2020_01_01.aio.operations.ServerKeysOperations - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The ID of the target subscription. - :type subscription_id: str - :param str base_url: Service URL - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - """ - - def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - base_url: Optional[str] = None, - **kwargs: Any - ) -> None: - if not base_url: - base_url = 'https://management.azure.com' - self._config = MySQLManagementClientConfiguration(credential, subscription_id, **kwargs) - self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False - self._deserialize = Deserializer(client_models) - - self.servers = ServersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.replicas = ReplicasOperations( - self._client, self._config, self._serialize, self._deserialize) - self.firewall_rules = FirewallRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.virtual_network_rules = VirtualNetworkRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.databases = DatabasesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.configurations = ConfigurationsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.log_files = LogFilesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.server_administrators = ServerAdministratorsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.location_based_performance_tier = LocationBasedPerformanceTierOperations( - self._client, self._config, self._serialize, self._deserialize) - self.check_name_availability = CheckNameAvailabilityOperations( - self._client, self._config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self._config, self._serialize, self._deserialize) - self.server_security_alert_policies = ServerSecurityAlertPoliciesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.query_texts = QueryTextsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.top_query_statistics = TopQueryStatisticsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.wait_statistics = WaitStatisticsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.advisors = AdvisorsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.recommended_actions = RecommendedActionsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.location_based_recommended_action_sessions_operation_status = LocationBasedRecommendedActionSessionsOperationStatusOperations( - self._client, self._config, self._serialize, self._deserialize) - self.location_based_recommended_action_sessions_result = LocationBasedRecommendedActionSessionsResultOperations( - self._client, self._config, self._serialize, self._deserialize) - self.private_endpoint_connections = PrivateEndpointConnectionsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.private_link_resources = PrivateLinkResourcesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.server_keys = ServerKeysOperations( - self._client, self._config, self._serialize, self._deserialize) - - async def close(self) -> None: - await self._client.close() - - async def __aenter__(self) -> "MySQLManagementClient": - await self._client.__aenter__() - return self - - async def __aexit__(self, *exc_details) -> None: - await self._client.__aexit__(*exc_details) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/__init__.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/__init__.py deleted file mode 100644 index e9f50ee07ef0..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._my_sql_management_client import MySQLManagementClient -__all__ = ['MySQLManagementClient'] - -try: - from ._patch import patch_sdk # type: ignore - patch_sdk() -except ImportError: - pass diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/_configuration.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/_configuration.py deleted file mode 100644 index 16d4cdaa2eba..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/_configuration.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import TYPE_CHECKING - -from azure.core.configuration import Configuration -from azure.core.pipeline import policies -from azure.mgmt.core.policies import ARMHttpLoggingPolicy - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any - - from azure.core.credentials import TokenCredential - -VERSION = "unknown" - -class MySQLManagementClientConfiguration(Configuration): - """Configuration for MySQLManagementClient. - - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The ID of the target subscription. - :type subscription_id: str - """ - - def __init__( - self, - credential, # type: "TokenCredential" - subscription_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - if credential is None: - raise ValueError("Parameter 'credential' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - super(MySQLManagementClientConfiguration, self).__init__(**kwargs) - - self.credential = credential - self.subscription_id = subscription_id - self.api_version = "2020-07-01-privatepreview" - self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'mgmt-rdbms/{}'.format(VERSION)) - self._configure(**kwargs) - - def _configure( - self, - **kwargs # type: Any - ): - # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') - if self.credential and not self.authentication_policy: - self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/_metadata.json b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/_metadata.json deleted file mode 100644 index 73e9416f7983..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/_metadata.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "chosen_version": "2020-07-01-privatepreview", - "total_api_version_list": ["2020-07-01-privatepreview"], - "client": { - "name": "MySQLManagementClient", - "filename": "_my_sql_management_client", - "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business model.", - "base_url": "\u0027https://management.azure.com\u0027", - "custom_base_url": null, - "azure_arm": true, - "has_lro_operations": true, - "client_side_validation": false - }, - "global_parameters": { - "sync": { - "credential": { - "signature": "credential, # type: \"TokenCredential\"", - "description": "Credential needed for the client to connect to Azure.", - "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true - }, - "subscription_id": { - "signature": "subscription_id, # type: str", - "description": "The ID of the target subscription.", - "docstring_type": "str", - "required": true - } - }, - "async": { - "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", - "description": "Credential needed for the client to connect to Azure.", - "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", - "required": true - }, - "subscription_id": { - "signature": "subscription_id, # type: str", - "description": "The ID of the target subscription.", - "docstring_type": "str", - "required": true - } - }, - "constant": { - }, - "call": "credential, subscription_id" - }, - "config": { - "credential": true, - "credential_scopes": ["https://management.azure.com/.default"], - "credential_default_policy_type": "BearerTokenCredentialPolicy", - "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null - }, - "operation_groups": { - "servers": "ServersOperations", - "replicas": "ReplicasOperations", - "server_keys": "ServerKeysOperations", - "firewall_rules": "FirewallRulesOperations", - "databases": "DatabasesOperations", - "configurations": "ConfigurationsOperations", - "location_based_capabilities": "LocationBasedCapabilitiesOperations", - "check_virtual_network_subnet_usage": "CheckVirtualNetworkSubnetUsageOperations", - "check_name_availability": "CheckNameAvailabilityOperations", - "operations": "Operations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" -} \ No newline at end of file diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/__init__.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/__init__.py deleted file mode 100644 index f7d297a817cf..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/__init__.py +++ /dev/null @@ -1,10 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._my_sql_management_client import MySQLManagementClient -__all__ = ['MySQLManagementClient'] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/_configuration.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/_configuration.py deleted file mode 100644 index b72e0e49cc95..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/_configuration.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any, TYPE_CHECKING - -from azure.core.configuration import Configuration -from azure.core.pipeline import policies -from azure.mgmt.core.policies import ARMHttpLoggingPolicy - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from azure.core.credentials_async import AsyncTokenCredential - -VERSION = "unknown" - -class MySQLManagementClientConfiguration(Configuration): - """Configuration for MySQLManagementClient. - - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The ID of the target subscription. - :type subscription_id: str - """ - - def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - **kwargs: Any - ) -> None: - if credential is None: - raise ValueError("Parameter 'credential' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - super(MySQLManagementClientConfiguration, self).__init__(**kwargs) - - self.credential = credential - self.subscription_id = subscription_id - self.api_version = "2020-07-01-privatepreview" - self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'mgmt-rdbms/{}'.format(VERSION)) - self._configure(**kwargs) - - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') - if self.credential and not self.authentication_policy: - self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/__init__.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/__init__.py similarity index 100% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/__init__.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/__init__.py diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/_configuration.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/_configuration.py similarity index 98% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/_configuration.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/_configuration.py index 25e6b7e14e60..c4e0108188c4 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/_configuration.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/_configuration.py @@ -47,6 +47,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id + self.api_version = "2020-07-01-preview" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-rdbms/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/_my_sql_management_client.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/_my_sql_management_client.py similarity index 83% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/_my_sql_management_client.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/_my_sql_management_client.py index 43e6732ae81d..f3853a214374 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/_my_sql_management_client.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/_my_sql_management_client.py @@ -35,25 +35,25 @@ class MySQLManagementClient(object): """The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business model. :ivar servers: ServersOperations operations - :vartype servers: azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.operations.ServersOperations + :vartype servers: azure.mgmt.rdbms.mysql_flexibleservers.operations.ServersOperations :ivar replicas: ReplicasOperations operations - :vartype replicas: azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.operations.ReplicasOperations + :vartype replicas: azure.mgmt.rdbms.mysql_flexibleservers.operations.ReplicasOperations :ivar server_keys: ServerKeysOperations operations - :vartype server_keys: azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.operations.ServerKeysOperations + :vartype server_keys: azure.mgmt.rdbms.mysql_flexibleservers.operations.ServerKeysOperations :ivar firewall_rules: FirewallRulesOperations operations - :vartype firewall_rules: azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.operations.FirewallRulesOperations + :vartype firewall_rules: azure.mgmt.rdbms.mysql_flexibleservers.operations.FirewallRulesOperations :ivar databases: DatabasesOperations operations - :vartype databases: azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.operations.DatabasesOperations + :vartype databases: azure.mgmt.rdbms.mysql_flexibleservers.operations.DatabasesOperations :ivar configurations: ConfigurationsOperations operations - :vartype configurations: azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.operations.ConfigurationsOperations + :vartype configurations: azure.mgmt.rdbms.mysql_flexibleservers.operations.ConfigurationsOperations :ivar location_based_capabilities: LocationBasedCapabilitiesOperations operations - :vartype location_based_capabilities: azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.operations.LocationBasedCapabilitiesOperations + :vartype location_based_capabilities: azure.mgmt.rdbms.mysql_flexibleservers.operations.LocationBasedCapabilitiesOperations :ivar check_virtual_network_subnet_usage: CheckVirtualNetworkSubnetUsageOperations operations - :vartype check_virtual_network_subnet_usage: azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.operations.CheckVirtualNetworkSubnetUsageOperations + :vartype check_virtual_network_subnet_usage: azure.mgmt.rdbms.mysql_flexibleservers.operations.CheckVirtualNetworkSubnetUsageOperations :ivar check_name_availability: CheckNameAvailabilityOperations operations - :vartype check_name_availability: azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.operations.CheckNameAvailabilityOperations + :vartype check_name_availability: azure.mgmt.rdbms.mysql_flexibleservers.operations.CheckNameAvailabilityOperations :ivar operations: Operations operations - :vartype operations: azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.operations.Operations + :vartype operations: azure.mgmt.rdbms.mysql_flexibleservers.operations.Operations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/__init__.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/__init__.py similarity index 100% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/__init__.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/__init__.py diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/_configuration.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/_configuration.py similarity index 98% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/_configuration.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/_configuration.py index 2064e0ed43b6..1ab26bcfc92c 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/aio/_configuration.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/_configuration.py @@ -44,6 +44,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id + self.api_version = "2020-07-01-preview" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-rdbms/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/_my_sql_management_client.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/_my_sql_management_client.py similarity index 82% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/_my_sql_management_client.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/_my_sql_management_client.py index 7bb1bfe8a1a7..b29c75c6c77b 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/_my_sql_management_client.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/_my_sql_management_client.py @@ -33,25 +33,25 @@ class MySQLManagementClient(object): """The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business model. :ivar servers: ServersOperations operations - :vartype servers: azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.aio.operations.ServersOperations + :vartype servers: azure.mgmt.rdbms.mysql_flexibleservers.aio.operations.ServersOperations :ivar replicas: ReplicasOperations operations - :vartype replicas: azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.aio.operations.ReplicasOperations + :vartype replicas: azure.mgmt.rdbms.mysql_flexibleservers.aio.operations.ReplicasOperations :ivar server_keys: ServerKeysOperations operations - :vartype server_keys: azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.aio.operations.ServerKeysOperations + :vartype server_keys: azure.mgmt.rdbms.mysql_flexibleservers.aio.operations.ServerKeysOperations :ivar firewall_rules: FirewallRulesOperations operations - :vartype firewall_rules: azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.aio.operations.FirewallRulesOperations + :vartype firewall_rules: azure.mgmt.rdbms.mysql_flexibleservers.aio.operations.FirewallRulesOperations :ivar databases: DatabasesOperations operations - :vartype databases: azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.aio.operations.DatabasesOperations + :vartype databases: azure.mgmt.rdbms.mysql_flexibleservers.aio.operations.DatabasesOperations :ivar configurations: ConfigurationsOperations operations - :vartype configurations: azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.aio.operations.ConfigurationsOperations + :vartype configurations: azure.mgmt.rdbms.mysql_flexibleservers.aio.operations.ConfigurationsOperations :ivar location_based_capabilities: LocationBasedCapabilitiesOperations operations - :vartype location_based_capabilities: azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.aio.operations.LocationBasedCapabilitiesOperations + :vartype location_based_capabilities: azure.mgmt.rdbms.mysql_flexibleservers.aio.operations.LocationBasedCapabilitiesOperations :ivar check_virtual_network_subnet_usage: CheckVirtualNetworkSubnetUsageOperations operations - :vartype check_virtual_network_subnet_usage: azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.aio.operations.CheckVirtualNetworkSubnetUsageOperations + :vartype check_virtual_network_subnet_usage: azure.mgmt.rdbms.mysql_flexibleservers.aio.operations.CheckVirtualNetworkSubnetUsageOperations :ivar check_name_availability: CheckNameAvailabilityOperations operations - :vartype check_name_availability: azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.aio.operations.CheckNameAvailabilityOperations + :vartype check_name_availability: azure.mgmt.rdbms.mysql_flexibleservers.aio.operations.CheckNameAvailabilityOperations :ivar operations: Operations operations - :vartype operations: azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.aio.operations.Operations + :vartype operations: azure.mgmt.rdbms.mysql_flexibleservers.aio.operations.Operations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/operations/__init__.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/__init__.py similarity index 100% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/operations/__init__.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/__init__.py diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/operations/_check_name_availability_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_check_name_availability_operations.py similarity index 89% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/operations/_check_name_availability_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_check_name_availability_operations.py index 50f7c488f3e1..828c12cc0fa3 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/operations/_check_name_availability_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_check_name_availability_operations.py @@ -13,7 +13,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -25,14 +25,14 @@ class CheckNameAvailabilityOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models + :type models: ~azure.mgmt.rdbms.mysql_flexibleservers.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -42,25 +42,25 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def execute( self, - name_availability_request: "models.NameAvailabilityRequest", + name_availability_request: "_models.NameAvailabilityRequest", **kwargs - ) -> "models.NameAvailability": + ) -> "_models.NameAvailability": """Check the availability of name for server. :param name_availability_request: The required parameters for checking if server name is available. - :type name_availability_request: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.NameAvailabilityRequest + :type name_availability_request: ~azure.mgmt.rdbms.mysql_flexibleservers.models.NameAvailabilityRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: NameAvailability, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.NameAvailability + :rtype: ~azure.mgmt.rdbms.mysql_flexibleservers.models.NameAvailability :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.NameAvailability"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NameAvailability"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/operations/_check_virtual_network_subnet_usage_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_check_virtual_network_subnet_usage_operations.py similarity index 88% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/operations/_check_virtual_network_subnet_usage_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_check_virtual_network_subnet_usage_operations.py index aff7b9966f88..fe77e4ad88a8 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/operations/_check_virtual_network_subnet_usage_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_check_virtual_network_subnet_usage_operations.py @@ -13,7 +13,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -25,14 +25,14 @@ class CheckVirtualNetworkSubnetUsageOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models + :type models: ~azure.mgmt.rdbms.mysql_flexibleservers.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -43,26 +43,26 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def execute( self, location_name: str, - parameters: "models.VirtualNetworkSubnetUsageParameter", + parameters: "_models.VirtualNetworkSubnetUsageParameter", **kwargs - ) -> "models.VirtualNetworkSubnetUsageResult": + ) -> "_models.VirtualNetworkSubnetUsageResult": """Get virtual network subnet usage for a given vNet resource id. :param location_name: The name of the location. :type location_name: str :param parameters: The required parameters for creating or updating a server. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.VirtualNetworkSubnetUsageParameter + :type parameters: ~azure.mgmt.rdbms.mysql_flexibleservers.models.VirtualNetworkSubnetUsageParameter :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualNetworkSubnetUsageResult, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.VirtualNetworkSubnetUsageResult + :rtype: ~azure.mgmt.rdbms.mysql_flexibleservers.models.VirtualNetworkSubnetUsageResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.VirtualNetworkSubnetUsageResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkSubnetUsageResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/operations/_configurations_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_configurations_operations.py similarity index 92% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/operations/_configurations_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_configurations_operations.py index 6f59d90b722d..2cd316ae1df9 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/operations/_configurations_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_configurations_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -28,14 +28,14 @@ class ConfigurationsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models + :type models: ~azure.mgmt.rdbms.mysql_flexibleservers.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -48,15 +48,15 @@ async def _update_initial( resource_group_name: str, server_name: str, configuration_name: str, - parameters: "models.Configuration", + parameters: "_models.Configuration", **kwargs - ) -> Optional["models.Configuration"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Configuration"]] + ) -> Optional["_models.Configuration"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Configuration"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -105,9 +105,9 @@ async def begin_update( resource_group_name: str, server_name: str, configuration_name: str, - parameters: "models.Configuration", + parameters: "_models.Configuration", **kwargs - ) -> AsyncLROPoller["models.Configuration"]: + ) -> AsyncLROPoller["_models.Configuration"]: """Updates a configuration of a server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -117,7 +117,7 @@ async def begin_update( :param configuration_name: The name of the server configuration. :type configuration_name: str :param parameters: The required parameters for updating a server configuration. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.Configuration + :type parameters: ~azure.mgmt.rdbms.mysql_flexibleservers.models.Configuration :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: True for ARMPolling, False for no polling, or a @@ -125,11 +125,11 @@ async def begin_update( :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 Configuration or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.Configuration] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql_flexibleservers.models.Configuration] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.Configuration"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Configuration"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -182,7 +182,7 @@ async def get( server_name: str, configuration_name: str, **kwargs - ) -> "models.Configuration": + ) -> "_models.Configuration": """Gets information about a configuration of server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -193,15 +193,15 @@ async def get( :type configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Configuration, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.Configuration + :rtype: ~azure.mgmt.rdbms.mysql_flexibleservers.models.Configuration :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Configuration"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Configuration"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" # Construct URL @@ -243,7 +243,7 @@ def list_by_server( resource_group_name: str, server_name: str, **kwargs - ) -> AsyncIterable["models.ConfigurationListResult"]: + ) -> AsyncIterable["_models.ConfigurationListResult"]: """List all the configurations in a given server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -252,15 +252,15 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ConfigurationListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ConfigurationListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql_flexibleservers.models.ConfigurationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ConfigurationListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfigurationListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/operations/_databases_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_databases_operations.py similarity index 94% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/operations/_databases_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_databases_operations.py index feb1651b9265..05829147d06a 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/operations/_databases_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_databases_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -28,14 +28,14 @@ class DatabasesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models + :type models: ~azure.mgmt.rdbms.mysql_flexibleservers.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -48,15 +48,15 @@ async def _create_or_update_initial( resource_group_name: str, server_name: str, database_name: str, - parameters: "models.Database", + parameters: "_models.Database", **kwargs - ) -> Optional["models.Database"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Database"]] + ) -> Optional["_models.Database"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Database"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -108,9 +108,9 @@ async def begin_create_or_update( resource_group_name: str, server_name: str, database_name: str, - parameters: "models.Database", + parameters: "_models.Database", **kwargs - ) -> AsyncLROPoller["models.Database"]: + ) -> AsyncLROPoller["_models.Database"]: """Creates a new database or updates an existing database. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -120,7 +120,7 @@ async def begin_create_or_update( :param database_name: The name of the database. :type database_name: str :param parameters: The required parameters for creating or updating a database. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.Database + :type parameters: ~azure.mgmt.rdbms.mysql_flexibleservers.models.Database :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: True for ARMPolling, False for no polling, or a @@ -128,11 +128,11 @@ async def begin_create_or_update( :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 Database or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.Database] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql_flexibleservers.models.Database] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.Database"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Database"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -191,7 +191,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" # Construct URL @@ -300,7 +300,7 @@ async def get( server_name: str, database_name: str, **kwargs - ) -> "models.Database": + ) -> "_models.Database": """Gets information about a database. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -311,15 +311,15 @@ async def get( :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Database, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.Database + :rtype: ~azure.mgmt.rdbms.mysql_flexibleservers.models.Database :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Database"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Database"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" # Construct URL @@ -361,7 +361,7 @@ def list_by_server( resource_group_name: str, server_name: str, **kwargs - ) -> AsyncIterable["models.DatabaseListResult"]: + ) -> AsyncIterable["_models.DatabaseListResult"]: """List all the databases in a given server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -370,15 +370,15 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DatabaseListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.DatabaseListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql_flexibleservers.models.DatabaseListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.DatabaseListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/operations/_firewall_rules_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_firewall_rules_operations.py similarity index 94% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/operations/_firewall_rules_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_firewall_rules_operations.py index ba8c0c18bd1c..d838b6b96119 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/operations/_firewall_rules_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_firewall_rules_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -28,14 +28,14 @@ class FirewallRulesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models + :type models: ~azure.mgmt.rdbms.mysql_flexibleservers.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -48,15 +48,15 @@ async def _create_or_update_initial( resource_group_name: str, server_name: str, firewall_rule_name: str, - parameters: "models.FirewallRule", + parameters: "_models.FirewallRule", **kwargs - ) -> Optional["models.FirewallRule"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.FirewallRule"]] + ) -> Optional["_models.FirewallRule"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.FirewallRule"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -108,9 +108,9 @@ async def begin_create_or_update( resource_group_name: str, server_name: str, firewall_rule_name: str, - parameters: "models.FirewallRule", + parameters: "_models.FirewallRule", **kwargs - ) -> AsyncLROPoller["models.FirewallRule"]: + ) -> AsyncLROPoller["_models.FirewallRule"]: """Creates a new firewall rule or updates an existing firewall rule. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -120,7 +120,7 @@ async def begin_create_or_update( :param firewall_rule_name: The name of the server firewall rule. :type firewall_rule_name: str :param parameters: The required parameters for creating or updating a firewall rule. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.FirewallRule + :type parameters: ~azure.mgmt.rdbms.mysql_flexibleservers.models.FirewallRule :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: True for ARMPolling, False for no polling, or a @@ -128,11 +128,11 @@ async def begin_create_or_update( :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 FirewallRule or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.FirewallRule] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql_flexibleservers.models.FirewallRule] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.FirewallRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRule"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -191,7 +191,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" # Construct URL @@ -300,7 +300,7 @@ async def get( server_name: str, firewall_rule_name: str, **kwargs - ) -> "models.FirewallRule": + ) -> "_models.FirewallRule": """Gets information about a server firewall rule. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -311,15 +311,15 @@ async def get( :type firewall_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: FirewallRule, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.FirewallRule + :rtype: ~azure.mgmt.rdbms.mysql_flexibleservers.models.FirewallRule :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.FirewallRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRule"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" # Construct URL @@ -361,7 +361,7 @@ def list_by_server( resource_group_name: str, server_name: str, **kwargs - ) -> AsyncIterable["models.FirewallRuleListResult"]: + ) -> AsyncIterable["_models.FirewallRuleListResult"]: """List all the firewall rules in a given server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -370,15 +370,15 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either FirewallRuleListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.FirewallRuleListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql_flexibleservers.models.FirewallRuleListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.FirewallRuleListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRuleListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/operations/_location_based_capabilities_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_location_based_capabilities_operations.py similarity index 92% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/operations/_location_based_capabilities_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_location_based_capabilities_operations.py index 2cf868ba6dbd..bcbd50388a94 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/operations/_location_based_capabilities_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_location_based_capabilities_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -26,14 +26,14 @@ class LocationBasedCapabilitiesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models + :type models: ~azure.mgmt.rdbms.mysql_flexibleservers.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -45,22 +45,22 @@ def list( self, location_name: str, **kwargs - ) -> AsyncIterable["models.CapabilitiesListResult"]: + ) -> AsyncIterable["_models.CapabilitiesListResult"]: """Get capabilities at specified location in a given subscription. :param location_name: The name of the location. :type location_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CapabilitiesListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.CapabilitiesListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql_flexibleservers.models.CapabilitiesListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.CapabilitiesListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CapabilitiesListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/operations/_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_operations.py similarity index 89% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/operations/_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_operations.py index 6e006aa62440..d454a345308a 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/operations/_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_operations.py @@ -13,7 +13,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -25,14 +25,14 @@ class Operations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models + :type models: ~azure.mgmt.rdbms.mysql_flexibleservers.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -43,20 +43,20 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def list( self, **kwargs - ) -> "models.OperationListResult": + ) -> "_models.OperationListResult": """Lists all of the available REST API operations. :keyword callable cls: A custom type or function that will be passed the direct response :return: OperationListResult, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.OperationListResult + :rtype: ~azure.mgmt.rdbms.mysql_flexibleservers.models.OperationListResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.OperationListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" # Construct URL diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/operations/_replicas_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_replicas_operations.py similarity index 93% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/operations/_replicas_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_replicas_operations.py index d779c15b0cd3..319f43f23791 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/operations/_replicas_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_replicas_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -26,14 +26,14 @@ class ReplicasOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models + :type models: ~azure.mgmt.rdbms.mysql_flexibleservers.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -46,7 +46,7 @@ def list_by_server( resource_group_name: str, server_name: str, **kwargs - ) -> AsyncIterable["models.ServerListResult"]: + ) -> AsyncIterable["_models.ServerListResult"]: """List all the replicas for a given server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -55,15 +55,15 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ServerListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/operations/_server_keys_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_server_keys_operations.py similarity index 94% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/operations/_server_keys_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_server_keys_operations.py index f4bd426b34d2..c44ee56860a7 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/operations/_server_keys_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_server_keys_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -28,14 +28,14 @@ class ServerKeysOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models + :type models: ~azure.mgmt.rdbms.mysql_flexibleservers.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -48,15 +48,15 @@ async def _create_or_update_initial( resource_group_name: str, server_name: str, key_name: str, - parameters: "models.ServerKey", + parameters: "_models.ServerKey", **kwargs - ) -> Optional["models.ServerKey"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.ServerKey"]] + ) -> Optional["_models.ServerKey"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ServerKey"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -108,9 +108,9 @@ async def begin_create_or_update( resource_group_name: str, server_name: str, key_name: str, - parameters: "models.ServerKey", + parameters: "_models.ServerKey", **kwargs - ) -> AsyncLROPoller["models.ServerKey"]: + ) -> AsyncLROPoller["_models.ServerKey"]: """Creates or updates a MySQL Server key. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -120,7 +120,7 @@ async def begin_create_or_update( :param key_name: The name of the server key. :type key_name: str :param parameters: The requested MySQL Server key resource state. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ServerKey + :type parameters: ~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerKey :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: True for ARMPolling, False for no polling, or a @@ -128,11 +128,11 @@ async def begin_create_or_update( :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 ServerKey or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ServerKey] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerKey] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerKey"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerKey"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -191,7 +191,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" # Construct URL @@ -300,7 +300,7 @@ async def get( server_name: str, key_name: str, **kwargs - ) -> "models.ServerKey": + ) -> "_models.ServerKey": """Gets a server key. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -311,15 +311,15 @@ async def get( :type key_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ServerKey, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ServerKey + :rtype: ~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerKey :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerKey"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerKey"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" # Construct URL @@ -361,7 +361,7 @@ def list_by_server( resource_group_name: str, server_name: str, **kwargs - ) -> AsyncIterable["models.ServerKeyListResult"]: + ) -> AsyncIterable["_models.ServerKeyListResult"]: """Gets a list of Server keys. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -370,15 +370,15 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerKeyListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ServerKeyListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerKeyListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerKeyListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerKeyListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/operations/_servers_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_servers_operations.py similarity index 95% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/operations/_servers_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_servers_operations.py index 6670033ae68c..306eacf573d6 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/aio/operations/_servers_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_servers_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -28,14 +28,14 @@ class ServersOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models + :type models: ~azure.mgmt.rdbms.mysql_flexibleservers.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -47,15 +47,15 @@ async def _create_initial( self, resource_group_name: str, server_name: str, - parameters: "models.Server", + parameters: "_models.Server", **kwargs - ) -> Optional["models.Server"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Server"]] + ) -> Optional["_models.Server"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Server"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -105,9 +105,9 @@ async def begin_create( self, resource_group_name: str, server_name: str, - parameters: "models.Server", + parameters: "_models.Server", **kwargs - ) -> AsyncLROPoller["models.Server"]: + ) -> AsyncLROPoller["_models.Server"]: """Creates a new server or updates an existing server. The update action will overwrite the existing server. @@ -116,7 +116,7 @@ async def begin_create( :param server_name: The name of the server. :type server_name: str :param parameters: The required parameters for creating or updating a server. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.Server + :type parameters: ~azure.mgmt.rdbms.mysql_flexibleservers.models.Server :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: True for ARMPolling, False for no polling, or a @@ -124,11 +124,11 @@ async def begin_create( :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 Server or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.Server] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql_flexibleservers.models.Server] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.Server"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Server"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -177,15 +177,15 @@ async def _update_initial( self, resource_group_name: str, server_name: str, - parameters: "models.ServerForUpdate", + parameters: "_models.ServerForUpdate", **kwargs - ) -> Optional["models.Server"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Server"]] + ) -> Optional["_models.Server"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Server"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -232,9 +232,9 @@ async def begin_update( self, resource_group_name: str, server_name: str, - parameters: "models.ServerForUpdate", + parameters: "_models.ServerForUpdate", **kwargs - ) -> AsyncLROPoller["models.Server"]: + ) -> AsyncLROPoller["_models.Server"]: """Updates an existing server. The request body can contain one to many of the properties present in the normal server definition. @@ -243,7 +243,7 @@ async def begin_update( :param server_name: The name of the server. :type server_name: str :param parameters: The required parameters for updating a server. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ServerForUpdate + :type parameters: ~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerForUpdate :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: True for ARMPolling, False for no polling, or a @@ -251,11 +251,11 @@ async def begin_update( :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 Server or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.Server] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.mysql_flexibleservers.models.Server] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.Server"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Server"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -311,7 +311,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" # Construct URL @@ -413,7 +413,7 @@ async def get( resource_group_name: str, server_name: str, **kwargs - ) -> "models.Server": + ) -> "_models.Server": """Gets information about a server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -422,15 +422,15 @@ async def get( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Server, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.Server + :rtype: ~azure.mgmt.rdbms.mysql_flexibleservers.models.Server :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Server"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Server"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" # Construct URL @@ -470,22 +470,22 @@ def list_by_resource_group( self, resource_group_name: str, **kwargs - ) -> AsyncIterable["models.ServerListResult"]: + ) -> AsyncIterable["_models.ServerListResult"]: """List all the servers in a given resource group. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ServerListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -539,20 +539,20 @@ async def get_next(next_link=None): def list( self, **kwargs - ) -> AsyncIterable["models.ServerListResult"]: + ) -> AsyncIterable["_models.ServerListResult"]: """List all the servers in a given subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ServerListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -613,7 +613,7 @@ async def _restart_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" # Construct URL @@ -721,7 +721,7 @@ async def _start_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" # Construct URL @@ -829,7 +829,7 @@ async def _stop_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" # Construct URL diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/models/__init__.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/models/__init__.py similarity index 100% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/models/__init__.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/models/__init__.py diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/models/_models.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/models/_models.py similarity index 87% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/models/_models.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/models/_models.py index b0f9f10a1a7c..408cb0c0773c 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/models/_models.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/models/_models.py @@ -15,8 +15,7 @@ class CapabilitiesListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: A list of supported capabilities. - :vartype value: - list[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.CapabilityProperties] + :vartype value: list[~azure.mgmt.rdbms.mysql_flexibleservers.models.CapabilityProperties] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -49,7 +48,7 @@ class CapabilityProperties(msrest.serialization.Model): :vartype zone: str :ivar supported_flexible_server_editions: A list of supported flexible server editions. :vartype supported_flexible_server_editions: - list[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ServerEditionCapability] + list[~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerEditionCapability] """ _validation = { @@ -72,17 +71,17 @@ def __init__( class Resource(msrest.serialization.Model): - """Resource. + """Common fields that are returned in the response for all Azure Resource Manager resources. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str """ @@ -113,13 +112,13 @@ class Configuration(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param value: Value of the configuration. :type value: str @@ -135,16 +134,15 @@ class Configuration(Resource): :type source: str :ivar is_read_only: If is the configuration read only. Possible values include: "True", "False". - :vartype is_read_only: str or - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.IsReadOnly + :vartype is_read_only: str or ~azure.mgmt.rdbms.mysql_flexibleservers.models.IsReadOnly :ivar is_config_pending_restart: If is the configuration pending restart or not. Possible values include: "True", "False". :vartype is_config_pending_restart: str or - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.IsConfigPendingRestart + ~azure.mgmt.rdbms.mysql_flexibleservers.models.IsConfigPendingRestart :ivar is_dynamic_config: If is the configuration dynamic. Possible values include: "True", "False". :vartype is_dynamic_config: str or - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.IsDynamicConfig + ~azure.mgmt.rdbms.mysql_flexibleservers.models.IsDynamicConfig """ _validation = { @@ -195,7 +193,7 @@ class ConfigurationListResult(msrest.serialization.Model): """A list of server configurations. :param value: The list of server configurations. - :type value: list[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.Configuration] + :type value: list[~azure.mgmt.rdbms.mysql_flexibleservers.models.Configuration] :param next_link: The link used to get the next page of operations. :type next_link: str """ @@ -219,13 +217,13 @@ class Database(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param charset: The charset of the database. :type charset: str @@ -260,7 +258,7 @@ class DatabaseListResult(msrest.serialization.Model): """A List of databases. :param value: The list of databases housed in a server. - :type value: list[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.Database] + :type value: list[~azure.mgmt.rdbms.mysql_flexibleservers.models.Database] :param next_link: The link used to get the next page of operations. :type next_link: str """ @@ -359,7 +357,7 @@ def __init__( class ErrorResponse(msrest.serialization.Model): - """The resource management error response. + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). Variables are only populated by the server, and will be ignored when sending a request. @@ -370,10 +368,10 @@ class ErrorResponse(msrest.serialization.Model): :ivar target: The error target. :vartype target: str :ivar details: The error details. - :vartype details: list[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ErrorResponse] + :vartype details: list[~azure.mgmt.rdbms.mysql_flexibleservers.models.ErrorResponse] :ivar additional_info: The error additional info. :vartype additional_info: - list[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ErrorAdditionalInfo] + list[~azure.mgmt.rdbms.mysql_flexibleservers.models.ErrorAdditionalInfo] """ _validation = { @@ -411,13 +409,13 @@ class FirewallRule(Resource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param start_ip_address: Required. The start IP address of the server firewall rule. Must be IPv4 format. @@ -456,7 +454,7 @@ class FirewallRuleListResult(msrest.serialization.Model): """A list of firewall rules. :param value: The list of firewall rules in a server. - :type value: list[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.FirewallRule] + :type value: list[~azure.mgmt.rdbms.mysql_flexibleservers.models.FirewallRule] :param next_link: The link used to get the next page of operations. :type next_link: str """ @@ -606,11 +604,12 @@ class Operation(msrest.serialization.Model): :ivar name: The name of the operation being performed on this particular object. :vartype name: str :ivar display: The localized display information for this particular operation or action. - :vartype display: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.OperationDisplay + :vartype display: ~azure.mgmt.rdbms.mysql_flexibleservers.models.OperationDisplay + :param is_data_action: Indicates whether the operation is a data action. + :type is_data_action: bool :ivar origin: The intended executor of the operation. Possible values include: "NotSpecified", "user", "system". - :vartype origin: str or - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.OperationOrigin + :vartype origin: str or ~azure.mgmt.rdbms.mysql_flexibleservers.models.OperationOrigin :ivar properties: Additional descriptions for the operation. :vartype properties: dict[str, object] """ @@ -625,6 +624,7 @@ class Operation(msrest.serialization.Model): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, 'origin': {'key': 'origin', 'type': 'str'}, 'properties': {'key': 'properties', 'type': '{object}'}, } @@ -636,6 +636,7 @@ def __init__( super(Operation, self).__init__(**kwargs) self.name = None self.display = None + self.is_data_action = kwargs.get('is_data_action', None) self.origin = None self.properties = None @@ -683,12 +684,16 @@ def __init__( class OperationListResult(msrest.serialization.Model): """A list of resource provider operations. - :param value: The list of resource provider operations. - :type value: list[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.Operation] + :param value: Collection of available operation details. + :type value: list[~azure.mgmt.rdbms.mysql_flexibleservers.models.Operation] + :param next_link: URL client should use to fetch the next page (per server side paging). + It's null for now, added for future use. + :type next_link: str """ _attribute_map = { 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, } def __init__( @@ -697,20 +702,21 @@ def __init__( ): super(OperationListResult, self).__init__(**kwargs) self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have everything other than required location and tags. + """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str """ @@ -734,19 +740,19 @@ def __init__( class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. + """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] @@ -785,22 +791,22 @@ class Server(TrackedResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param location: Required. The geo-location where the resource lives. :type location: str :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.Identity + :type identity: ~azure.mgmt.rdbms.mysql_flexibleservers.models.Identity :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.Sku + :type sku: ~azure.mgmt.rdbms.mysql_flexibleservers.models.Sku :param administrator_login: The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). :type administrator_login: str @@ -808,32 +814,29 @@ class Server(TrackedResource): server creation). :type administrator_login_password: str :param version: Server version. Possible values include: "5.7". - :type version: str or ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.mysql_flexibleservers.models.SslEnforcementEnum :param infrastructure_encryption: Status showing whether the server enabled infrastructure encryption. Possible values include: "Enabled", "Disabled". :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.InfrastructureEncryptionEnum + ~azure.mgmt.rdbms.mysql_flexibleservers.models.InfrastructureEncryptionEnum :ivar state: The state of a server. Possible values include: "Ready", "Dropping", "Disabled", "Starting", "Stopping", "Stopped", "Updating". - :vartype state: str or ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ServerState + :vartype state: str or ~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerState :ivar ha_state: The state of a HA server. Possible values include: "NotEnabled", "CreatingStandby", "ReplicatingData", "FailingOver", "Healthy", "RemovingStandby". - :vartype ha_state: str or - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ServerHAState + :vartype ha_state: str or ~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerHAState :param ha_enabled: Enable HA or not for a server. Possible values include: "Enabled", "Disabled". - :type ha_enabled: str or - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.HaEnabledEnum + :type ha_enabled: str or ~azure.mgmt.rdbms.mysql_flexibleservers.models.HaEnabledEnum :ivar fully_qualified_domain_name: The fully qualified domain name of a server. :vartype fully_qualified_domain_name: str :ivar earliest_restore_date: Earliest restore point creation time (ISO8601 format). :vartype earliest_restore_date: ~datetime.datetime :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.mysql_flexibleservers.models.StorageProfile :param replication_role: The replication role. :type replication_role: str :ivar replica_capacity: The maximum number of replicas that a primary server can have. @@ -842,10 +845,9 @@ class Server(TrackedResource): Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". :vartype public_network_access: str or - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.PublicNetworkAccessEnum + ~azure.mgmt.rdbms.mysql_flexibleservers.models.PublicNetworkAccessEnum :param maintenance_window: Maintenance window of a server. - :type maintenance_window: - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.MaintenanceWindow + :type maintenance_window: ~azure.mgmt.rdbms.mysql_flexibleservers.models.MaintenanceWindow :param source_server_id: The source MySQL server id. :type source_server_id: str :param restore_point_in_time: Restore point creation time (ISO8601 format), specifying the time @@ -860,10 +862,10 @@ class Server(TrackedResource): :vartype byok_enforcement: str :param delegated_subnet_arguments: Delegated subnet arguments. :type delegated_subnet_arguments: - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.DelegatedSubnetArguments + ~azure.mgmt.rdbms.mysql_flexibleservers.models.DelegatedSubnetArguments :param create_mode: The mode to create a new MySQL server. Possible values include: "Default", "PointInTimeRestore", "Replica". - :type create_mode: str or ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.CreateMode + :type create_mode: str or ~azure.mgmt.rdbms.mysql_flexibleservers.models.CreateMode :param tags_properties_tags: Application-specific metadata in the form of key-value pairs. :type tags_properties_tags: dict[str, str] """ @@ -957,10 +959,10 @@ class ServerEditionCapability(msrest.serialization.Model): :vartype name: str :ivar supported_storage_editions: A list of supported storage editions. :vartype supported_storage_editions: - list[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.StorageEditionCapability] + list[~azure.mgmt.rdbms.mysql_flexibleservers.models.StorageEditionCapability] :ivar supported_server_versions: A list of supported server versions. :vartype supported_server_versions: - list[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ServerVersionCapability] + list[~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerVersionCapability] """ _validation = { @@ -989,27 +991,24 @@ class ServerForUpdate(msrest.serialization.Model): """Parameters allowed to update for a server. :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.Sku + :type sku: ~azure.mgmt.rdbms.mysql_flexibleservers.models.Sku :param tags: A set of tags. Application-specific metadata in the form of key-value pairs. :type tags: dict[str, str] :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.mysql_flexibleservers.models.StorageProfile :param administrator_login_password: The password of the administrator login. :type administrator_login_password: str :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.mysql_flexibleservers.models.SslEnforcementEnum :param delegated_subnet_arguments: Delegated subnet arguments. :type delegated_subnet_arguments: - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.DelegatedSubnetArguments + ~azure.mgmt.rdbms.mysql_flexibleservers.models.DelegatedSubnetArguments :param ha_enabled: Enable HA or not for a server. Possible values include: "Enabled", "Disabled". - :type ha_enabled: str or - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.HaEnabledEnum + :type ha_enabled: str or ~azure.mgmt.rdbms.mysql_flexibleservers.models.HaEnabledEnum :param maintenance_window: Maintenance window of a server. - :type maintenance_window: - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.MaintenanceWindow + :type maintenance_window: ~azure.mgmt.rdbms.mysql_flexibleservers.models.MaintenanceWindow :param replication_role: The replication role of the server. :type replication_role: str """ @@ -1047,20 +1046,19 @@ class ServerKey(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar kind: Kind of encryption protector used to protect the key. :vartype kind: str :param server_key_type: The key type like 'AzureKeyVault'. Possible values include: "AzureKeyVault". - :type server_key_type: str or - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ServerKeyType + :type server_key_type: str or ~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerKeyType :param uri: The URI of the key. :type uri: str :ivar creation_date: The key creation date. @@ -1102,7 +1100,7 @@ class ServerKeyListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: A list of MySQL Server keys. - :vartype value: list[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ServerKey] + :vartype value: list[~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerKey] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -1130,7 +1128,7 @@ class ServerListResult(msrest.serialization.Model): """A list of servers. :param value: The list of servers. - :type value: list[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.Server] + :type value: list[~azure.mgmt.rdbms.mysql_flexibleservers.models.Server] :param next_link: The link used to get the next page of operations. :type next_link: str """ @@ -1157,8 +1155,7 @@ class ServerVersionCapability(msrest.serialization.Model): :ivar name: server version. :vartype name: str :ivar supported_vcores: A list of supported Vcores. - :vartype supported_vcores: - list[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.VcoreCapability] + :vartype supported_vcores: list[~azure.mgmt.rdbms.mysql_flexibleservers.models.VcoreCapability] """ _validation = { @@ -1189,7 +1186,7 @@ class Sku(msrest.serialization.Model): :type name: str :param tier: Required. The tier of the particular SKU, e.g. GeneralPurpose. Possible values include: "Burstable", "GeneralPurpose", "MemoryOptimized". - :type tier: str or ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.SkuTier + :type tier: str or ~azure.mgmt.rdbms.mysql_flexibleservers.models.SkuTier """ _validation = { @@ -1219,11 +1216,9 @@ class StorageEditionCapability(msrest.serialization.Model): :ivar name: storage edition name. :vartype name: str :ivar min_storage_size: The minimal supported storage size in MB. - :vartype min_storage_size: - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.StorageMBCapability + :vartype min_storage_size: ~azure.mgmt.rdbms.mysql_flexibleservers.models.StorageMBCapability :ivar max_storage_size: The maximum supported storage size in MB. - :vartype max_storage_size: - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.StorageMBCapability + :vartype max_storage_size: ~azure.mgmt.rdbms.mysql_flexibleservers.models.StorageMBCapability :ivar min_backup_retention_days: Minimal backup retention days. :vartype min_backup_retention_days: long :ivar max_backup_retention_days: Maximum backup retention days. @@ -1299,8 +1294,7 @@ class StorageProfile(msrest.serialization.Model): :type storage_iops: int :param storage_autogrow: Enable Storage Auto Grow. Possible values include: "Enabled", "Disabled". - :type storage_autogrow: str or - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.StorageAutogrow + :type storage_autogrow: str or ~azure.mgmt.rdbms.mysql_flexibleservers.models.StorageAutogrow """ _attribute_map = { @@ -1387,7 +1381,7 @@ class VirtualNetworkSubnetUsageResult(msrest.serialization.Model): :ivar delegated_subnets_usage: A list of delegated subnet usage. :vartype delegated_subnets_usage: - list[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.DelegatedSubnetUsage] + list[~azure.mgmt.rdbms.mysql_flexibleservers.models.DelegatedSubnetUsage] """ _validation = { diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/models/_models_py3.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/models/_models_py3.py similarity index 88% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/models/_models_py3.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/models/_models_py3.py index f9a97b85afbf..be4b93995da0 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/models/_models_py3.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/models/_models_py3.py @@ -20,8 +20,7 @@ class CapabilitiesListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: A list of supported capabilities. - :vartype value: - list[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.CapabilityProperties] + :vartype value: list[~azure.mgmt.rdbms.mysql_flexibleservers.models.CapabilityProperties] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -54,7 +53,7 @@ class CapabilityProperties(msrest.serialization.Model): :vartype zone: str :ivar supported_flexible_server_editions: A list of supported flexible server editions. :vartype supported_flexible_server_editions: - list[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ServerEditionCapability] + list[~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerEditionCapability] """ _validation = { @@ -77,17 +76,17 @@ def __init__( class Resource(msrest.serialization.Model): - """Resource. + """Common fields that are returned in the response for all Azure Resource Manager resources. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str """ @@ -118,13 +117,13 @@ class Configuration(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param value: Value of the configuration. :type value: str @@ -140,16 +139,15 @@ class Configuration(Resource): :type source: str :ivar is_read_only: If is the configuration read only. Possible values include: "True", "False". - :vartype is_read_only: str or - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.IsReadOnly + :vartype is_read_only: str or ~azure.mgmt.rdbms.mysql_flexibleservers.models.IsReadOnly :ivar is_config_pending_restart: If is the configuration pending restart or not. Possible values include: "True", "False". :vartype is_config_pending_restart: str or - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.IsConfigPendingRestart + ~azure.mgmt.rdbms.mysql_flexibleservers.models.IsConfigPendingRestart :ivar is_dynamic_config: If is the configuration dynamic. Possible values include: "True", "False". :vartype is_dynamic_config: str or - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.IsDynamicConfig + ~azure.mgmt.rdbms.mysql_flexibleservers.models.IsDynamicConfig """ _validation = { @@ -203,7 +201,7 @@ class ConfigurationListResult(msrest.serialization.Model): """A list of server configurations. :param value: The list of server configurations. - :type value: list[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.Configuration] + :type value: list[~azure.mgmt.rdbms.mysql_flexibleservers.models.Configuration] :param next_link: The link used to get the next page of operations. :type next_link: str """ @@ -230,13 +228,13 @@ class Database(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param charset: The charset of the database. :type charset: str @@ -274,7 +272,7 @@ class DatabaseListResult(msrest.serialization.Model): """A List of databases. :param value: The list of databases housed in a server. - :type value: list[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.Database] + :type value: list[~azure.mgmt.rdbms.mysql_flexibleservers.models.Database] :param next_link: The link used to get the next page of operations. :type next_link: str """ @@ -378,7 +376,7 @@ def __init__( class ErrorResponse(msrest.serialization.Model): - """The resource management error response. + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). Variables are only populated by the server, and will be ignored when sending a request. @@ -389,10 +387,10 @@ class ErrorResponse(msrest.serialization.Model): :ivar target: The error target. :vartype target: str :ivar details: The error details. - :vartype details: list[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ErrorResponse] + :vartype details: list[~azure.mgmt.rdbms.mysql_flexibleservers.models.ErrorResponse] :ivar additional_info: The error additional info. :vartype additional_info: - list[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ErrorAdditionalInfo] + list[~azure.mgmt.rdbms.mysql_flexibleservers.models.ErrorAdditionalInfo] """ _validation = { @@ -430,13 +428,13 @@ class FirewallRule(Resource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param start_ip_address: Required. The start IP address of the server firewall rule. Must be IPv4 format. @@ -478,7 +476,7 @@ class FirewallRuleListResult(msrest.serialization.Model): """A list of firewall rules. :param value: The list of firewall rules in a server. - :type value: list[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.FirewallRule] + :type value: list[~azure.mgmt.rdbms.mysql_flexibleservers.models.FirewallRule] :param next_link: The link used to get the next page of operations. :type next_link: str """ @@ -643,11 +641,12 @@ class Operation(msrest.serialization.Model): :ivar name: The name of the operation being performed on this particular object. :vartype name: str :ivar display: The localized display information for this particular operation or action. - :vartype display: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.OperationDisplay + :vartype display: ~azure.mgmt.rdbms.mysql_flexibleservers.models.OperationDisplay + :param is_data_action: Indicates whether the operation is a data action. + :type is_data_action: bool :ivar origin: The intended executor of the operation. Possible values include: "NotSpecified", "user", "system". - :vartype origin: str or - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.OperationOrigin + :vartype origin: str or ~azure.mgmt.rdbms.mysql_flexibleservers.models.OperationOrigin :ivar properties: Additional descriptions for the operation. :vartype properties: dict[str, object] """ @@ -662,17 +661,21 @@ class Operation(msrest.serialization.Model): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, 'origin': {'key': 'origin', 'type': 'str'}, 'properties': {'key': 'properties', 'type': '{object}'}, } def __init__( self, + *, + is_data_action: Optional[bool] = None, **kwargs ): super(Operation, self).__init__(**kwargs) self.name = None self.display = None + self.is_data_action = is_data_action self.origin = None self.properties = None @@ -720,36 +723,42 @@ def __init__( class OperationListResult(msrest.serialization.Model): """A list of resource provider operations. - :param value: The list of resource provider operations. - :type value: list[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.Operation] + :param value: Collection of available operation details. + :type value: list[~azure.mgmt.rdbms.mysql_flexibleservers.models.Operation] + :param next_link: URL client should use to fetch the next page (per server side paging). + It's null for now, added for future use. + :type next_link: str """ _attribute_map = { 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, } def __init__( self, *, value: Optional[List["Operation"]] = None, + next_link: Optional[str] = None, **kwargs ): super(OperationListResult, self).__init__(**kwargs) self.value = value + self.next_link = next_link class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have everything other than required location and tags. + """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str """ @@ -773,19 +782,19 @@ def __init__( class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. + """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] @@ -827,22 +836,22 @@ class Server(TrackedResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param location: Required. The geo-location where the resource lives. :type location: str :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.Identity + :type identity: ~azure.mgmt.rdbms.mysql_flexibleservers.models.Identity :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.Sku + :type sku: ~azure.mgmt.rdbms.mysql_flexibleservers.models.Sku :param administrator_login: The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). :type administrator_login: str @@ -850,32 +859,29 @@ class Server(TrackedResource): server creation). :type administrator_login_password: str :param version: Server version. Possible values include: "5.7". - :type version: str or ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.mysql_flexibleservers.models.SslEnforcementEnum :param infrastructure_encryption: Status showing whether the server enabled infrastructure encryption. Possible values include: "Enabled", "Disabled". :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.InfrastructureEncryptionEnum + ~azure.mgmt.rdbms.mysql_flexibleservers.models.InfrastructureEncryptionEnum :ivar state: The state of a server. Possible values include: "Ready", "Dropping", "Disabled", "Starting", "Stopping", "Stopped", "Updating". - :vartype state: str or ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ServerState + :vartype state: str or ~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerState :ivar ha_state: The state of a HA server. Possible values include: "NotEnabled", "CreatingStandby", "ReplicatingData", "FailingOver", "Healthy", "RemovingStandby". - :vartype ha_state: str or - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ServerHAState + :vartype ha_state: str or ~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerHAState :param ha_enabled: Enable HA or not for a server. Possible values include: "Enabled", "Disabled". - :type ha_enabled: str or - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.HaEnabledEnum + :type ha_enabled: str or ~azure.mgmt.rdbms.mysql_flexibleservers.models.HaEnabledEnum :ivar fully_qualified_domain_name: The fully qualified domain name of a server. :vartype fully_qualified_domain_name: str :ivar earliest_restore_date: Earliest restore point creation time (ISO8601 format). :vartype earliest_restore_date: ~datetime.datetime :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.mysql_flexibleservers.models.StorageProfile :param replication_role: The replication role. :type replication_role: str :ivar replica_capacity: The maximum number of replicas that a primary server can have. @@ -884,10 +890,9 @@ class Server(TrackedResource): Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". :vartype public_network_access: str or - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.PublicNetworkAccessEnum + ~azure.mgmt.rdbms.mysql_flexibleservers.models.PublicNetworkAccessEnum :param maintenance_window: Maintenance window of a server. - :type maintenance_window: - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.MaintenanceWindow + :type maintenance_window: ~azure.mgmt.rdbms.mysql_flexibleservers.models.MaintenanceWindow :param source_server_id: The source MySQL server id. :type source_server_id: str :param restore_point_in_time: Restore point creation time (ISO8601 format), specifying the time @@ -902,10 +907,10 @@ class Server(TrackedResource): :vartype byok_enforcement: str :param delegated_subnet_arguments: Delegated subnet arguments. :type delegated_subnet_arguments: - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.DelegatedSubnetArguments + ~azure.mgmt.rdbms.mysql_flexibleservers.models.DelegatedSubnetArguments :param create_mode: The mode to create a new MySQL server. Possible values include: "Default", "PointInTimeRestore", "Replica". - :type create_mode: str or ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.CreateMode + :type create_mode: str or ~azure.mgmt.rdbms.mysql_flexibleservers.models.CreateMode :param tags_properties_tags: Application-specific metadata in the form of key-value pairs. :type tags_properties_tags: dict[str, str] """ @@ -1019,10 +1024,10 @@ class ServerEditionCapability(msrest.serialization.Model): :vartype name: str :ivar supported_storage_editions: A list of supported storage editions. :vartype supported_storage_editions: - list[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.StorageEditionCapability] + list[~azure.mgmt.rdbms.mysql_flexibleservers.models.StorageEditionCapability] :ivar supported_server_versions: A list of supported server versions. :vartype supported_server_versions: - list[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ServerVersionCapability] + list[~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerVersionCapability] """ _validation = { @@ -1051,27 +1056,24 @@ class ServerForUpdate(msrest.serialization.Model): """Parameters allowed to update for a server. :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.Sku + :type sku: ~azure.mgmt.rdbms.mysql_flexibleservers.models.Sku :param tags: A set of tags. Application-specific metadata in the form of key-value pairs. :type tags: dict[str, str] :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.mysql_flexibleservers.models.StorageProfile :param administrator_login_password: The password of the administrator login. :type administrator_login_password: str :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.mysql_flexibleservers.models.SslEnforcementEnum :param delegated_subnet_arguments: Delegated subnet arguments. :type delegated_subnet_arguments: - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.DelegatedSubnetArguments + ~azure.mgmt.rdbms.mysql_flexibleservers.models.DelegatedSubnetArguments :param ha_enabled: Enable HA or not for a server. Possible values include: "Enabled", "Disabled". - :type ha_enabled: str or - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.HaEnabledEnum + :type ha_enabled: str or ~azure.mgmt.rdbms.mysql_flexibleservers.models.HaEnabledEnum :param maintenance_window: Maintenance window of a server. - :type maintenance_window: - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.MaintenanceWindow + :type maintenance_window: ~azure.mgmt.rdbms.mysql_flexibleservers.models.MaintenanceWindow :param replication_role: The replication role of the server. :type replication_role: str """ @@ -1119,20 +1121,19 @@ class ServerKey(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar kind: Kind of encryption protector used to protect the key. :vartype kind: str :param server_key_type: The key type like 'AzureKeyVault'. Possible values include: "AzureKeyVault". - :type server_key_type: str or - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ServerKeyType + :type server_key_type: str or ~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerKeyType :param uri: The URI of the key. :type uri: str :ivar creation_date: The key creation date. @@ -1177,7 +1178,7 @@ class ServerKeyListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: A list of MySQL Server keys. - :vartype value: list[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ServerKey] + :vartype value: list[~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerKey] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -1205,7 +1206,7 @@ class ServerListResult(msrest.serialization.Model): """A list of servers. :param value: The list of servers. - :type value: list[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.Server] + :type value: list[~azure.mgmt.rdbms.mysql_flexibleservers.models.Server] :param next_link: The link used to get the next page of operations. :type next_link: str """ @@ -1235,8 +1236,7 @@ class ServerVersionCapability(msrest.serialization.Model): :ivar name: server version. :vartype name: str :ivar supported_vcores: A list of supported Vcores. - :vartype supported_vcores: - list[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.VcoreCapability] + :vartype supported_vcores: list[~azure.mgmt.rdbms.mysql_flexibleservers.models.VcoreCapability] """ _validation = { @@ -1267,7 +1267,7 @@ class Sku(msrest.serialization.Model): :type name: str :param tier: Required. The tier of the particular SKU, e.g. GeneralPurpose. Possible values include: "Burstable", "GeneralPurpose", "MemoryOptimized". - :type tier: str or ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.SkuTier + :type tier: str or ~azure.mgmt.rdbms.mysql_flexibleservers.models.SkuTier """ _validation = { @@ -1300,11 +1300,9 @@ class StorageEditionCapability(msrest.serialization.Model): :ivar name: storage edition name. :vartype name: str :ivar min_storage_size: The minimal supported storage size in MB. - :vartype min_storage_size: - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.StorageMBCapability + :vartype min_storage_size: ~azure.mgmt.rdbms.mysql_flexibleservers.models.StorageMBCapability :ivar max_storage_size: The maximum supported storage size in MB. - :vartype max_storage_size: - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.StorageMBCapability + :vartype max_storage_size: ~azure.mgmt.rdbms.mysql_flexibleservers.models.StorageMBCapability :ivar min_backup_retention_days: Minimal backup retention days. :vartype min_backup_retention_days: long :ivar max_backup_retention_days: Maximum backup retention days. @@ -1380,8 +1378,7 @@ class StorageProfile(msrest.serialization.Model): :type storage_iops: int :param storage_autogrow: Enable Storage Auto Grow. Possible values include: "Enabled", "Disabled". - :type storage_autogrow: str or - ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.StorageAutogrow + :type storage_autogrow: str or ~azure.mgmt.rdbms.mysql_flexibleservers.models.StorageAutogrow """ _attribute_map = { @@ -1475,7 +1472,7 @@ class VirtualNetworkSubnetUsageResult(msrest.serialization.Model): :ivar delegated_subnets_usage: A list of delegated subnet usage. :vartype delegated_subnets_usage: - list[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.DelegatedSubnetUsage] + list[~azure.mgmt.rdbms.mysql_flexibleservers.models.DelegatedSubnetUsage] """ _validation = { diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/models/_my_sql_management_client_enums.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/models/_my_sql_management_client_enums.py similarity index 100% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/models/_my_sql_management_client_enums.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/models/_my_sql_management_client_enums.py diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/operations/__init__.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/operations/__init__.py similarity index 100% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/operations/__init__.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/operations/__init__.py diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/operations/_check_name_availability_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/operations/_check_name_availability_operations.py similarity index 89% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/operations/_check_name_availability_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/operations/_check_name_availability_operations.py index 85ff69b43647..6b257aafebb3 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/operations/_check_name_availability_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/operations/_check_name_availability_operations.py @@ -13,7 +13,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -29,14 +29,14 @@ class CheckNameAvailabilityOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models + :type models: ~azure.mgmt.rdbms.mysql_flexibleservers.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -46,26 +46,26 @@ def __init__(self, client, config, serializer, deserializer): def execute( self, - name_availability_request, # type: "models.NameAvailabilityRequest" + name_availability_request, # type: "_models.NameAvailabilityRequest" **kwargs # type: Any ): - # type: (...) -> "models.NameAvailability" + # type: (...) -> "_models.NameAvailability" """Check the availability of name for server. :param name_availability_request: The required parameters for checking if server name is available. - :type name_availability_request: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.NameAvailabilityRequest + :type name_availability_request: ~azure.mgmt.rdbms.mysql_flexibleservers.models.NameAvailabilityRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: NameAvailability, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.NameAvailability + :rtype: ~azure.mgmt.rdbms.mysql_flexibleservers.models.NameAvailability :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.NameAvailability"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NameAvailability"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/operations/_check_virtual_network_subnet_usage_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/operations/_check_virtual_network_subnet_usage_operations.py similarity index 88% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/operations/_check_virtual_network_subnet_usage_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/operations/_check_virtual_network_subnet_usage_operations.py index 66cf4f08b5cb..3874dca395d1 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/operations/_check_virtual_network_subnet_usage_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/operations/_check_virtual_network_subnet_usage_operations.py @@ -13,7 +13,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -29,14 +29,14 @@ class CheckVirtualNetworkSubnetUsageOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models + :type models: ~azure.mgmt.rdbms.mysql_flexibleservers.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -47,27 +47,27 @@ def __init__(self, client, config, serializer, deserializer): def execute( self, location_name, # type: str - parameters, # type: "models.VirtualNetworkSubnetUsageParameter" + parameters, # type: "_models.VirtualNetworkSubnetUsageParameter" **kwargs # type: Any ): - # type: (...) -> "models.VirtualNetworkSubnetUsageResult" + # type: (...) -> "_models.VirtualNetworkSubnetUsageResult" """Get virtual network subnet usage for a given vNet resource id. :param location_name: The name of the location. :type location_name: str :param parameters: The required parameters for creating or updating a server. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.VirtualNetworkSubnetUsageParameter + :type parameters: ~azure.mgmt.rdbms.mysql_flexibleservers.models.VirtualNetworkSubnetUsageParameter :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualNetworkSubnetUsageResult, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.VirtualNetworkSubnetUsageResult + :rtype: ~azure.mgmt.rdbms.mysql_flexibleservers.models.VirtualNetworkSubnetUsageResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.VirtualNetworkSubnetUsageResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkSubnetUsageResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/operations/_configurations_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/operations/_configurations_operations.py similarity index 92% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/operations/_configurations_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/operations/_configurations_operations.py index 53404caf249c..2e730917ee4b 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/operations/_configurations_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/operations/_configurations_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -32,14 +32,14 @@ class ConfigurationsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models + :type models: ~azure.mgmt.rdbms.mysql_flexibleservers.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,16 +52,16 @@ def _update_initial( resource_group_name, # type: str server_name, # type: str configuration_name, # type: str - parameters, # type: "models.Configuration" + parameters, # type: "_models.Configuration" **kwargs # type: Any ): - # type: (...) -> Optional["models.Configuration"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Configuration"]] + # type: (...) -> Optional["_models.Configuration"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Configuration"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -110,10 +110,10 @@ def begin_update( resource_group_name, # type: str server_name, # type: str configuration_name, # type: str - parameters, # type: "models.Configuration" + parameters, # type: "_models.Configuration" **kwargs # type: Any ): - # type: (...) -> LROPoller["models.Configuration"] + # type: (...) -> LROPoller["_models.Configuration"] """Updates a configuration of a server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -123,7 +123,7 @@ def begin_update( :param configuration_name: The name of the server configuration. :type configuration_name: str :param parameters: The required parameters for updating a server configuration. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.Configuration + :type parameters: ~azure.mgmt.rdbms.mysql_flexibleservers.models.Configuration :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: True for ARMPolling, False for no polling, or a @@ -131,11 +131,11 @@ def begin_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Configuration or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.Configuration] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql_flexibleservers.models.Configuration] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.Configuration"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Configuration"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -189,7 +189,7 @@ def get( configuration_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.Configuration" + # type: (...) -> "_models.Configuration" """Gets information about a configuration of server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -200,15 +200,15 @@ def get( :type configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Configuration, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.Configuration + :rtype: ~azure.mgmt.rdbms.mysql_flexibleservers.models.Configuration :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Configuration"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Configuration"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" # Construct URL @@ -251,7 +251,7 @@ def list_by_server( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.ConfigurationListResult"] + # type: (...) -> Iterable["_models.ConfigurationListResult"] """List all the configurations in a given server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -260,15 +260,15 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ConfigurationListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ConfigurationListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql_flexibleservers.models.ConfigurationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ConfigurationListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfigurationListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/operations/_databases_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/operations/_databases_operations.py similarity index 94% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/operations/_databases_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/operations/_databases_operations.py index ea6a4f670d29..9eecba158fa4 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/operations/_databases_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/operations/_databases_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -32,14 +32,14 @@ class DatabasesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models + :type models: ~azure.mgmt.rdbms.mysql_flexibleservers.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,16 +52,16 @@ def _create_or_update_initial( resource_group_name, # type: str server_name, # type: str database_name, # type: str - parameters, # type: "models.Database" + parameters, # type: "_models.Database" **kwargs # type: Any ): - # type: (...) -> Optional["models.Database"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Database"]] + # type: (...) -> Optional["_models.Database"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Database"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -113,10 +113,10 @@ def begin_create_or_update( resource_group_name, # type: str server_name, # type: str database_name, # type: str - parameters, # type: "models.Database" + parameters, # type: "_models.Database" **kwargs # type: Any ): - # type: (...) -> LROPoller["models.Database"] + # type: (...) -> LROPoller["_models.Database"] """Creates a new database or updates an existing database. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -126,7 +126,7 @@ def begin_create_or_update( :param database_name: The name of the database. :type database_name: str :param parameters: The required parameters for creating or updating a database. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.Database + :type parameters: ~azure.mgmt.rdbms.mysql_flexibleservers.models.Database :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: True for ARMPolling, False for no polling, or a @@ -134,11 +134,11 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Database or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.Database] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql_flexibleservers.models.Database] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.Database"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Database"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -198,7 +198,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" # Construct URL @@ -309,7 +309,7 @@ def get( database_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.Database" + # type: (...) -> "_models.Database" """Gets information about a database. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -320,15 +320,15 @@ def get( :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Database, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.Database + :rtype: ~azure.mgmt.rdbms.mysql_flexibleservers.models.Database :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Database"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Database"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" # Construct URL @@ -371,7 +371,7 @@ def list_by_server( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.DatabaseListResult"] + # type: (...) -> Iterable["_models.DatabaseListResult"] """List all the databases in a given server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -380,15 +380,15 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DatabaseListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.DatabaseListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql_flexibleservers.models.DatabaseListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.DatabaseListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/operations/_firewall_rules_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/operations/_firewall_rules_operations.py similarity index 94% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/operations/_firewall_rules_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/operations/_firewall_rules_operations.py index 460e58e60c56..1b1c0a36f360 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/operations/_firewall_rules_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/operations/_firewall_rules_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -32,14 +32,14 @@ class FirewallRulesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models + :type models: ~azure.mgmt.rdbms.mysql_flexibleservers.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,16 +52,16 @@ def _create_or_update_initial( resource_group_name, # type: str server_name, # type: str firewall_rule_name, # type: str - parameters, # type: "models.FirewallRule" + parameters, # type: "_models.FirewallRule" **kwargs # type: Any ): - # type: (...) -> Optional["models.FirewallRule"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.FirewallRule"]] + # type: (...) -> Optional["_models.FirewallRule"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.FirewallRule"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -113,10 +113,10 @@ def begin_create_or_update( resource_group_name, # type: str server_name, # type: str firewall_rule_name, # type: str - parameters, # type: "models.FirewallRule" + parameters, # type: "_models.FirewallRule" **kwargs # type: Any ): - # type: (...) -> LROPoller["models.FirewallRule"] + # type: (...) -> LROPoller["_models.FirewallRule"] """Creates a new firewall rule or updates an existing firewall rule. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -126,7 +126,7 @@ def begin_create_or_update( :param firewall_rule_name: The name of the server firewall rule. :type firewall_rule_name: str :param parameters: The required parameters for creating or updating a firewall rule. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.FirewallRule + :type parameters: ~azure.mgmt.rdbms.mysql_flexibleservers.models.FirewallRule :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: True for ARMPolling, False for no polling, or a @@ -134,11 +134,11 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either FirewallRule or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.FirewallRule] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql_flexibleservers.models.FirewallRule] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.FirewallRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRule"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -198,7 +198,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" # Construct URL @@ -309,7 +309,7 @@ def get( firewall_rule_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.FirewallRule" + # type: (...) -> "_models.FirewallRule" """Gets information about a server firewall rule. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -320,15 +320,15 @@ def get( :type firewall_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: FirewallRule, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.FirewallRule + :rtype: ~azure.mgmt.rdbms.mysql_flexibleservers.models.FirewallRule :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.FirewallRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRule"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" # Construct URL @@ -371,7 +371,7 @@ def list_by_server( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.FirewallRuleListResult"] + # type: (...) -> Iterable["_models.FirewallRuleListResult"] """List all the firewall rules in a given server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -380,15 +380,15 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either FirewallRuleListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.FirewallRuleListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql_flexibleservers.models.FirewallRuleListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.FirewallRuleListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRuleListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/operations/_location_based_capabilities_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/operations/_location_based_capabilities_operations.py similarity index 92% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/operations/_location_based_capabilities_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/operations/_location_based_capabilities_operations.py index c29a48d35138..c95f11f42a3c 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/operations/_location_based_capabilities_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/operations/_location_based_capabilities_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -30,14 +30,14 @@ class LocationBasedCapabilitiesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models + :type models: ~azure.mgmt.rdbms.mysql_flexibleservers.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -50,22 +50,22 @@ def list( location_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.CapabilitiesListResult"] + # type: (...) -> Iterable["_models.CapabilitiesListResult"] """Get capabilities at specified location in a given subscription. :param location_name: The name of the location. :type location_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CapabilitiesListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.CapabilitiesListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql_flexibleservers.models.CapabilitiesListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.CapabilitiesListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CapabilitiesListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/operations/_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/operations/_operations.py similarity index 89% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/operations/_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/operations/_operations.py index 835da2fc0ccb..0a7f8fd49de3 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/operations/_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/operations/_operations.py @@ -13,7 +13,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -29,14 +29,14 @@ class Operations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models + :type models: ~azure.mgmt.rdbms.mysql_flexibleservers.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -48,20 +48,20 @@ def list( self, **kwargs # type: Any ): - # type: (...) -> "models.OperationListResult" + # type: (...) -> "_models.OperationListResult" """Lists all of the available REST API operations. :keyword callable cls: A custom type or function that will be passed the direct response :return: OperationListResult, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.OperationListResult + :rtype: ~azure.mgmt.rdbms.mysql_flexibleservers.models.OperationListResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.OperationListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" # Construct URL diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/operations/_replicas_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/operations/_replicas_operations.py similarity index 93% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/operations/_replicas_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/operations/_replicas_operations.py index 0eebcce0b1f7..757bae942b2d 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/operations/_replicas_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/operations/_replicas_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -30,14 +30,14 @@ class ReplicasOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models + :type models: ~azure.mgmt.rdbms.mysql_flexibleservers.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -51,7 +51,7 @@ def list_by_server( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.ServerListResult"] + # type: (...) -> Iterable["_models.ServerListResult"] """List all the replicas for a given server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -60,15 +60,15 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ServerListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/operations/_server_keys_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/operations/_server_keys_operations.py similarity index 94% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/operations/_server_keys_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/operations/_server_keys_operations.py index 90a22c440147..4902d7fc3e48 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/operations/_server_keys_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/operations/_server_keys_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -32,14 +32,14 @@ class ServerKeysOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models + :type models: ~azure.mgmt.rdbms.mysql_flexibleservers.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,16 +52,16 @@ def _create_or_update_initial( resource_group_name, # type: str server_name, # type: str key_name, # type: str - parameters, # type: "models.ServerKey" + parameters, # type: "_models.ServerKey" **kwargs # type: Any ): - # type: (...) -> Optional["models.ServerKey"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.ServerKey"]] + # type: (...) -> Optional["_models.ServerKey"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ServerKey"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -113,10 +113,10 @@ def begin_create_or_update( resource_group_name, # type: str server_name, # type: str key_name, # type: str - parameters, # type: "models.ServerKey" + parameters, # type: "_models.ServerKey" **kwargs # type: Any ): - # type: (...) -> LROPoller["models.ServerKey"] + # type: (...) -> LROPoller["_models.ServerKey"] """Creates or updates a MySQL Server key. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -126,7 +126,7 @@ def begin_create_or_update( :param key_name: The name of the server key. :type key_name: str :param parameters: The requested MySQL Server key resource state. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ServerKey + :type parameters: ~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerKey :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: True for ARMPolling, False for no polling, or a @@ -134,11 +134,11 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ServerKey or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ServerKey] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerKey] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerKey"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerKey"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -198,7 +198,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" # Construct URL @@ -309,7 +309,7 @@ def get( key_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.ServerKey" + # type: (...) -> "_models.ServerKey" """Gets a server key. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -320,15 +320,15 @@ def get( :type key_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ServerKey, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ServerKey + :rtype: ~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerKey :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerKey"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerKey"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" # Construct URL @@ -371,7 +371,7 @@ def list_by_server( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.ServerKeyListResult"] + # type: (...) -> Iterable["_models.ServerKeyListResult"] """Gets a list of Server keys. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -380,15 +380,15 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerKeyListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ServerKeyListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerKeyListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerKeyListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerKeyListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/operations/_servers_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/operations/_servers_operations.py similarity index 95% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/operations/_servers_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/operations/_servers_operations.py index 50b111ea50da..e3b253f666ea 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/operations/_servers_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/operations/_servers_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -32,14 +32,14 @@ class ServersOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models + :type models: ~azure.mgmt.rdbms.mysql_flexibleservers.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -51,16 +51,16 @@ def _create_initial( self, resource_group_name, # type: str server_name, # type: str - parameters, # type: "models.Server" + parameters, # type: "_models.Server" **kwargs # type: Any ): - # type: (...) -> Optional["models.Server"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Server"]] + # type: (...) -> Optional["_models.Server"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Server"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -110,10 +110,10 @@ def begin_create( self, resource_group_name, # type: str server_name, # type: str - parameters, # type: "models.Server" + parameters, # type: "_models.Server" **kwargs # type: Any ): - # type: (...) -> LROPoller["models.Server"] + # type: (...) -> LROPoller["_models.Server"] """Creates a new server or updates an existing server. The update action will overwrite the existing server. @@ -122,7 +122,7 @@ def begin_create( :param server_name: The name of the server. :type server_name: str :param parameters: The required parameters for creating or updating a server. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.Server + :type parameters: ~azure.mgmt.rdbms.mysql_flexibleservers.models.Server :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: True for ARMPolling, False for no polling, or a @@ -130,11 +130,11 @@ def begin_create( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Server or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.Server] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql_flexibleservers.models.Server] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.Server"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Server"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -183,16 +183,16 @@ def _update_initial( self, resource_group_name, # type: str server_name, # type: str - parameters, # type: "models.ServerForUpdate" + parameters, # type: "_models.ServerForUpdate" **kwargs # type: Any ): - # type: (...) -> Optional["models.Server"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Server"]] + # type: (...) -> Optional["_models.Server"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Server"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -239,10 +239,10 @@ def begin_update( self, resource_group_name, # type: str server_name, # type: str - parameters, # type: "models.ServerForUpdate" + parameters, # type: "_models.ServerForUpdate" **kwargs # type: Any ): - # type: (...) -> LROPoller["models.Server"] + # type: (...) -> LROPoller["_models.Server"] """Updates an existing server. The request body can contain one to many of the properties present in the normal server definition. @@ -251,7 +251,7 @@ def begin_update( :param server_name: The name of the server. :type server_name: str :param parameters: The required parameters for updating a server. - :type parameters: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ServerForUpdate + :type parameters: ~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerForUpdate :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: True for ARMPolling, False for no polling, or a @@ -259,11 +259,11 @@ def begin_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Server or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.Server] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.mysql_flexibleservers.models.Server] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.Server"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Server"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -320,7 +320,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" # Construct URL @@ -424,7 +424,7 @@ def get( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.Server" + # type: (...) -> "_models.Server" """Gets information about a server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -433,15 +433,15 @@ def get( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Server, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.Server + :rtype: ~azure.mgmt.rdbms.mysql_flexibleservers.models.Server :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Server"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Server"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" # Construct URL @@ -482,22 +482,22 @@ def list_by_resource_group( resource_group_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.ServerListResult"] + # type: (...) -> Iterable["_models.ServerListResult"] """List all the servers in a given resource group. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ServerListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -552,20 +552,20 @@ def list( self, **kwargs # type: Any ): - # type: (...) -> Iterable["models.ServerListResult"] + # type: (...) -> Iterable["_models.ServerListResult"] """List all the servers in a given subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql.v2020_07_01_privatepreview.models.ServerListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.mysql_flexibleservers.models.ServerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -627,7 +627,7 @@ def _restart_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" # Construct URL @@ -737,7 +737,7 @@ def _start_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" # Construct URL @@ -847,7 +847,7 @@ def _stop_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-07-01-privatepreview" + api_version = "2020-07-01-preview" accept = "application/json" # Construct URL diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/py.typed b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/py.typed similarity index 100% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_01_01/py.typed rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/py.typed diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/_configuration.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/_configuration.py index b54a053cf1ee..5814a5d237a1 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/_configuration.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/_configuration.py @@ -1,21 +1,24 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any + +from typing import TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy -from ._version import VERSION +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential +VERSION = "unknown" class PostgreSQLManagementClientConfiguration(Configuration): """Configuration for PostgreSQLManagementClient. @@ -45,7 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'azure-mgmt-rdbms/{}'.format(VERSION)) + kwargs.setdefault('sdk_moniker', 'mgmt-rdbms/{}'.format(VERSION)) self._configure(**kwargs) def _configure( diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/_postgre_sql_management_client.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/_postgre_sql_management_client.py index fb13b72f8425..ce4249179b76 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/_postgre_sql_management_client.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/_postgre_sql_management_client.py @@ -1,337 +1,155 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + from azure.mgmt.core import ARMPipelineClient -from msrest import Serializer, Deserializer +from msrest import Deserializer, Serializer -from azure.profiles import KnownProfiles, ProfileDefinition -from azure.profiles.multiapiclient import MultiApiClientMixin -from ._configuration import PostgreSQLManagementClientConfiguration +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional -class _SDKClient(object): - def __init__(self, *args, **kwargs): - """This is a fake class to support current implemetation of MultiApiClientMixin." - Will be removed in final version of multiapi azure-core based client - """ - pass + from azure.core.credentials import TokenCredential -class PostgreSQLManagementClient(MultiApiClientMixin, _SDKClient): +from ._configuration import PostgreSQLManagementClientConfiguration +from .operations import ServersOperations +from .operations import ReplicasOperations +from .operations import FirewallRulesOperations +from .operations import VirtualNetworkRulesOperations +from .operations import DatabasesOperations +from .operations import ConfigurationsOperations +from .operations import ServerParametersOperations +from .operations import LogFilesOperations +from .operations import ServerAdministratorsOperations +from .operations import RecoverableServersOperations +from .operations import ServerBasedPerformanceTierOperations +from .operations import LocationBasedPerformanceTierOperations +from .operations import CheckNameAvailabilityOperations +from .operations import Operations +from .operations import ServerSecurityAlertPoliciesOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations +from .operations import ServerKeysOperations +from . import models + + +class PostgreSQLManagementClient(object): """The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model. - This ready contains multiple API versions, to help you deal with all of the Azure clouds - (Azure Stack, Azure Government, Azure China, etc.). - By default, it uses the latest API version available on public Azure. - For production, you should stick to a particular api-version and/or profile. - The profile sets a mapping between an operation group and its API version. - The api-version parameter sets the default API version if the operation - group is not described in the profile. - + :ivar servers: ServersOperations operations + :vartype servers: azure.mgmt.rdbms.postgresql.operations.ServersOperations + :ivar replicas: ReplicasOperations operations + :vartype replicas: azure.mgmt.rdbms.postgresql.operations.ReplicasOperations + :ivar firewall_rules: FirewallRulesOperations operations + :vartype firewall_rules: azure.mgmt.rdbms.postgresql.operations.FirewallRulesOperations + :ivar virtual_network_rules: VirtualNetworkRulesOperations operations + :vartype virtual_network_rules: azure.mgmt.rdbms.postgresql.operations.VirtualNetworkRulesOperations + :ivar databases: DatabasesOperations operations + :vartype databases: azure.mgmt.rdbms.postgresql.operations.DatabasesOperations + :ivar configurations: ConfigurationsOperations operations + :vartype configurations: azure.mgmt.rdbms.postgresql.operations.ConfigurationsOperations + :ivar server_parameters: ServerParametersOperations operations + :vartype server_parameters: azure.mgmt.rdbms.postgresql.operations.ServerParametersOperations + :ivar log_files: LogFilesOperations operations + :vartype log_files: azure.mgmt.rdbms.postgresql.operations.LogFilesOperations + :ivar server_administrators: ServerAdministratorsOperations operations + :vartype server_administrators: azure.mgmt.rdbms.postgresql.operations.ServerAdministratorsOperations + :ivar recoverable_servers: RecoverableServersOperations operations + :vartype recoverable_servers: azure.mgmt.rdbms.postgresql.operations.RecoverableServersOperations + :ivar server_based_performance_tier: ServerBasedPerformanceTierOperations operations + :vartype server_based_performance_tier: azure.mgmt.rdbms.postgresql.operations.ServerBasedPerformanceTierOperations + :ivar location_based_performance_tier: LocationBasedPerformanceTierOperations operations + :vartype location_based_performance_tier: azure.mgmt.rdbms.postgresql.operations.LocationBasedPerformanceTierOperations + :ivar check_name_availability: CheckNameAvailabilityOperations operations + :vartype check_name_availability: azure.mgmt.rdbms.postgresql.operations.CheckNameAvailabilityOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.rdbms.postgresql.operations.Operations + :ivar server_security_alert_policies: ServerSecurityAlertPoliciesOperations operations + :vartype server_security_alert_policies: azure.mgmt.rdbms.postgresql.operations.ServerSecurityAlertPoliciesOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: azure.mgmt.rdbms.postgresql.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: azure.mgmt.rdbms.postgresql.operations.PrivateLinkResourcesOperations + :ivar server_keys: ServerKeysOperations operations + :vartype server_keys: azure.mgmt.rdbms.postgresql.operations.ServerKeysOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. :type subscription_id: str - :param str api_version: API version to use if no profile is provided, or if - missing in profile. :param str base_url: Service URL - :param profile: A profile definition, from KnownProfiles to dict. - :type profile: azure.profiles.KnownProfiles :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ - DEFAULT_API_VERSION = '2020-01-01' - _PROFILE_TAG = "azure.mgmt.rdbms.PostgreSQLManagementClient" - LATEST_PROFILE = ProfileDefinition({ - _PROFILE_TAG: { - None: DEFAULT_API_VERSION, - }}, - _PROFILE_TAG + " latest" - ) - def __init__( self, credential, # type: "TokenCredential" subscription_id, # type: str - api_version=None, - base_url=None, - profile=KnownProfiles.default, + base_url=None, # type: Optional[str] **kwargs # type: Any ): + # type: (...) -> None if not base_url: base_url = 'https://management.azure.com' self._config = PostgreSQLManagementClientConfiguration(credential, subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) - super(PostgreSQLManagementClient, self).__init__( - api_version=api_version, - profile=profile - ) - - @classmethod - def _models_dict(cls, api_version): - return {k: v for k, v in cls.models(api_version).__dict__.items() if isinstance(v, type)} - - @classmethod - def models(cls, api_version=DEFAULT_API_VERSION): - """Module depends on the API version: - - * 2020-01-01: :mod:`v2020_01_01.models` - * 2020-02-14-preview: :mod:`v2020_02_14_preview.models` - """ - if api_version == '2020-01-01': - from .v2020_01_01 import models - return models - elif api_version == '2020-02-14-preview': - from .v2020_02_14_preview import models - return models - raise ValueError("API version {} is not available".format(api_version)) - - @property - def check_name_availability(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`CheckNameAvailabilityOperations` - * 2020-02-14-preview: :class:`CheckNameAvailabilityOperations` - """ - api_version = self._get_api_version('check_name_availability') - if api_version == '2020-01-01': - from .v2020_01_01.operations import CheckNameAvailabilityOperations as OperationClass - elif api_version == '2020-02-14-preview': - from .v2020_02_14_preview.operations import CheckNameAvailabilityOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'check_name_availability'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def configurations(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`ConfigurationsOperations` - * 2020-02-14-preview: :class:`ConfigurationsOperations` - """ - api_version = self._get_api_version('configurations') - if api_version == '2020-01-01': - from .v2020_01_01.operations import ConfigurationsOperations as OperationClass - elif api_version == '2020-02-14-preview': - from .v2020_02_14_preview.operations import ConfigurationsOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'configurations'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def databases(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`DatabasesOperations` - """ - api_version = self._get_api_version('databases') - if api_version == '2020-01-01': - from .v2020_01_01.operations import DatabasesOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'databases'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def firewall_rules(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`FirewallRulesOperations` - * 2020-02-14-preview: :class:`FirewallRulesOperations` - """ - api_version = self._get_api_version('firewall_rules') - if api_version == '2020-01-01': - from .v2020_01_01.operations import FirewallRulesOperations as OperationClass - elif api_version == '2020-02-14-preview': - from .v2020_02_14_preview.operations import FirewallRulesOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'firewall_rules'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def location_based_capabilities(self): - """Instance depends on the API version: - - * 2020-02-14-preview: :class:`LocationBasedCapabilitiesOperations` - """ - api_version = self._get_api_version('location_based_capabilities') - if api_version == '2020-02-14-preview': - from .v2020_02_14_preview.operations import LocationBasedCapabilitiesOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'location_based_capabilities'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def location_based_performance_tier(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`LocationBasedPerformanceTierOperations` - """ - api_version = self._get_api_version('location_based_performance_tier') - if api_version == '2020-01-01': - from .v2020_01_01.operations import LocationBasedPerformanceTierOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'location_based_performance_tier'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def log_files(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`LogFilesOperations` - """ - api_version = self._get_api_version('log_files') - if api_version == '2020-01-01': - from .v2020_01_01.operations import LogFilesOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'log_files'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - @property - def operations(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`Operations` - * 2020-02-14-preview: :class:`Operations` - """ - api_version = self._get_api_version('operations') - if api_version == '2020-01-01': - from .v2020_01_01.operations import Operations as OperationClass - elif api_version == '2020-02-14-preview': - from .v2020_02_14_preview.operations import Operations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def private_endpoint_connections(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`PrivateEndpointConnectionsOperations` - """ - api_version = self._get_api_version('private_endpoint_connections') - if api_version == '2020-01-01': - from .v2020_01_01.operations import PrivateEndpointConnectionsOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def private_link_resources(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`PrivateLinkResourcesOperations` - """ - api_version = self._get_api_version('private_link_resources') - if api_version == '2020-01-01': - from .v2020_01_01.operations import PrivateLinkResourcesOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'private_link_resources'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def replicas(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`ReplicasOperations` - """ - api_version = self._get_api_version('replicas') - if api_version == '2020-01-01': - from .v2020_01_01.operations import ReplicasOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'replicas'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def server_administrators(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`ServerAdministratorsOperations` - """ - api_version = self._get_api_version('server_administrators') - if api_version == '2020-01-01': - from .v2020_01_01.operations import ServerAdministratorsOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'server_administrators'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def server_keys(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`ServerKeysOperations` - """ - api_version = self._get_api_version('server_keys') - if api_version == '2020-01-01': - from .v2020_01_01.operations import ServerKeysOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'server_keys'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def server_security_alert_policies(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`ServerSecurityAlertPoliciesOperations` - """ - api_version = self._get_api_version('server_security_alert_policies') - if api_version == '2020-01-01': - from .v2020_01_01.operations import ServerSecurityAlertPoliciesOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'server_security_alert_policies'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def servers(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`ServersOperations` - * 2020-02-14-preview: :class:`ServersOperations` - """ - api_version = self._get_api_version('servers') - if api_version == '2020-01-01': - from .v2020_01_01.operations import ServersOperations as OperationClass - elif api_version == '2020-02-14-preview': - from .v2020_02_14_preview.operations import ServersOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'servers'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def virtual_network_rules(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`VirtualNetworkRulesOperations` - """ - api_version = self._get_api_version('virtual_network_rules') - if api_version == '2020-01-01': - from .v2020_01_01.operations import VirtualNetworkRulesOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'virtual_network_rules'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def virtual_network_subnet_usage(self): - """Instance depends on the API version: - - * 2020-02-14-preview: :class:`VirtualNetworkSubnetUsageOperations` - """ - api_version = self._get_api_version('virtual_network_subnet_usage') - if api_version == '2020-02-14-preview': - from .v2020_02_14_preview.operations import VirtualNetworkSubnetUsageOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'virtual_network_subnet_usage'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.servers = ServersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.replicas = ReplicasOperations( + self._client, self._config, self._serialize, self._deserialize) + self.firewall_rules = FirewallRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_network_rules = VirtualNetworkRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.databases = DatabasesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.configurations = ConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.server_parameters = ServerParametersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.log_files = LogFilesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.server_administrators = ServerAdministratorsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.recoverable_servers = RecoverableServersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.server_based_performance_tier = ServerBasedPerformanceTierOperations( + self._client, self._config, self._serialize, self._deserialize) + self.location_based_performance_tier = LocationBasedPerformanceTierOperations( + self._client, self._config, self._serialize, self._deserialize) + self.check_name_availability = CheckNameAvailabilityOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.server_security_alert_policies = ServerSecurityAlertPoliciesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.server_keys = ServerKeysOperations( + self._client, self._config, self._serialize, self._deserialize) def close(self): + # type: () -> None self._client.close() + def __enter__(self): + # type: () -> PostgreSQLManagementClient self._client.__enter__() return self + def __exit__(self, *exc_details): + # type: (Any) -> None self._client.__exit__(*exc_details) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/_version.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/_version.py deleted file mode 100644 index 7cf3ebf6b364..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/_version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "8.0.0b1" - diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/_configuration.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/_configuration.py index f296a85c46ce..ea980785497a 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/_configuration.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/_configuration.py @@ -1,21 +1,22 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any + +from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy -from .._version import VERSION +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential +VERSION = "unknown" class PostgreSQLManagementClientConfiguration(Configuration): """Configuration for PostgreSQLManagementClient. @@ -31,9 +32,9 @@ class PostgreSQLManagementClientConfiguration(Configuration): def __init__( self, - credential, # type: "AsyncTokenCredential" - subscription_id, # type: str - **kwargs # type: Any + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any ) -> None: if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -44,7 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'azure-mgmt-rdbms/{}'.format(VERSION)) + kwargs.setdefault('sdk_moniker', 'mgmt-rdbms/{}'.format(VERSION)) self._configure(**kwargs) def _configure( diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/_postgre_sql_management_client.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/_postgre_sql_management_client.py index 4ce777c3f351..cb4575fc3ff6 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/_postgre_sql_management_client.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/_postgre_sql_management_client.py @@ -1,337 +1,149 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from azure.mgmt.core import AsyncARMPipelineClient -from msrest import Serializer, Deserializer +from typing import Any, Optional, TYPE_CHECKING -from azure.profiles import KnownProfiles, ProfileDefinition -from azure.profiles.multiapiclient import MultiApiClientMixin -from ._configuration import PostgreSQLManagementClientConfiguration +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer -class _SDKClient(object): - def __init__(self, *args, **kwargs): - """This is a fake class to support current implemetation of MultiApiClientMixin." - Will be removed in final version of multiapi azure-core based client - """ - pass +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential -class PostgreSQLManagementClient(MultiApiClientMixin, _SDKClient): +from ._configuration import PostgreSQLManagementClientConfiguration +from .operations import ServersOperations +from .operations import ReplicasOperations +from .operations import FirewallRulesOperations +from .operations import VirtualNetworkRulesOperations +from .operations import DatabasesOperations +from .operations import ConfigurationsOperations +from .operations import ServerParametersOperations +from .operations import LogFilesOperations +from .operations import ServerAdministratorsOperations +from .operations import RecoverableServersOperations +from .operations import ServerBasedPerformanceTierOperations +from .operations import LocationBasedPerformanceTierOperations +from .operations import CheckNameAvailabilityOperations +from .operations import Operations +from .operations import ServerSecurityAlertPoliciesOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations +from .operations import ServerKeysOperations +from .. import models + + +class PostgreSQLManagementClient(object): """The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model. - This ready contains multiple API versions, to help you deal with all of the Azure clouds - (Azure Stack, Azure Government, Azure China, etc.). - By default, it uses the latest API version available on public Azure. - For production, you should stick to a particular api-version and/or profile. - The profile sets a mapping between an operation group and its API version. - The api-version parameter sets the default API version if the operation - group is not described in the profile. - + :ivar servers: ServersOperations operations + :vartype servers: azure.mgmt.rdbms.postgresql.aio.operations.ServersOperations + :ivar replicas: ReplicasOperations operations + :vartype replicas: azure.mgmt.rdbms.postgresql.aio.operations.ReplicasOperations + :ivar firewall_rules: FirewallRulesOperations operations + :vartype firewall_rules: azure.mgmt.rdbms.postgresql.aio.operations.FirewallRulesOperations + :ivar virtual_network_rules: VirtualNetworkRulesOperations operations + :vartype virtual_network_rules: azure.mgmt.rdbms.postgresql.aio.operations.VirtualNetworkRulesOperations + :ivar databases: DatabasesOperations operations + :vartype databases: azure.mgmt.rdbms.postgresql.aio.operations.DatabasesOperations + :ivar configurations: ConfigurationsOperations operations + :vartype configurations: azure.mgmt.rdbms.postgresql.aio.operations.ConfigurationsOperations + :ivar server_parameters: ServerParametersOperations operations + :vartype server_parameters: azure.mgmt.rdbms.postgresql.aio.operations.ServerParametersOperations + :ivar log_files: LogFilesOperations operations + :vartype log_files: azure.mgmt.rdbms.postgresql.aio.operations.LogFilesOperations + :ivar server_administrators: ServerAdministratorsOperations operations + :vartype server_administrators: azure.mgmt.rdbms.postgresql.aio.operations.ServerAdministratorsOperations + :ivar recoverable_servers: RecoverableServersOperations operations + :vartype recoverable_servers: azure.mgmt.rdbms.postgresql.aio.operations.RecoverableServersOperations + :ivar server_based_performance_tier: ServerBasedPerformanceTierOperations operations + :vartype server_based_performance_tier: azure.mgmt.rdbms.postgresql.aio.operations.ServerBasedPerformanceTierOperations + :ivar location_based_performance_tier: LocationBasedPerformanceTierOperations operations + :vartype location_based_performance_tier: azure.mgmt.rdbms.postgresql.aio.operations.LocationBasedPerformanceTierOperations + :ivar check_name_availability: CheckNameAvailabilityOperations operations + :vartype check_name_availability: azure.mgmt.rdbms.postgresql.aio.operations.CheckNameAvailabilityOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.rdbms.postgresql.aio.operations.Operations + :ivar server_security_alert_policies: ServerSecurityAlertPoliciesOperations operations + :vartype server_security_alert_policies: azure.mgmt.rdbms.postgresql.aio.operations.ServerSecurityAlertPoliciesOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: azure.mgmt.rdbms.postgresql.aio.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: azure.mgmt.rdbms.postgresql.aio.operations.PrivateLinkResourcesOperations + :ivar server_keys: ServerKeysOperations operations + :vartype server_keys: azure.mgmt.rdbms.postgresql.aio.operations.ServerKeysOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. :type subscription_id: str - :param str api_version: API version to use if no profile is provided, or if - missing in profile. :param str base_url: Service URL - :param profile: A profile definition, from KnownProfiles to dict. - :type profile: azure.profiles.KnownProfiles :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ - DEFAULT_API_VERSION = '2020-01-01' - _PROFILE_TAG = "azure.mgmt.rdbms.PostgreSQLManagementClient" - LATEST_PROFILE = ProfileDefinition({ - _PROFILE_TAG: { - None: DEFAULT_API_VERSION, - }}, - _PROFILE_TAG + " latest" - ) - def __init__( self, - credential, # type: "AsyncTokenCredential" - subscription_id, # type: str - api_version=None, - base_url=None, - profile=KnownProfiles.default, - **kwargs # type: Any + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any ) -> None: if not base_url: base_url = 'https://management.azure.com' self._config = PostgreSQLManagementClientConfiguration(credential, subscription_id, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) - super(PostgreSQLManagementClient, self).__init__( - api_version=api_version, - profile=profile - ) - - @classmethod - def _models_dict(cls, api_version): - return {k: v for k, v in cls.models(api_version).__dict__.items() if isinstance(v, type)} - - @classmethod - def models(cls, api_version=DEFAULT_API_VERSION): - """Module depends on the API version: - - * 2020-01-01: :mod:`v2020_01_01.models` - * 2020-02-14-preview: :mod:`v2020_02_14_preview.models` - """ - if api_version == '2020-01-01': - from ..v2020_01_01 import models - return models - elif api_version == '2020-02-14-preview': - from ..v2020_02_14_preview import models - return models - raise ValueError("API version {} is not available".format(api_version)) - - @property - def check_name_availability(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`CheckNameAvailabilityOperations` - * 2020-02-14-preview: :class:`CheckNameAvailabilityOperations` - """ - api_version = self._get_api_version('check_name_availability') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import CheckNameAvailabilityOperations as OperationClass - elif api_version == '2020-02-14-preview': - from ..v2020_02_14_preview.aio.operations import CheckNameAvailabilityOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'check_name_availability'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def configurations(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`ConfigurationsOperations` - * 2020-02-14-preview: :class:`ConfigurationsOperations` - """ - api_version = self._get_api_version('configurations') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import ConfigurationsOperations as OperationClass - elif api_version == '2020-02-14-preview': - from ..v2020_02_14_preview.aio.operations import ConfigurationsOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'configurations'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def databases(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`DatabasesOperations` - """ - api_version = self._get_api_version('databases') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import DatabasesOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'databases'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def firewall_rules(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`FirewallRulesOperations` - * 2020-02-14-preview: :class:`FirewallRulesOperations` - """ - api_version = self._get_api_version('firewall_rules') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import FirewallRulesOperations as OperationClass - elif api_version == '2020-02-14-preview': - from ..v2020_02_14_preview.aio.operations import FirewallRulesOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'firewall_rules'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def location_based_capabilities(self): - """Instance depends on the API version: - - * 2020-02-14-preview: :class:`LocationBasedCapabilitiesOperations` - """ - api_version = self._get_api_version('location_based_capabilities') - if api_version == '2020-02-14-preview': - from ..v2020_02_14_preview.aio.operations import LocationBasedCapabilitiesOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'location_based_capabilities'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def location_based_performance_tier(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`LocationBasedPerformanceTierOperations` - """ - api_version = self._get_api_version('location_based_performance_tier') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import LocationBasedPerformanceTierOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'location_based_performance_tier'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def log_files(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`LogFilesOperations` - """ - api_version = self._get_api_version('log_files') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import LogFilesOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'log_files'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - @property - def operations(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`Operations` - * 2020-02-14-preview: :class:`Operations` - """ - api_version = self._get_api_version('operations') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import Operations as OperationClass - elif api_version == '2020-02-14-preview': - from ..v2020_02_14_preview.aio.operations import Operations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def private_endpoint_connections(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`PrivateEndpointConnectionsOperations` - """ - api_version = self._get_api_version('private_endpoint_connections') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import PrivateEndpointConnectionsOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def private_link_resources(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`PrivateLinkResourcesOperations` - """ - api_version = self._get_api_version('private_link_resources') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import PrivateLinkResourcesOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'private_link_resources'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def replicas(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`ReplicasOperations` - """ - api_version = self._get_api_version('replicas') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import ReplicasOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'replicas'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def server_administrators(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`ServerAdministratorsOperations` - """ - api_version = self._get_api_version('server_administrators') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import ServerAdministratorsOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'server_administrators'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def server_keys(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`ServerKeysOperations` - """ - api_version = self._get_api_version('server_keys') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import ServerKeysOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'server_keys'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def server_security_alert_policies(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`ServerSecurityAlertPoliciesOperations` - """ - api_version = self._get_api_version('server_security_alert_policies') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import ServerSecurityAlertPoliciesOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'server_security_alert_policies'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def servers(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`ServersOperations` - * 2020-02-14-preview: :class:`ServersOperations` - """ - api_version = self._get_api_version('servers') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import ServersOperations as OperationClass - elif api_version == '2020-02-14-preview': - from ..v2020_02_14_preview.aio.operations import ServersOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'servers'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def virtual_network_rules(self): - """Instance depends on the API version: - - * 2020-01-01: :class:`VirtualNetworkRulesOperations` - """ - api_version = self._get_api_version('virtual_network_rules') - if api_version == '2020-01-01': - from ..v2020_01_01.aio.operations import VirtualNetworkRulesOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'virtual_network_rules'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - @property - def virtual_network_subnet_usage(self): - """Instance depends on the API version: - - * 2020-02-14-preview: :class:`VirtualNetworkSubnetUsageOperations` - """ - api_version = self._get_api_version('virtual_network_subnet_usage') - if api_version == '2020-02-14-preview': - from ..v2020_02_14_preview.aio.operations import VirtualNetworkSubnetUsageOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'virtual_network_subnet_usage'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - - async def close(self): + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.servers = ServersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.replicas = ReplicasOperations( + self._client, self._config, self._serialize, self._deserialize) + self.firewall_rules = FirewallRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_network_rules = VirtualNetworkRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.databases = DatabasesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.configurations = ConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.server_parameters = ServerParametersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.log_files = LogFilesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.server_administrators = ServerAdministratorsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.recoverable_servers = RecoverableServersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.server_based_performance_tier = ServerBasedPerformanceTierOperations( + self._client, self._config, self._serialize, self._deserialize) + self.location_based_performance_tier = LocationBasedPerformanceTierOperations( + self._client, self._config, self._serialize, self._deserialize) + self.check_name_availability = CheckNameAvailabilityOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.server_security_alert_policies = ServerSecurityAlertPoliciesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.server_keys = ServerKeysOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def close(self) -> None: await self._client.close() - async def __aenter__(self): + + async def __aenter__(self) -> "PostgreSQLManagementClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details): + + async def __aexit__(self, *exc_details) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/__init__.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/__init__.py similarity index 85% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/__init__.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/__init__.py index 16012019075a..170155b06941 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/__init__.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/__init__.py @@ -12,8 +12,11 @@ from ._virtual_network_rules_operations import VirtualNetworkRulesOperations from ._databases_operations import DatabasesOperations from ._configurations_operations import ConfigurationsOperations +from ._server_parameters_operations import ServerParametersOperations from ._log_files_operations import LogFilesOperations from ._server_administrators_operations import ServerAdministratorsOperations +from ._recoverable_servers_operations import RecoverableServersOperations +from ._server_based_performance_tier_operations import ServerBasedPerformanceTierOperations from ._location_based_performance_tier_operations import LocationBasedPerformanceTierOperations from ._check_name_availability_operations import CheckNameAvailabilityOperations from ._operations import Operations @@ -29,8 +32,11 @@ 'VirtualNetworkRulesOperations', 'DatabasesOperations', 'ConfigurationsOperations', + 'ServerParametersOperations', 'LogFilesOperations', 'ServerAdministratorsOperations', + 'RecoverableServersOperations', + 'ServerBasedPerformanceTierOperations', 'LocationBasedPerformanceTierOperations', 'CheckNameAvailabilityOperations', 'Operations', diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_check_name_availability_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_check_name_availability_operations.py similarity index 91% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_check_name_availability_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_check_name_availability_operations.py index 7ebb9a8761ef..a803592eed10 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_check_name_availability_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_check_name_availability_operations.py @@ -13,7 +13,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -25,14 +25,14 @@ class CheckNameAvailabilityOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.postgresql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -42,20 +42,20 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def execute( self, - name_availability_request: "models.NameAvailabilityRequest", + name_availability_request: "_models.NameAvailabilityRequest", **kwargs - ) -> "models.NameAvailability": + ) -> "_models.NameAvailability": """Check the availability of name for resource. :param name_availability_request: The required parameters for checking if resource name is available. - :type name_availability_request: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.NameAvailabilityRequest + :type name_availability_request: ~azure.mgmt.rdbms.postgresql.models.NameAvailabilityRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: NameAvailability, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.NameAvailability + :rtype: ~azure.mgmt.rdbms.postgresql.models.NameAvailability :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.NameAvailability"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NameAvailability"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_configurations_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_configurations_operations.py similarity index 94% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_configurations_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_configurations_operations.py index 90b4bb4396b1..798594db2185 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_configurations_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_configurations_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -28,14 +28,14 @@ class ConfigurationsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.postgresql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -48,10 +48,10 @@ async def _create_or_update_initial( resource_group_name: str, server_name: str, configuration_name: str, - parameters: "models.Configuration", + parameters: "_models.Configuration", **kwargs - ) -> Optional["models.Configuration"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Configuration"]] + ) -> Optional["_models.Configuration"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Configuration"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -105,9 +105,9 @@ async def begin_create_or_update( resource_group_name: str, server_name: str, configuration_name: str, - parameters: "models.Configuration", + parameters: "_models.Configuration", **kwargs - ) -> AsyncLROPoller["models.Configuration"]: + ) -> AsyncLROPoller["_models.Configuration"]: """Updates a configuration of a server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -117,7 +117,7 @@ async def begin_create_or_update( :param configuration_name: The name of the server configuration. :type configuration_name: str :param parameters: The required parameters for updating a server configuration. - :type parameters: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.Configuration + :type parameters: ~azure.mgmt.rdbms.postgresql.models.Configuration :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: True for ARMPolling, False for no polling, or a @@ -125,11 +125,11 @@ async def begin_create_or_update( :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 Configuration or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.Configuration] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.postgresql.models.Configuration] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.Configuration"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Configuration"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -182,7 +182,7 @@ async def get( server_name: str, configuration_name: str, **kwargs - ) -> "models.Configuration": + ) -> "_models.Configuration": """Gets information about a configuration of server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -193,10 +193,10 @@ async def get( :type configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Configuration, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.Configuration + :rtype: ~azure.mgmt.rdbms.postgresql.models.Configuration :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Configuration"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Configuration"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -243,7 +243,7 @@ def list_by_server( resource_group_name: str, server_name: str, **kwargs - ) -> AsyncIterable["models.ConfigurationListResult"]: + ) -> AsyncIterable["_models.ConfigurationListResult"]: """List all the configurations in a given server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -252,10 +252,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ConfigurationListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ConfigurationListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql.models.ConfigurationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ConfigurationListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfigurationListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_databases_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_databases_operations.py similarity index 95% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_databases_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_databases_operations.py index 223fe9486bb2..f060e631786f 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_databases_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_databases_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -28,14 +28,14 @@ class DatabasesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.postgresql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -48,10 +48,10 @@ async def _create_or_update_initial( resource_group_name: str, server_name: str, database_name: str, - parameters: "models.Database", + parameters: "_models.Database", **kwargs - ) -> Optional["models.Database"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Database"]] + ) -> Optional["_models.Database"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Database"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -108,9 +108,9 @@ async def begin_create_or_update( resource_group_name: str, server_name: str, database_name: str, - parameters: "models.Database", + parameters: "_models.Database", **kwargs - ) -> AsyncLROPoller["models.Database"]: + ) -> AsyncLROPoller["_models.Database"]: """Creates a new database or updates an existing database. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -120,7 +120,7 @@ async def begin_create_or_update( :param database_name: The name of the database. :type database_name: str :param parameters: The required parameters for creating or updating a database. - :type parameters: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.Database + :type parameters: ~azure.mgmt.rdbms.postgresql.models.Database :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: True for ARMPolling, False for no polling, or a @@ -128,11 +128,11 @@ async def begin_create_or_update( :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 Database or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.Database] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.postgresql.models.Database] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.Database"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Database"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -298,7 +298,7 @@ async def get( server_name: str, database_name: str, **kwargs - ) -> "models.Database": + ) -> "_models.Database": """Gets information about a database. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -309,10 +309,10 @@ async def get( :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Database, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.Database + :rtype: ~azure.mgmt.rdbms.postgresql.models.Database :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Database"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Database"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -359,7 +359,7 @@ def list_by_server( resource_group_name: str, server_name: str, **kwargs - ) -> AsyncIterable["models.DatabaseListResult"]: + ) -> AsyncIterable["_models.DatabaseListResult"]: """List all the databases in a given server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -368,10 +368,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DatabaseListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.DatabaseListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql.models.DatabaseListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.DatabaseListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_firewall_rules_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_firewall_rules_operations.py similarity index 95% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_firewall_rules_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_firewall_rules_operations.py index b134643958a2..ff1389636364 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_firewall_rules_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_firewall_rules_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -28,14 +28,14 @@ class FirewallRulesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.postgresql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -48,10 +48,10 @@ async def _create_or_update_initial( resource_group_name: str, server_name: str, firewall_rule_name: str, - parameters: "models.FirewallRule", + parameters: "_models.FirewallRule", **kwargs - ) -> Optional["models.FirewallRule"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.FirewallRule"]] + ) -> Optional["_models.FirewallRule"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.FirewallRule"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -108,9 +108,9 @@ async def begin_create_or_update( resource_group_name: str, server_name: str, firewall_rule_name: str, - parameters: "models.FirewallRule", + parameters: "_models.FirewallRule", **kwargs - ) -> AsyncLROPoller["models.FirewallRule"]: + ) -> AsyncLROPoller["_models.FirewallRule"]: """Creates a new firewall rule or updates an existing firewall rule. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -120,7 +120,7 @@ async def begin_create_or_update( :param firewall_rule_name: The name of the server firewall rule. :type firewall_rule_name: str :param parameters: The required parameters for creating or updating a firewall rule. - :type parameters: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.FirewallRule + :type parameters: ~azure.mgmt.rdbms.postgresql.models.FirewallRule :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: True for ARMPolling, False for no polling, or a @@ -128,11 +128,11 @@ async def begin_create_or_update( :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 FirewallRule or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.FirewallRule] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.postgresql.models.FirewallRule] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.FirewallRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRule"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -298,7 +298,7 @@ async def get( server_name: str, firewall_rule_name: str, **kwargs - ) -> "models.FirewallRule": + ) -> "_models.FirewallRule": """Gets information about a server firewall rule. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -309,10 +309,10 @@ async def get( :type firewall_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: FirewallRule, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.FirewallRule + :rtype: ~azure.mgmt.rdbms.postgresql.models.FirewallRule :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.FirewallRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRule"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -359,7 +359,7 @@ def list_by_server( resource_group_name: str, server_name: str, **kwargs - ) -> AsyncIterable["models.FirewallRuleListResult"]: + ) -> AsyncIterable["_models.FirewallRuleListResult"]: """List all the firewall rules in a given server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -368,10 +368,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either FirewallRuleListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.FirewallRuleListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql.models.FirewallRuleListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.FirewallRuleListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRuleListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_location_based_performance_tier_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_location_based_performance_tier_operations.py similarity index 93% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_location_based_performance_tier_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_location_based_performance_tier_operations.py index 54281338ef52..ba95b8046904 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_location_based_performance_tier_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_location_based_performance_tier_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -26,14 +26,14 @@ class LocationBasedPerformanceTierOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.postgresql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -45,17 +45,17 @@ def list( self, location_name: str, **kwargs - ) -> AsyncIterable["models.PerformanceTierListResult"]: + ) -> AsyncIterable["_models.PerformanceTierListResult"]: """List all the performance tiers at specified location in a given subscription. :param location_name: The name of the location. :type location_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerformanceTierListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PerformanceTierListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql.models.PerformanceTierListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.PerformanceTierListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerformanceTierListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_log_files_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_log_files_operations.py similarity index 94% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_log_files_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_log_files_operations.py index 15451cd93562..f61aa250f7d3 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_log_files_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_log_files_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -26,14 +26,14 @@ class LogFilesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.postgresql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -46,7 +46,7 @@ def list_by_server( resource_group_name: str, server_name: str, **kwargs - ) -> AsyncIterable["models.LogFileListResult"]: + ) -> AsyncIterable["_models.LogFileListResult"]: """List all the log files in a given server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -55,10 +55,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either LogFileListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.LogFileListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql.models.LogFileListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.LogFileListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.LogFileListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_operations.py similarity index 91% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_operations.py index 2e33c8ec1824..2a9443646732 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_operations.py @@ -13,7 +13,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -25,14 +25,14 @@ class Operations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.postgresql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -43,15 +43,15 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def list( self, **kwargs - ) -> "models.OperationListResult": + ) -> "_models.OperationListResult": """Lists all of the available REST API operations. :keyword callable cls: A custom type or function that will be passed the direct response :return: OperationListResult, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.OperationListResult + :rtype: ~azure.mgmt.rdbms.postgresql.models.OperationListResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.OperationListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_private_endpoint_connections_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_private_endpoint_connections_operations.py similarity index 94% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_private_endpoint_connections_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_private_endpoint_connections_operations.py index c2f85a752ecc..5b870e7562e9 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_private_endpoint_connections_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -28,14 +28,14 @@ class PrivateEndpointConnectionsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.postgresql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -49,7 +49,7 @@ async def get( server_name: str, private_endpoint_connection_name: str, **kwargs - ) -> "models.PrivateEndpointConnection": + ) -> "_models.PrivateEndpointConnection": """Gets a private endpoint connection. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -60,10 +60,10 @@ async def get( :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PrivateEndpointConnection, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PrivateEndpointConnection + :rtype: ~azure.mgmt.rdbms.postgresql.models.PrivateEndpointConnection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -110,10 +110,10 @@ async def _create_or_update_initial( resource_group_name: str, server_name: str, private_endpoint_connection_name: str, - parameters: "models.PrivateEndpointConnection", + parameters: "_models.PrivateEndpointConnection", **kwargs - ) -> Optional["models.PrivateEndpointConnection"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.PrivateEndpointConnection"]] + ) -> Optional["_models.PrivateEndpointConnection"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PrivateEndpointConnection"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -167,9 +167,9 @@ async def begin_create_or_update( resource_group_name: str, server_name: str, private_endpoint_connection_name: str, - parameters: "models.PrivateEndpointConnection", + parameters: "_models.PrivateEndpointConnection", **kwargs - ) -> AsyncLROPoller["models.PrivateEndpointConnection"]: + ) -> AsyncLROPoller["_models.PrivateEndpointConnection"]: """Approve or reject a private endpoint connection with a given name. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -179,7 +179,7 @@ async def begin_create_or_update( :param private_endpoint_connection_name: :type private_endpoint_connection_name: str :param parameters: - :type parameters: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PrivateEndpointConnection + :type parameters: ~azure.mgmt.rdbms.postgresql.models.PrivateEndpointConnection :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: True for ARMPolling, False for no polling, or a @@ -187,11 +187,11 @@ async def begin_create_or_update( :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 PrivateEndpointConnection or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PrivateEndpointConnection] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.postgresql.models.PrivateEndpointConnection] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -358,10 +358,10 @@ async def _update_tags_initial( resource_group_name: str, server_name: str, private_endpoint_connection_name: str, - parameters: "models.TagsObject", + parameters: "_models.TagsObject", **kwargs - ) -> "models.PrivateEndpointConnection": - cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"] + ) -> "_models.PrivateEndpointConnection": + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -413,9 +413,9 @@ async def begin_update_tags( resource_group_name: str, server_name: str, private_endpoint_connection_name: str, - parameters: "models.TagsObject", + parameters: "_models.TagsObject", **kwargs - ) -> AsyncLROPoller["models.PrivateEndpointConnection"]: + ) -> AsyncLROPoller["_models.PrivateEndpointConnection"]: """Updates tags on private endpoint connection. Updates private endpoint connection with the specified tags. @@ -428,7 +428,7 @@ async def begin_update_tags( :type private_endpoint_connection_name: str :param parameters: Parameters supplied to the Update private endpoint connection Tags operation. - :type parameters: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.TagsObject + :type parameters: ~azure.mgmt.rdbms.postgresql.models.TagsObject :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: True for ARMPolling, False for no polling, or a @@ -436,11 +436,11 @@ async def begin_update_tags( :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 PrivateEndpointConnection or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PrivateEndpointConnection] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.postgresql.models.PrivateEndpointConnection] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -492,7 +492,7 @@ def list_by_server( resource_group_name: str, server_name: str, **kwargs - ) -> AsyncIterable["models.PrivateEndpointConnectionListResult"]: + ) -> AsyncIterable["_models.PrivateEndpointConnectionListResult"]: """Gets all private endpoint connections on a server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -501,10 +501,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PrivateEndpointConnectionListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql.models.PrivateEndpointConnectionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnectionListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_private_link_resources_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_private_link_resources_operations.py similarity index 93% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_private_link_resources_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_private_link_resources_operations.py index 4ad73819fa1e..342bee5a5549 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_private_link_resources_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_private_link_resources_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -26,14 +26,14 @@ class PrivateLinkResourcesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.postgresql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -46,7 +46,7 @@ def list_by_server( resource_group_name: str, server_name: str, **kwargs - ) -> AsyncIterable["models.PrivateLinkResourceListResult"]: + ) -> AsyncIterable["_models.PrivateLinkResourceListResult"]: """Gets the private link resources for PostgreSQL server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -55,10 +55,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PrivateLinkResourceListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PrivateLinkResourceListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql.models.PrivateLinkResourceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateLinkResourceListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -121,7 +121,7 @@ async def get( server_name: str, group_name: str, **kwargs - ) -> "models.PrivateLinkResource": + ) -> "_models.PrivateLinkResource": """Gets a private link resource for PostgreSQL server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -132,10 +132,10 @@ async def get( :type group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PrivateLinkResource, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PrivateLinkResource + :rtype: ~azure.mgmt.rdbms.postgresql.models.PrivateLinkResource :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateLinkResource"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResource"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_recoverable_servers_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_recoverable_servers_operations.py new file mode 100644 index 000000000000..36f80120c678 --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_recoverable_servers_operations.py @@ -0,0 +1,99 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class RecoverableServersOperations: + """RecoverableServersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.rdbms.postgresql.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + server_name: str, + **kwargs + ) -> "_models.RecoverableServerResource": + """Gets a recoverable PostgreSQL Server. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RecoverableServerResource, or the result of cls(response) + :rtype: ~azure.mgmt.rdbms.postgresql.models.RecoverableServerResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecoverableServerResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-12-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RecoverableServerResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/recoverableServers'} # type: ignore diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_replicas_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_replicas_operations.py similarity index 94% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_replicas_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_replicas_operations.py index 0f19d8316b24..083cf3ffb8ac 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_replicas_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_replicas_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -26,14 +26,14 @@ class ReplicasOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.postgresql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -46,7 +46,7 @@ def list_by_server( resource_group_name: str, server_name: str, **kwargs - ) -> AsyncIterable["models.ServerListResult"]: + ) -> AsyncIterable["_models.ServerListResult"]: """List all the replicas for a given server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -55,10 +55,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql.models.ServerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_server_administrators_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_server_administrators_operations.py similarity index 94% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_server_administrators_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_server_administrators_operations.py index 2900d6460128..4e4741ea6d6c 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_server_administrators_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_server_administrators_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -28,14 +28,14 @@ class ServerAdministratorsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.postgresql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -48,7 +48,7 @@ async def get( resource_group_name: str, server_name: str, **kwargs - ) -> "models.ServerAdministratorResource": + ) -> "_models.ServerAdministratorResource": """Gets information about a AAD server administrator. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -57,10 +57,10 @@ async def get( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ServerAdministratorResource, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerAdministratorResource + :rtype: ~azure.mgmt.rdbms.postgresql.models.ServerAdministratorResource :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerAdministratorResource"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerAdministratorResource"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -105,10 +105,10 @@ async def _create_or_update_initial( self, resource_group_name: str, server_name: str, - properties: "models.ServerAdministratorResource", + properties: "_models.ServerAdministratorResource", **kwargs - ) -> "models.ServerAdministratorResource": - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerAdministratorResource"] + ) -> "_models.ServerAdministratorResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerAdministratorResource"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -162,9 +162,9 @@ async def begin_create_or_update( self, resource_group_name: str, server_name: str, - properties: "models.ServerAdministratorResource", + properties: "_models.ServerAdministratorResource", **kwargs - ) -> AsyncLROPoller["models.ServerAdministratorResource"]: + ) -> AsyncLROPoller["_models.ServerAdministratorResource"]: """Creates or update active directory administrator on an existing server. The update action will overwrite the existing administrator. @@ -174,7 +174,7 @@ async def begin_create_or_update( :type server_name: str :param properties: The required parameters for creating or updating an AAD server administrator. - :type properties: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerAdministratorResource + :type properties: ~azure.mgmt.rdbms.postgresql.models.ServerAdministratorResource :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: True for ARMPolling, False for no polling, or a @@ -182,11 +182,11 @@ async def begin_create_or_update( :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 ServerAdministratorResource or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerAdministratorResource] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.postgresql.models.ServerAdministratorResource] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerAdministratorResource"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerAdministratorResource"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -344,7 +344,7 @@ def list( resource_group_name: str, server_name: str, **kwargs - ) -> AsyncIterable["models.ServerAdministratorResourceListResult"]: + ) -> AsyncIterable["_models.ServerAdministratorResourceListResult"]: """Returns a list of server Administrators. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -353,10 +353,10 @@ def list( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerAdministratorResourceListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerAdministratorResourceListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql.models.ServerAdministratorResourceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerAdministratorResourceListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerAdministratorResourceListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_server_based_performance_tier_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_server_based_performance_tier_operations.py new file mode 100644 index 000000000000..535f46579edc --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_server_based_performance_tier_operations.py @@ -0,0 +1,116 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ServerBasedPerformanceTierOperations: + """ServerBasedPerformanceTierOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.rdbms.postgresql.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + server_name: str, + **kwargs + ) -> AsyncIterable["_models.PerformanceTierListResult"]: + """List all the performance tiers for a PostgreSQL server. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PerformanceTierListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql.models.PerformanceTierListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerformanceTierListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + 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] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('PerformanceTierListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/performanceTiers'} # type: ignore diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_server_keys_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_server_keys_operations.py similarity index 95% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_server_keys_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_server_keys_operations.py index 5684fefea2bd..6b00257d6ef6 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_server_keys_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_server_keys_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -28,14 +28,14 @@ class ServerKeysOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.postgresql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -48,7 +48,7 @@ def list( resource_group_name: str, server_name: str, **kwargs - ) -> AsyncIterable["models.ServerKeyListResult"]: + ) -> AsyncIterable["_models.ServerKeyListResult"]: """Gets a list of Server keys. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -57,10 +57,10 @@ def list( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerKeyListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerKeyListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql.models.ServerKeyListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerKeyListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerKeyListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -123,7 +123,7 @@ async def get( server_name: str, key_name: str, **kwargs - ) -> "models.ServerKey": + ) -> "_models.ServerKey": """Gets a PostgreSQL Server key. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -134,10 +134,10 @@ async def get( :type key_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ServerKey, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerKey + :rtype: ~azure.mgmt.rdbms.postgresql.models.ServerKey :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerKey"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerKey"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -184,10 +184,10 @@ async def _create_or_update_initial( server_name: str, key_name: str, resource_group_name: str, - parameters: "models.ServerKey", + parameters: "_models.ServerKey", **kwargs - ) -> "models.ServerKey": - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerKey"] + ) -> "_models.ServerKey": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerKey"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -243,9 +243,9 @@ async def begin_create_or_update( server_name: str, key_name: str, resource_group_name: str, - parameters: "models.ServerKey", + parameters: "_models.ServerKey", **kwargs - ) -> AsyncLROPoller["models.ServerKey"]: + ) -> AsyncLROPoller["_models.ServerKey"]: """Creates or updates a PostgreSQL Server key. :param server_name: The name of the server. @@ -255,7 +255,7 @@ async def begin_create_or_update( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param parameters: The requested PostgreSQL Server key resource state. - :type parameters: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerKey + :type parameters: ~azure.mgmt.rdbms.postgresql.models.ServerKey :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: True for ARMPolling, False for no polling, or a @@ -263,11 +263,11 @@ async def begin_create_or_update( :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 ServerKey or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerKey] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.postgresql.models.ServerKey] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerKey"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerKey"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_server_parameters_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_server_parameters_operations.py new file mode 100644 index 000000000000..d434e5579388 --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_server_parameters_operations.py @@ -0,0 +1,169 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ServerParametersOperations: + """ServerParametersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.rdbms.postgresql.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _list_update_configurations_initial( + self, + resource_group_name: str, + server_name: str, + value: "_models.ConfigurationListResult", + **kwargs + ) -> Optional["_models.ConfigurationListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ConfigurationListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._list_update_configurations_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(value, 'ConfigurationListResult') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConfigurationListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _list_update_configurations_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/updateConfigurations'} # type: ignore + + async def begin_list_update_configurations( + self, + resource_group_name: str, + server_name: str, + value: "_models.ConfigurationListResult", + **kwargs + ) -> AsyncLROPoller["_models.ConfigurationListResult"]: + """Update a list of configurations in a given server. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param value: The parameters for updating a list of server configuration. + :type value: ~azure.mgmt.rdbms.postgresql.models.ConfigurationListResult + :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: True for ARMPolling, False for no polling, or a + 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: An instance of AsyncLROPoller that returns either ConfigurationListResult or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.postgresql.models.ConfigurationListResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfigurationListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._list_update_configurations_initial( + resource_group_name=resource_group_name, + server_name=server_name, + value=value, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ConfigurationListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_list_update_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/updateConfigurations'} # type: ignore diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_server_security_alert_policies_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_server_security_alert_policies_operations.py similarity index 90% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_server_security_alert_policies_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_server_security_alert_policies_operations.py index a91b2dd3ecf4..ce226a4e6293 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_server_security_alert_policies_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_server_security_alert_policies_operations.py @@ -15,7 +15,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -27,14 +27,14 @@ class ServerSecurityAlertPoliciesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.postgresql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -46,9 +46,9 @@ async def get( self, resource_group_name: str, server_name: str, - security_alert_policy_name: Union[str, "models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], **kwargs - ) -> "models.ServerSecurityAlertPolicy": + ) -> "_models.ServerSecurityAlertPolicy": """Get a server's security alert policy. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -56,13 +56,13 @@ async def get( :param server_name: The name of the server. :type server_name: str :param security_alert_policy_name: The name of the security alert policy. - :type security_alert_policy_name: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.SecurityAlertPolicyName + :type security_alert_policy_name: str or ~azure.mgmt.rdbms.postgresql.models.SecurityAlertPolicyName :keyword callable cls: A custom type or function that will be passed the direct response :return: ServerSecurityAlertPolicy, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerSecurityAlertPolicy + :rtype: ~azure.mgmt.rdbms.postgresql.models.ServerSecurityAlertPolicy :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerSecurityAlertPolicy"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerSecurityAlertPolicy"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -108,11 +108,11 @@ async def _create_or_update_initial( self, resource_group_name: str, server_name: str, - security_alert_policy_name: Union[str, "models.SecurityAlertPolicyName"], - parameters: "models.ServerSecurityAlertPolicy", + security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + parameters: "_models.ServerSecurityAlertPolicy", **kwargs - ) -> Optional["models.ServerSecurityAlertPolicy"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.ServerSecurityAlertPolicy"]] + ) -> Optional["_models.ServerSecurityAlertPolicy"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ServerSecurityAlertPolicy"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -165,10 +165,10 @@ async def begin_create_or_update( self, resource_group_name: str, server_name: str, - security_alert_policy_name: Union[str, "models.SecurityAlertPolicyName"], - parameters: "models.ServerSecurityAlertPolicy", + security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + parameters: "_models.ServerSecurityAlertPolicy", **kwargs - ) -> AsyncLROPoller["models.ServerSecurityAlertPolicy"]: + ) -> AsyncLROPoller["_models.ServerSecurityAlertPolicy"]: """Creates or updates a threat detection policy. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -176,9 +176,9 @@ async def begin_create_or_update( :param server_name: The name of the server. :type server_name: str :param security_alert_policy_name: The name of the threat detection policy. - :type security_alert_policy_name: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.SecurityAlertPolicyName + :type security_alert_policy_name: str or ~azure.mgmt.rdbms.postgresql.models.SecurityAlertPolicyName :param parameters: The server security alert policy. - :type parameters: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerSecurityAlertPolicy + :type parameters: ~azure.mgmt.rdbms.postgresql.models.ServerSecurityAlertPolicy :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: True for ARMPolling, False for no polling, or a @@ -186,11 +186,11 @@ async def begin_create_or_update( :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 ServerSecurityAlertPolicy or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerSecurityAlertPolicy] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.postgresql.models.ServerSecurityAlertPolicy] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerSecurityAlertPolicy"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerSecurityAlertPolicy"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_servers_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_servers_operations.py similarity index 95% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_servers_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_servers_operations.py index 072732d68292..59e961ec9976 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_servers_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_servers_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -28,14 +28,14 @@ class ServersOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.postgresql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -47,10 +47,10 @@ async def _create_initial( self, resource_group_name: str, server_name: str, - parameters: "models.ServerForCreate", + parameters: "_models.ServerForCreate", **kwargs - ) -> Optional["models.Server"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Server"]] + ) -> Optional["_models.Server"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Server"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -105,9 +105,9 @@ async def begin_create( self, resource_group_name: str, server_name: str, - parameters: "models.ServerForCreate", + parameters: "_models.ServerForCreate", **kwargs - ) -> AsyncLROPoller["models.Server"]: + ) -> AsyncLROPoller["_models.Server"]: """Creates a new server, or will overwrite an existing server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -115,7 +115,7 @@ async def begin_create( :param server_name: The name of the server. :type server_name: str :param parameters: The required parameters for creating or updating a server. - :type parameters: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerForCreate + :type parameters: ~azure.mgmt.rdbms.postgresql.models.ServerForCreate :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: True for ARMPolling, False for no polling, or a @@ -123,11 +123,11 @@ async def begin_create( :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 Server or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.Server] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.postgresql.models.Server] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.Server"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Server"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -176,10 +176,10 @@ async def _update_initial( self, resource_group_name: str, server_name: str, - parameters: "models.ServerUpdateParameters", + parameters: "_models.ServerUpdateParameters", **kwargs - ) -> Optional["models.Server"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Server"]] + ) -> Optional["_models.Server"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Server"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -231,9 +231,9 @@ async def begin_update( self, resource_group_name: str, server_name: str, - parameters: "models.ServerUpdateParameters", + parameters: "_models.ServerUpdateParameters", **kwargs - ) -> AsyncLROPoller["models.Server"]: + ) -> AsyncLROPoller["_models.Server"]: """Updates an existing server. The request body can contain one to many of the properties present in the normal server definition. @@ -242,7 +242,7 @@ async def begin_update( :param server_name: The name of the server. :type server_name: str :param parameters: The required parameters for updating a server. - :type parameters: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerUpdateParameters + :type parameters: ~azure.mgmt.rdbms.postgresql.models.ServerUpdateParameters :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: True for ARMPolling, False for no polling, or a @@ -250,11 +250,11 @@ async def begin_update( :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 Server or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.Server] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.postgresql.models.Server] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.Server"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Server"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -410,7 +410,7 @@ async def get( resource_group_name: str, server_name: str, **kwargs - ) -> "models.Server": + ) -> "_models.Server": """Gets information about a server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -419,10 +419,10 @@ async def get( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Server, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.Server + :rtype: ~azure.mgmt.rdbms.postgresql.models.Server :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Server"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Server"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -467,17 +467,17 @@ def list_by_resource_group( self, resource_group_name: str, **kwargs - ) -> AsyncIterable["models.ServerListResult"]: + ) -> AsyncIterable["_models.ServerListResult"]: """List all the servers in a given resource group. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql.models.ServerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -536,15 +536,15 @@ async def get_next(next_link=None): def list( self, **kwargs - ) -> AsyncIterable["models.ServerListResult"]: + ) -> AsyncIterable["_models.ServerListResult"]: """List all the servers in a given subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql.models.ServerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_virtual_network_rules_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_virtual_network_rules_operations.py similarity index 95% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_virtual_network_rules_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_virtual_network_rules_operations.py index dd767a1aff6e..42f2002d1f94 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/operations/_virtual_network_rules_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/aio/operations/_virtual_network_rules_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -28,14 +28,14 @@ class VirtualNetworkRulesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.postgresql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -49,7 +49,7 @@ async def get( server_name: str, virtual_network_rule_name: str, **kwargs - ) -> "models.VirtualNetworkRule": + ) -> "_models.VirtualNetworkRule": """Gets a virtual network rule. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -60,10 +60,10 @@ async def get( :type virtual_network_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualNetworkRule, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.VirtualNetworkRule + :rtype: ~azure.mgmt.rdbms.postgresql.models.VirtualNetworkRule :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.VirtualNetworkRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkRule"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -110,10 +110,10 @@ async def _create_or_update_initial( resource_group_name: str, server_name: str, virtual_network_rule_name: str, - parameters: "models.VirtualNetworkRule", + parameters: "_models.VirtualNetworkRule", **kwargs - ) -> Optional["models.VirtualNetworkRule"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.VirtualNetworkRule"]] + ) -> Optional["_models.VirtualNetworkRule"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VirtualNetworkRule"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -170,9 +170,9 @@ async def begin_create_or_update( resource_group_name: str, server_name: str, virtual_network_rule_name: str, - parameters: "models.VirtualNetworkRule", + parameters: "_models.VirtualNetworkRule", **kwargs - ) -> AsyncLROPoller["models.VirtualNetworkRule"]: + ) -> AsyncLROPoller["_models.VirtualNetworkRule"]: """Creates or updates an existing virtual network rule. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -182,7 +182,7 @@ async def begin_create_or_update( :param virtual_network_rule_name: The name of the virtual network rule. :type virtual_network_rule_name: str :param parameters: The requested virtual Network Rule Resource state. - :type parameters: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.VirtualNetworkRule + :type parameters: ~azure.mgmt.rdbms.postgresql.models.VirtualNetworkRule :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: True for ARMPolling, False for no polling, or a @@ -190,11 +190,11 @@ async def begin_create_or_update( :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 VirtualNetworkRule or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.VirtualNetworkRule] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.postgresql.models.VirtualNetworkRule] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.VirtualNetworkRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkRule"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -359,7 +359,7 @@ def list_by_server( resource_group_name: str, server_name: str, **kwargs - ) -> AsyncIterable["models.VirtualNetworkRuleListResult"]: + ) -> AsyncIterable["_models.VirtualNetworkRuleListResult"]: """Gets a list of virtual network rules in a server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -368,10 +368,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualNetworkRuleListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.VirtualNetworkRuleListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql.models.VirtualNetworkRuleListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.VirtualNetworkRuleListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkRuleListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models.py deleted file mode 100644 index db21579cbfbc..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models.py +++ /dev/null @@ -1,7 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -------------------------------------------------------------------------- -from .v2020_01_01.models import * diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/models/__init__.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/__init__.py similarity index 98% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/models/__init__.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/__init__.py index bd55d2fa8e8f..b86a9db576b9 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/models/__init__.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/__init__.py @@ -33,6 +33,7 @@ from ._models_py3 import PrivateLinkResourceProperties from ._models_py3 import PrivateLinkServiceConnectionStateProperty from ._models_py3 import ProxyResource + from ._models_py3 import RecoverableServerResource from ._models_py3 import Resource from ._models_py3 import ResourceIdentity from ._models_py3 import Server @@ -85,6 +86,7 @@ from ._models import PrivateLinkResourceProperties # type: ignore from ._models import PrivateLinkServiceConnectionStateProperty # type: ignore from ._models import ProxyResource # type: ignore + from ._models import RecoverableServerResource # type: ignore from ._models import Resource # type: ignore from ._models import ResourceIdentity # type: ignore from ._models import Server # type: ignore @@ -160,6 +162,7 @@ 'PrivateLinkResourceProperties', 'PrivateLinkServiceConnectionStateProperty', 'ProxyResource', + 'RecoverableServerResource', 'Resource', 'ResourceIdentity', 'Server', diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/models/_models.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/_models.py similarity index 83% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/models/_models.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/_models.py index b731a4916b5c..343a76988a95 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/models/_models.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/_models.py @@ -10,17 +10,17 @@ class Resource(msrest.serialization.Model): - """Resource. + """Common fields that are returned in the response for all Azure Resource Manager resources. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str """ @@ -51,13 +51,13 @@ class Configuration(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param value: Value of the configuration. :type value: str @@ -112,7 +112,7 @@ class ConfigurationListResult(msrest.serialization.Model): """A list of server configurations. :param value: The list of server configurations. - :type value: list[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.Configuration] + :type value: list[~azure.mgmt.rdbms.postgresql.models.Configuration] """ _attribute_map = { @@ -132,13 +132,13 @@ class Database(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param charset: The charset of the database. :type charset: str @@ -173,7 +173,7 @@ class DatabaseListResult(msrest.serialization.Model): """A List of databases. :param value: The list of databases housed in a server. - :type value: list[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.Database] + :type value: list[~azure.mgmt.rdbms.postgresql.models.Database] """ _attribute_map = { @@ -219,7 +219,7 @@ def __init__( class ErrorResponse(msrest.serialization.Model): - """The resource management error response. + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). Variables are only populated by the server, and will be ignored when sending a request. @@ -230,10 +230,9 @@ class ErrorResponse(msrest.serialization.Model): :ivar target: The error target. :vartype target: str :ivar details: The error details. - :vartype details: list[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ErrorResponse] + :vartype details: list[~azure.mgmt.rdbms.postgresql.models.ErrorResponse] :ivar additional_info: The error additional info. - :vartype additional_info: - list[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ErrorAdditionalInfo] + :vartype additional_info: list[~azure.mgmt.rdbms.postgresql.models.ErrorAdditionalInfo] """ _validation = { @@ -271,13 +270,13 @@ class FirewallRule(Resource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param start_ip_address: Required. The start IP address of the server firewall rule. Must be IPv4 format. @@ -316,7 +315,7 @@ class FirewallRuleListResult(msrest.serialization.Model): """A list of firewall rules. :param value: The list of firewall rules in a server. - :type value: list[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.FirewallRule] + :type value: list[~azure.mgmt.rdbms.postgresql.models.FirewallRule] """ _attribute_map = { @@ -336,13 +335,13 @@ class LogFile(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param size_in_kb: Size of the log file. :type size_in_kb: long @@ -391,7 +390,7 @@ class LogFileListResult(msrest.serialization.Model): """A list of log files. :param value: The list of log files. - :type value: list[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.LogFile] + :type value: list[~azure.mgmt.rdbms.postgresql.models.LogFile] """ _attribute_map = { @@ -470,10 +469,10 @@ class Operation(msrest.serialization.Model): :ivar name: The name of the operation being performed on this particular object. :vartype name: str :ivar display: The localized display information for this particular operation or action. - :vartype display: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.OperationDisplay + :vartype display: ~azure.mgmt.rdbms.postgresql.models.OperationDisplay :ivar origin: The intended executor of the operation. Possible values include: "NotSpecified", "user", "system". - :vartype origin: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.OperationOrigin + :vartype origin: str or ~azure.mgmt.rdbms.postgresql.models.OperationOrigin :ivar properties: Additional descriptions for the operation. :vartype properties: dict[str, object] """ @@ -547,7 +546,7 @@ class OperationListResult(msrest.serialization.Model): """A list of resource provider operations. :param value: The list of resource provider operations. - :type value: list[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.Operation] + :type value: list[~azure.mgmt.rdbms.postgresql.models.Operation] """ _attribute_map = { @@ -566,7 +565,7 @@ class PerformanceTierListResult(msrest.serialization.Model): """A list of performance tiers. :param value: The list of performance tiers. - :type value: list[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PerformanceTierProperties] + :type value: list[~azure.mgmt.rdbms.postgresql.models.PerformanceTierProperties] """ _attribute_map = { @@ -586,13 +585,33 @@ class PerformanceTierProperties(msrest.serialization.Model): :param id: ID of the performance tier. :type id: str + :param max_backup_retention_days: Maximum Backup retention in days for the performance tier + edition. + :type max_backup_retention_days: int + :param min_backup_retention_days: Minimum Backup retention in days for the performance tier + edition. + :type min_backup_retention_days: int + :param max_storage_mb: Max storage allowed for a server. + :type max_storage_mb: int + :param min_large_storage_mb: Max storage allowed for a server. + :type min_large_storage_mb: int + :param max_large_storage_mb: Max storage allowed for a server. + :type max_large_storage_mb: int + :param min_storage_mb: Max storage allowed for a server. + :type min_storage_mb: int :param service_level_objectives: Service level objectives associated with the performance tier. :type service_level_objectives: - list[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PerformanceTierServiceLevelObjectives] + list[~azure.mgmt.rdbms.postgresql.models.PerformanceTierServiceLevelObjectives] """ _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'max_backup_retention_days': {'key': 'maxBackupRetentionDays', 'type': 'int'}, + 'min_backup_retention_days': {'key': 'minBackupRetentionDays', 'type': 'int'}, + 'max_storage_mb': {'key': 'maxStorageMB', 'type': 'int'}, + 'min_large_storage_mb': {'key': 'minLargeStorageMB', 'type': 'int'}, + 'max_large_storage_mb': {'key': 'maxLargeStorageMB', 'type': 'int'}, + 'min_storage_mb': {'key': 'minStorageMB', 'type': 'int'}, 'service_level_objectives': {'key': 'serviceLevelObjectives', 'type': '[PerformanceTierServiceLevelObjectives]'}, } @@ -602,6 +621,12 @@ def __init__( ): super(PerformanceTierProperties, self).__init__(**kwargs) self.id = kwargs.get('id', None) + self.max_backup_retention_days = kwargs.get('max_backup_retention_days', None) + self.min_backup_retention_days = kwargs.get('min_backup_retention_days', None) + self.max_storage_mb = kwargs.get('max_storage_mb', None) + self.min_large_storage_mb = kwargs.get('min_large_storage_mb', None) + self.max_large_storage_mb = kwargs.get('max_large_storage_mb', None) + self.min_storage_mb = kwargs.get('min_storage_mb', None) self.service_level_objectives = kwargs.get('service_level_objectives', None) @@ -659,20 +684,20 @@ class PrivateEndpointConnection(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param private_endpoint: Private endpoint which the connection belongs to. - :type private_endpoint: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PrivateEndpointProperty + :type private_endpoint: ~azure.mgmt.rdbms.postgresql.models.PrivateEndpointProperty :param private_link_service_connection_state: Connection state of the private endpoint connection. :type private_link_service_connection_state: - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PrivateLinkServiceConnectionStateProperty + ~azure.mgmt.rdbms.postgresql.models.PrivateLinkServiceConnectionStateProperty :ivar provisioning_state: State of the private endpoint connection. :vartype provisioning_state: str """ @@ -709,7 +734,7 @@ class PrivateEndpointConnectionListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: Array of results. - :vartype value: list[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PrivateEndpointConnection] + :vartype value: list[~azure.mgmt.rdbms.postgresql.models.PrivateEndpointConnection] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -757,17 +782,16 @@ class PrivateLinkResource(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar properties: The private link resource group id. - :vartype properties: - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PrivateLinkResourceProperties + :vartype properties: ~azure.mgmt.rdbms.postgresql.models.PrivateLinkResourceProperties """ _validation = { @@ -798,7 +822,7 @@ class PrivateLinkResourceListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: Array of results. - :vartype value: list[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PrivateLinkResource] + :vartype value: list[~azure.mgmt.rdbms.postgresql.models.PrivateLinkResource] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -890,17 +914,17 @@ def __init__( class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have everything other than required location and tags. + """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str """ @@ -923,6 +947,70 @@ def __init__( super(ProxyResource, self).__init__(**kwargs) +class RecoverableServerResource(Resource): + """A recoverable server resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar last_available_backup_date_time: The last available backup date time. + :vartype last_available_backup_date_time: str + :ivar service_level_objective: The service level objective. + :vartype service_level_objective: str + :ivar edition: Edition of the performance tier. + :vartype edition: str + :ivar v_core: vCore associated with the service level objective. + :vartype v_core: int + :ivar hardware_generation: Hardware generation associated with the service level objective. + :vartype hardware_generation: str + :ivar version: The PostgreSQL version. + :vartype version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_available_backup_date_time': {'readonly': True}, + 'service_level_objective': {'readonly': True}, + 'edition': {'readonly': True}, + 'v_core': {'readonly': True}, + 'hardware_generation': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'last_available_backup_date_time': {'key': 'properties.lastAvailableBackupDateTime', 'type': 'str'}, + 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, + 'edition': {'key': 'properties.edition', 'type': 'str'}, + 'v_core': {'key': 'properties.vCore', 'type': 'int'}, + 'hardware_generation': {'key': 'properties.hardwareGeneration', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RecoverableServerResource, self).__init__(**kwargs) + self.last_available_backup_date_time = None + self.service_level_objective = None + self.edition = None + self.v_core = None + self.hardware_generation = None + self.version = None + + class ResourceIdentity(msrest.serialization.Model): """Azure Active Directory identity configuration for a resource. @@ -933,7 +1021,7 @@ class ResourceIdentity(msrest.serialization.Model): :param type: The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource. Possible values include: "SystemAssigned". - :type type: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.IdentityType + :type type: str or ~azure.mgmt.rdbms.postgresql.models.IdentityType :ivar tenant_id: The Azure Active Directory tenant id. :vartype tenant_id: str """ @@ -960,19 +1048,19 @@ def __init__( class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. + """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] @@ -1011,52 +1099,50 @@ class Server(TrackedResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param location: Required. The geo-location where the resource lives. :type location: str :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ResourceIdentity + :type identity: ~azure.mgmt.rdbms.postgresql.models.ResourceIdentity :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.Sku + :type sku: ~azure.mgmt.rdbms.postgresql.models.Sku :param administrator_login: The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). :type administrator_login: str :param version: Server version. Possible values include: "9.5", "9.6", "10", "10.0", "10.2", "11". - :type version: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum :param minimal_tls_version: Enforce a minimal Tls version for the server. Possible values include: "TLS1_0", "TLS1_1", "TLS1_2", "TLSEnforcementDisabled". - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.MinimalTlsVersionEnum + :type minimal_tls_version: str or ~azure.mgmt.rdbms.postgresql.models.MinimalTlsVersionEnum :ivar byok_enforcement: Status showing whether the server data encryption is enabled with customer-managed keys. :vartype byok_enforcement: str :param infrastructure_encryption: Status showing whether the server enabled infrastructure encryption. Possible values include: "Enabled", "Disabled". :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.InfrastructureEncryption + ~azure.mgmt.rdbms.postgresql.models.InfrastructureEncryption :param user_visible_state: A state of a server that is visible to user. Possible values include: "Ready", "Dropping", "Disabled", "Inaccessible". - :type user_visible_state: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerState + :type user_visible_state: str or ~azure.mgmt.rdbms.postgresql.models.ServerState :param fully_qualified_domain_name: The fully qualified domain name of a server. :type fully_qualified_domain_name: str :param earliest_restore_date: Earliest restore point creation time (ISO8601 format). :type earliest_restore_date: ~datetime.datetime :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile :param replication_role: The replication role of the server. :type replication_role: str :param master_server_id: The master server id of a replica server. @@ -1066,11 +1152,10 @@ class Server(TrackedResource): :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.postgresql.models.PublicNetworkAccessEnum :ivar private_endpoint_connections: List of private endpoint connections on a server. :vartype private_endpoint_connections: - list[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerPrivateEndpointConnection] + list[~azure.mgmt.rdbms.postgresql.models.ServerPrivateEndpointConnection] """ _validation = { @@ -1137,13 +1222,13 @@ class ServerAdministratorResource(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar administrator_type: The type of administrator. Default value: "ActiveDirectory". :vartype administrator_type: str @@ -1188,7 +1273,7 @@ class ServerAdministratorResourceListResult(msrest.serialization.Model): """The response to a list Active Directory Administrators request. :param value: The list of server Active Directory Administrators for the server. - :type value: list[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerAdministratorResource] + :type value: list[~azure.mgmt.rdbms.postgresql.models.ServerAdministratorResource] """ _attribute_map = { @@ -1209,11 +1294,11 @@ class ServerForCreate(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ResourceIdentity + :type identity: ~azure.mgmt.rdbms.postgresql.models.ResourceIdentity :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.Sku + :type sku: ~azure.mgmt.rdbms.postgresql.models.Sku :param properties: Required. Properties of the server. - :type properties: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerPropertiesForCreate + :type properties: ~azure.mgmt.rdbms.postgresql.models.ServerPropertiesForCreate :param location: Required. The location the resource resides in. :type location: str :param tags: A set of tags. Application-specific metadata in the form of key-value pairs. @@ -1250,19 +1335,19 @@ class ServerKey(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar kind: Kind of encryption protector used to protect the key. :vartype kind: str :param server_key_type: The key type like 'AzureKeyVault'. Possible values include: "AzureKeyVault". - :type server_key_type: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerKeyType + :type server_key_type: str or ~azure.mgmt.rdbms.postgresql.models.ServerKeyType :param uri: The URI of the key. :type uri: str :ivar creation_date: The key creation date. @@ -1304,7 +1389,7 @@ class ServerKeyListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: A list of PostgreSQL Server keys. - :vartype value: list[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerKey] + :vartype value: list[~azure.mgmt.rdbms.postgresql.models.ServerKey] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -1332,7 +1417,7 @@ class ServerListResult(msrest.serialization.Model): """A list of servers. :param value: The list of servers. - :type value: list[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.Server] + :type value: list[~azure.mgmt.rdbms.postgresql.models.Server] """ _attribute_map = { @@ -1356,7 +1441,7 @@ class ServerPrivateEndpointConnection(msrest.serialization.Model): :vartype id: str :ivar properties: Private endpoint connection properties. :vartype properties: - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerPrivateEndpointConnectionProperties + ~azure.mgmt.rdbms.postgresql.models.ServerPrivateEndpointConnectionProperties """ _validation = { @@ -1384,15 +1469,15 @@ class ServerPrivateEndpointConnectionProperties(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :param private_endpoint: Private endpoint which the connection belongs to. - :type private_endpoint: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PrivateEndpointProperty + :type private_endpoint: ~azure.mgmt.rdbms.postgresql.models.PrivateEndpointProperty :param private_link_service_connection_state: Connection state of the private endpoint connection. :type private_link_service_connection_state: - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerPrivateLinkServiceConnectionStateProperty + ~azure.mgmt.rdbms.postgresql.models.ServerPrivateLinkServiceConnectionStateProperty :ivar provisioning_state: State of the private endpoint connection. Possible values include: "Approving", "Ready", "Dropping", "Failed", "Rejecting". :vartype provisioning_state: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PrivateEndpointProvisioningState + ~azure.mgmt.rdbms.postgresql.models.PrivateEndpointProvisioningState """ _validation = { @@ -1425,13 +1510,13 @@ class ServerPrivateLinkServiceConnectionStateProperty(msrest.serialization.Model :param status: Required. The private link service connection status. Possible values include: "Approved", "Pending", "Rejected", "Disconnected". :type status: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PrivateLinkServiceConnectionStateStatus + ~azure.mgmt.rdbms.postgresql.models.PrivateLinkServiceConnectionStateStatus :param description: Required. The private link service connection description. :type description: str :ivar actions_required: The actions required for private link service connection. Possible values include: "None". :vartype actions_required: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PrivateLinkServiceConnectionStateActionsRequire + ~azure.mgmt.rdbms.postgresql.models.PrivateLinkServiceConnectionStateActionsRequire """ _validation = { @@ -1466,29 +1551,26 @@ class ServerPropertiesForCreate(msrest.serialization.Model): :param version: Server version. Possible values include: "9.5", "9.6", "10", "10.0", "10.2", "11". - :type version: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum :param minimal_tls_version: Enforce a minimal Tls version for the server. Possible values include: "TLS1_0", "TLS1_1", "TLS1_2", "TLSEnforcementDisabled". - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.MinimalTlsVersionEnum + :type minimal_tls_version: str or ~azure.mgmt.rdbms.postgresql.models.MinimalTlsVersionEnum :param infrastructure_encryption: Status showing whether the server enabled infrastructure encryption. Possible values include: "Enabled", "Disabled". :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.InfrastructureEncryption + ~azure.mgmt.rdbms.postgresql.models.InfrastructureEncryption :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.postgresql.models.PublicNetworkAccessEnum :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile :param create_mode: Required. The mode to create a new server.Constant filled by server. Possible values include: "Default", "PointInTimeRestore", "GeoRestore", "Replica". - :type create_mode: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.CreateMode + :type create_mode: str or ~azure.mgmt.rdbms.postgresql.models.CreateMode """ _validation = { @@ -1530,29 +1612,26 @@ class ServerPropertiesForDefaultCreate(ServerPropertiesForCreate): :param version: Server version. Possible values include: "9.5", "9.6", "10", "10.0", "10.2", "11". - :type version: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum :param minimal_tls_version: Enforce a minimal Tls version for the server. Possible values include: "TLS1_0", "TLS1_1", "TLS1_2", "TLSEnforcementDisabled". - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.MinimalTlsVersionEnum + :type minimal_tls_version: str or ~azure.mgmt.rdbms.postgresql.models.MinimalTlsVersionEnum :param infrastructure_encryption: Status showing whether the server enabled infrastructure encryption. Possible values include: "Enabled", "Disabled". :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.InfrastructureEncryption + ~azure.mgmt.rdbms.postgresql.models.InfrastructureEncryption :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.postgresql.models.PublicNetworkAccessEnum :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile :param create_mode: Required. The mode to create a new server.Constant filled by server. Possible values include: "Default", "PointInTimeRestore", "GeoRestore", "Replica". - :type create_mode: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.CreateMode + :type create_mode: str or ~azure.mgmt.rdbms.postgresql.models.CreateMode :param administrator_login: Required. The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). :type administrator_login: str @@ -1595,29 +1674,26 @@ class ServerPropertiesForGeoRestore(ServerPropertiesForCreate): :param version: Server version. Possible values include: "9.5", "9.6", "10", "10.0", "10.2", "11". - :type version: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum :param minimal_tls_version: Enforce a minimal Tls version for the server. Possible values include: "TLS1_0", "TLS1_1", "TLS1_2", "TLSEnforcementDisabled". - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.MinimalTlsVersionEnum + :type minimal_tls_version: str or ~azure.mgmt.rdbms.postgresql.models.MinimalTlsVersionEnum :param infrastructure_encryption: Status showing whether the server enabled infrastructure encryption. Possible values include: "Enabled", "Disabled". :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.InfrastructureEncryption + ~azure.mgmt.rdbms.postgresql.models.InfrastructureEncryption :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.postgresql.models.PublicNetworkAccessEnum :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile :param create_mode: Required. The mode to create a new server.Constant filled by server. Possible values include: "Default", "PointInTimeRestore", "GeoRestore", "Replica". - :type create_mode: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.CreateMode + :type create_mode: str or ~azure.mgmt.rdbms.postgresql.models.CreateMode :param source_server_id: Required. The source server id to restore from. :type source_server_id: str """ @@ -1654,29 +1730,26 @@ class ServerPropertiesForReplica(ServerPropertiesForCreate): :param version: Server version. Possible values include: "9.5", "9.6", "10", "10.0", "10.2", "11". - :type version: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum :param minimal_tls_version: Enforce a minimal Tls version for the server. Possible values include: "TLS1_0", "TLS1_1", "TLS1_2", "TLSEnforcementDisabled". - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.MinimalTlsVersionEnum + :type minimal_tls_version: str or ~azure.mgmt.rdbms.postgresql.models.MinimalTlsVersionEnum :param infrastructure_encryption: Status showing whether the server enabled infrastructure encryption. Possible values include: "Enabled", "Disabled". :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.InfrastructureEncryption + ~azure.mgmt.rdbms.postgresql.models.InfrastructureEncryption :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.postgresql.models.PublicNetworkAccessEnum :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile :param create_mode: Required. The mode to create a new server.Constant filled by server. Possible values include: "Default", "PointInTimeRestore", "GeoRestore", "Replica". - :type create_mode: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.CreateMode + :type create_mode: str or ~azure.mgmt.rdbms.postgresql.models.CreateMode :param source_server_id: Required. The master server id to create replica from. :type source_server_id: str """ @@ -1713,29 +1786,26 @@ class ServerPropertiesForRestore(ServerPropertiesForCreate): :param version: Server version. Possible values include: "9.5", "9.6", "10", "10.0", "10.2", "11". - :type version: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum :param minimal_tls_version: Enforce a minimal Tls version for the server. Possible values include: "TLS1_0", "TLS1_1", "TLS1_2", "TLSEnforcementDisabled". - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.MinimalTlsVersionEnum + :type minimal_tls_version: str or ~azure.mgmt.rdbms.postgresql.models.MinimalTlsVersionEnum :param infrastructure_encryption: Status showing whether the server enabled infrastructure encryption. Possible values include: "Enabled", "Disabled". :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.InfrastructureEncryption + ~azure.mgmt.rdbms.postgresql.models.InfrastructureEncryption :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.postgresql.models.PublicNetworkAccessEnum :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile :param create_mode: Required. The mode to create a new server.Constant filled by server. Possible values include: "Default", "PointInTimeRestore", "GeoRestore", "Replica". - :type create_mode: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.CreateMode + :type create_mode: str or ~azure.mgmt.rdbms.postgresql.models.CreateMode :param source_server_id: Required. The source server id to restore from. :type source_server_id: str :param restore_point_in_time: Required. Restore point creation time (ISO8601 format), @@ -1776,18 +1846,17 @@ class ServerSecurityAlertPolicy(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param state: Specifies the state of the policy, whether it is enabled or disabled. Possible values include: "Enabled", "Disabled". - :type state: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerSecurityAlertPolicyState + :type state: str or ~azure.mgmt.rdbms.postgresql.models.ServerSecurityAlertPolicyState :param disabled_alerts: Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly. :type disabled_alerts: list[str] @@ -1843,31 +1912,28 @@ class ServerUpdateParameters(msrest.serialization.Model): """Parameters allowed to update for a server. :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ResourceIdentity + :type identity: ~azure.mgmt.rdbms.postgresql.models.ResourceIdentity :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.Sku + :type sku: ~azure.mgmt.rdbms.postgresql.models.Sku :param tags: A set of tags. Application-specific metadata in the form of key-value pairs. :type tags: dict[str, str] :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile :param administrator_login_password: The password of the administrator login. :type administrator_login_password: str :param version: The version of a server. Possible values include: "9.5", "9.6", "10", "10.0", "10.2", "11". - :type version: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum :param minimal_tls_version: Enforce a minimal Tls version for the server. Possible values include: "TLS1_0", "TLS1_1", "TLS1_2", "TLSEnforcementDisabled". - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.MinimalTlsVersionEnum + :type minimal_tls_version: str or ~azure.mgmt.rdbms.postgresql.models.MinimalTlsVersionEnum :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.postgresql.models.PublicNetworkAccessEnum :param replication_role: The replication role of the server. :type replication_role: str """ @@ -1912,7 +1978,7 @@ class Sku(msrest.serialization.Model): :type name: str :param tier: The tier of the particular SKU, e.g. Basic. Possible values include: "Basic", "GeneralPurpose", "MemoryOptimized". - :type tier: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.SkuTier + :type tier: str or ~azure.mgmt.rdbms.postgresql.models.SkuTier :param capacity: The scale up/out capacity, representing server's compute units. :type capacity: int :param size: The size code, to be interpreted by resource as appropriate. @@ -1953,13 +2019,12 @@ class StorageProfile(msrest.serialization.Model): :type backup_retention_days: int :param geo_redundant_backup: Enable Geo-redundant or not for server backup. Possible values include: "Enabled", "Disabled". - :type geo_redundant_backup: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.GeoRedundantBackup + :type geo_redundant_backup: str or ~azure.mgmt.rdbms.postgresql.models.GeoRedundantBackup :param storage_mb: Max storage allowed for a server. :type storage_mb: int :param storage_autogrow: Enable Storage Auto Grow. Possible values include: "Enabled", "Disabled". - :type storage_autogrow: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.StorageAutogrow + :type storage_autogrow: str or ~azure.mgmt.rdbms.postgresql.models.StorageAutogrow """ _attribute_map = { @@ -2004,13 +2069,13 @@ class VirtualNetworkRule(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param virtual_network_subnet_id: The ARM resource id of the virtual network subnet. :type virtual_network_subnet_id: str @@ -2019,7 +2084,7 @@ class VirtualNetworkRule(Resource): :type ignore_missing_vnet_service_endpoint: bool :ivar state: Virtual Network Rule State. Possible values include: "Initializing", "InProgress", "Ready", "Deleting", "Unknown". - :vartype state: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.VirtualNetworkRuleState + :vartype state: str or ~azure.mgmt.rdbms.postgresql.models.VirtualNetworkRuleState """ _validation = { @@ -2054,7 +2119,7 @@ class VirtualNetworkRuleListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: Array of results. - :vartype value: list[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.VirtualNetworkRule] + :vartype value: list[~azure.mgmt.rdbms.postgresql.models.VirtualNetworkRule] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/models/_models_py3.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/_models_py3.py similarity index 84% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/models/_models_py3.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/_models_py3.py index 75d78e226c24..ad193002626b 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/models/_models_py3.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/_models_py3.py @@ -15,17 +15,17 @@ class Resource(msrest.serialization.Model): - """Resource. + """Common fields that are returned in the response for all Azure Resource Manager resources. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str """ @@ -56,13 +56,13 @@ class Configuration(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param value: Value of the configuration. :type value: str @@ -120,7 +120,7 @@ class ConfigurationListResult(msrest.serialization.Model): """A list of server configurations. :param value: The list of server configurations. - :type value: list[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.Configuration] + :type value: list[~azure.mgmt.rdbms.postgresql.models.Configuration] """ _attribute_map = { @@ -142,13 +142,13 @@ class Database(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param charset: The charset of the database. :type charset: str @@ -186,7 +186,7 @@ class DatabaseListResult(msrest.serialization.Model): """A List of databases. :param value: The list of databases housed in a server. - :type value: list[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.Database] + :type value: list[~azure.mgmt.rdbms.postgresql.models.Database] """ _attribute_map = { @@ -234,7 +234,7 @@ def __init__( class ErrorResponse(msrest.serialization.Model): - """The resource management error response. + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). Variables are only populated by the server, and will be ignored when sending a request. @@ -245,10 +245,9 @@ class ErrorResponse(msrest.serialization.Model): :ivar target: The error target. :vartype target: str :ivar details: The error details. - :vartype details: list[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ErrorResponse] + :vartype details: list[~azure.mgmt.rdbms.postgresql.models.ErrorResponse] :ivar additional_info: The error additional info. - :vartype additional_info: - list[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ErrorAdditionalInfo] + :vartype additional_info: list[~azure.mgmt.rdbms.postgresql.models.ErrorAdditionalInfo] """ _validation = { @@ -286,13 +285,13 @@ class FirewallRule(Resource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param start_ip_address: Required. The start IP address of the server firewall rule. Must be IPv4 format. @@ -334,7 +333,7 @@ class FirewallRuleListResult(msrest.serialization.Model): """A list of firewall rules. :param value: The list of firewall rules in a server. - :type value: list[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.FirewallRule] + :type value: list[~azure.mgmt.rdbms.postgresql.models.FirewallRule] """ _attribute_map = { @@ -356,13 +355,13 @@ class LogFile(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param size_in_kb: Size of the log file. :type size_in_kb: long @@ -415,7 +414,7 @@ class LogFileListResult(msrest.serialization.Model): """A list of log files. :param value: The list of log files. - :type value: list[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.LogFile] + :type value: list[~azure.mgmt.rdbms.postgresql.models.LogFile] """ _attribute_map = { @@ -503,10 +502,10 @@ class Operation(msrest.serialization.Model): :ivar name: The name of the operation being performed on this particular object. :vartype name: str :ivar display: The localized display information for this particular operation or action. - :vartype display: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.OperationDisplay + :vartype display: ~azure.mgmt.rdbms.postgresql.models.OperationDisplay :ivar origin: The intended executor of the operation. Possible values include: "NotSpecified", "user", "system". - :vartype origin: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.OperationOrigin + :vartype origin: str or ~azure.mgmt.rdbms.postgresql.models.OperationOrigin :ivar properties: Additional descriptions for the operation. :vartype properties: dict[str, object] """ @@ -580,7 +579,7 @@ class OperationListResult(msrest.serialization.Model): """A list of resource provider operations. :param value: The list of resource provider operations. - :type value: list[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.Operation] + :type value: list[~azure.mgmt.rdbms.postgresql.models.Operation] """ _attribute_map = { @@ -601,7 +600,7 @@ class PerformanceTierListResult(msrest.serialization.Model): """A list of performance tiers. :param value: The list of performance tiers. - :type value: list[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PerformanceTierProperties] + :type value: list[~azure.mgmt.rdbms.postgresql.models.PerformanceTierProperties] """ _attribute_map = { @@ -623,13 +622,33 @@ class PerformanceTierProperties(msrest.serialization.Model): :param id: ID of the performance tier. :type id: str + :param max_backup_retention_days: Maximum Backup retention in days for the performance tier + edition. + :type max_backup_retention_days: int + :param min_backup_retention_days: Minimum Backup retention in days for the performance tier + edition. + :type min_backup_retention_days: int + :param max_storage_mb: Max storage allowed for a server. + :type max_storage_mb: int + :param min_large_storage_mb: Max storage allowed for a server. + :type min_large_storage_mb: int + :param max_large_storage_mb: Max storage allowed for a server. + :type max_large_storage_mb: int + :param min_storage_mb: Max storage allowed for a server. + :type min_storage_mb: int :param service_level_objectives: Service level objectives associated with the performance tier. :type service_level_objectives: - list[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PerformanceTierServiceLevelObjectives] + list[~azure.mgmt.rdbms.postgresql.models.PerformanceTierServiceLevelObjectives] """ _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'max_backup_retention_days': {'key': 'maxBackupRetentionDays', 'type': 'int'}, + 'min_backup_retention_days': {'key': 'minBackupRetentionDays', 'type': 'int'}, + 'max_storage_mb': {'key': 'maxStorageMB', 'type': 'int'}, + 'min_large_storage_mb': {'key': 'minLargeStorageMB', 'type': 'int'}, + 'max_large_storage_mb': {'key': 'maxLargeStorageMB', 'type': 'int'}, + 'min_storage_mb': {'key': 'minStorageMB', 'type': 'int'}, 'service_level_objectives': {'key': 'serviceLevelObjectives', 'type': '[PerformanceTierServiceLevelObjectives]'}, } @@ -637,11 +656,23 @@ def __init__( self, *, id: Optional[str] = None, + max_backup_retention_days: Optional[int] = None, + min_backup_retention_days: Optional[int] = None, + max_storage_mb: Optional[int] = None, + min_large_storage_mb: Optional[int] = None, + max_large_storage_mb: Optional[int] = None, + min_storage_mb: Optional[int] = None, service_level_objectives: Optional[List["PerformanceTierServiceLevelObjectives"]] = None, **kwargs ): super(PerformanceTierProperties, self).__init__(**kwargs) self.id = id + self.max_backup_retention_days = max_backup_retention_days + self.min_backup_retention_days = min_backup_retention_days + self.max_storage_mb = max_storage_mb + self.min_large_storage_mb = min_large_storage_mb + self.max_large_storage_mb = max_large_storage_mb + self.min_storage_mb = min_storage_mb self.service_level_objectives = service_level_objectives @@ -708,20 +739,20 @@ class PrivateEndpointConnection(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param private_endpoint: Private endpoint which the connection belongs to. - :type private_endpoint: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PrivateEndpointProperty + :type private_endpoint: ~azure.mgmt.rdbms.postgresql.models.PrivateEndpointProperty :param private_link_service_connection_state: Connection state of the private endpoint connection. :type private_link_service_connection_state: - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PrivateLinkServiceConnectionStateProperty + ~azure.mgmt.rdbms.postgresql.models.PrivateLinkServiceConnectionStateProperty :ivar provisioning_state: State of the private endpoint connection. :vartype provisioning_state: str """ @@ -761,7 +792,7 @@ class PrivateEndpointConnectionListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: Array of results. - :vartype value: list[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PrivateEndpointConnection] + :vartype value: list[~azure.mgmt.rdbms.postgresql.models.PrivateEndpointConnection] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -811,17 +842,16 @@ class PrivateLinkResource(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar properties: The private link resource group id. - :vartype properties: - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PrivateLinkResourceProperties + :vartype properties: ~azure.mgmt.rdbms.postgresql.models.PrivateLinkResourceProperties """ _validation = { @@ -852,7 +882,7 @@ class PrivateLinkResourceListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: Array of results. - :vartype value: list[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PrivateLinkResource] + :vartype value: list[~azure.mgmt.rdbms.postgresql.models.PrivateLinkResource] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -947,17 +977,17 @@ def __init__( class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have everything other than required location and tags. + """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str """ @@ -980,6 +1010,70 @@ def __init__( super(ProxyResource, self).__init__(**kwargs) +class RecoverableServerResource(Resource): + """A recoverable server resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar last_available_backup_date_time: The last available backup date time. + :vartype last_available_backup_date_time: str + :ivar service_level_objective: The service level objective. + :vartype service_level_objective: str + :ivar edition: Edition of the performance tier. + :vartype edition: str + :ivar v_core: vCore associated with the service level objective. + :vartype v_core: int + :ivar hardware_generation: Hardware generation associated with the service level objective. + :vartype hardware_generation: str + :ivar version: The PostgreSQL version. + :vartype version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_available_backup_date_time': {'readonly': True}, + 'service_level_objective': {'readonly': True}, + 'edition': {'readonly': True}, + 'v_core': {'readonly': True}, + 'hardware_generation': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'last_available_backup_date_time': {'key': 'properties.lastAvailableBackupDateTime', 'type': 'str'}, + 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, + 'edition': {'key': 'properties.edition', 'type': 'str'}, + 'v_core': {'key': 'properties.vCore', 'type': 'int'}, + 'hardware_generation': {'key': 'properties.hardwareGeneration', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RecoverableServerResource, self).__init__(**kwargs) + self.last_available_backup_date_time = None + self.service_level_objective = None + self.edition = None + self.v_core = None + self.hardware_generation = None + self.version = None + + class ResourceIdentity(msrest.serialization.Model): """Azure Active Directory identity configuration for a resource. @@ -990,7 +1084,7 @@ class ResourceIdentity(msrest.serialization.Model): :param type: The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource. Possible values include: "SystemAssigned". - :type type: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.IdentityType + :type type: str or ~azure.mgmt.rdbms.postgresql.models.IdentityType :ivar tenant_id: The Azure Active Directory tenant id. :vartype tenant_id: str """ @@ -1019,19 +1113,19 @@ def __init__( class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. + """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] @@ -1073,52 +1167,50 @@ class Server(TrackedResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param location: Required. The geo-location where the resource lives. :type location: str :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ResourceIdentity + :type identity: ~azure.mgmt.rdbms.postgresql.models.ResourceIdentity :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.Sku + :type sku: ~azure.mgmt.rdbms.postgresql.models.Sku :param administrator_login: The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). :type administrator_login: str :param version: Server version. Possible values include: "9.5", "9.6", "10", "10.0", "10.2", "11". - :type version: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum :param minimal_tls_version: Enforce a minimal Tls version for the server. Possible values include: "TLS1_0", "TLS1_1", "TLS1_2", "TLSEnforcementDisabled". - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.MinimalTlsVersionEnum + :type minimal_tls_version: str or ~azure.mgmt.rdbms.postgresql.models.MinimalTlsVersionEnum :ivar byok_enforcement: Status showing whether the server data encryption is enabled with customer-managed keys. :vartype byok_enforcement: str :param infrastructure_encryption: Status showing whether the server enabled infrastructure encryption. Possible values include: "Enabled", "Disabled". :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.InfrastructureEncryption + ~azure.mgmt.rdbms.postgresql.models.InfrastructureEncryption :param user_visible_state: A state of a server that is visible to user. Possible values include: "Ready", "Dropping", "Disabled", "Inaccessible". - :type user_visible_state: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerState + :type user_visible_state: str or ~azure.mgmt.rdbms.postgresql.models.ServerState :param fully_qualified_domain_name: The fully qualified domain name of a server. :type fully_qualified_domain_name: str :param earliest_restore_date: Earliest restore point creation time (ISO8601 format). :type earliest_restore_date: ~datetime.datetime :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile :param replication_role: The replication role of the server. :type replication_role: str :param master_server_id: The master server id of a replica server. @@ -1128,11 +1220,10 @@ class Server(TrackedResource): :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.postgresql.models.PublicNetworkAccessEnum :ivar private_endpoint_connections: List of private endpoint connections on a server. :vartype private_endpoint_connections: - list[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerPrivateEndpointConnection] + list[~azure.mgmt.rdbms.postgresql.models.ServerPrivateEndpointConnection] """ _validation = { @@ -1217,13 +1308,13 @@ class ServerAdministratorResource(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar administrator_type: The type of administrator. Default value: "ActiveDirectory". :vartype administrator_type: str @@ -1272,7 +1363,7 @@ class ServerAdministratorResourceListResult(msrest.serialization.Model): """The response to a list Active Directory Administrators request. :param value: The list of server Active Directory Administrators for the server. - :type value: list[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerAdministratorResource] + :type value: list[~azure.mgmt.rdbms.postgresql.models.ServerAdministratorResource] """ _attribute_map = { @@ -1295,11 +1386,11 @@ class ServerForCreate(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ResourceIdentity + :type identity: ~azure.mgmt.rdbms.postgresql.models.ResourceIdentity :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.Sku + :type sku: ~azure.mgmt.rdbms.postgresql.models.Sku :param properties: Required. Properties of the server. - :type properties: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerPropertiesForCreate + :type properties: ~azure.mgmt.rdbms.postgresql.models.ServerPropertiesForCreate :param location: Required. The location the resource resides in. :type location: str :param tags: A set of tags. Application-specific metadata in the form of key-value pairs. @@ -1342,19 +1433,19 @@ class ServerKey(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar kind: Kind of encryption protector used to protect the key. :vartype kind: str :param server_key_type: The key type like 'AzureKeyVault'. Possible values include: "AzureKeyVault". - :type server_key_type: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerKeyType + :type server_key_type: str or ~azure.mgmt.rdbms.postgresql.models.ServerKeyType :param uri: The URI of the key. :type uri: str :ivar creation_date: The key creation date. @@ -1399,7 +1490,7 @@ class ServerKeyListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: A list of PostgreSQL Server keys. - :vartype value: list[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerKey] + :vartype value: list[~azure.mgmt.rdbms.postgresql.models.ServerKey] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -1427,7 +1518,7 @@ class ServerListResult(msrest.serialization.Model): """A list of servers. :param value: The list of servers. - :type value: list[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.Server] + :type value: list[~azure.mgmt.rdbms.postgresql.models.Server] """ _attribute_map = { @@ -1453,7 +1544,7 @@ class ServerPrivateEndpointConnection(msrest.serialization.Model): :vartype id: str :ivar properties: Private endpoint connection properties. :vartype properties: - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerPrivateEndpointConnectionProperties + ~azure.mgmt.rdbms.postgresql.models.ServerPrivateEndpointConnectionProperties """ _validation = { @@ -1481,15 +1572,15 @@ class ServerPrivateEndpointConnectionProperties(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :param private_endpoint: Private endpoint which the connection belongs to. - :type private_endpoint: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PrivateEndpointProperty + :type private_endpoint: ~azure.mgmt.rdbms.postgresql.models.PrivateEndpointProperty :param private_link_service_connection_state: Connection state of the private endpoint connection. :type private_link_service_connection_state: - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerPrivateLinkServiceConnectionStateProperty + ~azure.mgmt.rdbms.postgresql.models.ServerPrivateLinkServiceConnectionStateProperty :ivar provisioning_state: State of the private endpoint connection. Possible values include: "Approving", "Ready", "Dropping", "Failed", "Rejecting". :vartype provisioning_state: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PrivateEndpointProvisioningState + ~azure.mgmt.rdbms.postgresql.models.PrivateEndpointProvisioningState """ _validation = { @@ -1525,13 +1616,13 @@ class ServerPrivateLinkServiceConnectionStateProperty(msrest.serialization.Model :param status: Required. The private link service connection status. Possible values include: "Approved", "Pending", "Rejected", "Disconnected". :type status: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PrivateLinkServiceConnectionStateStatus + ~azure.mgmt.rdbms.postgresql.models.PrivateLinkServiceConnectionStateStatus :param description: Required. The private link service connection description. :type description: str :ivar actions_required: The actions required for private link service connection. Possible values include: "None". :vartype actions_required: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PrivateLinkServiceConnectionStateActionsRequire + ~azure.mgmt.rdbms.postgresql.models.PrivateLinkServiceConnectionStateActionsRequire """ _validation = { @@ -1569,29 +1660,26 @@ class ServerPropertiesForCreate(msrest.serialization.Model): :param version: Server version. Possible values include: "9.5", "9.6", "10", "10.0", "10.2", "11". - :type version: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum :param minimal_tls_version: Enforce a minimal Tls version for the server. Possible values include: "TLS1_0", "TLS1_1", "TLS1_2", "TLSEnforcementDisabled". - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.MinimalTlsVersionEnum + :type minimal_tls_version: str or ~azure.mgmt.rdbms.postgresql.models.MinimalTlsVersionEnum :param infrastructure_encryption: Status showing whether the server enabled infrastructure encryption. Possible values include: "Enabled", "Disabled". :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.InfrastructureEncryption + ~azure.mgmt.rdbms.postgresql.models.InfrastructureEncryption :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.postgresql.models.PublicNetworkAccessEnum :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile :param create_mode: Required. The mode to create a new server.Constant filled by server. Possible values include: "Default", "PointInTimeRestore", "GeoRestore", "Replica". - :type create_mode: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.CreateMode + :type create_mode: str or ~azure.mgmt.rdbms.postgresql.models.CreateMode """ _validation = { @@ -1640,29 +1728,26 @@ class ServerPropertiesForDefaultCreate(ServerPropertiesForCreate): :param version: Server version. Possible values include: "9.5", "9.6", "10", "10.0", "10.2", "11". - :type version: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum :param minimal_tls_version: Enforce a minimal Tls version for the server. Possible values include: "TLS1_0", "TLS1_1", "TLS1_2", "TLSEnforcementDisabled". - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.MinimalTlsVersionEnum + :type minimal_tls_version: str or ~azure.mgmt.rdbms.postgresql.models.MinimalTlsVersionEnum :param infrastructure_encryption: Status showing whether the server enabled infrastructure encryption. Possible values include: "Enabled", "Disabled". :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.InfrastructureEncryption + ~azure.mgmt.rdbms.postgresql.models.InfrastructureEncryption :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.postgresql.models.PublicNetworkAccessEnum :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile :param create_mode: Required. The mode to create a new server.Constant filled by server. Possible values include: "Default", "PointInTimeRestore", "GeoRestore", "Replica". - :type create_mode: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.CreateMode + :type create_mode: str or ~azure.mgmt.rdbms.postgresql.models.CreateMode :param administrator_login: Required. The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). :type administrator_login: str @@ -1714,29 +1799,26 @@ class ServerPropertiesForGeoRestore(ServerPropertiesForCreate): :param version: Server version. Possible values include: "9.5", "9.6", "10", "10.0", "10.2", "11". - :type version: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum :param minimal_tls_version: Enforce a minimal Tls version for the server. Possible values include: "TLS1_0", "TLS1_1", "TLS1_2", "TLSEnforcementDisabled". - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.MinimalTlsVersionEnum + :type minimal_tls_version: str or ~azure.mgmt.rdbms.postgresql.models.MinimalTlsVersionEnum :param infrastructure_encryption: Status showing whether the server enabled infrastructure encryption. Possible values include: "Enabled", "Disabled". :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.InfrastructureEncryption + ~azure.mgmt.rdbms.postgresql.models.InfrastructureEncryption :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.postgresql.models.PublicNetworkAccessEnum :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile :param create_mode: Required. The mode to create a new server.Constant filled by server. Possible values include: "Default", "PointInTimeRestore", "GeoRestore", "Replica". - :type create_mode: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.CreateMode + :type create_mode: str or ~azure.mgmt.rdbms.postgresql.models.CreateMode :param source_server_id: Required. The source server id to restore from. :type source_server_id: str """ @@ -1781,29 +1863,26 @@ class ServerPropertiesForReplica(ServerPropertiesForCreate): :param version: Server version. Possible values include: "9.5", "9.6", "10", "10.0", "10.2", "11". - :type version: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum :param minimal_tls_version: Enforce a minimal Tls version for the server. Possible values include: "TLS1_0", "TLS1_1", "TLS1_2", "TLSEnforcementDisabled". - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.MinimalTlsVersionEnum + :type minimal_tls_version: str or ~azure.mgmt.rdbms.postgresql.models.MinimalTlsVersionEnum :param infrastructure_encryption: Status showing whether the server enabled infrastructure encryption. Possible values include: "Enabled", "Disabled". :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.InfrastructureEncryption + ~azure.mgmt.rdbms.postgresql.models.InfrastructureEncryption :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.postgresql.models.PublicNetworkAccessEnum :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile :param create_mode: Required. The mode to create a new server.Constant filled by server. Possible values include: "Default", "PointInTimeRestore", "GeoRestore", "Replica". - :type create_mode: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.CreateMode + :type create_mode: str or ~azure.mgmt.rdbms.postgresql.models.CreateMode :param source_server_id: Required. The master server id to create replica from. :type source_server_id: str """ @@ -1848,29 +1927,26 @@ class ServerPropertiesForRestore(ServerPropertiesForCreate): :param version: Server version. Possible values include: "9.5", "9.6", "10", "10.0", "10.2", "11". - :type version: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum :param minimal_tls_version: Enforce a minimal Tls version for the server. Possible values include: "TLS1_0", "TLS1_1", "TLS1_2", "TLSEnforcementDisabled". - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.MinimalTlsVersionEnum + :type minimal_tls_version: str or ~azure.mgmt.rdbms.postgresql.models.MinimalTlsVersionEnum :param infrastructure_encryption: Status showing whether the server enabled infrastructure encryption. Possible values include: "Enabled", "Disabled". :type infrastructure_encryption: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.InfrastructureEncryption + ~azure.mgmt.rdbms.postgresql.models.InfrastructureEncryption :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.postgresql.models.PublicNetworkAccessEnum :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile :param create_mode: Required. The mode to create a new server.Constant filled by server. Possible values include: "Default", "PointInTimeRestore", "GeoRestore", "Replica". - :type create_mode: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.CreateMode + :type create_mode: str or ~azure.mgmt.rdbms.postgresql.models.CreateMode :param source_server_id: Required. The source server id to restore from. :type source_server_id: str :param restore_point_in_time: Required. Restore point creation time (ISO8601 format), @@ -1920,18 +1996,17 @@ class ServerSecurityAlertPolicy(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param state: Specifies the state of the policy, whether it is enabled or disabled. Possible values include: "Enabled", "Disabled". - :type state: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerSecurityAlertPolicyState + :type state: str or ~azure.mgmt.rdbms.postgresql.models.ServerSecurityAlertPolicyState :param disabled_alerts: Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly. :type disabled_alerts: list[str] @@ -1995,31 +2070,28 @@ class ServerUpdateParameters(msrest.serialization.Model): """Parameters allowed to update for a server. :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ResourceIdentity + :type identity: ~azure.mgmt.rdbms.postgresql.models.ResourceIdentity :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.Sku + :type sku: ~azure.mgmt.rdbms.postgresql.models.Sku :param tags: A set of tags. Application-specific metadata in the form of key-value pairs. :type tags: dict[str, str] :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile :param administrator_login_password: The password of the administrator login. :type administrator_login_password: str :param version: The version of a server. Possible values include: "9.5", "9.6", "10", "10.0", "10.2", "11". - :type version: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion :param ssl_enforcement: Enable ssl enforcement or not when connect to server. Possible values include: "Enabled", "Disabled". - :type ssl_enforcement: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.SslEnforcementEnum + :type ssl_enforcement: str or ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum :param minimal_tls_version: Enforce a minimal Tls version for the server. Possible values include: "TLS1_0", "TLS1_1", "TLS1_2", "TLSEnforcementDisabled". - :type minimal_tls_version: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.MinimalTlsVersionEnum + :type minimal_tls_version: str or ~azure.mgmt.rdbms.postgresql.models.MinimalTlsVersionEnum :param public_network_access: Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PublicNetworkAccessEnum + :type public_network_access: str or ~azure.mgmt.rdbms.postgresql.models.PublicNetworkAccessEnum :param replication_role: The replication role of the server. :type replication_role: str """ @@ -2075,7 +2147,7 @@ class Sku(msrest.serialization.Model): :type name: str :param tier: The tier of the particular SKU, e.g. Basic. Possible values include: "Basic", "GeneralPurpose", "MemoryOptimized". - :type tier: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.SkuTier + :type tier: str or ~azure.mgmt.rdbms.postgresql.models.SkuTier :param capacity: The scale up/out capacity, representing server's compute units. :type capacity: int :param size: The size code, to be interpreted by resource as appropriate. @@ -2122,13 +2194,12 @@ class StorageProfile(msrest.serialization.Model): :type backup_retention_days: int :param geo_redundant_backup: Enable Geo-redundant or not for server backup. Possible values include: "Enabled", "Disabled". - :type geo_redundant_backup: str or - ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.GeoRedundantBackup + :type geo_redundant_backup: str or ~azure.mgmt.rdbms.postgresql.models.GeoRedundantBackup :param storage_mb: Max storage allowed for a server. :type storage_mb: int :param storage_autogrow: Enable Storage Auto Grow. Possible values include: "Enabled", "Disabled". - :type storage_autogrow: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.StorageAutogrow + :type storage_autogrow: str or ~azure.mgmt.rdbms.postgresql.models.StorageAutogrow """ _attribute_map = { @@ -2180,13 +2251,13 @@ class VirtualNetworkRule(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param virtual_network_subnet_id: The ARM resource id of the virtual network subnet. :type virtual_network_subnet_id: str @@ -2195,7 +2266,7 @@ class VirtualNetworkRule(Resource): :type ignore_missing_vnet_service_endpoint: bool :ivar state: Virtual Network Rule State. Possible values include: "Initializing", "InProgress", "Ready", "Deleting", "Unknown". - :vartype state: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.VirtualNetworkRuleState + :vartype state: str or ~azure.mgmt.rdbms.postgresql.models.VirtualNetworkRuleState """ _validation = { @@ -2233,7 +2304,7 @@ class VirtualNetworkRuleListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: Array of results. - :vartype value: list[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.VirtualNetworkRule] + :vartype value: list[~azure.mgmt.rdbms.postgresql.models.VirtualNetworkRule] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/models/_postgre_sql_management_client_enums.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/_postgre_sql_management_client_enums.py similarity index 100% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/models/_postgre_sql_management_client_enums.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/_postgre_sql_management_client_enums.py diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/__init__.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/__init__.py similarity index 85% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/__init__.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/__init__.py index 16012019075a..170155b06941 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/__init__.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/__init__.py @@ -12,8 +12,11 @@ from ._virtual_network_rules_operations import VirtualNetworkRulesOperations from ._databases_operations import DatabasesOperations from ._configurations_operations import ConfigurationsOperations +from ._server_parameters_operations import ServerParametersOperations from ._log_files_operations import LogFilesOperations from ._server_administrators_operations import ServerAdministratorsOperations +from ._recoverable_servers_operations import RecoverableServersOperations +from ._server_based_performance_tier_operations import ServerBasedPerformanceTierOperations from ._location_based_performance_tier_operations import LocationBasedPerformanceTierOperations from ._check_name_availability_operations import CheckNameAvailabilityOperations from ._operations import Operations @@ -29,8 +32,11 @@ 'VirtualNetworkRulesOperations', 'DatabasesOperations', 'ConfigurationsOperations', + 'ServerParametersOperations', 'LogFilesOperations', 'ServerAdministratorsOperations', + 'RecoverableServersOperations', + 'ServerBasedPerformanceTierOperations', 'LocationBasedPerformanceTierOperations', 'CheckNameAvailabilityOperations', 'Operations', diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_check_name_availability_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_check_name_availability_operations.py similarity index 90% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_check_name_availability_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_check_name_availability_operations.py index 453086f79c1b..65083a224944 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_check_name_availability_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_check_name_availability_operations.py @@ -13,7 +13,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -29,14 +29,14 @@ class CheckNameAvailabilityOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.postgresql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -46,21 +46,21 @@ def __init__(self, client, config, serializer, deserializer): def execute( self, - name_availability_request, # type: "models.NameAvailabilityRequest" + name_availability_request, # type: "_models.NameAvailabilityRequest" **kwargs # type: Any ): - # type: (...) -> "models.NameAvailability" + # type: (...) -> "_models.NameAvailability" """Check the availability of name for resource. :param name_availability_request: The required parameters for checking if resource name is available. - :type name_availability_request: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.NameAvailabilityRequest + :type name_availability_request: ~azure.mgmt.rdbms.postgresql.models.NameAvailabilityRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: NameAvailability, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.NameAvailability + :rtype: ~azure.mgmt.rdbms.postgresql.models.NameAvailability :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.NameAvailability"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NameAvailability"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_configurations_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_configurations_operations.py similarity index 93% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_configurations_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_configurations_operations.py index 348cc09379de..98443500872f 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_configurations_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_configurations_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -32,14 +32,14 @@ class ConfigurationsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.postgresql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,11 +52,11 @@ def _create_or_update_initial( resource_group_name, # type: str server_name, # type: str configuration_name, # type: str - parameters, # type: "models.Configuration" + parameters, # type: "_models.Configuration" **kwargs # type: Any ): - # type: (...) -> Optional["models.Configuration"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Configuration"]] + # type: (...) -> Optional["_models.Configuration"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Configuration"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -110,10 +110,10 @@ def begin_create_or_update( resource_group_name, # type: str server_name, # type: str configuration_name, # type: str - parameters, # type: "models.Configuration" + parameters, # type: "_models.Configuration" **kwargs # type: Any ): - # type: (...) -> LROPoller["models.Configuration"] + # type: (...) -> LROPoller["_models.Configuration"] """Updates a configuration of a server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -123,7 +123,7 @@ def begin_create_or_update( :param configuration_name: The name of the server configuration. :type configuration_name: str :param parameters: The required parameters for updating a server configuration. - :type parameters: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.Configuration + :type parameters: ~azure.mgmt.rdbms.postgresql.models.Configuration :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: True for ARMPolling, False for no polling, or a @@ -131,11 +131,11 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Configuration or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.Configuration] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.postgresql.models.Configuration] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.Configuration"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Configuration"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -189,7 +189,7 @@ def get( configuration_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.Configuration" + # type: (...) -> "_models.Configuration" """Gets information about a configuration of server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -200,10 +200,10 @@ def get( :type configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Configuration, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.Configuration + :rtype: ~azure.mgmt.rdbms.postgresql.models.Configuration :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Configuration"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Configuration"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -251,7 +251,7 @@ def list_by_server( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.ConfigurationListResult"] + # type: (...) -> Iterable["_models.ConfigurationListResult"] """List all the configurations in a given server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -260,10 +260,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ConfigurationListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ConfigurationListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql.models.ConfigurationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ConfigurationListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfigurationListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_databases_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_databases_operations.py similarity index 95% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_databases_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_databases_operations.py index e1134386a437..244e8a5b60d7 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_databases_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_databases_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -32,14 +32,14 @@ class DatabasesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.postgresql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,11 +52,11 @@ def _create_or_update_initial( resource_group_name, # type: str server_name, # type: str database_name, # type: str - parameters, # type: "models.Database" + parameters, # type: "_models.Database" **kwargs # type: Any ): - # type: (...) -> Optional["models.Database"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Database"]] + # type: (...) -> Optional["_models.Database"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Database"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -113,10 +113,10 @@ def begin_create_or_update( resource_group_name, # type: str server_name, # type: str database_name, # type: str - parameters, # type: "models.Database" + parameters, # type: "_models.Database" **kwargs # type: Any ): - # type: (...) -> LROPoller["models.Database"] + # type: (...) -> LROPoller["_models.Database"] """Creates a new database or updates an existing database. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -126,7 +126,7 @@ def begin_create_or_update( :param database_name: The name of the database. :type database_name: str :param parameters: The required parameters for creating or updating a database. - :type parameters: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.Database + :type parameters: ~azure.mgmt.rdbms.postgresql.models.Database :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: True for ARMPolling, False for no polling, or a @@ -134,11 +134,11 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Database or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.Database] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.postgresql.models.Database] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.Database"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Database"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -307,7 +307,7 @@ def get( database_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.Database" + # type: (...) -> "_models.Database" """Gets information about a database. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -318,10 +318,10 @@ def get( :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Database, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.Database + :rtype: ~azure.mgmt.rdbms.postgresql.models.Database :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Database"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Database"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -369,7 +369,7 @@ def list_by_server( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.DatabaseListResult"] + # type: (...) -> Iterable["_models.DatabaseListResult"] """List all the databases in a given server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -378,10 +378,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DatabaseListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.DatabaseListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql.models.DatabaseListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.DatabaseListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_firewall_rules_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_firewall_rules_operations.py similarity index 95% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_firewall_rules_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_firewall_rules_operations.py index fed27c32317e..e30b510d542e 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_firewall_rules_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_firewall_rules_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -32,14 +32,14 @@ class FirewallRulesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.postgresql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,11 +52,11 @@ def _create_or_update_initial( resource_group_name, # type: str server_name, # type: str firewall_rule_name, # type: str - parameters, # type: "models.FirewallRule" + parameters, # type: "_models.FirewallRule" **kwargs # type: Any ): - # type: (...) -> Optional["models.FirewallRule"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.FirewallRule"]] + # type: (...) -> Optional["_models.FirewallRule"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.FirewallRule"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -113,10 +113,10 @@ def begin_create_or_update( resource_group_name, # type: str server_name, # type: str firewall_rule_name, # type: str - parameters, # type: "models.FirewallRule" + parameters, # type: "_models.FirewallRule" **kwargs # type: Any ): - # type: (...) -> LROPoller["models.FirewallRule"] + # type: (...) -> LROPoller["_models.FirewallRule"] """Creates a new firewall rule or updates an existing firewall rule. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -126,7 +126,7 @@ def begin_create_or_update( :param firewall_rule_name: The name of the server firewall rule. :type firewall_rule_name: str :param parameters: The required parameters for creating or updating a firewall rule. - :type parameters: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.FirewallRule + :type parameters: ~azure.mgmt.rdbms.postgresql.models.FirewallRule :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: True for ARMPolling, False for no polling, or a @@ -134,11 +134,11 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either FirewallRule or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.FirewallRule] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.postgresql.models.FirewallRule] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.FirewallRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRule"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -307,7 +307,7 @@ def get( firewall_rule_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.FirewallRule" + # type: (...) -> "_models.FirewallRule" """Gets information about a server firewall rule. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -318,10 +318,10 @@ def get( :type firewall_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: FirewallRule, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.FirewallRule + :rtype: ~azure.mgmt.rdbms.postgresql.models.FirewallRule :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.FirewallRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRule"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -369,7 +369,7 @@ def list_by_server( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.FirewallRuleListResult"] + # type: (...) -> Iterable["_models.FirewallRuleListResult"] """List all the firewall rules in a given server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -378,10 +378,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either FirewallRuleListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.FirewallRuleListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql.models.FirewallRuleListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.FirewallRuleListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRuleListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_location_based_performance_tier_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_location_based_performance_tier_operations.py similarity index 93% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_location_based_performance_tier_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_location_based_performance_tier_operations.py index 8bc0e96e7ae8..f4dbe3dd35ab 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_location_based_performance_tier_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_location_based_performance_tier_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -30,14 +30,14 @@ class LocationBasedPerformanceTierOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.postgresql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -50,17 +50,17 @@ def list( location_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.PerformanceTierListResult"] + # type: (...) -> Iterable["_models.PerformanceTierListResult"] """List all the performance tiers at specified location in a given subscription. :param location_name: The name of the location. :type location_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerformanceTierListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PerformanceTierListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql.models.PerformanceTierListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.PerformanceTierListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerformanceTierListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_log_files_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_log_files_operations.py similarity index 94% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_log_files_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_log_files_operations.py index 7cfd67e854e5..60ef797149c1 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_log_files_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_log_files_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -30,14 +30,14 @@ class LogFilesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.postgresql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -51,7 +51,7 @@ def list_by_server( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.LogFileListResult"] + # type: (...) -> Iterable["_models.LogFileListResult"] """List all the log files in a given server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -60,10 +60,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either LogFileListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.LogFileListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql.models.LogFileListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.LogFileListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.LogFileListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_operations.py similarity index 91% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_operations.py index 82cdac638731..2b897906dfb4 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_operations.py @@ -13,7 +13,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -29,14 +29,14 @@ class Operations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.postgresql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -48,15 +48,15 @@ def list( self, **kwargs # type: Any ): - # type: (...) -> "models.OperationListResult" + # type: (...) -> "_models.OperationListResult" """Lists all of the available REST API operations. :keyword callable cls: A custom type or function that will be passed the direct response :return: OperationListResult, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.OperationListResult + :rtype: ~azure.mgmt.rdbms.postgresql.models.OperationListResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.OperationListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_private_endpoint_connections_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_private_endpoint_connections_operations.py similarity index 94% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_private_endpoint_connections_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_private_endpoint_connections_operations.py index 9bb13931b550..5d5a6ad513b3 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_private_endpoint_connections_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_private_endpoint_connections_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -32,14 +32,14 @@ class PrivateEndpointConnectionsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.postgresql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -54,7 +54,7 @@ def get( private_endpoint_connection_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.PrivateEndpointConnection" + # type: (...) -> "_models.PrivateEndpointConnection" """Gets a private endpoint connection. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -65,10 +65,10 @@ def get( :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PrivateEndpointConnection, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PrivateEndpointConnection + :rtype: ~azure.mgmt.rdbms.postgresql.models.PrivateEndpointConnection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -115,11 +115,11 @@ def _create_or_update_initial( resource_group_name, # type: str server_name, # type: str private_endpoint_connection_name, # type: str - parameters, # type: "models.PrivateEndpointConnection" + parameters, # type: "_models.PrivateEndpointConnection" **kwargs # type: Any ): - # type: (...) -> Optional["models.PrivateEndpointConnection"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.PrivateEndpointConnection"]] + # type: (...) -> Optional["_models.PrivateEndpointConnection"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PrivateEndpointConnection"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -173,10 +173,10 @@ def begin_create_or_update( resource_group_name, # type: str server_name, # type: str private_endpoint_connection_name, # type: str - parameters, # type: "models.PrivateEndpointConnection" + parameters, # type: "_models.PrivateEndpointConnection" **kwargs # type: Any ): - # type: (...) -> LROPoller["models.PrivateEndpointConnection"] + # type: (...) -> LROPoller["_models.PrivateEndpointConnection"] """Approve or reject a private endpoint connection with a given name. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -186,7 +186,7 @@ def begin_create_or_update( :param private_endpoint_connection_name: :type private_endpoint_connection_name: str :param parameters: - :type parameters: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PrivateEndpointConnection + :type parameters: ~azure.mgmt.rdbms.postgresql.models.PrivateEndpointConnection :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: True for ARMPolling, False for no polling, or a @@ -194,11 +194,11 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PrivateEndpointConnection] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.postgresql.models.PrivateEndpointConnection] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -367,11 +367,11 @@ def _update_tags_initial( resource_group_name, # type: str server_name, # type: str private_endpoint_connection_name, # type: str - parameters, # type: "models.TagsObject" + parameters, # type: "_models.TagsObject" **kwargs # type: Any ): - # type: (...) -> "models.PrivateEndpointConnection" - cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"] + # type: (...) -> "_models.PrivateEndpointConnection" + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -423,10 +423,10 @@ def begin_update_tags( resource_group_name, # type: str server_name, # type: str private_endpoint_connection_name, # type: str - parameters, # type: "models.TagsObject" + parameters, # type: "_models.TagsObject" **kwargs # type: Any ): - # type: (...) -> LROPoller["models.PrivateEndpointConnection"] + # type: (...) -> LROPoller["_models.PrivateEndpointConnection"] """Updates tags on private endpoint connection. Updates private endpoint connection with the specified tags. @@ -439,7 +439,7 @@ def begin_update_tags( :type private_endpoint_connection_name: str :param parameters: Parameters supplied to the Update private endpoint connection Tags operation. - :type parameters: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.TagsObject + :type parameters: ~azure.mgmt.rdbms.postgresql.models.TagsObject :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: True for ARMPolling, False for no polling, or a @@ -447,11 +447,11 @@ def begin_update_tags( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PrivateEndpointConnection] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.postgresql.models.PrivateEndpointConnection] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -504,7 +504,7 @@ def list_by_server( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.PrivateEndpointConnectionListResult"] + # type: (...) -> Iterable["_models.PrivateEndpointConnectionListResult"] """Gets all private endpoint connections on a server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -513,10 +513,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PrivateEndpointConnectionListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql.models.PrivateEndpointConnectionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnectionListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_private_link_resources_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_private_link_resources_operations.py similarity index 93% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_private_link_resources_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_private_link_resources_operations.py index 95c39d246084..f477d1540b1a 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_private_link_resources_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_private_link_resources_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -30,14 +30,14 @@ class PrivateLinkResourcesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.postgresql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -51,7 +51,7 @@ def list_by_server( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.PrivateLinkResourceListResult"] + # type: (...) -> Iterable["_models.PrivateLinkResourceListResult"] """Gets the private link resources for PostgreSQL server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -60,10 +60,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PrivateLinkResourceListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PrivateLinkResourceListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql.models.PrivateLinkResourceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateLinkResourceListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -127,7 +127,7 @@ def get( group_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.PrivateLinkResource" + # type: (...) -> "_models.PrivateLinkResource" """Gets a private link resource for PostgreSQL server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -138,10 +138,10 @@ def get( :type group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PrivateLinkResource, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.PrivateLinkResource + :rtype: ~azure.mgmt.rdbms.postgresql.models.PrivateLinkResource :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateLinkResource"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResource"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_recoverable_servers_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_recoverable_servers_operations.py new file mode 100644 index 000000000000..f6a68785e02a --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_recoverable_servers_operations.py @@ -0,0 +1,104 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class RecoverableServersOperations(object): + """RecoverableServersOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.rdbms.postgresql.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + server_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.RecoverableServerResource" + """Gets a recoverable PostgreSQL Server. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RecoverableServerResource, or the result of cls(response) + :rtype: ~azure.mgmt.rdbms.postgresql.models.RecoverableServerResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecoverableServerResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-12-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RecoverableServerResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/recoverableServers'} # type: ignore diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_replicas_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_replicas_operations.py similarity index 94% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_replicas_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_replicas_operations.py index 4ba13c151b57..b5f8157b6c6a 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_replicas_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_replicas_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -30,14 +30,14 @@ class ReplicasOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.postgresql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -51,7 +51,7 @@ def list_by_server( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.ServerListResult"] + # type: (...) -> Iterable["_models.ServerListResult"] """List all the replicas for a given server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -60,10 +60,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql.models.ServerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_server_administrators_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_server_administrators_operations.py similarity index 94% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_server_administrators_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_server_administrators_operations.py index abff67d8bbb5..ac3b169a950f 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_server_administrators_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_server_administrators_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -32,14 +32,14 @@ class ServerAdministratorsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.postgresql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -53,7 +53,7 @@ def get( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.ServerAdministratorResource" + # type: (...) -> "_models.ServerAdministratorResource" """Gets information about a AAD server administrator. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -62,10 +62,10 @@ def get( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ServerAdministratorResource, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerAdministratorResource + :rtype: ~azure.mgmt.rdbms.postgresql.models.ServerAdministratorResource :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerAdministratorResource"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerAdministratorResource"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -110,11 +110,11 @@ def _create_or_update_initial( self, resource_group_name, # type: str server_name, # type: str - properties, # type: "models.ServerAdministratorResource" + properties, # type: "_models.ServerAdministratorResource" **kwargs # type: Any ): - # type: (...) -> "models.ServerAdministratorResource" - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerAdministratorResource"] + # type: (...) -> "_models.ServerAdministratorResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerAdministratorResource"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -168,10 +168,10 @@ def begin_create_or_update( self, resource_group_name, # type: str server_name, # type: str - properties, # type: "models.ServerAdministratorResource" + properties, # type: "_models.ServerAdministratorResource" **kwargs # type: Any ): - # type: (...) -> LROPoller["models.ServerAdministratorResource"] + # type: (...) -> LROPoller["_models.ServerAdministratorResource"] """Creates or update active directory administrator on an existing server. The update action will overwrite the existing administrator. @@ -181,7 +181,7 @@ def begin_create_or_update( :type server_name: str :param properties: The required parameters for creating or updating an AAD server administrator. - :type properties: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerAdministratorResource + :type properties: ~azure.mgmt.rdbms.postgresql.models.ServerAdministratorResource :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: True for ARMPolling, False for no polling, or a @@ -189,11 +189,11 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ServerAdministratorResource or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerAdministratorResource] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.postgresql.models.ServerAdministratorResource] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerAdministratorResource"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerAdministratorResource"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -354,7 +354,7 @@ def list( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.ServerAdministratorResourceListResult"] + # type: (...) -> Iterable["_models.ServerAdministratorResourceListResult"] """Returns a list of server Administrators. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -363,10 +363,10 @@ def list( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerAdministratorResourceListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerAdministratorResourceListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql.models.ServerAdministratorResourceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerAdministratorResourceListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerAdministratorResourceListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_server_based_performance_tier_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_server_based_performance_tier_operations.py new file mode 100644 index 000000000000..a8980640d61d --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_server_based_performance_tier_operations.py @@ -0,0 +1,121 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ServerBasedPerformanceTierOperations(object): + """ServerBasedPerformanceTierOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.rdbms.postgresql.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + server_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PerformanceTierListResult"] + """List all the performance tiers for a PostgreSQL server. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PerformanceTierListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql.models.PerformanceTierListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerformanceTierListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + 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] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('PerformanceTierListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/performanceTiers'} # type: ignore diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_server_keys_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_server_keys_operations.py similarity index 95% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_server_keys_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_server_keys_operations.py index c7f7584e388d..c61f424026a2 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_server_keys_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_server_keys_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -32,14 +32,14 @@ class ServerKeysOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.postgresql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -53,7 +53,7 @@ def list( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.ServerKeyListResult"] + # type: (...) -> Iterable["_models.ServerKeyListResult"] """Gets a list of Server keys. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -62,10 +62,10 @@ def list( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerKeyListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerKeyListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql.models.ServerKeyListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerKeyListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerKeyListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -129,7 +129,7 @@ def get( key_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.ServerKey" + # type: (...) -> "_models.ServerKey" """Gets a PostgreSQL Server key. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -140,10 +140,10 @@ def get( :type key_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ServerKey, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerKey + :rtype: ~azure.mgmt.rdbms.postgresql.models.ServerKey :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerKey"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerKey"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -190,11 +190,11 @@ def _create_or_update_initial( server_name, # type: str key_name, # type: str resource_group_name, # type: str - parameters, # type: "models.ServerKey" + parameters, # type: "_models.ServerKey" **kwargs # type: Any ): - # type: (...) -> "models.ServerKey" - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerKey"] + # type: (...) -> "_models.ServerKey" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerKey"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -250,10 +250,10 @@ def begin_create_or_update( server_name, # type: str key_name, # type: str resource_group_name, # type: str - parameters, # type: "models.ServerKey" + parameters, # type: "_models.ServerKey" **kwargs # type: Any ): - # type: (...) -> LROPoller["models.ServerKey"] + # type: (...) -> LROPoller["_models.ServerKey"] """Creates or updates a PostgreSQL Server key. :param server_name: The name of the server. @@ -263,7 +263,7 @@ def begin_create_or_update( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param parameters: The requested PostgreSQL Server key resource state. - :type parameters: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerKey + :type parameters: ~azure.mgmt.rdbms.postgresql.models.ServerKey :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: True for ARMPolling, False for no polling, or a @@ -271,11 +271,11 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ServerKey or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerKey] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.postgresql.models.ServerKey] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerKey"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerKey"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_server_parameters_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_server_parameters_operations.py new file mode 100644 index 000000000000..9149f50f2c4e --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_server_parameters_operations.py @@ -0,0 +1,175 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ServerParametersOperations(object): + """ServerParametersOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.rdbms.postgresql.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _list_update_configurations_initial( + self, + resource_group_name, # type: str + server_name, # type: str + value, # type: "_models.ConfigurationListResult" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ConfigurationListResult"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ConfigurationListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2017-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._list_update_configurations_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(value, 'ConfigurationListResult') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConfigurationListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _list_update_configurations_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/updateConfigurations'} # type: ignore + + def begin_list_update_configurations( + self, + resource_group_name, # type: str + server_name, # type: str + value, # type: "_models.ConfigurationListResult" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ConfigurationListResult"] + """Update a list of configurations in a given server. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param value: The parameters for updating a list of server configuration. + :type value: ~azure.mgmt.rdbms.postgresql.models.ConfigurationListResult + :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: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ConfigurationListResult or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.postgresql.models.ConfigurationListResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfigurationListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._list_update_configurations_initial( + resource_group_name=resource_group_name, + server_name=server_name, + value=value, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ConfigurationListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_list_update_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSQL/servers/{serverName}/updateConfigurations'} # type: ignore diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_server_security_alert_policies_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_server_security_alert_policies_operations.py similarity index 90% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_server_security_alert_policies_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_server_security_alert_policies_operations.py index c939bee03844..d99ddeac423c 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_server_security_alert_policies_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_server_security_alert_policies_operations.py @@ -15,7 +15,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -31,14 +31,14 @@ class ServerSecurityAlertPoliciesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.postgresql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -50,10 +50,10 @@ def get( self, resource_group_name, # type: str server_name, # type: str - security_alert_policy_name, # type: Union[str, "models.SecurityAlertPolicyName"] + security_alert_policy_name, # type: Union[str, "_models.SecurityAlertPolicyName"] **kwargs # type: Any ): - # type: (...) -> "models.ServerSecurityAlertPolicy" + # type: (...) -> "_models.ServerSecurityAlertPolicy" """Get a server's security alert policy. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -61,13 +61,13 @@ def get( :param server_name: The name of the server. :type server_name: str :param security_alert_policy_name: The name of the security alert policy. - :type security_alert_policy_name: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.SecurityAlertPolicyName + :type security_alert_policy_name: str or ~azure.mgmt.rdbms.postgresql.models.SecurityAlertPolicyName :keyword callable cls: A custom type or function that will be passed the direct response :return: ServerSecurityAlertPolicy, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerSecurityAlertPolicy + :rtype: ~azure.mgmt.rdbms.postgresql.models.ServerSecurityAlertPolicy :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerSecurityAlertPolicy"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerSecurityAlertPolicy"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -113,12 +113,12 @@ def _create_or_update_initial( self, resource_group_name, # type: str server_name, # type: str - security_alert_policy_name, # type: Union[str, "models.SecurityAlertPolicyName"] - parameters, # type: "models.ServerSecurityAlertPolicy" + security_alert_policy_name, # type: Union[str, "_models.SecurityAlertPolicyName"] + parameters, # type: "_models.ServerSecurityAlertPolicy" **kwargs # type: Any ): - # type: (...) -> Optional["models.ServerSecurityAlertPolicy"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.ServerSecurityAlertPolicy"]] + # type: (...) -> Optional["_models.ServerSecurityAlertPolicy"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ServerSecurityAlertPolicy"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -171,11 +171,11 @@ def begin_create_or_update( self, resource_group_name, # type: str server_name, # type: str - security_alert_policy_name, # type: Union[str, "models.SecurityAlertPolicyName"] - parameters, # type: "models.ServerSecurityAlertPolicy" + security_alert_policy_name, # type: Union[str, "_models.SecurityAlertPolicyName"] + parameters, # type: "_models.ServerSecurityAlertPolicy" **kwargs # type: Any ): - # type: (...) -> LROPoller["models.ServerSecurityAlertPolicy"] + # type: (...) -> LROPoller["_models.ServerSecurityAlertPolicy"] """Creates or updates a threat detection policy. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -183,9 +183,9 @@ def begin_create_or_update( :param server_name: The name of the server. :type server_name: str :param security_alert_policy_name: The name of the threat detection policy. - :type security_alert_policy_name: str or ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.SecurityAlertPolicyName + :type security_alert_policy_name: str or ~azure.mgmt.rdbms.postgresql.models.SecurityAlertPolicyName :param parameters: The server security alert policy. - :type parameters: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerSecurityAlertPolicy + :type parameters: ~azure.mgmt.rdbms.postgresql.models.ServerSecurityAlertPolicy :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: True for ARMPolling, False for no polling, or a @@ -193,11 +193,11 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ServerSecurityAlertPolicy or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerSecurityAlertPolicy] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.postgresql.models.ServerSecurityAlertPolicy] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerSecurityAlertPolicy"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerSecurityAlertPolicy"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_servers_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_servers_operations.py similarity index 95% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_servers_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_servers_operations.py index 6e036c1b6a75..41b427a0b225 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_servers_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_servers_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -32,14 +32,14 @@ class ServersOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.postgresql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -51,11 +51,11 @@ def _create_initial( self, resource_group_name, # type: str server_name, # type: str - parameters, # type: "models.ServerForCreate" + parameters, # type: "_models.ServerForCreate" **kwargs # type: Any ): - # type: (...) -> Optional["models.Server"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Server"]] + # type: (...) -> Optional["_models.Server"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Server"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -110,10 +110,10 @@ def begin_create( self, resource_group_name, # type: str server_name, # type: str - parameters, # type: "models.ServerForCreate" + parameters, # type: "_models.ServerForCreate" **kwargs # type: Any ): - # type: (...) -> LROPoller["models.Server"] + # type: (...) -> LROPoller["_models.Server"] """Creates a new server, or will overwrite an existing server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -121,7 +121,7 @@ def begin_create( :param server_name: The name of the server. :type server_name: str :param parameters: The required parameters for creating or updating a server. - :type parameters: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerForCreate + :type parameters: ~azure.mgmt.rdbms.postgresql.models.ServerForCreate :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: True for ARMPolling, False for no polling, or a @@ -129,11 +129,11 @@ def begin_create( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Server or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.Server] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.postgresql.models.Server] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.Server"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Server"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -182,11 +182,11 @@ def _update_initial( self, resource_group_name, # type: str server_name, # type: str - parameters, # type: "models.ServerUpdateParameters" + parameters, # type: "_models.ServerUpdateParameters" **kwargs # type: Any ): - # type: (...) -> Optional["models.Server"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Server"]] + # type: (...) -> Optional["_models.Server"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Server"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -238,10 +238,10 @@ def begin_update( self, resource_group_name, # type: str server_name, # type: str - parameters, # type: "models.ServerUpdateParameters" + parameters, # type: "_models.ServerUpdateParameters" **kwargs # type: Any ): - # type: (...) -> LROPoller["models.Server"] + # type: (...) -> LROPoller["_models.Server"] """Updates an existing server. The request body can contain one to many of the properties present in the normal server definition. @@ -250,7 +250,7 @@ def begin_update( :param server_name: The name of the server. :type server_name: str :param parameters: The required parameters for updating a server. - :type parameters: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerUpdateParameters + :type parameters: ~azure.mgmt.rdbms.postgresql.models.ServerUpdateParameters :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: True for ARMPolling, False for no polling, or a @@ -258,11 +258,11 @@ def begin_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Server or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.Server] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.postgresql.models.Server] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.Server"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Server"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -421,7 +421,7 @@ def get( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.Server" + # type: (...) -> "_models.Server" """Gets information about a server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -430,10 +430,10 @@ def get( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Server, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.Server + :rtype: ~azure.mgmt.rdbms.postgresql.models.Server :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Server"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Server"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -479,17 +479,17 @@ def list_by_resource_group( resource_group_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.ServerListResult"] + # type: (...) -> Iterable["_models.ServerListResult"] """List all the servers in a given resource group. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql.models.ServerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -549,15 +549,15 @@ def list( self, **kwargs # type: Any ): - # type: (...) -> Iterable["models.ServerListResult"] + # type: (...) -> Iterable["_models.ServerListResult"] """List all the servers in a given subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.ServerListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql.models.ServerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_virtual_network_rules_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_virtual_network_rules_operations.py similarity index 95% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_virtual_network_rules_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_virtual_network_rules_operations.py index 7c1af80ca98c..8c4e0d1299f3 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/operations/_virtual_network_rules_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/_virtual_network_rules_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -32,14 +32,14 @@ class VirtualNetworkRulesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models + :type models: ~azure.mgmt.rdbms.postgresql.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -54,7 +54,7 @@ def get( virtual_network_rule_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.VirtualNetworkRule" + # type: (...) -> "_models.VirtualNetworkRule" """Gets a virtual network rule. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -65,10 +65,10 @@ def get( :type virtual_network_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualNetworkRule, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.VirtualNetworkRule + :rtype: ~azure.mgmt.rdbms.postgresql.models.VirtualNetworkRule :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.VirtualNetworkRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkRule"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -115,11 +115,11 @@ def _create_or_update_initial( resource_group_name, # type: str server_name, # type: str virtual_network_rule_name, # type: str - parameters, # type: "models.VirtualNetworkRule" + parameters, # type: "_models.VirtualNetworkRule" **kwargs # type: Any ): - # type: (...) -> Optional["models.VirtualNetworkRule"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.VirtualNetworkRule"]] + # type: (...) -> Optional["_models.VirtualNetworkRule"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VirtualNetworkRule"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -176,10 +176,10 @@ def begin_create_or_update( resource_group_name, # type: str server_name, # type: str virtual_network_rule_name, # type: str - parameters, # type: "models.VirtualNetworkRule" + parameters, # type: "_models.VirtualNetworkRule" **kwargs # type: Any ): - # type: (...) -> LROPoller["models.VirtualNetworkRule"] + # type: (...) -> LROPoller["_models.VirtualNetworkRule"] """Creates or updates an existing virtual network rule. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -189,7 +189,7 @@ def begin_create_or_update( :param virtual_network_rule_name: The name of the virtual network rule. :type virtual_network_rule_name: str :param parameters: The requested virtual Network Rule Resource state. - :type parameters: ~azure.mgmt.rdbms.postgresql.v2020_01_01.models.VirtualNetworkRule + :type parameters: ~azure.mgmt.rdbms.postgresql.models.VirtualNetworkRule :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: True for ARMPolling, False for no polling, or a @@ -197,11 +197,11 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either VirtualNetworkRule or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.VirtualNetworkRule] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.postgresql.models.VirtualNetworkRule] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.VirtualNetworkRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkRule"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -369,7 +369,7 @@ def list_by_server( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.VirtualNetworkRuleListResult"] + # type: (...) -> Iterable["_models.VirtualNetworkRuleListResult"] """Gets a list of virtual network rules in a server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -378,10 +378,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualNetworkRuleListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql.v2020_01_01.models.VirtualNetworkRuleListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql.models.VirtualNetworkRuleListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.VirtualNetworkRuleListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkRuleListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/_metadata.json b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/_metadata.json deleted file mode 100644 index 8d00b36be24e..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/_metadata.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "chosen_version": "2020-01-01", - "total_api_version_list": ["2017-12-01", "2018-06-01", "2020-01-01"], - "client": { - "name": "PostgreSQLManagementClient", - "filename": "_postgre_sql_management_client", - "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model.", - "base_url": "\u0027https://management.azure.com\u0027", - "custom_base_url": null, - "azure_arm": true, - "has_lro_operations": true, - "client_side_validation": false - }, - "global_parameters": { - "sync": { - "credential": { - "signature": "credential, # type: \"TokenCredential\"", - "description": "Credential needed for the client to connect to Azure.", - "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true - }, - "subscription_id": { - "signature": "subscription_id, # type: str", - "description": "The ID of the target subscription.", - "docstring_type": "str", - "required": true - } - }, - "async": { - "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", - "description": "Credential needed for the client to connect to Azure.", - "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", - "required": true - }, - "subscription_id": { - "signature": "subscription_id, # type: str", - "description": "The ID of the target subscription.", - "docstring_type": "str", - "required": true - } - }, - "constant": { - }, - "call": "credential, subscription_id" - }, - "config": { - "credential": true, - "credential_scopes": ["https://management.azure.com/.default"], - "credential_default_policy_type": "BearerTokenCredentialPolicy", - "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null - }, - "operation_groups": { - "servers": "ServersOperations", - "replicas": "ReplicasOperations", - "firewall_rules": "FirewallRulesOperations", - "virtual_network_rules": "VirtualNetworkRulesOperations", - "databases": "DatabasesOperations", - "configurations": "ConfigurationsOperations", - "log_files": "LogFilesOperations", - "server_administrators": "ServerAdministratorsOperations", - "location_based_performance_tier": "LocationBasedPerformanceTierOperations", - "check_name_availability": "CheckNameAvailabilityOperations", - "operations": "Operations", - "server_security_alert_policies": "ServerSecurityAlertPoliciesOperations", - "private_endpoint_connections": "PrivateEndpointConnectionsOperations", - "private_link_resources": "PrivateLinkResourcesOperations", - "server_keys": "ServerKeysOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" -} \ No newline at end of file diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/_postgre_sql_management_client.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/_postgre_sql_management_client.py deleted file mode 100644 index d0045159908f..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/_postgre_sql_management_client.py +++ /dev/null @@ -1,140 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import TYPE_CHECKING - -from azure.mgmt.core import ARMPipelineClient -from msrest import Deserializer, Serializer - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Optional - - from azure.core.credentials import TokenCredential - -from ._configuration import PostgreSQLManagementClientConfiguration -from .operations import ServersOperations -from .operations import ReplicasOperations -from .operations import FirewallRulesOperations -from .operations import VirtualNetworkRulesOperations -from .operations import DatabasesOperations -from .operations import ConfigurationsOperations -from .operations import LogFilesOperations -from .operations import ServerAdministratorsOperations -from .operations import LocationBasedPerformanceTierOperations -from .operations import CheckNameAvailabilityOperations -from .operations import Operations -from .operations import ServerSecurityAlertPoliciesOperations -from .operations import PrivateEndpointConnectionsOperations -from .operations import PrivateLinkResourcesOperations -from .operations import ServerKeysOperations -from . import models - - -class PostgreSQLManagementClient(object): - """The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model. - - :ivar servers: ServersOperations operations - :vartype servers: azure.mgmt.rdbms.postgresql.v2020_01_01.operations.ServersOperations - :ivar replicas: ReplicasOperations operations - :vartype replicas: azure.mgmt.rdbms.postgresql.v2020_01_01.operations.ReplicasOperations - :ivar firewall_rules: FirewallRulesOperations operations - :vartype firewall_rules: azure.mgmt.rdbms.postgresql.v2020_01_01.operations.FirewallRulesOperations - :ivar virtual_network_rules: VirtualNetworkRulesOperations operations - :vartype virtual_network_rules: azure.mgmt.rdbms.postgresql.v2020_01_01.operations.VirtualNetworkRulesOperations - :ivar databases: DatabasesOperations operations - :vartype databases: azure.mgmt.rdbms.postgresql.v2020_01_01.operations.DatabasesOperations - :ivar configurations: ConfigurationsOperations operations - :vartype configurations: azure.mgmt.rdbms.postgresql.v2020_01_01.operations.ConfigurationsOperations - :ivar log_files: LogFilesOperations operations - :vartype log_files: azure.mgmt.rdbms.postgresql.v2020_01_01.operations.LogFilesOperations - :ivar server_administrators: ServerAdministratorsOperations operations - :vartype server_administrators: azure.mgmt.rdbms.postgresql.v2020_01_01.operations.ServerAdministratorsOperations - :ivar location_based_performance_tier: LocationBasedPerformanceTierOperations operations - :vartype location_based_performance_tier: azure.mgmt.rdbms.postgresql.v2020_01_01.operations.LocationBasedPerformanceTierOperations - :ivar check_name_availability: CheckNameAvailabilityOperations operations - :vartype check_name_availability: azure.mgmt.rdbms.postgresql.v2020_01_01.operations.CheckNameAvailabilityOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.rdbms.postgresql.v2020_01_01.operations.Operations - :ivar server_security_alert_policies: ServerSecurityAlertPoliciesOperations operations - :vartype server_security_alert_policies: azure.mgmt.rdbms.postgresql.v2020_01_01.operations.ServerSecurityAlertPoliciesOperations - :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations - :vartype private_endpoint_connections: azure.mgmt.rdbms.postgresql.v2020_01_01.operations.PrivateEndpointConnectionsOperations - :ivar private_link_resources: PrivateLinkResourcesOperations operations - :vartype private_link_resources: azure.mgmt.rdbms.postgresql.v2020_01_01.operations.PrivateLinkResourcesOperations - :ivar server_keys: ServerKeysOperations operations - :vartype server_keys: azure.mgmt.rdbms.postgresql.v2020_01_01.operations.ServerKeysOperations - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The ID of the target subscription. - :type subscription_id: str - :param str base_url: Service URL - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - """ - - def __init__( - self, - credential, # type: "TokenCredential" - subscription_id, # type: str - base_url=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> None - if not base_url: - base_url = 'https://management.azure.com' - self._config = PostgreSQLManagementClientConfiguration(credential, subscription_id, **kwargs) - self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False - self._deserialize = Deserializer(client_models) - - self.servers = ServersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.replicas = ReplicasOperations( - self._client, self._config, self._serialize, self._deserialize) - self.firewall_rules = FirewallRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.virtual_network_rules = VirtualNetworkRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.databases = DatabasesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.configurations = ConfigurationsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.log_files = LogFilesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.server_administrators = ServerAdministratorsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.location_based_performance_tier = LocationBasedPerformanceTierOperations( - self._client, self._config, self._serialize, self._deserialize) - self.check_name_availability = CheckNameAvailabilityOperations( - self._client, self._config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self._config, self._serialize, self._deserialize) - self.server_security_alert_policies = ServerSecurityAlertPoliciesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.private_endpoint_connections = PrivateEndpointConnectionsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.private_link_resources = PrivateLinkResourcesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.server_keys = ServerKeysOperations( - self._client, self._config, self._serialize, self._deserialize) - - def close(self): - # type: () -> None - self._client.close() - - def __enter__(self): - # type: () -> PostgreSQLManagementClient - self._client.__enter__() - return self - - def __exit__(self, *exc_details): - # type: (Any) -> None - self._client.__exit__(*exc_details) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/_postgre_sql_management_client.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/_postgre_sql_management_client.py deleted file mode 100644 index 7d9f429aac3d..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/_postgre_sql_management_client.py +++ /dev/null @@ -1,134 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any, Optional, TYPE_CHECKING - -from azure.mgmt.core import AsyncARMPipelineClient -from msrest import Deserializer, Serializer - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from azure.core.credentials_async import AsyncTokenCredential - -from ._configuration import PostgreSQLManagementClientConfiguration -from .operations import ServersOperations -from .operations import ReplicasOperations -from .operations import FirewallRulesOperations -from .operations import VirtualNetworkRulesOperations -from .operations import DatabasesOperations -from .operations import ConfigurationsOperations -from .operations import LogFilesOperations -from .operations import ServerAdministratorsOperations -from .operations import LocationBasedPerformanceTierOperations -from .operations import CheckNameAvailabilityOperations -from .operations import Operations -from .operations import ServerSecurityAlertPoliciesOperations -from .operations import PrivateEndpointConnectionsOperations -from .operations import PrivateLinkResourcesOperations -from .operations import ServerKeysOperations -from .. import models - - -class PostgreSQLManagementClient(object): - """The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model. - - :ivar servers: ServersOperations operations - :vartype servers: azure.mgmt.rdbms.postgresql.v2020_01_01.aio.operations.ServersOperations - :ivar replicas: ReplicasOperations operations - :vartype replicas: azure.mgmt.rdbms.postgresql.v2020_01_01.aio.operations.ReplicasOperations - :ivar firewall_rules: FirewallRulesOperations operations - :vartype firewall_rules: azure.mgmt.rdbms.postgresql.v2020_01_01.aio.operations.FirewallRulesOperations - :ivar virtual_network_rules: VirtualNetworkRulesOperations operations - :vartype virtual_network_rules: azure.mgmt.rdbms.postgresql.v2020_01_01.aio.operations.VirtualNetworkRulesOperations - :ivar databases: DatabasesOperations operations - :vartype databases: azure.mgmt.rdbms.postgresql.v2020_01_01.aio.operations.DatabasesOperations - :ivar configurations: ConfigurationsOperations operations - :vartype configurations: azure.mgmt.rdbms.postgresql.v2020_01_01.aio.operations.ConfigurationsOperations - :ivar log_files: LogFilesOperations operations - :vartype log_files: azure.mgmt.rdbms.postgresql.v2020_01_01.aio.operations.LogFilesOperations - :ivar server_administrators: ServerAdministratorsOperations operations - :vartype server_administrators: azure.mgmt.rdbms.postgresql.v2020_01_01.aio.operations.ServerAdministratorsOperations - :ivar location_based_performance_tier: LocationBasedPerformanceTierOperations operations - :vartype location_based_performance_tier: azure.mgmt.rdbms.postgresql.v2020_01_01.aio.operations.LocationBasedPerformanceTierOperations - :ivar check_name_availability: CheckNameAvailabilityOperations operations - :vartype check_name_availability: azure.mgmt.rdbms.postgresql.v2020_01_01.aio.operations.CheckNameAvailabilityOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.rdbms.postgresql.v2020_01_01.aio.operations.Operations - :ivar server_security_alert_policies: ServerSecurityAlertPoliciesOperations operations - :vartype server_security_alert_policies: azure.mgmt.rdbms.postgresql.v2020_01_01.aio.operations.ServerSecurityAlertPoliciesOperations - :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations - :vartype private_endpoint_connections: azure.mgmt.rdbms.postgresql.v2020_01_01.aio.operations.PrivateEndpointConnectionsOperations - :ivar private_link_resources: PrivateLinkResourcesOperations operations - :vartype private_link_resources: azure.mgmt.rdbms.postgresql.v2020_01_01.aio.operations.PrivateLinkResourcesOperations - :ivar server_keys: ServerKeysOperations operations - :vartype server_keys: azure.mgmt.rdbms.postgresql.v2020_01_01.aio.operations.ServerKeysOperations - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The ID of the target subscription. - :type subscription_id: str - :param str base_url: Service URL - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - """ - - def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - base_url: Optional[str] = None, - **kwargs: Any - ) -> None: - if not base_url: - base_url = 'https://management.azure.com' - self._config = PostgreSQLManagementClientConfiguration(credential, subscription_id, **kwargs) - self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False - self._deserialize = Deserializer(client_models) - - self.servers = ServersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.replicas = ReplicasOperations( - self._client, self._config, self._serialize, self._deserialize) - self.firewall_rules = FirewallRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.virtual_network_rules = VirtualNetworkRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.databases = DatabasesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.configurations = ConfigurationsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.log_files = LogFilesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.server_administrators = ServerAdministratorsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.location_based_performance_tier = LocationBasedPerformanceTierOperations( - self._client, self._config, self._serialize, self._deserialize) - self.check_name_availability = CheckNameAvailabilityOperations( - self._client, self._config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self._config, self._serialize, self._deserialize) - self.server_security_alert_policies = ServerSecurityAlertPoliciesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.private_endpoint_connections = PrivateEndpointConnectionsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.private_link_resources = PrivateLinkResourcesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.server_keys = ServerKeysOperations( - self._client, self._config, self._serialize, self._deserialize) - - async def close(self) -> None: - await self._client.close() - - async def __aenter__(self) -> "PostgreSQLManagementClient": - await self._client.__aenter__() - return self - - async def __aexit__(self, *exc_details) -> None: - await self._client.__aexit__(*exc_details) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/py.typed b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/py.typed deleted file mode 100644 index e5aff4f83af8..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/py.typed +++ /dev/null @@ -1 +0,0 @@ -# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/__init__.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/__init__.py deleted file mode 100644 index c28024c9d5c4..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._postgre_sql_management_client import PostgreSQLManagementClient -__all__ = ['PostgreSQLManagementClient'] - -try: - from ._patch import patch_sdk # type: ignore - patch_sdk() -except ImportError: - pass diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/_configuration.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/_configuration.py deleted file mode 100644 index e20130157689..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/_configuration.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import TYPE_CHECKING - -from azure.core.configuration import Configuration -from azure.core.pipeline import policies -from azure.mgmt.core.policies import ARMHttpLoggingPolicy - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any - - from azure.core.credentials import TokenCredential - -VERSION = "unknown" - -class PostgreSQLManagementClientConfiguration(Configuration): - """Configuration for PostgreSQLManagementClient. - - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The ID of the target subscription. - :type subscription_id: str - """ - - def __init__( - self, - credential, # type: "TokenCredential" - subscription_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - if credential is None: - raise ValueError("Parameter 'credential' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - super(PostgreSQLManagementClientConfiguration, self).__init__(**kwargs) - - self.credential = credential - self.subscription_id = subscription_id - self.api_version = "2020-02-14-preview" - self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'mgmt-rdbms/{}'.format(VERSION)) - self._configure(**kwargs) - - def _configure( - self, - **kwargs # type: Any - ): - # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') - if self.credential and not self.authentication_policy: - self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/_metadata.json b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/_metadata.json deleted file mode 100644 index 39c8d467ef68..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/_metadata.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "chosen_version": "2020-02-14-preview", - "total_api_version_list": ["2020-02-14-preview"], - "client": { - "name": "PostgreSQLManagementClient", - "filename": "_postgre_sql_management_client", - "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model.", - "base_url": "\u0027https://management.azure.com\u0027", - "custom_base_url": null, - "azure_arm": true, - "has_lro_operations": true, - "client_side_validation": false - }, - "global_parameters": { - "sync": { - "credential": { - "signature": "credential, # type: \"TokenCredential\"", - "description": "Credential needed for the client to connect to Azure.", - "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true - }, - "subscription_id": { - "signature": "subscription_id, # type: str", - "description": "The ID of the target subscription.", - "docstring_type": "str", - "required": true - } - }, - "async": { - "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", - "description": "Credential needed for the client to connect to Azure.", - "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", - "required": true - }, - "subscription_id": { - "signature": "subscription_id, # type: str", - "description": "The ID of the target subscription.", - "docstring_type": "str", - "required": true - } - }, - "constant": { - }, - "call": "credential, subscription_id" - }, - "config": { - "credential": true, - "credential_scopes": ["https://management.azure.com/.default"], - "credential_default_policy_type": "BearerTokenCredentialPolicy", - "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null - }, - "operation_groups": { - "servers": "ServersOperations", - "firewall_rules": "FirewallRulesOperations", - "configurations": "ConfigurationsOperations", - "check_name_availability": "CheckNameAvailabilityOperations", - "location_based_capabilities": "LocationBasedCapabilitiesOperations", - "virtual_network_subnet_usage": "VirtualNetworkSubnetUsageOperations", - "operations": "Operations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" -} \ No newline at end of file diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/aio/__init__.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/aio/__init__.py deleted file mode 100644 index 97665f586f83..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/aio/__init__.py +++ /dev/null @@ -1,10 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._postgre_sql_management_client import PostgreSQLManagementClient -__all__ = ['PostgreSQLManagementClient'] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/aio/_configuration.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/aio/_configuration.py deleted file mode 100644 index 2ae38f080322..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/aio/_configuration.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any, TYPE_CHECKING - -from azure.core.configuration import Configuration -from azure.core.pipeline import policies -from azure.mgmt.core.policies import ARMHttpLoggingPolicy - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from azure.core.credentials_async import AsyncTokenCredential - -VERSION = "unknown" - -class PostgreSQLManagementClientConfiguration(Configuration): - """Configuration for PostgreSQLManagementClient. - - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The ID of the target subscription. - :type subscription_id: str - """ - - def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - **kwargs: Any - ) -> None: - if credential is None: - raise ValueError("Parameter 'credential' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - super(PostgreSQLManagementClientConfiguration, self).__init__(**kwargs) - - self.credential = credential - self.subscription_id = subscription_id - self.api_version = "2020-02-14-preview" - self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'mgmt-rdbms/{}'.format(VERSION)) - self._configure(**kwargs) - - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') - if self.credential and not self.authentication_policy: - self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/py.typed b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/py.typed deleted file mode 100644 index e5aff4f83af8..000000000000 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/py.typed +++ /dev/null @@ -1 +0,0 @@ -# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/__init__.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/__init__.py similarity index 100% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/__init__.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/__init__.py diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/_configuration.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/_configuration.py similarity index 100% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/_configuration.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/_configuration.py diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/_postgre_sql_management_client.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/_postgre_sql_management_client.py similarity index 83% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/_postgre_sql_management_client.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/_postgre_sql_management_client.py index f95533b95296..72d038359f15 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/_postgre_sql_management_client.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/_postgre_sql_management_client.py @@ -25,6 +25,7 @@ from .operations import LocationBasedCapabilitiesOperations from .operations import VirtualNetworkSubnetUsageOperations from .operations import Operations +from .operations import DatabasesOperations from . import models @@ -32,19 +33,21 @@ class PostgreSQLManagementClient(object): """The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model. :ivar servers: ServersOperations operations - :vartype servers: azure.mgmt.rdbms.postgresql.v2020_02_14_preview.operations.ServersOperations + :vartype servers: azure.mgmt.rdbms.postgresql_flexibleservers.operations.ServersOperations :ivar firewall_rules: FirewallRulesOperations operations - :vartype firewall_rules: azure.mgmt.rdbms.postgresql.v2020_02_14_preview.operations.FirewallRulesOperations + :vartype firewall_rules: azure.mgmt.rdbms.postgresql_flexibleservers.operations.FirewallRulesOperations :ivar configurations: ConfigurationsOperations operations - :vartype configurations: azure.mgmt.rdbms.postgresql.v2020_02_14_preview.operations.ConfigurationsOperations + :vartype configurations: azure.mgmt.rdbms.postgresql_flexibleservers.operations.ConfigurationsOperations :ivar check_name_availability: CheckNameAvailabilityOperations operations - :vartype check_name_availability: azure.mgmt.rdbms.postgresql.v2020_02_14_preview.operations.CheckNameAvailabilityOperations + :vartype check_name_availability: azure.mgmt.rdbms.postgresql_flexibleservers.operations.CheckNameAvailabilityOperations :ivar location_based_capabilities: LocationBasedCapabilitiesOperations operations - :vartype location_based_capabilities: azure.mgmt.rdbms.postgresql.v2020_02_14_preview.operations.LocationBasedCapabilitiesOperations + :vartype location_based_capabilities: azure.mgmt.rdbms.postgresql_flexibleservers.operations.LocationBasedCapabilitiesOperations :ivar virtual_network_subnet_usage: VirtualNetworkSubnetUsageOperations operations - :vartype virtual_network_subnet_usage: azure.mgmt.rdbms.postgresql.v2020_02_14_preview.operations.VirtualNetworkSubnetUsageOperations + :vartype virtual_network_subnet_usage: azure.mgmt.rdbms.postgresql_flexibleservers.operations.VirtualNetworkSubnetUsageOperations :ivar operations: Operations operations - :vartype operations: azure.mgmt.rdbms.postgresql.v2020_02_14_preview.operations.Operations + :vartype operations: azure.mgmt.rdbms.postgresql_flexibleservers.operations.Operations + :ivar databases: DatabasesOperations operations + :vartype databases: azure.mgmt.rdbms.postgresql_flexibleservers.operations.DatabasesOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. @@ -85,6 +88,8 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.operations = Operations( self._client, self._config, self._serialize, self._deserialize) + self.databases = DatabasesOperations( + self._client, self._config, self._serialize, self._deserialize) def close(self): # type: () -> None diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/__init__.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/__init__.py similarity index 100% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/__init__.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/__init__.py diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/_configuration.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/_configuration.py similarity index 100% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_01_01/aio/_configuration.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/_configuration.py diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/aio/_postgre_sql_management_client.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/_postgre_sql_management_client.py similarity index 82% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/aio/_postgre_sql_management_client.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/_postgre_sql_management_client.py index c2caaa2a7e55..4f6ecc2baff8 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/aio/_postgre_sql_management_client.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/_postgre_sql_management_client.py @@ -23,6 +23,7 @@ from .operations import LocationBasedCapabilitiesOperations from .operations import VirtualNetworkSubnetUsageOperations from .operations import Operations +from .operations import DatabasesOperations from .. import models @@ -30,19 +31,21 @@ class PostgreSQLManagementClient(object): """The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model. :ivar servers: ServersOperations operations - :vartype servers: azure.mgmt.rdbms.postgresql.v2020_02_14_preview.aio.operations.ServersOperations + :vartype servers: azure.mgmt.rdbms.postgresql_flexibleservers.aio.operations.ServersOperations :ivar firewall_rules: FirewallRulesOperations operations - :vartype firewall_rules: azure.mgmt.rdbms.postgresql.v2020_02_14_preview.aio.operations.FirewallRulesOperations + :vartype firewall_rules: azure.mgmt.rdbms.postgresql_flexibleservers.aio.operations.FirewallRulesOperations :ivar configurations: ConfigurationsOperations operations - :vartype configurations: azure.mgmt.rdbms.postgresql.v2020_02_14_preview.aio.operations.ConfigurationsOperations + :vartype configurations: azure.mgmt.rdbms.postgresql_flexibleservers.aio.operations.ConfigurationsOperations :ivar check_name_availability: CheckNameAvailabilityOperations operations - :vartype check_name_availability: azure.mgmt.rdbms.postgresql.v2020_02_14_preview.aio.operations.CheckNameAvailabilityOperations + :vartype check_name_availability: azure.mgmt.rdbms.postgresql_flexibleservers.aio.operations.CheckNameAvailabilityOperations :ivar location_based_capabilities: LocationBasedCapabilitiesOperations operations - :vartype location_based_capabilities: azure.mgmt.rdbms.postgresql.v2020_02_14_preview.aio.operations.LocationBasedCapabilitiesOperations + :vartype location_based_capabilities: azure.mgmt.rdbms.postgresql_flexibleservers.aio.operations.LocationBasedCapabilitiesOperations :ivar virtual_network_subnet_usage: VirtualNetworkSubnetUsageOperations operations - :vartype virtual_network_subnet_usage: azure.mgmt.rdbms.postgresql.v2020_02_14_preview.aio.operations.VirtualNetworkSubnetUsageOperations + :vartype virtual_network_subnet_usage: azure.mgmt.rdbms.postgresql_flexibleservers.aio.operations.VirtualNetworkSubnetUsageOperations :ivar operations: Operations operations - :vartype operations: azure.mgmt.rdbms.postgresql.v2020_02_14_preview.aio.operations.Operations + :vartype operations: azure.mgmt.rdbms.postgresql_flexibleservers.aio.operations.Operations + :ivar databases: DatabasesOperations operations + :vartype databases: azure.mgmt.rdbms.postgresql_flexibleservers.aio.operations.DatabasesOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. @@ -82,6 +85,8 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.operations = Operations( self._client, self._config, self._serialize, self._deserialize) + self.databases = DatabasesOperations( + self._client, self._config, self._serialize, self._deserialize) async def close(self) -> None: await self._client.close() diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/aio/operations/__init__.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/operations/__init__.py similarity index 93% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/aio/operations/__init__.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/operations/__init__.py index 36431bc0ed31..87ee27dc72c6 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/aio/operations/__init__.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/operations/__init__.py @@ -13,6 +13,7 @@ from ._location_based_capabilities_operations import LocationBasedCapabilitiesOperations from ._virtual_network_subnet_usage_operations import VirtualNetworkSubnetUsageOperations from ._operations import Operations +from ._databases_operations import DatabasesOperations __all__ = [ 'ServersOperations', @@ -22,4 +23,5 @@ 'LocationBasedCapabilitiesOperations', 'VirtualNetworkSubnetUsageOperations', 'Operations', + 'DatabasesOperations', ] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/aio/operations/_check_name_availability_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/operations/_check_name_availability_operations.py similarity index 90% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/aio/operations/_check_name_availability_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/operations/_check_name_availability_operations.py index 6a5c563b9de2..8a508a3c317a 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/aio/operations/_check_name_availability_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/operations/_check_name_availability_operations.py @@ -13,7 +13,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -25,14 +25,14 @@ class CheckNameAvailabilityOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models + :type models: ~azure.mgmt.rdbms.postgresql_flexibleservers.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -42,20 +42,20 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def execute( self, - name_availability_request: "models.NameAvailabilityRequest", + name_availability_request: "_models.NameAvailabilityRequest", **kwargs - ) -> "models.NameAvailability": + ) -> "_models.NameAvailability": """Check the availability of name for resource. :param name_availability_request: The required parameters for checking if resource name is available. - :type name_availability_request: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.NameAvailabilityRequest + :type name_availability_request: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.NameAvailabilityRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: NameAvailability, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.NameAvailability + :rtype: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.NameAvailability :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.NameAvailability"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NameAvailability"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/aio/operations/_configurations_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/operations/_configurations_operations.py similarity index 93% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/aio/operations/_configurations_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/operations/_configurations_operations.py index c99cfee5a362..de853b2bd592 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/aio/operations/_configurations_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/operations/_configurations_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -28,14 +28,14 @@ class ConfigurationsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models + :type models: ~azure.mgmt.rdbms.postgresql_flexibleservers.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -48,7 +48,7 @@ def list_by_server( resource_group_name: str, server_name: str, **kwargs - ) -> AsyncIterable["models.ConfigurationListResult"]: + ) -> AsyncIterable["_models.ConfigurationListResult"]: """List all the configurations in a given server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -57,10 +57,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ConfigurationListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.ConfigurationListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql_flexibleservers.models.ConfigurationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ConfigurationListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfigurationListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -123,7 +123,7 @@ async def get( server_name: str, configuration_name: str, **kwargs - ) -> "models.Configuration": + ) -> "_models.Configuration": """Gets information about a configuration of server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -134,10 +134,10 @@ async def get( :type configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Configuration, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.Configuration + :rtype: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.Configuration :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Configuration"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Configuration"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -184,10 +184,10 @@ async def _update_initial( resource_group_name: str, server_name: str, configuration_name: str, - parameters: "models.Configuration", + parameters: "_models.Configuration", **kwargs - ) -> Optional["models.Configuration"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Configuration"]] + ) -> Optional["_models.Configuration"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Configuration"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -241,9 +241,9 @@ async def begin_update( resource_group_name: str, server_name: str, configuration_name: str, - parameters: "models.Configuration", + parameters: "_models.Configuration", **kwargs - ) -> AsyncLROPoller["models.Configuration"]: + ) -> AsyncLROPoller["_models.Configuration"]: """Updates a configuration of a server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -253,7 +253,7 @@ async def begin_update( :param configuration_name: The name of the server configuration. :type configuration_name: str :param parameters: The required parameters for updating a server configuration. - :type parameters: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.Configuration + :type parameters: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.Configuration :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: True for ARMPolling, False for no polling, or a @@ -261,11 +261,11 @@ async def begin_update( :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 Configuration or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.Configuration] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.postgresql_flexibleservers.models.Configuration] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.Configuration"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Configuration"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/operations/_databases_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/operations/_databases_operations.py new file mode 100644 index 000000000000..3c2adc76384f --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/operations/_databases_operations.py @@ -0,0 +1,431 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DatabasesOperations: + """DatabasesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.rdbms.postgresql_flexibleservers.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _create_initial( + self, + resource_group_name: str, + server_name: str, + database_name: str, + parameters: "_models.Database", + **kwargs + ) -> Optional["_models.Database"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Database"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-05-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'Database') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Database', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Database', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/databases/{databaseName}'} # type: ignore + + async def begin_create( + self, + resource_group_name: str, + server_name: str, + database_name: str, + parameters: "_models.Database", + **kwargs + ) -> AsyncLROPoller["_models.Database"]: + """Creates a new database or updates an existing database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_name: str + :param parameters: The required parameters for creating or updating a database. + :type parameters: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.Database + :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: True for ARMPolling, False for no polling, or a + 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: An instance of AsyncLROPoller that returns either Database or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.postgresql_flexibleservers.models.Database] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Database"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + server_name=server_name, + database_name=database_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Database', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/databases/{databaseName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + server_name: str, + database_name: str, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-05-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/databases/{databaseName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + server_name: str, + database_name: str, + **kwargs + ) -> AsyncLROPoller[None]: + """Deletes a database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_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: True for ARMPolling, False for no polling, or a + 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: 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] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + server_name=server_name, + database_name=database_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/databases/{databaseName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + server_name: str, + database_name: str, + **kwargs + ) -> "_models.Database": + """Gets information about a database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Database, or the result of cls(response) + :rtype: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.Database + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Database"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-05-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + 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 + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Database', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/databases/{databaseName}'} # type: ignore + + def list_by_server( + self, + resource_group_name: str, + server_name: str, + **kwargs + ) -> AsyncIterable["_models.DatabaseListResult"]: + """List all the databases in a given server. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DatabaseListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql_flexibleservers.models.DatabaseListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-05-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_server.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + 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] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DatabaseListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/databases'} # type: ignore diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/aio/operations/_firewall_rules_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/operations/_firewall_rules_operations.py similarity index 95% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/aio/operations/_firewall_rules_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/operations/_firewall_rules_operations.py index 85f7ed41e6b9..4c5cb0ab6d51 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/aio/operations/_firewall_rules_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/operations/_firewall_rules_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -28,14 +28,14 @@ class FirewallRulesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models + :type models: ~azure.mgmt.rdbms.postgresql_flexibleservers.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -48,10 +48,10 @@ async def _create_or_update_initial( resource_group_name: str, server_name: str, firewall_rule_name: str, - parameters: "models.FirewallRule", + parameters: "_models.FirewallRule", **kwargs - ) -> Optional["models.FirewallRule"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.FirewallRule"]] + ) -> Optional["_models.FirewallRule"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.FirewallRule"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -108,9 +108,9 @@ async def begin_create_or_update( resource_group_name: str, server_name: str, firewall_rule_name: str, - parameters: "models.FirewallRule", + parameters: "_models.FirewallRule", **kwargs - ) -> AsyncLROPoller["models.FirewallRule"]: + ) -> AsyncLROPoller["_models.FirewallRule"]: """Creates a new firewall rule or updates an existing firewall rule. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -120,7 +120,7 @@ async def begin_create_or_update( :param firewall_rule_name: The name of the server firewall rule. :type firewall_rule_name: str :param parameters: The required parameters for creating or updating a firewall rule. - :type parameters: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.FirewallRule + :type parameters: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.FirewallRule :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: True for ARMPolling, False for no polling, or a @@ -128,11 +128,11 @@ async def begin_create_or_update( :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 FirewallRule or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.FirewallRule] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.postgresql_flexibleservers.models.FirewallRule] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.FirewallRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRule"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -300,7 +300,7 @@ async def get( server_name: str, firewall_rule_name: str, **kwargs - ) -> "models.FirewallRule": + ) -> "_models.FirewallRule": """List all the firewall rules in a given server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -311,10 +311,10 @@ async def get( :type firewall_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: FirewallRule, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.FirewallRule + :rtype: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.FirewallRule :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.FirewallRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRule"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -361,7 +361,7 @@ def list_by_server( resource_group_name: str, server_name: str, **kwargs - ) -> AsyncIterable["models.FirewallRuleListResult"]: + ) -> AsyncIterable["_models.FirewallRuleListResult"]: """List all the firewall rules in a given PostgreSQL server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -370,10 +370,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either FirewallRuleListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.FirewallRuleListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql_flexibleservers.models.FirewallRuleListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.FirewallRuleListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRuleListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/aio/operations/_location_based_capabilities_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/operations/_location_based_capabilities_operations.py similarity index 93% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/aio/operations/_location_based_capabilities_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/operations/_location_based_capabilities_operations.py index 6bb0dfa30c60..3d6c9e41554f 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/aio/operations/_location_based_capabilities_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/operations/_location_based_capabilities_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -26,14 +26,14 @@ class LocationBasedCapabilitiesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models + :type models: ~azure.mgmt.rdbms.postgresql_flexibleservers.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -45,17 +45,17 @@ def execute( self, location_name: str, **kwargs - ) -> AsyncIterable["models.CapabilitiesListResult"]: + ) -> AsyncIterable["_models.CapabilitiesListResult"]: """Get capabilities at specified location in a given subscription. :param location_name: The name of the location. :type location_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CapabilitiesListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.CapabilitiesListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql_flexibleservers.models.CapabilitiesListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.CapabilitiesListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CapabilitiesListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/aio/operations/_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/operations/_operations.py similarity index 91% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/aio/operations/_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/operations/_operations.py index 4d693d05c9ce..823666cce7f0 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/aio/operations/_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/operations/_operations.py @@ -13,7 +13,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -25,14 +25,14 @@ class Operations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models + :type models: ~azure.mgmt.rdbms.postgresql_flexibleservers.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -43,15 +43,15 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def list( self, **kwargs - ) -> "models.OperationListResult": + ) -> "_models.OperationListResult": """Lists all of the available REST API operations. :keyword callable cls: A custom type or function that will be passed the direct response :return: OperationListResult, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.OperationListResult + :rtype: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.OperationListResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.OperationListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/aio/operations/_servers_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/operations/_servers_operations.py similarity index 96% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/aio/operations/_servers_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/operations/_servers_operations.py index 7c112280783c..f766f063b3fa 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/aio/operations/_servers_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/operations/_servers_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -28,14 +28,14 @@ class ServersOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models + :type models: ~azure.mgmt.rdbms.postgresql_flexibleservers.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -47,10 +47,10 @@ async def _create_initial( self, resource_group_name: str, server_name: str, - parameters: "models.Server", + parameters: "_models.Server", **kwargs - ) -> Optional["models.Server"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Server"]] + ) -> Optional["_models.Server"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Server"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -105,9 +105,9 @@ async def begin_create( self, resource_group_name: str, server_name: str, - parameters: "models.Server", + parameters: "_models.Server", **kwargs - ) -> AsyncLROPoller["models.Server"]: + ) -> AsyncLROPoller["_models.Server"]: """Creates a new server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -115,7 +115,7 @@ async def begin_create( :param server_name: The name of the server. :type server_name: str :param parameters: The required parameters for creating or updating a server. - :type parameters: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.Server + :type parameters: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.Server :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: True for ARMPolling, False for no polling, or a @@ -123,11 +123,11 @@ async def begin_create( :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 Server or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.Server] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.postgresql_flexibleservers.models.Server] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.Server"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Server"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -176,10 +176,10 @@ async def _update_initial( self, resource_group_name: str, server_name: str, - parameters: "models.ServerForUpdate", + parameters: "_models.ServerForUpdate", **kwargs - ) -> Optional["models.Server"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Server"]] + ) -> Optional["_models.Server"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Server"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -231,9 +231,9 @@ async def begin_update( self, resource_group_name: str, server_name: str, - parameters: "models.ServerForUpdate", + parameters: "_models.ServerForUpdate", **kwargs - ) -> AsyncLROPoller["models.Server"]: + ) -> AsyncLROPoller["_models.Server"]: """Updates an existing server. The request body can contain one to many of the properties present in the normal server definition. @@ -242,7 +242,7 @@ async def begin_update( :param server_name: The name of the server. :type server_name: str :param parameters: The required parameters for updating a server. - :type parameters: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.ServerForUpdate + :type parameters: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerForUpdate :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: True for ARMPolling, False for no polling, or a @@ -250,11 +250,11 @@ async def begin_update( :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 Server or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.Server] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.rdbms.postgresql_flexibleservers.models.Server] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.Server"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Server"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -412,7 +412,7 @@ async def get( resource_group_name: str, server_name: str, **kwargs - ) -> "models.Server": + ) -> "_models.Server": """Gets information about a server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -421,10 +421,10 @@ async def get( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Server, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.Server + :rtype: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.Server :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Server"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Server"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -469,17 +469,17 @@ def list_by_resource_group( self, resource_group_name: str, **kwargs - ) -> AsyncIterable["models.ServerListResult"]: + ) -> AsyncIterable["_models.ServerListResult"]: """List all the servers in a given resource group. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.ServerListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -538,15 +538,15 @@ async def get_next(next_link=None): def list( self, **kwargs - ) -> AsyncIterable["models.ServerListResult"]: + ) -> AsyncIterable["_models.ServerListResult"]: """List all the servers in a given subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.ServerListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/aio/operations/_virtual_network_subnet_usage_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/operations/_virtual_network_subnet_usage_operations.py similarity index 89% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/aio/operations/_virtual_network_subnet_usage_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/operations/_virtual_network_subnet_usage_operations.py index 4f6da4753d84..69b1e0b13b17 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/aio/operations/_virtual_network_subnet_usage_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/aio/operations/_virtual_network_subnet_usage_operations.py @@ -13,7 +13,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -25,14 +25,14 @@ class VirtualNetworkSubnetUsageOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models + :type models: ~azure.mgmt.rdbms.postgresql_flexibleservers.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -43,21 +43,21 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def execute( self, location_name: str, - parameters: "models.VirtualNetworkSubnetUsageParameter", + parameters: "_models.VirtualNetworkSubnetUsageParameter", **kwargs - ) -> "models.VirtualNetworkSubnetUsageResult": + ) -> "_models.VirtualNetworkSubnetUsageResult": """Get virtual network subnet usage for a given vNet resource id. :param location_name: The name of the location. :type location_name: str :param parameters: The required parameters for creating or updating a server. - :type parameters: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.VirtualNetworkSubnetUsageParameter + :type parameters: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.VirtualNetworkSubnetUsageParameter :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualNetworkSubnetUsageResult, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.VirtualNetworkSubnetUsageResult + :rtype: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.VirtualNetworkSubnetUsageResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.VirtualNetworkSubnetUsageResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkSubnetUsageResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/models/__init__.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/models/__init__.py similarity index 95% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/models/__init__.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/models/__init__.py index dcc3073a9ad7..7060fd74fe25 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/models/__init__.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/models/__init__.py @@ -11,6 +11,8 @@ from ._models_py3 import CapabilityProperties from ._models_py3 import Configuration from ._models_py3 import ConfigurationListResult + from ._models_py3 import Database + from ._models_py3 import DatabaseListResult from ._models_py3 import DelegatedSubnetUsage from ._models_py3 import ErrorAdditionalInfo from ._models_py3 import ErrorResponse @@ -44,6 +46,8 @@ from ._models import CapabilityProperties # type: ignore from ._models import Configuration # type: ignore from ._models import ConfigurationListResult # type: ignore + from ._models import Database # type: ignore + from ._models import DatabaseListResult # type: ignore from ._models import DelegatedSubnetUsage # type: ignore from ._models import ErrorAdditionalInfo # type: ignore from ._models import ErrorResponse # type: ignore @@ -90,6 +94,8 @@ 'CapabilityProperties', 'Configuration', 'ConfigurationListResult', + 'Database', + 'DatabaseListResult', 'DelegatedSubnetUsage', 'ErrorAdditionalInfo', 'ErrorResponse', diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/models/_models.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/models/_models.py similarity index 85% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/models/_models.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/models/_models.py index 9eb1a79bab78..77e65c9e57f6 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/models/_models.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/models/_models.py @@ -15,8 +15,7 @@ class CapabilitiesListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: A list of supported capabilities. - :vartype value: - list[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.CapabilityProperties] + :vartype value: list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.CapabilityProperties] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -49,7 +48,7 @@ class CapabilityProperties(msrest.serialization.Model): :vartype zone: str :ivar supported_flexible_server_editions: :vartype supported_flexible_server_editions: - list[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.ServerEditionCapability] + list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerEditionCapability] """ _validation = { @@ -72,17 +71,17 @@ def __init__( class Resource(msrest.serialization.Model): - """Resource. + """Common fields that are returned in the response for all Azure Resource Manager resources. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str """ @@ -113,13 +112,13 @@ class Configuration(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param value: Value of the configuration. :type value: str @@ -130,7 +129,7 @@ class Configuration(Resource): :ivar data_type: Data type of the configuration. Possible values include: "Boolean", "Numeric", "Integer", "Enumeration". :vartype data_type: str or - ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.ConfigurationDataType + ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ConfigurationDataType :ivar allowed_values: Allowed values of the configuration. :vartype allowed_values: str :param source: Source of the configuration. @@ -176,7 +175,7 @@ class ConfigurationListResult(msrest.serialization.Model): """A list of server configurations. :param value: The list of server configurations. - :type value: list[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.Configuration] + :type value: list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.Configuration] :param next_link: The link used to get the next page of operations. :type next_link: str """ @@ -195,6 +194,71 @@ def __init__( self.next_link = kwargs.get('next_link', None) +class Database(Resource): + """Represents a Database. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param charset: The charset of the database. + :type charset: str + :param collation: The collation of the database. + :type collation: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'charset': {'key': 'properties.charset', 'type': 'str'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Database, self).__init__(**kwargs) + self.charset = kwargs.get('charset', None) + self.collation = kwargs.get('collation', None) + + +class DatabaseListResult(msrest.serialization.Model): + """A List of databases. + + :param value: The list of databases housed in a server. + :type value: list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.Database] + :param next_link: The link used to get the next page of databases. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Database]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DatabaseListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + class DelegatedSubnetUsage(msrest.serialization.Model): """Delegated subnet usage data. @@ -256,7 +320,7 @@ def __init__( class ErrorResponse(msrest.serialization.Model): - """The resource management error response. + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). Variables are only populated by the server, and will be ignored when sending a request. @@ -267,10 +331,10 @@ class ErrorResponse(msrest.serialization.Model): :ivar target: The error target. :vartype target: str :ivar details: The error details. - :vartype details: list[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.ErrorResponse] + :vartype details: list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.ErrorResponse] :ivar additional_info: The error additional info. :vartype additional_info: - list[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.ErrorAdditionalInfo] + list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.ErrorAdditionalInfo] """ _validation = { @@ -308,13 +372,13 @@ class FirewallRule(Resource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param start_ip_address: Required. The start IP address of the server firewall rule. Must be IPv4 format. @@ -353,7 +417,7 @@ class FirewallRuleListResult(msrest.serialization.Model): """A list of firewall rules. :param value: The list of firewall rules in a server. - :type value: list[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.FirewallRule] + :type value: list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.FirewallRule] :param next_link: The link used to get the next page of operations. :type next_link: str """ @@ -507,12 +571,12 @@ class Operation(msrest.serialization.Model): :ivar name: The name of the operation being performed on this particular object. :vartype name: str :ivar display: The localized display information for this particular operation or action. - :vartype display: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.OperationDisplay + :vartype display: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.OperationDisplay :param is_data_action: Indicates whether the operation is a data action. :type is_data_action: bool :ivar origin: The intended executor of the operation. Possible values include: "NotSpecified", "user", "system". - :vartype origin: str or ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.OperationOrigin + :vartype origin: str or ~azure.mgmt.rdbms.postgresql_flexibleservers.models.OperationOrigin :ivar properties: Additional descriptions for the operation. :vartype properties: dict[str, object] """ @@ -588,7 +652,7 @@ class OperationListResult(msrest.serialization.Model): """A list of resource provider operations. :param value: Collection of available operation details. - :type value: list[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.Operation] + :type value: list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.Operation] :param next_link: URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. :type next_link: str @@ -609,17 +673,17 @@ def __init__( class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have everything other than required location and tags. + """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str """ @@ -643,19 +707,19 @@ def __init__( class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. + """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] @@ -694,22 +758,22 @@ class Server(TrackedResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param location: Required. The geo-location where the resource lives. :type location: str :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.Identity + :type identity: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.Identity :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.Sku + :type sku: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.Sku :param administrator_login: The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). :type administrator_login: str @@ -717,30 +781,29 @@ class Server(TrackedResource): creation). :type administrator_login_password: str :param version: PostgreSQL Server version. Possible values include: "12", "11". - :type version: str or ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerVersion :ivar state: A state of a server that is visible to user. Possible values include: "Ready", "Dropping", "Disabled", "Starting", "Stopping", "Stopped", "Updating". - :vartype state: str or ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.ServerState + :vartype state: str or ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerState :ivar ha_state: A state of a HA server that is visible to user. Possible values include: "NotEnabled", "CreatingStandby", "ReplicatingData", "FailingOver", "Healthy", "RemovingStandby". - :vartype ha_state: str or ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.ServerHAState + :vartype ha_state: str or ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerHAState :ivar fully_qualified_domain_name: The fully qualified domain name of a server. :vartype fully_qualified_domain_name: str :param display_name: The display name of a server. :type display_name: str :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.StorageProfile :ivar public_network_access: public network access is enabled or not. Possible values include: "Enabled", "Disabled". :vartype public_network_access: str or - ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.ServerPublicNetworkAccessState + ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerPublicNetworkAccessState :param maintenance_window: Maintenance window of a server. - :type maintenance_window: - ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.MaintenanceWindow + :type maintenance_window: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.MaintenanceWindow :param ha_enabled: stand by count value can be either enabled or disabled. Possible values include: "Enabled", "Disabled". - :type ha_enabled: str or ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.HAEnabledEnum + :type ha_enabled: str or ~azure.mgmt.rdbms.postgresql_flexibleservers.models.HAEnabledEnum :param source_server_name: The source PostgreSQL server name to restore from. :type source_server_name: str :param point_in_time_utc: Restore point creation time (ISO8601 format), specifying the time to @@ -755,10 +818,10 @@ class Server(TrackedResource): :vartype byok_enforcement: str :param delegated_subnet_arguments: :type delegated_subnet_arguments: - ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.ServerPropertiesDelegatedSubnetArguments + ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerPropertiesDelegatedSubnetArguments :param create_mode: The mode to create a new PostgreSQL server. Possible values include: "Default", "PointInTimeRestore". - :type create_mode: str or ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.CreateMode + :type create_mode: str or ~azure.mgmt.rdbms.postgresql_flexibleservers.models.CreateMode :param tags_properties_tags: Application-specific metadata in the form of key-value pairs. :type tags_properties_tags: dict[str, str] """ @@ -842,10 +905,10 @@ class ServerEditionCapability(msrest.serialization.Model): :vartype name: str :ivar supported_storage_editions: :vartype supported_storage_editions: - list[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.StorageEditionCapability] + list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.StorageEditionCapability] :ivar supported_server_versions: :vartype supported_server_versions: - list[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.ServerVersionCapability] + list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerVersionCapability] """ _validation = { @@ -876,19 +939,18 @@ class ServerForUpdate(msrest.serialization.Model): :param location: The location the resource resides in. :type location: str :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.Sku + :type sku: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.Sku :param tags: A set of tags. Application-specific metadata in the form of key-value pairs. :type tags: dict[str, str] :param administrator_login_password: The password of the administrator login. :type administrator_login_password: str :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.StorageProfile :param ha_enabled: stand by count value can be either enabled or disabled. Possible values include: "Enabled", "Disabled". - :type ha_enabled: str or ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.HAEnabledEnum + :type ha_enabled: str or ~azure.mgmt.rdbms.postgresql_flexibleservers.models.HAEnabledEnum :param maintenance_window: Maintenance window of a server. - :type maintenance_window: - ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.MaintenanceWindow + :type maintenance_window: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.MaintenanceWindow """ _attribute_map = { @@ -919,7 +981,7 @@ class ServerListResult(msrest.serialization.Model): """A list of servers. :param value: The list of flexible servers. - :type value: list[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.Server] + :type value: list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.Server] :param next_link: The link used to get the next page of operations. :type next_link: str """ @@ -966,7 +1028,7 @@ class ServerVersionCapability(msrest.serialization.Model): :vartype name: str :ivar supported_vcores: :vartype supported_vcores: - list[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.VcoreCapability] + list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.VcoreCapability] """ _validation = { @@ -998,7 +1060,7 @@ class Sku(msrest.serialization.Model): :type name: str :param tier: Required. The tier of the particular SKU, e.g. Burstable. Possible values include: "Burstable", "GeneralPurpose", "MemoryOptimized". - :type tier: str or ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.SkuTier + :type tier: str or ~azure.mgmt.rdbms.postgresql_flexibleservers.models.SkuTier """ _validation = { @@ -1029,7 +1091,7 @@ class StorageEditionCapability(msrest.serialization.Model): :vartype name: str :ivar supported_storage_mb: :vartype supported_storage_mb: - list[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.StorageMBCapability] + list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.StorageMBCapability] """ _validation = { @@ -1175,7 +1237,7 @@ class VirtualNetworkSubnetUsageResult(msrest.serialization.Model): :ivar delegated_subnets_usage: :vartype delegated_subnets_usage: - list[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.DelegatedSubnetUsage] + list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.DelegatedSubnetUsage] """ _validation = { diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/models/_models_py3.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/models/_models_py3.py similarity index 85% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/models/_models_py3.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/models/_models_py3.py index 7585149c4d8e..21bca1c9728b 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/models/_models_py3.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/models/_models_py3.py @@ -20,8 +20,7 @@ class CapabilitiesListResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: A list of supported capabilities. - :vartype value: - list[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.CapabilityProperties] + :vartype value: list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.CapabilityProperties] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -54,7 +53,7 @@ class CapabilityProperties(msrest.serialization.Model): :vartype zone: str :ivar supported_flexible_server_editions: :vartype supported_flexible_server_editions: - list[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.ServerEditionCapability] + list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerEditionCapability] """ _validation = { @@ -77,17 +76,17 @@ def __init__( class Resource(msrest.serialization.Model): - """Resource. + """Common fields that are returned in the response for all Azure Resource Manager resources. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str """ @@ -118,13 +117,13 @@ class Configuration(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param value: Value of the configuration. :type value: str @@ -135,7 +134,7 @@ class Configuration(Resource): :ivar data_type: Data type of the configuration. Possible values include: "Boolean", "Numeric", "Integer", "Enumeration". :vartype data_type: str or - ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.ConfigurationDataType + ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ConfigurationDataType :ivar allowed_values: Allowed values of the configuration. :vartype allowed_values: str :param source: Source of the configuration. @@ -184,7 +183,7 @@ class ConfigurationListResult(msrest.serialization.Model): """A list of server configurations. :param value: The list of server configurations. - :type value: list[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.Configuration] + :type value: list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.Configuration] :param next_link: The link used to get the next page of operations. :type next_link: str """ @@ -206,6 +205,77 @@ def __init__( self.next_link = next_link +class Database(Resource): + """Represents a Database. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param charset: The charset of the database. + :type charset: str + :param collation: The collation of the database. + :type collation: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'charset': {'key': 'properties.charset', 'type': 'str'}, + 'collation': {'key': 'properties.collation', 'type': 'str'}, + } + + def __init__( + self, + *, + charset: Optional[str] = None, + collation: Optional[str] = None, + **kwargs + ): + super(Database, self).__init__(**kwargs) + self.charset = charset + self.collation = collation + + +class DatabaseListResult(msrest.serialization.Model): + """A List of databases. + + :param value: The list of databases housed in a server. + :type value: list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.Database] + :param next_link: The link used to get the next page of databases. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Database]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Database"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(DatabaseListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + class DelegatedSubnetUsage(msrest.serialization.Model): """Delegated subnet usage data. @@ -267,7 +337,7 @@ def __init__( class ErrorResponse(msrest.serialization.Model): - """The resource management error response. + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). Variables are only populated by the server, and will be ignored when sending a request. @@ -278,10 +348,10 @@ class ErrorResponse(msrest.serialization.Model): :ivar target: The error target. :vartype target: str :ivar details: The error details. - :vartype details: list[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.ErrorResponse] + :vartype details: list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.ErrorResponse] :ivar additional_info: The error additional info. :vartype additional_info: - list[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.ErrorAdditionalInfo] + list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.ErrorAdditionalInfo] """ _validation = { @@ -319,13 +389,13 @@ class FirewallRule(Resource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param start_ip_address: Required. The start IP address of the server firewall rule. Must be IPv4 format. @@ -367,7 +437,7 @@ class FirewallRuleListResult(msrest.serialization.Model): """A list of firewall rules. :param value: The list of firewall rules in a server. - :type value: list[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.FirewallRule] + :type value: list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.FirewallRule] :param next_link: The link used to get the next page of operations. :type next_link: str """ @@ -537,12 +607,12 @@ class Operation(msrest.serialization.Model): :ivar name: The name of the operation being performed on this particular object. :vartype name: str :ivar display: The localized display information for this particular operation or action. - :vartype display: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.OperationDisplay + :vartype display: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.OperationDisplay :param is_data_action: Indicates whether the operation is a data action. :type is_data_action: bool :ivar origin: The intended executor of the operation. Possible values include: "NotSpecified", "user", "system". - :vartype origin: str or ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.OperationOrigin + :vartype origin: str or ~azure.mgmt.rdbms.postgresql_flexibleservers.models.OperationOrigin :ivar properties: Additional descriptions for the operation. :vartype properties: dict[str, object] """ @@ -620,7 +690,7 @@ class OperationListResult(msrest.serialization.Model): """A list of resource provider operations. :param value: Collection of available operation details. - :type value: list[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.Operation] + :type value: list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.Operation] :param next_link: URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. :type next_link: str @@ -644,17 +714,17 @@ def __init__( class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have everything other than required location and tags. + """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str """ @@ -678,19 +748,19 @@ def __init__( class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. + """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] @@ -732,22 +802,22 @@ class Server(TrackedResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param location: Required. The geo-location where the resource lives. :type location: str :param identity: The Azure Active Directory identity of the server. - :type identity: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.Identity + :type identity: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.Identity :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.Sku + :type sku: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.Sku :param administrator_login: The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). :type administrator_login: str @@ -755,30 +825,29 @@ class Server(TrackedResource): creation). :type administrator_login_password: str :param version: PostgreSQL Server version. Possible values include: "12", "11". - :type version: str or ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.ServerVersion + :type version: str or ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerVersion :ivar state: A state of a server that is visible to user. Possible values include: "Ready", "Dropping", "Disabled", "Starting", "Stopping", "Stopped", "Updating". - :vartype state: str or ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.ServerState + :vartype state: str or ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerState :ivar ha_state: A state of a HA server that is visible to user. Possible values include: "NotEnabled", "CreatingStandby", "ReplicatingData", "FailingOver", "Healthy", "RemovingStandby". - :vartype ha_state: str or ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.ServerHAState + :vartype ha_state: str or ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerHAState :ivar fully_qualified_domain_name: The fully qualified domain name of a server. :vartype fully_qualified_domain_name: str :param display_name: The display name of a server. :type display_name: str :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.StorageProfile :ivar public_network_access: public network access is enabled or not. Possible values include: "Enabled", "Disabled". :vartype public_network_access: str or - ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.ServerPublicNetworkAccessState + ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerPublicNetworkAccessState :param maintenance_window: Maintenance window of a server. - :type maintenance_window: - ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.MaintenanceWindow + :type maintenance_window: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.MaintenanceWindow :param ha_enabled: stand by count value can be either enabled or disabled. Possible values include: "Enabled", "Disabled". - :type ha_enabled: str or ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.HAEnabledEnum + :type ha_enabled: str or ~azure.mgmt.rdbms.postgresql_flexibleservers.models.HAEnabledEnum :param source_server_name: The source PostgreSQL server name to restore from. :type source_server_name: str :param point_in_time_utc: Restore point creation time (ISO8601 format), specifying the time to @@ -793,10 +862,10 @@ class Server(TrackedResource): :vartype byok_enforcement: str :param delegated_subnet_arguments: :type delegated_subnet_arguments: - ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.ServerPropertiesDelegatedSubnetArguments + ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerPropertiesDelegatedSubnetArguments :param create_mode: The mode to create a new PostgreSQL server. Possible values include: "Default", "PointInTimeRestore". - :type create_mode: str or ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.CreateMode + :type create_mode: str or ~azure.mgmt.rdbms.postgresql_flexibleservers.models.CreateMode :param tags_properties_tags: Application-specific metadata in the form of key-value pairs. :type tags_properties_tags: dict[str, str] """ @@ -898,10 +967,10 @@ class ServerEditionCapability(msrest.serialization.Model): :vartype name: str :ivar supported_storage_editions: :vartype supported_storage_editions: - list[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.StorageEditionCapability] + list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.StorageEditionCapability] :ivar supported_server_versions: :vartype supported_server_versions: - list[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.ServerVersionCapability] + list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerVersionCapability] """ _validation = { @@ -932,19 +1001,18 @@ class ServerForUpdate(msrest.serialization.Model): :param location: The location the resource resides in. :type location: str :param sku: The SKU (pricing tier) of the server. - :type sku: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.Sku + :type sku: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.Sku :param tags: A set of tags. Application-specific metadata in the form of key-value pairs. :type tags: dict[str, str] :param administrator_login_password: The password of the administrator login. :type administrator_login_password: str :param storage_profile: Storage profile of a server. - :type storage_profile: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.StorageProfile + :type storage_profile: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.StorageProfile :param ha_enabled: stand by count value can be either enabled or disabled. Possible values include: "Enabled", "Disabled". - :type ha_enabled: str or ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.HAEnabledEnum + :type ha_enabled: str or ~azure.mgmt.rdbms.postgresql_flexibleservers.models.HAEnabledEnum :param maintenance_window: Maintenance window of a server. - :type maintenance_window: - ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.MaintenanceWindow + :type maintenance_window: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.MaintenanceWindow """ _attribute_map = { @@ -983,7 +1051,7 @@ class ServerListResult(msrest.serialization.Model): """A list of servers. :param value: The list of flexible servers. - :type value: list[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.Server] + :type value: list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.Server] :param next_link: The link used to get the next page of operations. :type next_link: str """ @@ -1035,7 +1103,7 @@ class ServerVersionCapability(msrest.serialization.Model): :vartype name: str :ivar supported_vcores: :vartype supported_vcores: - list[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.VcoreCapability] + list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.VcoreCapability] """ _validation = { @@ -1067,7 +1135,7 @@ class Sku(msrest.serialization.Model): :type name: str :param tier: Required. The tier of the particular SKU, e.g. Burstable. Possible values include: "Burstable", "GeneralPurpose", "MemoryOptimized". - :type tier: str or ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.SkuTier + :type tier: str or ~azure.mgmt.rdbms.postgresql_flexibleservers.models.SkuTier """ _validation = { @@ -1101,7 +1169,7 @@ class StorageEditionCapability(msrest.serialization.Model): :vartype name: str :ivar supported_storage_mb: :vartype supported_storage_mb: - list[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.StorageMBCapability] + list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.StorageMBCapability] """ _validation = { @@ -1252,7 +1320,7 @@ class VirtualNetworkSubnetUsageResult(msrest.serialization.Model): :ivar delegated_subnets_usage: :vartype delegated_subnets_usage: - list[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.DelegatedSubnetUsage] + list[~azure.mgmt.rdbms.postgresql_flexibleservers.models.DelegatedSubnetUsage] """ _validation = { diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/models/_postgre_sql_management_client_enums.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/models/_postgre_sql_management_client_enums.py similarity index 100% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/models/_postgre_sql_management_client_enums.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/models/_postgre_sql_management_client_enums.py diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/operations/__init__.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/operations/__init__.py similarity index 93% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/operations/__init__.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/operations/__init__.py index 36431bc0ed31..87ee27dc72c6 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/operations/__init__.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/operations/__init__.py @@ -13,6 +13,7 @@ from ._location_based_capabilities_operations import LocationBasedCapabilitiesOperations from ._virtual_network_subnet_usage_operations import VirtualNetworkSubnetUsageOperations from ._operations import Operations +from ._databases_operations import DatabasesOperations __all__ = [ 'ServersOperations', @@ -22,4 +23,5 @@ 'LocationBasedCapabilitiesOperations', 'VirtualNetworkSubnetUsageOperations', 'Operations', + 'DatabasesOperations', ] diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/operations/_check_name_availability_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/operations/_check_name_availability_operations.py similarity index 90% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/operations/_check_name_availability_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/operations/_check_name_availability_operations.py index 0d641b4393c7..4893fa8d7f83 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/operations/_check_name_availability_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/operations/_check_name_availability_operations.py @@ -13,7 +13,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -29,14 +29,14 @@ class CheckNameAvailabilityOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models + :type models: ~azure.mgmt.rdbms.postgresql_flexibleservers.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -46,21 +46,21 @@ def __init__(self, client, config, serializer, deserializer): def execute( self, - name_availability_request, # type: "models.NameAvailabilityRequest" + name_availability_request, # type: "_models.NameAvailabilityRequest" **kwargs # type: Any ): - # type: (...) -> "models.NameAvailability" + # type: (...) -> "_models.NameAvailability" """Check the availability of name for resource. :param name_availability_request: The required parameters for checking if resource name is available. - :type name_availability_request: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.NameAvailabilityRequest + :type name_availability_request: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.NameAvailabilityRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: NameAvailability, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.NameAvailability + :rtype: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.NameAvailability :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.NameAvailability"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NameAvailability"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/operations/_configurations_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/operations/_configurations_operations.py similarity index 93% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/operations/_configurations_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/operations/_configurations_operations.py index b01860a3b745..e895ffe2dfad 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/operations/_configurations_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/operations/_configurations_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -32,14 +32,14 @@ class ConfigurationsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models + :type models: ~azure.mgmt.rdbms.postgresql_flexibleservers.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -53,7 +53,7 @@ def list_by_server( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.ConfigurationListResult"] + # type: (...) -> Iterable["_models.ConfigurationListResult"] """List all the configurations in a given server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -62,10 +62,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ConfigurationListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.ConfigurationListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql_flexibleservers.models.ConfigurationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ConfigurationListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfigurationListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -129,7 +129,7 @@ def get( configuration_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.Configuration" + # type: (...) -> "_models.Configuration" """Gets information about a configuration of server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -140,10 +140,10 @@ def get( :type configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Configuration, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.Configuration + :rtype: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.Configuration :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Configuration"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Configuration"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -190,11 +190,11 @@ def _update_initial( resource_group_name, # type: str server_name, # type: str configuration_name, # type: str - parameters, # type: "models.Configuration" + parameters, # type: "_models.Configuration" **kwargs # type: Any ): - # type: (...) -> Optional["models.Configuration"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Configuration"]] + # type: (...) -> Optional["_models.Configuration"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Configuration"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -248,10 +248,10 @@ def begin_update( resource_group_name, # type: str server_name, # type: str configuration_name, # type: str - parameters, # type: "models.Configuration" + parameters, # type: "_models.Configuration" **kwargs # type: Any ): - # type: (...) -> LROPoller["models.Configuration"] + # type: (...) -> LROPoller["_models.Configuration"] """Updates a configuration of a server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -261,7 +261,7 @@ def begin_update( :param configuration_name: The name of the server configuration. :type configuration_name: str :param parameters: The required parameters for updating a server configuration. - :type parameters: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.Configuration + :type parameters: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.Configuration :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: True for ARMPolling, False for no polling, or a @@ -269,11 +269,11 @@ def begin_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Configuration or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.Configuration] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.postgresql_flexibleservers.models.Configuration] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.Configuration"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Configuration"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/operations/_databases_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/operations/_databases_operations.py new file mode 100644 index 000000000000..7c57b3811f18 --- /dev/null +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/operations/_databases_operations.py @@ -0,0 +1,441 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class DatabasesOperations(object): + """DatabasesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.rdbms.postgresql_flexibleservers.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _create_initial( + self, + resource_group_name, # type: str + server_name, # type: str + database_name, # type: str + parameters, # type: "_models.Database" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.Database"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Database"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-05-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'Database') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Database', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Database', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/databases/{databaseName}'} # type: ignore + + def begin_create( + self, + resource_group_name, # type: str + server_name, # type: str + database_name, # type: str + parameters, # type: "_models.Database" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.Database"] + """Creates a new database or updates an existing database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_name: str + :param parameters: The required parameters for creating or updating a database. + :type parameters: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.Database + :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: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either Database or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.postgresql_flexibleservers.models.Database] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Database"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + server_name=server_name, + database_name=database_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Database', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/databases/{databaseName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + server_name, # type: str + database_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-05-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/databases/{databaseName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + server_name, # type: str + database_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_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: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + server_name=server_name, + database_name=database_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/databases/{databaseName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + server_name, # type: str + database_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.Database" + """Gets information about a database. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param database_name: The name of the database. + :type database_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Database, or the result of cls(response) + :rtype: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.Database + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Database"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-05-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Database', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/databases/{databaseName}'} # type: ignore + + def list_by_server( + self, + resource_group_name, # type: str + server_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DatabaseListResult"] + """List all the databases in a given server. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DatabaseListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql_flexibleservers.models.DatabaseListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DatabaseListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-11-05-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_server.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + 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] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DatabaseListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{serverName}/databases'} # type: ignore diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/operations/_firewall_rules_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/operations/_firewall_rules_operations.py similarity index 95% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/operations/_firewall_rules_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/operations/_firewall_rules_operations.py index b0e476e20d00..70e2cf49564e 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/operations/_firewall_rules_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/operations/_firewall_rules_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -32,14 +32,14 @@ class FirewallRulesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models + :type models: ~azure.mgmt.rdbms.postgresql_flexibleservers.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,11 +52,11 @@ def _create_or_update_initial( resource_group_name, # type: str server_name, # type: str firewall_rule_name, # type: str - parameters, # type: "models.FirewallRule" + parameters, # type: "_models.FirewallRule" **kwargs # type: Any ): - # type: (...) -> Optional["models.FirewallRule"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.FirewallRule"]] + # type: (...) -> Optional["_models.FirewallRule"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.FirewallRule"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -113,10 +113,10 @@ def begin_create_or_update( resource_group_name, # type: str server_name, # type: str firewall_rule_name, # type: str - parameters, # type: "models.FirewallRule" + parameters, # type: "_models.FirewallRule" **kwargs # type: Any ): - # type: (...) -> LROPoller["models.FirewallRule"] + # type: (...) -> LROPoller["_models.FirewallRule"] """Creates a new firewall rule or updates an existing firewall rule. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -126,7 +126,7 @@ def begin_create_or_update( :param firewall_rule_name: The name of the server firewall rule. :type firewall_rule_name: str :param parameters: The required parameters for creating or updating a firewall rule. - :type parameters: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.FirewallRule + :type parameters: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.FirewallRule :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: True for ARMPolling, False for no polling, or a @@ -134,11 +134,11 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either FirewallRule or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.FirewallRule] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.postgresql_flexibleservers.models.FirewallRule] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.FirewallRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRule"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -309,7 +309,7 @@ def get( firewall_rule_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.FirewallRule" + # type: (...) -> "_models.FirewallRule" """List all the firewall rules in a given server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -320,10 +320,10 @@ def get( :type firewall_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: FirewallRule, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.FirewallRule + :rtype: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.FirewallRule :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.FirewallRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRule"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -371,7 +371,7 @@ def list_by_server( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.FirewallRuleListResult"] + # type: (...) -> Iterable["_models.FirewallRuleListResult"] """List all the firewall rules in a given PostgreSQL server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -380,10 +380,10 @@ def list_by_server( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either FirewallRuleListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.FirewallRuleListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql_flexibleservers.models.FirewallRuleListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.FirewallRuleListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallRuleListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/operations/_location_based_capabilities_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/operations/_location_based_capabilities_operations.py similarity index 93% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/operations/_location_based_capabilities_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/operations/_location_based_capabilities_operations.py index bfa6cc09a56e..79264b3e42d0 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/operations/_location_based_capabilities_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/operations/_location_based_capabilities_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -30,14 +30,14 @@ class LocationBasedCapabilitiesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models + :type models: ~azure.mgmt.rdbms.postgresql_flexibleservers.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -50,17 +50,17 @@ def execute( location_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.CapabilitiesListResult"] + # type: (...) -> Iterable["_models.CapabilitiesListResult"] """Get capabilities at specified location in a given subscription. :param location_name: The name of the location. :type location_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CapabilitiesListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.CapabilitiesListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql_flexibleservers.models.CapabilitiesListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.CapabilitiesListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CapabilitiesListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/operations/_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/operations/_operations.py similarity index 91% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/operations/_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/operations/_operations.py index 674bea02ead0..31e7a96a1723 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/operations/_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/operations/_operations.py @@ -13,7 +13,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -29,14 +29,14 @@ class Operations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models + :type models: ~azure.mgmt.rdbms.postgresql_flexibleservers.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -48,15 +48,15 @@ def list( self, **kwargs # type: Any ): - # type: (...) -> "models.OperationListResult" + # type: (...) -> "_models.OperationListResult" """Lists all of the available REST API operations. :keyword callable cls: A custom type or function that will be passed the direct response :return: OperationListResult, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.OperationListResult + :rtype: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.OperationListResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.OperationListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/operations/_servers_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/operations/_servers_operations.py similarity index 96% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/operations/_servers_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/operations/_servers_operations.py index c9bb95063b1e..0b4a2ada01be 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/operations/_servers_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/operations/_servers_operations.py @@ -16,7 +16,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -32,14 +32,14 @@ class ServersOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models + :type models: ~azure.mgmt.rdbms.postgresql_flexibleservers.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -51,11 +51,11 @@ def _create_initial( self, resource_group_name, # type: str server_name, # type: str - parameters, # type: "models.Server" + parameters, # type: "_models.Server" **kwargs # type: Any ): - # type: (...) -> Optional["models.Server"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Server"]] + # type: (...) -> Optional["_models.Server"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Server"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -110,10 +110,10 @@ def begin_create( self, resource_group_name, # type: str server_name, # type: str - parameters, # type: "models.Server" + parameters, # type: "_models.Server" **kwargs # type: Any ): - # type: (...) -> LROPoller["models.Server"] + # type: (...) -> LROPoller["_models.Server"] """Creates a new server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -121,7 +121,7 @@ def begin_create( :param server_name: The name of the server. :type server_name: str :param parameters: The required parameters for creating or updating a server. - :type parameters: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.Server + :type parameters: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.Server :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: True for ARMPolling, False for no polling, or a @@ -129,11 +129,11 @@ def begin_create( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Server or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.Server] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.postgresql_flexibleservers.models.Server] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.Server"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Server"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -182,11 +182,11 @@ def _update_initial( self, resource_group_name, # type: str server_name, # type: str - parameters, # type: "models.ServerForUpdate" + parameters, # type: "_models.ServerForUpdate" **kwargs # type: Any ): - # type: (...) -> Optional["models.Server"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.Server"]] + # type: (...) -> Optional["_models.Server"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Server"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -238,10 +238,10 @@ def begin_update( self, resource_group_name, # type: str server_name, # type: str - parameters, # type: "models.ServerForUpdate" + parameters, # type: "_models.ServerForUpdate" **kwargs # type: Any ): - # type: (...) -> LROPoller["models.Server"] + # type: (...) -> LROPoller["_models.Server"] """Updates an existing server. The request body can contain one to many of the properties present in the normal server definition. @@ -250,7 +250,7 @@ def begin_update( :param server_name: The name of the server. :type server_name: str :param parameters: The required parameters for updating a server. - :type parameters: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.ServerForUpdate + :type parameters: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerForUpdate :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: True for ARMPolling, False for no polling, or a @@ -258,11 +258,11 @@ def begin_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Server or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.Server] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.rdbms.postgresql_flexibleservers.models.Server] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.Server"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Server"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -423,7 +423,7 @@ def get( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.Server" + # type: (...) -> "_models.Server" """Gets information about a server. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -432,10 +432,10 @@ def get( :type server_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Server, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.Server + :rtype: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.Server :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Server"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Server"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -481,17 +481,17 @@ def list_by_resource_group( resource_group_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.ServerListResult"] + # type: (...) -> Iterable["_models.ServerListResult"] """List all the servers in a given resource group. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.ServerListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } @@ -551,15 +551,15 @@ def list( self, **kwargs # type: Any ): - # type: (...) -> Iterable["models.ServerListResult"] + # type: (...) -> Iterable["_models.ServerListResult"] """List all the servers in a given subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ServerListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.ServerListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.rdbms.postgresql_flexibleservers.models.ServerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ServerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServerListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/operations/_virtual_network_subnet_usage_operations.py b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/operations/_virtual_network_subnet_usage_operations.py similarity index 89% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/operations/_virtual_network_subnet_usage_operations.py rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/operations/_virtual_network_subnet_usage_operations.py index 7fae455cfff8..f32167995119 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/v2020_02_14_preview/operations/_virtual_network_subnet_usage_operations.py +++ b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/operations/_virtual_network_subnet_usage_operations.py @@ -13,7 +13,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -29,14 +29,14 @@ class VirtualNetworkSubnetUsageOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models + :type models: ~azure.mgmt.rdbms.postgresql_flexibleservers.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -47,22 +47,22 @@ def __init__(self, client, config, serializer, deserializer): def execute( self, location_name, # type: str - parameters, # type: "models.VirtualNetworkSubnetUsageParameter" + parameters, # type: "_models.VirtualNetworkSubnetUsageParameter" **kwargs # type: Any ): - # type: (...) -> "models.VirtualNetworkSubnetUsageResult" + # type: (...) -> "_models.VirtualNetworkSubnetUsageResult" """Get virtual network subnet usage for a given vNet resource id. :param location_name: The name of the location. :type location_name: str :param parameters: The required parameters for creating or updating a server. - :type parameters: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.VirtualNetworkSubnetUsageParameter + :type parameters: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.VirtualNetworkSubnetUsageParameter :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualNetworkSubnetUsageResult, or the result of cls(response) - :rtype: ~azure.mgmt.rdbms.postgresql.v2020_02_14_preview.models.VirtualNetworkSubnetUsageResult + :rtype: ~azure.mgmt.rdbms.postgresql_flexibleservers.models.VirtualNetworkSubnetUsageResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.VirtualNetworkSubnetUsageResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkSubnetUsageResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/py.typed b/sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/py.typed similarity index 100% rename from sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/v2020_07_01_privatepreview/py.typed rename to sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql_flexibleservers/py.typed diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure_mgmt_rdbms-1.9.0-py2.py3-none-any.whl b/sdk/rdbms/azure-mgmt-rdbms/azure_mgmt_rdbms-1.9.0-py2.py3-none-any.whl deleted file mode 100644 index 73288a5eb8c7..000000000000 Binary files a/sdk/rdbms/azure-mgmt-rdbms/azure_mgmt_rdbms-1.9.0-py2.py3-none-any.whl and /dev/null differ diff --git a/sdk/rdbms/azure-mgmt-rdbms/azure_mgmt_rdbms-2.0.0-py2.py3-none-any.whl b/sdk/rdbms/azure-mgmt-rdbms/azure_mgmt_rdbms-2.0.0-py2.py3-none-any.whl deleted file mode 100644 index b19efd389ecb..000000000000 Binary files a/sdk/rdbms/azure-mgmt-rdbms/azure_mgmt_rdbms-2.0.0-py2.py3-none-any.whl and /dev/null differ diff --git a/sdk/rdbms/azure-mgmt-rdbms/tests/recordings/test_cli_mgmt_mariadb.test_mariadb.yaml b/sdk/rdbms/azure-mgmt-rdbms/tests/recordings/test_cli_mgmt_mariadb.test_mariadb.yaml index 188759a6bd3e..c1f632fd4978 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/tests/recordings/test_cli_mgmt_mariadb.test_mariadb.yaml +++ b/sdk/rdbms/azure-mgmt-rdbms/tests/recordings/test_cli_mgmt_mariadb.test_mariadb.yaml @@ -17,27 +17,27 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBForMariaDB/servers/testserver21827?api-version=2018-06-01 response: body: - string: '{"operation":"UpsertElasticServer","startTime":"2020-11-16T03:41:51.1Z"}' + string: '{"operation":"UpsertElasticServer","startTime":"2020-12-28T09:46:08.51Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/af7a3658-f000-4706-b731-75fe189e2df0?api-version=2018-06-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/c886b7f9-fdae-4ad4-8144-c3dbd6385600?api-version=2018-06-01 cache-control: - no-cache content-length: - - '72' + - '73' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:41:51 GMT + - Mon, 28 Dec 2020 09:46:09 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/operationResults/af7a3658-f000-4706-b731-75fe189e2df0?api-version=2018-06-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/operationResults/c886b7f9-fdae-4ad4-8144-c3dbd6385600?api-version=2018-06-01 pragma: - no-cache server: @@ -47,7 +47,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 202 message: Accepted @@ -61,21 +61,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/af7a3658-f000-4706-b731-75fe189e2df0?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/c886b7f9-fdae-4ad4-8144-c3dbd6385600?api-version=2018-06-01 response: body: - string: '{"name":"af7a3658-f000-4706-b731-75fe189e2df0","status":"Succeeded","startTime":"2020-11-16T03:41:51.1Z"}' + string: '{"name":"c886b7f9-fdae-4ad4-8144-c3dbd6385600","status":"InProgress","startTime":"2020-12-28T09:46:08.51Z"}' headers: cache-control: - no-cache content-length: - - '105' + - '107' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:42:52 GMT + - Mon, 28 Dec 2020 09:47:09 GMT expires: - '-1' pragma: @@ -103,21 +103,63 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/c886b7f9-fdae-4ad4-8144-c3dbd6385600?api-version=2018-06-01 + response: + body: + string: '{"name":"c886b7f9-fdae-4ad4-8144-c3dbd6385600","status":"Succeeded","startTime":"2020-12-28T09:46:08.51Z"}' + headers: + cache-control: + - no-cache + content-length: + - '106' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Dec 2020 09:48:11 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBForMariaDB/servers/testserver21827?api-version=2018-06-01 response: body: - string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":128000,"backupRetentionDays":7,"geoRedundantBackup":"Enabled","storageAutogrow":"Disabled"},"version":"10.2","sslEnforcement":"Enabled","minimalTlsVersion":"TLSEnforcementDisabled","userVisibleState":"Ready","fullyQualifiedDomainName":"testserver21827.mariadb.database.azure.com","earliestRestoreDate":"2020-11-16T03:51:51.413+00:00","replicationRole":"None","masterServerId":"","replicaCapacity":5,"byokEnforcement":"Disabled","infrastructureEncryption":"Disabled","privateEndpointConnections":[],"publicNetworkAccess":"Enabled"},"location":"eastus","tags":{"elastic_server":"1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBforMariaDB/servers/testserver21827","name":"testserver21827","type":"Microsoft.DBforMariaDB/servers"}' + string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":128000,"backupRetentionDays":7,"geoRedundantBackup":"Enabled","storageAutogrow":"Disabled"},"version":"10.2","sslEnforcement":"Enabled","minimalTlsVersion":"TLSEnforcementDisabled","userVisibleState":"Ready","fullyQualifiedDomainName":"testserver21827.mariadb.database.azure.com","earliestRestoreDate":"2020-12-28T09:56:09.01+00:00","replicationRole":"None","masterServerId":"","replicaCapacity":5,"byokEnforcement":"Disabled","infrastructureEncryption":"Disabled","privateEndpointConnections":[],"publicNetworkAccess":"Enabled"},"location":"eastus","tags":{"elastic_server":"1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBforMariaDB/servers/testserver21827","name":"testserver21827","type":"Microsoft.DBforMariaDB/servers"}' headers: cache-control: - no-cache content-length: - - '976' + - '975' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:42:52 GMT + - Mon, 28 Dec 2020 09:48:11 GMT expires: - '-1' pragma: @@ -150,27 +192,27 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBForMariaDB/servers/serverreplica21827?api-version=2018-06-01 response: body: - string: '{"operation":"CreateElasticServerContinuousCopy","startTime":"2020-11-16T03:42:58.4Z"}' + string: '{"operation":"CreateElasticServerContinuousCopy","startTime":"2020-12-28T09:48:16.45Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/c51cac10-1423-4076-86a1-8a0f1d2c5906?api-version=2018-06-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/714708a3-d546-44b7-ae6b-d458017fd572?api-version=2018-06-01 cache-control: - no-cache content-length: - - '86' + - '87' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:42:57 GMT + - Mon, 28 Dec 2020 09:48:16 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/operationResults/c51cac10-1423-4076-86a1-8a0f1d2c5906?api-version=2018-06-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/operationResults/714708a3-d546-44b7-ae6b-d458017fd572?api-version=2018-06-01 pragma: - no-cache server: @@ -180,7 +222,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1198' status: code: 202 message: Accepted @@ -194,21 +236,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/c51cac10-1423-4076-86a1-8a0f1d2c5906?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/714708a3-d546-44b7-ae6b-d458017fd572?api-version=2018-06-01 response: body: - string: '{"name":"c51cac10-1423-4076-86a1-8a0f1d2c5906","status":"InProgress","startTime":"2020-11-16T03:42:58.4Z"}' + string: '{"name":"714708a3-d546-44b7-ae6b-d458017fd572","status":"InProgress","startTime":"2020-12-28T09:48:16.45Z"}' headers: cache-control: - no-cache content-length: - - '106' + - '107' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:43:28 GMT + - Mon, 28 Dec 2020 09:48:46 GMT expires: - '-1' pragma: @@ -236,21 +278,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/c51cac10-1423-4076-86a1-8a0f1d2c5906?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/714708a3-d546-44b7-ae6b-d458017fd572?api-version=2018-06-01 response: body: - string: '{"name":"c51cac10-1423-4076-86a1-8a0f1d2c5906","status":"InProgress","startTime":"2020-11-16T03:42:58.4Z"}' + string: '{"name":"714708a3-d546-44b7-ae6b-d458017fd572","status":"InProgress","startTime":"2020-12-28T09:48:16.45Z"}' headers: cache-control: - no-cache content-length: - - '106' + - '107' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:43:59 GMT + - Mon, 28 Dec 2020 09:49:16 GMT expires: - '-1' pragma: @@ -278,21 +320,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/c51cac10-1423-4076-86a1-8a0f1d2c5906?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/714708a3-d546-44b7-ae6b-d458017fd572?api-version=2018-06-01 response: body: - string: '{"name":"c51cac10-1423-4076-86a1-8a0f1d2c5906","status":"InProgress","startTime":"2020-11-16T03:42:58.4Z"}' + string: '{"name":"714708a3-d546-44b7-ae6b-d458017fd572","status":"InProgress","startTime":"2020-12-28T09:48:16.45Z"}' headers: cache-control: - no-cache content-length: - - '106' + - '107' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:44:29 GMT + - Mon, 28 Dec 2020 09:49:46 GMT expires: - '-1' pragma: @@ -320,21 +362,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/c51cac10-1423-4076-86a1-8a0f1d2c5906?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/714708a3-d546-44b7-ae6b-d458017fd572?api-version=2018-06-01 response: body: - string: '{"name":"c51cac10-1423-4076-86a1-8a0f1d2c5906","status":"InProgress","startTime":"2020-11-16T03:42:58.4Z"}' + string: '{"name":"714708a3-d546-44b7-ae6b-d458017fd572","status":"InProgress","startTime":"2020-12-28T09:48:16.45Z"}' headers: cache-control: - no-cache content-length: - - '106' + - '107' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:44:59 GMT + - Mon, 28 Dec 2020 09:50:18 GMT expires: - '-1' pragma: @@ -362,21 +404,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/c51cac10-1423-4076-86a1-8a0f1d2c5906?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/714708a3-d546-44b7-ae6b-d458017fd572?api-version=2018-06-01 response: body: - string: '{"name":"c51cac10-1423-4076-86a1-8a0f1d2c5906","status":"InProgress","startTime":"2020-11-16T03:42:58.4Z"}' + string: '{"name":"714708a3-d546-44b7-ae6b-d458017fd572","status":"InProgress","startTime":"2020-12-28T09:48:16.45Z"}' headers: cache-control: - no-cache content-length: - - '106' + - '107' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:45:29 GMT + - Mon, 28 Dec 2020 09:50:48 GMT expires: - '-1' pragma: @@ -404,21 +446,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/c51cac10-1423-4076-86a1-8a0f1d2c5906?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/714708a3-d546-44b7-ae6b-d458017fd572?api-version=2018-06-01 response: body: - string: '{"name":"c51cac10-1423-4076-86a1-8a0f1d2c5906","status":"InProgress","startTime":"2020-11-16T03:42:58.4Z"}' + string: '{"name":"714708a3-d546-44b7-ae6b-d458017fd572","status":"InProgress","startTime":"2020-12-28T09:48:16.45Z"}' headers: cache-control: - no-cache content-length: - - '106' + - '107' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:46:01 GMT + - Mon, 28 Dec 2020 09:51:18 GMT expires: - '-1' pragma: @@ -446,21 +488,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/c51cac10-1423-4076-86a1-8a0f1d2c5906?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/714708a3-d546-44b7-ae6b-d458017fd572?api-version=2018-06-01 response: body: - string: '{"name":"c51cac10-1423-4076-86a1-8a0f1d2c5906","status":"InProgress","startTime":"2020-11-16T03:42:58.4Z"}' + string: '{"name":"714708a3-d546-44b7-ae6b-d458017fd572","status":"InProgress","startTime":"2020-12-28T09:48:16.45Z"}' headers: cache-control: - no-cache content-length: - - '106' + - '107' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:46:31 GMT + - Mon, 28 Dec 2020 09:51:48 GMT expires: - '-1' pragma: @@ -488,21 +530,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/c51cac10-1423-4076-86a1-8a0f1d2c5906?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/714708a3-d546-44b7-ae6b-d458017fd572?api-version=2018-06-01 response: body: - string: '{"name":"c51cac10-1423-4076-86a1-8a0f1d2c5906","status":"InProgress","startTime":"2020-11-16T03:42:58.4Z"}' + string: '{"name":"714708a3-d546-44b7-ae6b-d458017fd572","status":"InProgress","startTime":"2020-12-28T09:48:16.45Z"}' headers: cache-control: - no-cache content-length: - - '106' + - '107' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:47:02 GMT + - Mon, 28 Dec 2020 09:52:19 GMT expires: - '-1' pragma: @@ -530,21 +572,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/c51cac10-1423-4076-86a1-8a0f1d2c5906?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/714708a3-d546-44b7-ae6b-d458017fd572?api-version=2018-06-01 response: body: - string: '{"name":"c51cac10-1423-4076-86a1-8a0f1d2c5906","status":"InProgress","startTime":"2020-11-16T03:42:58.4Z"}' + string: '{"name":"714708a3-d546-44b7-ae6b-d458017fd572","status":"InProgress","startTime":"2020-12-28T09:48:16.45Z"}' headers: cache-control: - no-cache content-length: - - '106' + - '107' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:47:32 GMT + - Mon, 28 Dec 2020 09:52:49 GMT expires: - '-1' pragma: @@ -572,21 +614,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/c51cac10-1423-4076-86a1-8a0f1d2c5906?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/714708a3-d546-44b7-ae6b-d458017fd572?api-version=2018-06-01 response: body: - string: '{"name":"c51cac10-1423-4076-86a1-8a0f1d2c5906","status":"InProgress","startTime":"2020-11-16T03:42:58.4Z"}' + string: '{"name":"714708a3-d546-44b7-ae6b-d458017fd572","status":"InProgress","startTime":"2020-12-28T09:48:16.45Z"}' headers: cache-control: - no-cache content-length: - - '106' + - '107' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:48:02 GMT + - Mon, 28 Dec 2020 09:53:19 GMT expires: - '-1' pragma: @@ -614,21 +656,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/c51cac10-1423-4076-86a1-8a0f1d2c5906?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/714708a3-d546-44b7-ae6b-d458017fd572?api-version=2018-06-01 response: body: - string: '{"name":"c51cac10-1423-4076-86a1-8a0f1d2c5906","status":"InProgress","startTime":"2020-11-16T03:42:58.4Z"}' + string: '{"name":"714708a3-d546-44b7-ae6b-d458017fd572","status":"InProgress","startTime":"2020-12-28T09:48:16.45Z"}' headers: cache-control: - no-cache content-length: - - '106' + - '107' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:48:33 GMT + - Mon, 28 Dec 2020 09:53:50 GMT expires: - '-1' pragma: @@ -656,21 +698,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/c51cac10-1423-4076-86a1-8a0f1d2c5906?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/714708a3-d546-44b7-ae6b-d458017fd572?api-version=2018-06-01 response: body: - string: '{"name":"c51cac10-1423-4076-86a1-8a0f1d2c5906","status":"InProgress","startTime":"2020-11-16T03:42:58.4Z"}' + string: '{"name":"714708a3-d546-44b7-ae6b-d458017fd572","status":"InProgress","startTime":"2020-12-28T09:48:16.45Z"}' headers: cache-control: - no-cache content-length: - - '106' + - '107' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:49:03 GMT + - Mon, 28 Dec 2020 09:54:20 GMT expires: - '-1' pragma: @@ -698,21 +740,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/c51cac10-1423-4076-86a1-8a0f1d2c5906?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/714708a3-d546-44b7-ae6b-d458017fd572?api-version=2018-06-01 response: body: - string: '{"name":"c51cac10-1423-4076-86a1-8a0f1d2c5906","status":"InProgress","startTime":"2020-11-16T03:42:58.4Z"}' + string: '{"name":"714708a3-d546-44b7-ae6b-d458017fd572","status":"InProgress","startTime":"2020-12-28T09:48:16.45Z"}' headers: cache-control: - no-cache content-length: - - '106' + - '107' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:49:34 GMT + - Mon, 28 Dec 2020 09:54:51 GMT expires: - '-1' pragma: @@ -740,21 +782,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/c51cac10-1423-4076-86a1-8a0f1d2c5906?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/714708a3-d546-44b7-ae6b-d458017fd572?api-version=2018-06-01 response: body: - string: '{"name":"c51cac10-1423-4076-86a1-8a0f1d2c5906","status":"InProgress","startTime":"2020-11-16T03:42:58.4Z"}' + string: '{"name":"714708a3-d546-44b7-ae6b-d458017fd572","status":"InProgress","startTime":"2020-12-28T09:48:16.45Z"}' headers: cache-control: - no-cache content-length: - - '106' + - '107' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:50:05 GMT + - Mon, 28 Dec 2020 09:55:21 GMT expires: - '-1' pragma: @@ -782,21 +824,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/c51cac10-1423-4076-86a1-8a0f1d2c5906?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/714708a3-d546-44b7-ae6b-d458017fd572?api-version=2018-06-01 response: body: - string: '{"name":"c51cac10-1423-4076-86a1-8a0f1d2c5906","status":"InProgress","startTime":"2020-11-16T03:42:58.4Z"}' + string: '{"name":"714708a3-d546-44b7-ae6b-d458017fd572","status":"InProgress","startTime":"2020-12-28T09:48:16.45Z"}' headers: cache-control: - no-cache content-length: - - '106' + - '107' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:50:35 GMT + - Mon, 28 Dec 2020 09:55:51 GMT expires: - '-1' pragma: @@ -824,21 +866,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/c51cac10-1423-4076-86a1-8a0f1d2c5906?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/714708a3-d546-44b7-ae6b-d458017fd572?api-version=2018-06-01 response: body: - string: '{"name":"c51cac10-1423-4076-86a1-8a0f1d2c5906","status":"InProgress","startTime":"2020-11-16T03:42:58.4Z"}' + string: '{"name":"714708a3-d546-44b7-ae6b-d458017fd572","status":"InProgress","startTime":"2020-12-28T09:48:16.45Z"}' headers: cache-control: - no-cache content-length: - - '106' + - '107' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:51:05 GMT + - Mon, 28 Dec 2020 09:56:22 GMT expires: - '-1' pragma: @@ -866,21 +908,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/c51cac10-1423-4076-86a1-8a0f1d2c5906?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/714708a3-d546-44b7-ae6b-d458017fd572?api-version=2018-06-01 response: body: - string: '{"name":"c51cac10-1423-4076-86a1-8a0f1d2c5906","status":"InProgress","startTime":"2020-11-16T03:42:58.4Z"}' + string: '{"name":"714708a3-d546-44b7-ae6b-d458017fd572","status":"InProgress","startTime":"2020-12-28T09:48:16.45Z"}' headers: cache-control: - no-cache content-length: - - '106' + - '107' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:51:36 GMT + - Mon, 28 Dec 2020 09:56:53 GMT expires: - '-1' pragma: @@ -908,21 +950,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/c51cac10-1423-4076-86a1-8a0f1d2c5906?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/714708a3-d546-44b7-ae6b-d458017fd572?api-version=2018-06-01 response: body: - string: '{"name":"c51cac10-1423-4076-86a1-8a0f1d2c5906","status":"Succeeded","startTime":"2020-11-16T03:42:58.4Z"}' + string: '{"name":"714708a3-d546-44b7-ae6b-d458017fd572","status":"InProgress","startTime":"2020-12-28T09:48:16.45Z"}' headers: cache-control: - no-cache content-length: - - '105' + - '107' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:52:06 GMT + - Mon, 28 Dec 2020 09:57:23 GMT expires: - '-1' pragma: @@ -950,21 +992,63 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/714708a3-d546-44b7-ae6b-d458017fd572?api-version=2018-06-01 + response: + body: + string: '{"name":"714708a3-d546-44b7-ae6b-d458017fd572","status":"Succeeded","startTime":"2020-12-28T09:48:16.45Z"}' + headers: + cache-control: + - no-cache + content-length: + - '106' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Dec 2020 09:57:53 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBForMariaDB/servers/serverreplica21827?api-version=2018-06-01 response: body: - string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":128000,"backupRetentionDays":7,"geoRedundantBackup":"Enabled","storageAutogrow":"Enabled"},"version":"10.2","sslEnforcement":"Enabled","minimalTlsVersion":"TLSEnforcementDisabled","userVisibleState":"Ready","fullyQualifiedDomainName":"serverreplica21827.mariadb.database.azure.com","earliestRestoreDate":"2020-11-16T03:54:59.823+00:00","replicationRole":"Replica","masterServerId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBforMariaDB/servers/testserver21827","replicaCapacity":0,"byokEnforcement":"Disabled","infrastructureEncryption":"Disabled","privateEndpointConnections":[],"publicNetworkAccess":"Enabled"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBforMariaDB/servers/serverreplica21827","name":"serverreplica21827","type":"Microsoft.DBforMariaDB/servers"}' + string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":128000,"backupRetentionDays":7,"geoRedundantBackup":"Enabled","storageAutogrow":"Enabled"},"version":"10.2","sslEnforcement":"Enabled","minimalTlsVersion":"TLSEnforcementDisabled","userVisibleState":"Ready","fullyQualifiedDomainName":"serverreplica21827.mariadb.database.azure.com","earliestRestoreDate":"2020-12-28T10:00:19.2+00:00","replicationRole":"Replica","masterServerId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBforMariaDB/servers/testserver21827","replicaCapacity":0,"byokEnforcement":"Disabled","infrastructureEncryption":"Disabled","privateEndpointConnections":[],"publicNetworkAccess":"Enabled"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBforMariaDB/servers/serverreplica21827","name":"serverreplica21827","type":"Microsoft.DBforMariaDB/servers"}' headers: cache-control: - no-cache content-length: - - '1123' + - '1121' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:52:06 GMT + - Mon, 28 Dec 2020 09:57:54 GMT expires: - '-1' pragma: @@ -996,15 +1080,15 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBForMariaDB/servers/testserver21827/databases/testdatabase21827?api-version=2018-06-01 response: body: - string: '{"operation":"UpsertElasticServerDatabase","startTime":"2020-11-16T03:52:08.293Z"}' + string: '{"operation":"UpsertElasticServerDatabase","startTime":"2020-12-28T09:57:55.143Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/2c331e3b-4c70-4254-aad7-180b3440fa01?api-version=2018-06-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/c37a071d-7a77-4fb2-b618-68924a14b312?api-version=2018-06-01 cache-control: - no-cache content-length: @@ -1012,11 +1096,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:52:07 GMT + - Mon, 28 Dec 2020 09:57:54 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/operationResults/2c331e3b-4c70-4254-aad7-180b3440fa01?api-version=2018-06-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/operationResults/c37a071d-7a77-4fb2-b618-68924a14b312?api-version=2018-06-01 pragma: - no-cache server: @@ -1026,7 +1110,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1196' + - '1197' status: code: 202 message: Accepted @@ -1040,12 +1124,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/2c331e3b-4c70-4254-aad7-180b3440fa01?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/c37a071d-7a77-4fb2-b618-68924a14b312?api-version=2018-06-01 response: body: - string: '{"name":"2c331e3b-4c70-4254-aad7-180b3440fa01","status":"Succeeded","startTime":"2020-11-16T03:52:08.293Z"}' + string: '{"name":"c37a071d-7a77-4fb2-b618-68924a14b312","status":"Succeeded","startTime":"2020-12-28T09:57:55.143Z"}' headers: cache-control: - no-cache @@ -1054,7 +1138,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:52:23 GMT + - Mon, 28 Dec 2020 09:58:10 GMT expires: - '-1' pragma: @@ -1082,7 +1166,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBForMariaDB/servers/testserver21827/databases/testdatabase21827?api-version=2018-06-01 response: @@ -1096,7 +1180,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:52:24 GMT + - Mon, 28 Dec 2020 09:58:10 GMT expires: - '-1' pragma: @@ -1128,27 +1212,27 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBForMariaDB/servers/testserver21827/firewallRules/firewallrule?api-version=2018-06-01 response: body: - string: '{"operation":"UpsertElasticServerFirewallRules","startTime":"2020-11-16T03:52:24.857Z"}' + string: '{"operation":"UpsertElasticServerFirewallRules","startTime":"2020-12-28T09:58:11.52Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/1dec1a47-10e9-4d79-a82c-55e549a5adb6?api-version=2018-06-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/25a381cd-e359-4545-a32a-1300c2cb3e1d?api-version=2018-06-01 cache-control: - no-cache content-length: - - '87' + - '86' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:52:25 GMT + - Mon, 28 Dec 2020 09:58:11 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/operationResults/1dec1a47-10e9-4d79-a82c-55e549a5adb6?api-version=2018-06-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/operationResults/25a381cd-e359-4545-a32a-1300c2cb3e1d?api-version=2018-06-01 pragma: - no-cache server: @@ -1158,7 +1242,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1195' + - '1196' status: code: 202 message: Accepted @@ -1172,21 +1256,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/1dec1a47-10e9-4d79-a82c-55e549a5adb6?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/25a381cd-e359-4545-a32a-1300c2cb3e1d?api-version=2018-06-01 response: body: - string: '{"name":"1dec1a47-10e9-4d79-a82c-55e549a5adb6","status":"Succeeded","startTime":"2020-11-16T03:52:24.857Z"}' + string: '{"name":"25a381cd-e359-4545-a32a-1300c2cb3e1d","status":"Succeeded","startTime":"2020-12-28T09:58:11.52Z"}' headers: cache-control: - no-cache content-length: - - '107' + - '106' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:52:41 GMT + - Mon, 28 Dec 2020 09:58:26 GMT expires: - '-1' pragma: @@ -1214,7 +1298,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBForMariaDB/servers/testserver21827/firewallRules/firewallrule?api-version=2018-06-01 response: @@ -1228,7 +1312,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:52:41 GMT + - Mon, 28 Dec 2020 09:58:26 GMT expires: - '-1' pragma: @@ -1260,15 +1344,15 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBforMariaDB/servers/testserver21827/securityAlertPolicies/securityalertpolicy?api-version=2018-06-01 response: body: - string: '{"operation":"UpsertServerThreatDetectionPolicy","startTime":"2020-11-16T03:52:42.357Z"}' + string: '{"operation":"UpsertServerThreatDetectionPolicy","startTime":"2020-12-28T09:58:27.927Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/East%20US/securityAlertPoliciesAzureAsyncOperation/e457228b-aa3c-442f-a6fe-412d41e35664?api-version=2018-06-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/East%20US/securityAlertPoliciesAzureAsyncOperation/47b61f21-5dcc-4d52-84f5-3dd4b8108d94?api-version=2018-06-01 cache-control: - no-cache content-length: @@ -1276,11 +1360,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:52:42 GMT + - Mon, 28 Dec 2020 09:58:27 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/East%20US/securityAlertPoliciesOperationResults/e457228b-aa3c-442f-a6fe-412d41e35664?api-version=2018-06-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/East%20US/securityAlertPoliciesOperationResults/47b61f21-5dcc-4d52-84f5-3dd4b8108d94?api-version=2018-06-01 pragma: - no-cache server: @@ -1290,7 +1374,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1194' + - '1195' status: code: 202 message: Accepted @@ -1304,12 +1388,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/East%20US/securityAlertPoliciesAzureAsyncOperation/e457228b-aa3c-442f-a6fe-412d41e35664?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/East%20US/securityAlertPoliciesAzureAsyncOperation/47b61f21-5dcc-4d52-84f5-3dd4b8108d94?api-version=2018-06-01 response: body: - string: '{"name":"e457228b-aa3c-442f-a6fe-412d41e35664","status":"Succeeded","startTime":"2020-11-16T03:52:42.357Z"}' + string: '{"name":"47b61f21-5dcc-4d52-84f5-3dd4b8108d94","status":"Succeeded","startTime":"2020-12-28T09:58:27.927Z"}' headers: cache-control: - no-cache @@ -1318,7 +1402,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:52:45 GMT + - Mon, 28 Dec 2020 09:58:30 GMT expires: - '-1' pragma: @@ -1346,12 +1430,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBforMariaDB/servers/testserver21827/securityAlertPolicies/securityalertpolicy?api-version=2018-06-01 response: body: - string: '{"properties":{"state":"Enabled","disabledAlerts":[""],"emailAddresses":[""],"emailAccountAdmins":false,"storageEndpoint":"","storageAccountAccessKey":"","retentionDays":0,"creationTime":"2020-11-16T03:52:42.483Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBforMariaDB/servers/testserver21827/securityAlertPolicies/securityalertpolicy","name":"securityalertpolicy","type":"Microsoft.DBforMariaDB/servers/securityAlertPolicies"}' + string: '{"properties":{"state":"Enabled","disabledAlerts":[""],"emailAddresses":[""],"emailAccountAdmins":false,"storageEndpoint":"","storageAccountAccessKey":"","retentionDays":0,"creationTime":"2020-12-28T09:58:28.037Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBforMariaDB/servers/testserver21827/securityAlertPolicies/securityalertpolicy","name":"securityalertpolicy","type":"Microsoft.DBforMariaDB/servers/securityAlertPolicies"}' headers: cache-control: - no-cache @@ -1360,7 +1444,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:52:46 GMT + - Mon, 28 Dec 2020 09:58:30 GMT expires: - '-1' pragma: @@ -1392,27 +1476,27 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBforMariaDB/servers/testserver21827/securityAlertPolicies/securityalertpolicy?api-version=2018-06-01 response: body: - string: '{"operation":"UpsertServerThreatDetectionPolicy","startTime":"2020-11-16T03:52:46.967Z"}' + string: '{"operation":"UpsertServerThreatDetectionPolicy","startTime":"2020-12-28T09:58:32.13Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/East%20US/securityAlertPoliciesAzureAsyncOperation/e3166ca8-888d-49ca-b341-318a9f6b62a6?api-version=2018-06-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/East%20US/securityAlertPoliciesAzureAsyncOperation/e4939c0e-9a09-422b-a632-0402e070f72a?api-version=2018-06-01 cache-control: - no-cache content-length: - - '88' + - '87' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:52:46 GMT + - Mon, 28 Dec 2020 09:58:31 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/East%20US/securityAlertPoliciesOperationResults/e3166ca8-888d-49ca-b341-318a9f6b62a6?api-version=2018-06-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/East%20US/securityAlertPoliciesOperationResults/e4939c0e-9a09-422b-a632-0402e070f72a?api-version=2018-06-01 pragma: - no-cache server: @@ -1422,7 +1506,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1193' + - '1194' status: code: 202 message: Accepted @@ -1436,21 +1520,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/East%20US/securityAlertPoliciesAzureAsyncOperation/e3166ca8-888d-49ca-b341-318a9f6b62a6?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/East%20US/securityAlertPoliciesAzureAsyncOperation/e4939c0e-9a09-422b-a632-0402e070f72a?api-version=2018-06-01 response: body: - string: '{"name":"e3166ca8-888d-49ca-b341-318a9f6b62a6","status":"Succeeded","startTime":"2020-11-16T03:52:46.967Z"}' + string: '{"name":"e4939c0e-9a09-422b-a632-0402e070f72a","status":"Succeeded","startTime":"2020-12-28T09:58:32.13Z"}' headers: cache-control: - no-cache content-length: - - '107' + - '106' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:52:50 GMT + - Mon, 28 Dec 2020 09:58:34 GMT expires: - '-1' pragma: @@ -1478,12 +1562,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBforMariaDB/servers/testserver21827/securityAlertPolicies/securityalertpolicy?api-version=2018-06-01 response: body: - string: '{"properties":{"state":"Disabled","disabledAlerts":[""],"emailAddresses":[""],"emailAccountAdmins":false,"storageEndpoint":"","storageAccountAccessKey":"","retentionDays":0,"creationTime":"2020-11-16T03:52:42.483Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBforMariaDB/servers/testserver21827/securityAlertPolicies/securityalertpolicy","name":"securityalertpolicy","type":"Microsoft.DBforMariaDB/servers/securityAlertPolicies"}' + string: '{"properties":{"state":"Disabled","disabledAlerts":[""],"emailAddresses":[""],"emailAccountAdmins":false,"storageEndpoint":"","storageAccountAccessKey":"","retentionDays":0,"creationTime":"2020-12-28T09:58:28.037Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBforMariaDB/servers/testserver21827/securityAlertPolicies/securityalertpolicy","name":"securityalertpolicy","type":"Microsoft.DBforMariaDB/servers/securityAlertPolicies"}' headers: cache-control: - no-cache @@ -1492,7 +1576,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:52:50 GMT + - Mon, 28 Dec 2020 09:58:35 GMT expires: - '-1' pragma: @@ -1520,12 +1604,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBforMariaDB/servers/testserver21827/securityAlertPolicies/securityalertpolicy?api-version=2018-06-01 response: body: - string: '{"properties":{"state":"Disabled","disabledAlerts":[""],"emailAddresses":[""],"emailAccountAdmins":false,"storageEndpoint":"","storageAccountAccessKey":"","retentionDays":0,"creationTime":"2020-11-16T03:52:42.483Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBforMariaDB/servers/testserver21827/securityAlertPolicies/securityalertpolicy","name":"securityalertpolicy","type":"Microsoft.DBforMariaDB/servers/securityAlertPolicies"}' + string: '{"properties":{"state":"Disabled","disabledAlerts":[""],"emailAddresses":[""],"emailAccountAdmins":false,"storageEndpoint":"","storageAccountAccessKey":"","retentionDays":0,"creationTime":"2020-12-28T09:58:28.037Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBforMariaDB/servers/testserver21827/securityAlertPolicies/securityalertpolicy","name":"securityalertpolicy","type":"Microsoft.DBforMariaDB/servers/securityAlertPolicies"}' headers: cache-control: - no-cache @@ -1534,7 +1618,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:52:51 GMT + - Mon, 28 Dec 2020 09:58:35 GMT expires: - '-1' pragma: @@ -1562,7 +1646,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBForMariaDB/servers/testserver21827/firewallRules/firewallrule?api-version=2018-06-01 response: @@ -1576,7 +1660,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:52:51 GMT + - Mon, 28 Dec 2020 09:58:36 GMT expires: - '-1' pragma: @@ -1604,7 +1688,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBForMariaDB/servers/testserver21827/databases/testdatabase21827?api-version=2018-06-01 response: @@ -1618,7 +1702,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:52:52 GMT + - Mon, 28 Dec 2020 09:58:36 GMT expires: - '-1' pragma: @@ -1646,21 +1730,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBForMariaDB/servers/testserver21827?api-version=2018-06-01 response: body: - string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":128000,"backupRetentionDays":7,"geoRedundantBackup":"Enabled","storageAutogrow":"Disabled"},"version":"10.2","sslEnforcement":"Enabled","minimalTlsVersion":"TLSEnforcementDisabled","userVisibleState":"Ready","fullyQualifiedDomainName":"testserver21827.mariadb.database.azure.com","earliestRestoreDate":"2020-11-16T03:51:51.413+00:00","replicationRole":"Master","masterServerId":"","replicaCapacity":5,"byokEnforcement":"Disabled","infrastructureEncryption":"Disabled","privateEndpointConnections":[],"publicNetworkAccess":"Enabled"},"location":"eastus","tags":{"elastic_server":"1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBforMariaDB/servers/testserver21827","name":"testserver21827","type":"Microsoft.DBforMariaDB/servers"}' + string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":128000,"backupRetentionDays":7,"geoRedundantBackup":"Enabled","storageAutogrow":"Disabled"},"version":"10.2","sslEnforcement":"Enabled","minimalTlsVersion":"TLSEnforcementDisabled","userVisibleState":"Ready","fullyQualifiedDomainName":"testserver21827.mariadb.database.azure.com","earliestRestoreDate":"2020-12-28T09:56:09.01+00:00","replicationRole":"Master","masterServerId":"","replicaCapacity":5,"byokEnforcement":"Disabled","infrastructureEncryption":"Disabled","privateEndpointConnections":[],"publicNetworkAccess":"Enabled"},"location":"eastus","tags":{"elastic_server":"1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBforMariaDB/servers/testserver21827","name":"testserver21827","type":"Microsoft.DBforMariaDB/servers"}' headers: cache-control: - no-cache content-length: - - '978' + - '977' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:52:52 GMT + - Mon, 28 Dec 2020 09:58:36 GMT expires: - '-1' pragma: @@ -1688,7 +1772,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/providers/Microsoft.DBForMariaDB/operations?api-version=2018-06-01 response: @@ -1892,21 +1976,21 @@ interactions: DB for MariaDB","resource":"Database Metric Definition","operation":"Get database metric definitions","description":"Return types of metrics that are available for databases"},"properties":{"serviceSpecification":{"metricSpecifications":[{"name":"cpu_percent","displayName":"CPU - percent","displayDescription":"CPU percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":true},{"name":"memory_percent","displayName":"Memory - percent","displayDescription":"Memory percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":true},{"name":"io_consumption_percent","displayName":"IO - percent","displayDescription":"IO percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":true},{"name":"storage_percent","displayName":"Storage - percent","displayDescription":"Storage percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":true},{"name":"storage_used","displayName":"Storage - used","displayDescription":"Storage used","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":true},{"name":"storage_limit","displayName":"Storage - limit","displayDescription":"Storage limit","unit":"Bytes","aggregationType":"Maximum","supportedAggregationTypes":["Maximum"],"fillGapWithZero":true},{"name":"serverlog_storage_percent","displayName":"Server - Log storage percent","displayDescription":"Server Log storage percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":true},{"name":"serverlog_storage_usage","displayName":"Server - Log storage used","displayDescription":"Server Log storage used","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":true},{"name":"serverlog_storage_limit","displayName":"Server - Log storage limit","displayDescription":"Server Log storage limit","unit":"Bytes","aggregationType":"Average","fillGapWithZero":true},{"name":"active_connections","displayName":"Active - Connections","displayDescription":"Active Connections","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":true},{"name":"connections_failed","displayName":"Failed - Connections","displayDescription":"Failed Connections","unit":"Count","aggregationType":"Total","supportedAggregationTypes":["Total"],"fillGapWithZero":true},{"name":"seconds_behind_master","displayName":"Replication - lag in seconds","displayDescription":"Replication lag in seconds","unit":"Count","aggregationType":"Maximum","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":true},{"name":"backup_storage_used","displayName":"Backup - Storage used","displayDescription":"Backup Storage used","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"supportedTimeGrainTypes":["PT15M","PT30M","PT1H","PT6H","PT12H","P1D"],"fillGapWithZero":true},{"name":"network_bytes_egress","displayName":"Network - Out","displayDescription":"Network Out across active connections","unit":"Bytes","aggregationType":"Total","supportedAggregationTypes":["Total"],"fillGapWithZero":true},{"name":"network_bytes_ingress","displayName":"Network - In","displayDescription":"Network In across active connections","unit":"Bytes","aggregationType":"Total","supportedAggregationTypes":["Total"],"fillGapWithZero":true}]}}},{"name":"Microsoft.DBforMariaDB/servers/providers/Microsoft.Insights/logDefinitions/read","display":{"provider":"Microsoft + percent","displayDescription":"CPU percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":false,"category":"Saturation"},{"name":"memory_percent","displayName":"Memory + percent","displayDescription":"Memory percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":false,"category":"Saturation"},{"name":"io_consumption_percent","displayName":"IO + percent","displayDescription":"IO percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":false,"category":"Saturation"},{"name":"storage_percent","displayName":"Storage + percent","displayDescription":"Storage percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":false,"category":"Saturation"},{"name":"storage_used","displayName":"Storage + used","displayDescription":"Storage used","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":false,"category":"Saturation"},{"name":"storage_limit","displayName":"Storage + limit","displayDescription":"Storage limit","unit":"Bytes","aggregationType":"Maximum","supportedAggregationTypes":["Maximum"],"fillGapWithZero":false,"category":"Saturation"},{"name":"serverlog_storage_percent","displayName":"Server + Log storage percent","displayDescription":"Server Log storage percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":false,"category":"Saturation"},{"name":"serverlog_storage_usage","displayName":"Server + Log storage used","displayDescription":"Server Log storage used","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":false,"category":"Saturation"},{"name":"serverlog_storage_limit","displayName":"Server + Log storage limit","displayDescription":"Server Log storage limit","unit":"Bytes","aggregationType":"Maximum","supportedAggregationTypes":["Maximum"],"fillGapWithZero":false,"category":"Saturation"},{"name":"active_connections","displayName":"Active + Connections","displayDescription":"Active Connections","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":false,"category":"Traffic"},{"name":"connections_failed","displayName":"Failed + Connections","displayDescription":"Failed Connections","unit":"Count","aggregationType":"Total","supportedAggregationTypes":["Total"],"fillGapWithZero":false,"category":"Errors"},{"name":"seconds_behind_master","displayName":"Replication + lag in seconds","displayDescription":"Replication lag in seconds","unit":"Count","aggregationType":"Maximum","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":false,"category":"Latency"},{"name":"backup_storage_used","displayName":"Backup + Storage used","displayDescription":"Backup Storage used","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"supportedTimeGrainTypes":["PT15M","PT30M","PT1H","PT6H","PT12H","P1D"],"fillGapWithZero":false,"category":"Saturation"},{"name":"network_bytes_egress","displayName":"Network + Out","displayDescription":"Network Out across active connections","unit":"Bytes","aggregationType":"Total","supportedAggregationTypes":["Total"],"fillGapWithZero":false,"category":"Traffic"},{"name":"network_bytes_ingress","displayName":"Network + In","displayDescription":"Network In across active connections","unit":"Bytes","aggregationType":"Total","supportedAggregationTypes":["Total"],"fillGapWithZero":false,"category":"Traffic"}]}}},{"name":"Microsoft.DBforMariaDB/servers/providers/Microsoft.Insights/logDefinitions/read","display":{"provider":"Microsoft DB for MariaDB","resource":"The log definition of servers","operation":"Read the log definitions","description":"Gets the available logs for MariaDB servers"},"properties":{"serviceSpecification":{"logSpecifications":[{"name":"MySqlSlowLogs","displayName":"MariaDB Server Logs","blobDuration":"PT1H"},{"name":"MySqlAuditLogs","displayName":"MariaDB @@ -1920,11 +2004,11 @@ interactions: cache-control: - no-cache content-length: - - '25514' + - '25913' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:52:53 GMT + - Mon, 28 Dec 2020 09:58:37 GMT expires: - '-1' pragma: @@ -1954,15 +2038,15 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBForMariaDB/servers/testserver21827/restart?api-version=2018-06-01 response: body: - string: '{"operation":"RestartElasticServer","startTime":"2020-11-16T03:52:54.467Z"}' + string: '{"operation":"RestartElasticServer","startTime":"2020-12-28T09:58:38.973Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/fe0e6009-89a9-43f5-b446-575c00eb3730?api-version=2018-06-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/9bdad7a7-10a4-4fef-ac36-6d38e61c846a?api-version=2018-06-01 cache-control: - no-cache content-length: @@ -1970,11 +2054,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:52:54 GMT + - Mon, 28 Dec 2020 09:58:38 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/operationResults/fe0e6009-89a9-43f5-b446-575c00eb3730?api-version=2018-06-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/operationResults/9bdad7a7-10a4-4fef-ac36-6d38e61c846a?api-version=2018-06-01 pragma: - no-cache server: @@ -1998,12 +2082,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/fe0e6009-89a9-43f5-b446-575c00eb3730?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/9bdad7a7-10a4-4fef-ac36-6d38e61c846a?api-version=2018-06-01 response: body: - string: '{"name":"fe0e6009-89a9-43f5-b446-575c00eb3730","status":"InProgress","startTime":"2020-11-16T03:52:54.467Z"}' + string: '{"name":"9bdad7a7-10a4-4fef-ac36-6d38e61c846a","status":"InProgress","startTime":"2020-12-28T09:58:38.973Z"}' headers: cache-control: - no-cache @@ -2012,7 +2096,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:53:09 GMT + - Mon, 28 Dec 2020 09:58:54 GMT expires: - '-1' pragma: @@ -2040,12 +2124,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/fe0e6009-89a9-43f5-b446-575c00eb3730?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/9bdad7a7-10a4-4fef-ac36-6d38e61c846a?api-version=2018-06-01 response: body: - string: '{"name":"fe0e6009-89a9-43f5-b446-575c00eb3730","status":"InProgress","startTime":"2020-11-16T03:52:54.467Z"}' + string: '{"name":"9bdad7a7-10a4-4fef-ac36-6d38e61c846a","status":"InProgress","startTime":"2020-12-28T09:58:38.973Z"}' headers: cache-control: - no-cache @@ -2054,7 +2138,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:53:25 GMT + - Mon, 28 Dec 2020 09:59:09 GMT expires: - '-1' pragma: @@ -2082,12 +2166,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/fe0e6009-89a9-43f5-b446-575c00eb3730?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/9bdad7a7-10a4-4fef-ac36-6d38e61c846a?api-version=2018-06-01 response: body: - string: '{"name":"fe0e6009-89a9-43f5-b446-575c00eb3730","status":"InProgress","startTime":"2020-11-16T03:52:54.467Z"}' + string: '{"name":"9bdad7a7-10a4-4fef-ac36-6d38e61c846a","status":"InProgress","startTime":"2020-12-28T09:58:38.973Z"}' headers: cache-control: - no-cache @@ -2096,7 +2180,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:53:40 GMT + - Mon, 28 Dec 2020 09:59:24 GMT expires: - '-1' pragma: @@ -2124,12 +2208,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/fe0e6009-89a9-43f5-b446-575c00eb3730?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/9bdad7a7-10a4-4fef-ac36-6d38e61c846a?api-version=2018-06-01 response: body: - string: '{"name":"fe0e6009-89a9-43f5-b446-575c00eb3730","status":"Succeeded","startTime":"2020-11-16T03:52:54.467Z"}' + string: '{"name":"9bdad7a7-10a4-4fef-ac36-6d38e61c846a","status":"Succeeded","startTime":"2020-12-28T09:58:38.973Z"}' headers: cache-control: - no-cache @@ -2138,7 +2222,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:53:56 GMT + - Mon, 28 Dec 2020 09:59:40 GMT expires: - '-1' pragma: @@ -2166,9 +2250,9 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/operationResults/fe0e6009-89a9-43f5-b446-575c00eb3730?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/operationResults/9bdad7a7-10a4-4fef-ac36-6d38e61c846a?api-version=2018-06-01 response: body: string: '' @@ -2178,7 +2262,7 @@ interactions: content-length: - '0' date: - - Mon, 16 Nov 2020 03:53:56 GMT + - Mon, 28 Dec 2020 09:59:40 GMT expires: - '-1' pragma: @@ -2206,27 +2290,27 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: PATCH uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBForMariaDB/servers/testserver21827?api-version=2018-06-01 response: body: - string: '{"operation":"UpsertElasticServer","startTime":"2020-11-16T03:53:57.5Z"}' + string: '{"operation":"UpsertElasticServer","startTime":"2020-12-28T09:59:41.207Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/714969bb-09e2-47c0-bedb-9ded3501c120?api-version=2018-06-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/83d26a4d-7f73-4a59-a901-e9cb4b544fcf?api-version=2018-06-01 cache-control: - no-cache content-length: - - '72' + - '74' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:53:58 GMT + - Mon, 28 Dec 2020 09:59:42 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/operationResults/714969bb-09e2-47c0-bedb-9ded3501c120?api-version=2018-06-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/operationResults/83d26a4d-7f73-4a59-a901-e9cb4b544fcf?api-version=2018-06-01 pragma: - no-cache server: @@ -2236,7 +2320,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1192' + - '1193' status: code: 202 message: Accepted @@ -2250,21 +2334,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/714969bb-09e2-47c0-bedb-9ded3501c120?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/83d26a4d-7f73-4a59-a901-e9cb4b544fcf?api-version=2018-06-01 response: body: - string: '{"name":"714969bb-09e2-47c0-bedb-9ded3501c120","status":"Succeeded","startTime":"2020-11-16T03:53:57.5Z"}' + string: '{"name":"83d26a4d-7f73-4a59-a901-e9cb4b544fcf","status":"Succeeded","startTime":"2020-12-28T09:59:41.207Z"}' headers: cache-control: - no-cache content-length: - - '105' + - '107' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:54:59 GMT + - Mon, 28 Dec 2020 10:00:42 GMT expires: - '-1' pragma: @@ -2292,21 +2376,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBForMariaDB/servers/testserver21827?api-version=2018-06-01 response: body: - string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":128000,"backupRetentionDays":7,"geoRedundantBackup":"Enabled","storageAutogrow":"Disabled"},"version":"10.2","sslEnforcement":"Enabled","minimalTlsVersion":"TLSEnforcementDisabled","userVisibleState":"Ready","fullyQualifiedDomainName":"testserver21827.mariadb.database.azure.com","earliestRestoreDate":"2020-11-16T03:51:51.413+00:00","replicationRole":"Master","masterServerId":"","replicaCapacity":5,"byokEnforcement":"Disabled","infrastructureEncryption":"Disabled","privateEndpointConnections":[],"publicNetworkAccess":"Enabled"},"location":"eastus","tags":{"elastic_server":"1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBforMariaDB/servers/testserver21827","name":"testserver21827","type":"Microsoft.DBforMariaDB/servers"}' + string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":128000,"backupRetentionDays":7,"geoRedundantBackup":"Enabled","storageAutogrow":"Disabled"},"version":"10.2","sslEnforcement":"Enabled","minimalTlsVersion":"TLSEnforcementDisabled","userVisibleState":"Ready","fullyQualifiedDomainName":"testserver21827.mariadb.database.azure.com","earliestRestoreDate":"2020-12-28T09:56:09.01+00:00","replicationRole":"Master","masterServerId":"","replicaCapacity":5,"byokEnforcement":"Disabled","infrastructureEncryption":"Disabled","privateEndpointConnections":[],"publicNetworkAccess":"Enabled"},"location":"eastus","tags":{"elastic_server":"1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBforMariaDB/servers/testserver21827","name":"testserver21827","type":"Microsoft.DBforMariaDB/servers"}' headers: cache-control: - no-cache content-length: - - '978' + - '977' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:54:59 GMT + - Mon, 28 Dec 2020 10:00:43 GMT expires: - '-1' pragma: @@ -2338,7 +2422,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBForMariaDB/checkNameAvailability?api-version=2018-06-01 response: @@ -2352,7 +2436,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:55:01 GMT + - Mon, 28 Dec 2020 10:00:44 GMT expires: - '-1' pragma: @@ -2384,15 +2468,15 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBForMariaDB/servers/testserver21827/firewallRules/firewallrule?api-version=2018-06-01 response: body: - string: '{"operation":"DropElasticServerFirewallRule","startTime":"2020-11-16T03:55:01.89Z"}' + string: '{"operation":"DropElasticServerFirewallRule","startTime":"2020-12-28T10:00:45.36Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/cbbb8e36-4522-4be4-aaa0-a43999a41b1a?api-version=2018-06-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/5a11c273-daa2-4a09-b438-35ae901a5fbb?api-version=2018-06-01 cache-control: - no-cache content-length: @@ -2400,11 +2484,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:55:02 GMT + - Mon, 28 Dec 2020 10:00:45 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/operationResults/cbbb8e36-4522-4be4-aaa0-a43999a41b1a?api-version=2018-06-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/operationResults/5a11c273-daa2-4a09-b438-35ae901a5fbb?api-version=2018-06-01 pragma: - no-cache server: @@ -2428,12 +2512,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/cbbb8e36-4522-4be4-aaa0-a43999a41b1a?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/5a11c273-daa2-4a09-b438-35ae901a5fbb?api-version=2018-06-01 response: body: - string: '{"name":"cbbb8e36-4522-4be4-aaa0-a43999a41b1a","status":"Succeeded","startTime":"2020-11-16T03:55:01.89Z"}' + string: '{"name":"5a11c273-daa2-4a09-b438-35ae901a5fbb","status":"Succeeded","startTime":"2020-12-28T10:00:45.36Z"}' headers: cache-control: - no-cache @@ -2442,7 +2526,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:55:18 GMT + - Mon, 28 Dec 2020 10:01:01 GMT expires: - '-1' pragma: @@ -2472,15 +2556,15 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBForMariaDB/servers/testserver21827/databases/testdatabase21827?api-version=2018-06-01 response: body: - string: '{"operation":"DropElasticServerDatabase","startTime":"2020-11-16T03:55:18.937Z"}' + string: '{"operation":"DropElasticServerDatabase","startTime":"2020-12-28T10:01:02.127Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/b4283294-f2b6-4f26-84f0-948e2cce1780?api-version=2018-06-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/2c98f15e-5782-448e-b22c-154dfdf76c16?api-version=2018-06-01 cache-control: - no-cache content-length: @@ -2488,11 +2572,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:55:18 GMT + - Mon, 28 Dec 2020 10:01:01 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/operationResults/b4283294-f2b6-4f26-84f0-948e2cce1780?api-version=2018-06-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/operationResults/2c98f15e-5782-448e-b22c-154dfdf76c16?api-version=2018-06-01 pragma: - no-cache server: @@ -2516,12 +2600,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/b4283294-f2b6-4f26-84f0-948e2cce1780?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/2c98f15e-5782-448e-b22c-154dfdf76c16?api-version=2018-06-01 response: body: - string: '{"name":"b4283294-f2b6-4f26-84f0-948e2cce1780","status":"Succeeded","startTime":"2020-11-16T03:55:18.937Z"}' + string: '{"name":"2c98f15e-5782-448e-b22c-154dfdf76c16","status":"Succeeded","startTime":"2020-12-28T10:01:02.127Z"}' headers: cache-control: - no-cache @@ -2530,7 +2614,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:55:34 GMT + - Mon, 28 Dec 2020 10:01:16 GMT expires: - '-1' pragma: @@ -2560,15 +2644,15 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mariadb_test_mariadbf2c70db8/providers/Microsoft.DBForMariaDB/servers/testserver21827?api-version=2018-06-01 response: body: - string: '{"operation":"DropElasticServer","startTime":"2020-11-16T03:55:35.077Z"}' + string: '{"operation":"DropElasticServer","startTime":"2020-12-28T10:01:18.207Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/d2887d08-9069-48e0-a714-5be433c6aa5b?api-version=2018-06-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/e41a7a14-cbab-4b4f-8276-7f5fe356936d?api-version=2018-06-01 cache-control: - no-cache content-length: @@ -2576,11 +2660,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:55:34 GMT + - Mon, 28 Dec 2020 10:01:17 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/operationResults/d2887d08-9069-48e0-a714-5be433c6aa5b?api-version=2018-06-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/operationResults/e41a7a14-cbab-4b4f-8276-7f5fe356936d?api-version=2018-06-01 pragma: - no-cache server: @@ -2604,12 +2688,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/d2887d08-9069-48e0-a714-5be433c6aa5b?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMariaDB/locations/eastus/azureAsyncOperation/e41a7a14-cbab-4b4f-8276-7f5fe356936d?api-version=2018-06-01 response: body: - string: '{"name":"d2887d08-9069-48e0-a714-5be433c6aa5b","status":"Succeeded","startTime":"2020-11-16T03:55:35.077Z"}' + string: '{"name":"e41a7a14-cbab-4b4f-8276-7f5fe356936d","status":"Succeeded","startTime":"2020-12-28T10:01:18.207Z"}' headers: cache-control: - no-cache @@ -2618,7 +2702,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 03:55:50 GMT + - Mon, 28 Dec 2020 10:01:33 GMT expires: - '-1' pragma: diff --git a/sdk/rdbms/azure-mgmt-rdbms/tests/recordings/test_cli_mgmt_mysql.test_mysql.yaml b/sdk/rdbms/azure-mgmt-rdbms/tests/recordings/test_cli_mgmt_mysql.test_mysql.yaml index 3e0c5815b0fc..8f620767f6a9 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/tests/recordings/test_cli_mgmt_mysql.test_mysql.yaml +++ b/sdk/rdbms/azure-mgmt-rdbms/tests/recordings/test_cli_mgmt_mysql.test_mysql.yaml @@ -17,15 +17,15 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBForMySQL/servers/testserver2134?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBForMySQL/servers/testserver21341?api-version=2017-12-01 response: body: - string: '{"operation":"UpsertElasticServer","startTime":"2020-11-16T01:51:10.13Z"}' + string: '{"operation":"UpsertElasticServer","startTime":"2020-12-29T02:57:24.19Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/f74ba25b-7ff2-48de-9ff3-1e3c54fbc9d1?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/2d5e6d76-5d2b-4c97-a766-b7023790802e?api-version=2017-12-01 cache-control: - no-cache content-length: @@ -33,11 +33,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 01:51:10 GMT + - Tue, 29 Dec 2020 02:57:24 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/operationResults/f74ba25b-7ff2-48de-9ff3-1e3c54fbc9d1?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/operationResults/2d5e6d76-5d2b-4c97-a766-b7023790802e?api-version=2017-12-01 pragma: - no-cache server: @@ -61,12 +61,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/f74ba25b-7ff2-48de-9ff3-1e3c54fbc9d1?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/2d5e6d76-5d2b-4c97-a766-b7023790802e?api-version=2017-12-01 response: body: - string: '{"name":"f74ba25b-7ff2-48de-9ff3-1e3c54fbc9d1","status":"InProgress","startTime":"2020-11-16T01:51:10.13Z"}' + string: '{"name":"2d5e6d76-5d2b-4c97-a766-b7023790802e","status":"InProgress","startTime":"2020-12-29T02:57:24.19Z"}' headers: cache-control: - no-cache @@ -75,7 +75,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 01:52:12 GMT + - Tue, 29 Dec 2020 02:58:24 GMT expires: - '-1' pragma: @@ -103,21 +103,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/f74ba25b-7ff2-48de-9ff3-1e3c54fbc9d1?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/2d5e6d76-5d2b-4c97-a766-b7023790802e?api-version=2017-12-01 response: body: - string: '{"name":"f74ba25b-7ff2-48de-9ff3-1e3c54fbc9d1","status":"Succeeded","startTime":"2020-11-16T01:51:10.13Z"}' + string: '{"name":"2d5e6d76-5d2b-4c97-a766-b7023790802e","status":"InProgress","startTime":"2020-12-29T02:57:24.19Z"}' headers: cache-control: - no-cache content-length: - - '106' + - '107' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 01:53:12 GMT + - Tue, 29 Dec 2020 02:59:25 GMT expires: - '-1' pragma: @@ -145,21 +145,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBForMySQL/servers/testserver2134?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/2d5e6d76-5d2b-4c97-a766-b7023790802e?api-version=2017-12-01 response: body: - string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":128000,"backupRetentionDays":7,"geoRedundantBackup":"Enabled","storageAutogrow":"Disabled"},"version":"5.7","sslEnforcement":"Enabled","minimalTlsVersion":"TLSEnforcementDisabled","userVisibleState":"Ready","fullyQualifiedDomainName":"testserver2134.mysql.database.azure.com","earliestRestoreDate":"2020-11-16T02:01:10.49+00:00","replicationRole":"None","masterServerId":"","replicaCapacity":5,"byokEnforcement":"Disabled","privateEndpointConnections":[],"infrastructureEncryption":"Disabled","publicNetworkAccess":"Enabled"},"location":"eastus","tags":{"elastic_server":"1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/testserver2134","name":"testserver2134","type":"Microsoft.DBforMySQL/servers"}' + string: '{"name":"2d5e6d76-5d2b-4c97-a766-b7023790802e","status":"Succeeded","startTime":"2020-12-29T02:57:24.19Z"}' headers: cache-control: - no-cache content-length: - - '961' + - '106' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 01:53:12 GMT + - Tue, 29 Dec 2020 03:00:26 GMT expires: - '-1' pragma: @@ -178,96 +178,96 @@ interactions: code: 200 message: OK - request: - body: '{"properties": {"createMode": "Replica", "sourceServerId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/testserver2134"}, - "location": "eastus"}' + body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate Connection: - keep-alive - Content-Length: - - '244' - Content-Type: - - application/json User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBForMySQL/servers/serverreplica2134?api-version=2017-12-01 + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBForMySQL/servers/testserver21341?api-version=2017-12-01 response: body: - string: '{"operation":"CreateElasticServerContinuousCopy","startTime":"2020-11-16T01:53:19.56Z"}' + string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":128000,"backupRetentionDays":7,"geoRedundantBackup":"Enabled","storageAutogrow":"Disabled"},"version":"5.7","sslEnforcement":"Enabled","minimalTlsVersion":"TLSEnforcementDisabled","userVisibleState":"Ready","fullyQualifiedDomainName":"testserver21341.mysql.database.azure.com","earliestRestoreDate":"2020-12-29T03:07:24.473+00:00","replicationRole":"None","masterServerId":"","replicaCapacity":5,"byokEnforcement":"Disabled","privateEndpointConnections":[],"infrastructureEncryption":"Disabled","publicNetworkAccess":"Enabled"},"location":"eastus","tags":{"elastic_server":"1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/testserver21341","name":"testserver21341","type":"Microsoft.DBforMySQL/servers"}' headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/a989c621-2a41-49af-9e3e-29c4e34ca141?api-version=2017-12-01 cache-control: - no-cache content-length: - - '87' + - '965' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 01:53:18 GMT + - Tue, 29 Dec 2020 03:00:26 GMT expires: - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/operationResults/a989c621-2a41-49af-9e3e-29c4e34ca141?api-version=2017-12-01 pragma: - no-cache server: - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding x-content-type-options: - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1198' status: - code: 202 - message: Accepted + code: 200 + message: OK - request: - body: null + body: '{"properties": {"createMode": "Replica", "sourceServerId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/testserver21341"}, + "location": "eastus"}' headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: - keep-alive + Content-Length: + - '245' + Content-Type: + - application/json User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/a989c621-2a41-49af-9e3e-29c4e34ca141?api-version=2017-12-01 + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBForMySQL/servers/serverreplica21341?api-version=2017-12-01 response: body: - string: '{"name":"a989c621-2a41-49af-9e3e-29c4e34ca141","status":"InProgress","startTime":"2020-11-16T01:53:19.56Z"}' + string: '{"operation":"CreateElasticServerContinuousCopy","startTime":"2020-12-29T03:00:34.287Z"}' headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/4f8d2705-afce-4f50-91a7-a752a110946c?api-version=2017-12-01 cache-control: - no-cache content-length: - - '107' + - '88' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 01:53:50 GMT + - Tue, 29 Dec 2020 03:00:33 GMT expires: - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/operationResults/4f8d2705-afce-4f50-91a7-a752a110946c?api-version=2017-12-01 pragma: - no-cache server: - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding x-content-type-options: - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' status: - code: 200 - message: OK + code: 202 + message: Accepted - request: body: null headers: @@ -278,21 +278,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/a989c621-2a41-49af-9e3e-29c4e34ca141?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/4f8d2705-afce-4f50-91a7-a752a110946c?api-version=2017-12-01 response: body: - string: '{"name":"a989c621-2a41-49af-9e3e-29c4e34ca141","status":"InProgress","startTime":"2020-11-16T01:53:19.56Z"}' + string: '{"name":"4f8d2705-afce-4f50-91a7-a752a110946c","status":"InProgress","startTime":"2020-12-29T03:00:34.287Z"}' headers: cache-control: - no-cache content-length: - - '107' + - '108' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 01:54:20 GMT + - Tue, 29 Dec 2020 03:01:04 GMT expires: - '-1' pragma: @@ -320,21 +320,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/a989c621-2a41-49af-9e3e-29c4e34ca141?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/4f8d2705-afce-4f50-91a7-a752a110946c?api-version=2017-12-01 response: body: - string: '{"name":"a989c621-2a41-49af-9e3e-29c4e34ca141","status":"InProgress","startTime":"2020-11-16T01:53:19.56Z"}' + string: '{"name":"4f8d2705-afce-4f50-91a7-a752a110946c","status":"InProgress","startTime":"2020-12-29T03:00:34.287Z"}' headers: cache-control: - no-cache content-length: - - '107' + - '108' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 01:54:50 GMT + - Tue, 29 Dec 2020 03:01:34 GMT expires: - '-1' pragma: @@ -362,21 +362,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/a989c621-2a41-49af-9e3e-29c4e34ca141?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/4f8d2705-afce-4f50-91a7-a752a110946c?api-version=2017-12-01 response: body: - string: '{"name":"a989c621-2a41-49af-9e3e-29c4e34ca141","status":"InProgress","startTime":"2020-11-16T01:53:19.56Z"}' + string: '{"name":"4f8d2705-afce-4f50-91a7-a752a110946c","status":"InProgress","startTime":"2020-12-29T03:00:34.287Z"}' headers: cache-control: - no-cache content-length: - - '107' + - '108' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 01:55:21 GMT + - Tue, 29 Dec 2020 03:02:04 GMT expires: - '-1' pragma: @@ -404,21 +404,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/a989c621-2a41-49af-9e3e-29c4e34ca141?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/4f8d2705-afce-4f50-91a7-a752a110946c?api-version=2017-12-01 response: body: - string: '{"name":"a989c621-2a41-49af-9e3e-29c4e34ca141","status":"InProgress","startTime":"2020-11-16T01:53:19.56Z"}' + string: '{"name":"4f8d2705-afce-4f50-91a7-a752a110946c","status":"InProgress","startTime":"2020-12-29T03:00:34.287Z"}' headers: cache-control: - no-cache content-length: - - '107' + - '108' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 01:55:51 GMT + - Tue, 29 Dec 2020 03:02:35 GMT expires: - '-1' pragma: @@ -446,21 +446,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/a989c621-2a41-49af-9e3e-29c4e34ca141?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/4f8d2705-afce-4f50-91a7-a752a110946c?api-version=2017-12-01 response: body: - string: '{"name":"a989c621-2a41-49af-9e3e-29c4e34ca141","status":"InProgress","startTime":"2020-11-16T01:53:19.56Z"}' + string: '{"name":"4f8d2705-afce-4f50-91a7-a752a110946c","status":"InProgress","startTime":"2020-12-29T03:00:34.287Z"}' headers: cache-control: - no-cache content-length: - - '107' + - '108' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 01:56:22 GMT + - Tue, 29 Dec 2020 03:03:06 GMT expires: - '-1' pragma: @@ -488,21 +488,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/a989c621-2a41-49af-9e3e-29c4e34ca141?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/4f8d2705-afce-4f50-91a7-a752a110946c?api-version=2017-12-01 response: body: - string: '{"name":"a989c621-2a41-49af-9e3e-29c4e34ca141","status":"InProgress","startTime":"2020-11-16T01:53:19.56Z"}' + string: '{"name":"4f8d2705-afce-4f50-91a7-a752a110946c","status":"InProgress","startTime":"2020-12-29T03:00:34.287Z"}' headers: cache-control: - no-cache content-length: - - '107' + - '108' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 01:56:52 GMT + - Tue, 29 Dec 2020 03:03:36 GMT expires: - '-1' pragma: @@ -530,21 +530,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/a989c621-2a41-49af-9e3e-29c4e34ca141?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/4f8d2705-afce-4f50-91a7-a752a110946c?api-version=2017-12-01 response: body: - string: '{"name":"a989c621-2a41-49af-9e3e-29c4e34ca141","status":"InProgress","startTime":"2020-11-16T01:53:19.56Z"}' + string: '{"name":"4f8d2705-afce-4f50-91a7-a752a110946c","status":"InProgress","startTime":"2020-12-29T03:00:34.287Z"}' headers: cache-control: - no-cache content-length: - - '107' + - '108' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 01:57:22 GMT + - Tue, 29 Dec 2020 03:04:06 GMT expires: - '-1' pragma: @@ -572,21 +572,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/a989c621-2a41-49af-9e3e-29c4e34ca141?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/4f8d2705-afce-4f50-91a7-a752a110946c?api-version=2017-12-01 response: body: - string: '{"name":"a989c621-2a41-49af-9e3e-29c4e34ca141","status":"InProgress","startTime":"2020-11-16T01:53:19.56Z"}' + string: '{"name":"4f8d2705-afce-4f50-91a7-a752a110946c","status":"InProgress","startTime":"2020-12-29T03:00:34.287Z"}' headers: cache-control: - no-cache content-length: - - '107' + - '108' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 01:57:54 GMT + - Tue, 29 Dec 2020 03:04:37 GMT expires: - '-1' pragma: @@ -614,21 +614,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/a989c621-2a41-49af-9e3e-29c4e34ca141?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/4f8d2705-afce-4f50-91a7-a752a110946c?api-version=2017-12-01 response: body: - string: '{"name":"a989c621-2a41-49af-9e3e-29c4e34ca141","status":"InProgress","startTime":"2020-11-16T01:53:19.56Z"}' + string: '{"name":"4f8d2705-afce-4f50-91a7-a752a110946c","status":"InProgress","startTime":"2020-12-29T03:00:34.287Z"}' headers: cache-control: - no-cache content-length: - - '107' + - '108' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 01:58:24 GMT + - Tue, 29 Dec 2020 03:05:07 GMT expires: - '-1' pragma: @@ -656,21 +656,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/a989c621-2a41-49af-9e3e-29c4e34ca141?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/4f8d2705-afce-4f50-91a7-a752a110946c?api-version=2017-12-01 response: body: - string: '{"name":"a989c621-2a41-49af-9e3e-29c4e34ca141","status":"InProgress","startTime":"2020-11-16T01:53:19.56Z"}' + string: '{"name":"4f8d2705-afce-4f50-91a7-a752a110946c","status":"InProgress","startTime":"2020-12-29T03:00:34.287Z"}' headers: cache-control: - no-cache content-length: - - '107' + - '108' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 01:58:54 GMT + - Tue, 29 Dec 2020 03:05:38 GMT expires: - '-1' pragma: @@ -698,21 +698,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/a989c621-2a41-49af-9e3e-29c4e34ca141?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/4f8d2705-afce-4f50-91a7-a752a110946c?api-version=2017-12-01 response: body: - string: '{"name":"a989c621-2a41-49af-9e3e-29c4e34ca141","status":"InProgress","startTime":"2020-11-16T01:53:19.56Z"}' + string: '{"name":"4f8d2705-afce-4f50-91a7-a752a110946c","status":"InProgress","startTime":"2020-12-29T03:00:34.287Z"}' headers: cache-control: - no-cache content-length: - - '107' + - '108' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 01:59:25 GMT + - Tue, 29 Dec 2020 03:06:08 GMT expires: - '-1' pragma: @@ -740,21 +740,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/a989c621-2a41-49af-9e3e-29c4e34ca141?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/4f8d2705-afce-4f50-91a7-a752a110946c?api-version=2017-12-01 response: body: - string: '{"name":"a989c621-2a41-49af-9e3e-29c4e34ca141","status":"InProgress","startTime":"2020-11-16T01:53:19.56Z"}' + string: '{"name":"4f8d2705-afce-4f50-91a7-a752a110946c","status":"InProgress","startTime":"2020-12-29T03:00:34.287Z"}' headers: cache-control: - no-cache content-length: - - '107' + - '108' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 01:59:56 GMT + - Tue, 29 Dec 2020 03:06:38 GMT expires: - '-1' pragma: @@ -782,21 +782,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/a989c621-2a41-49af-9e3e-29c4e34ca141?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/4f8d2705-afce-4f50-91a7-a752a110946c?api-version=2017-12-01 response: body: - string: '{"name":"a989c621-2a41-49af-9e3e-29c4e34ca141","status":"InProgress","startTime":"2020-11-16T01:53:19.56Z"}' + string: '{"name":"4f8d2705-afce-4f50-91a7-a752a110946c","status":"InProgress","startTime":"2020-12-29T03:00:34.287Z"}' headers: cache-control: - no-cache content-length: - - '107' + - '108' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:00:26 GMT + - Tue, 29 Dec 2020 03:07:10 GMT expires: - '-1' pragma: @@ -824,21 +824,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/a989c621-2a41-49af-9e3e-29c4e34ca141?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/4f8d2705-afce-4f50-91a7-a752a110946c?api-version=2017-12-01 response: body: - string: '{"name":"a989c621-2a41-49af-9e3e-29c4e34ca141","status":"InProgress","startTime":"2020-11-16T01:53:19.56Z"}' + string: '{"name":"4f8d2705-afce-4f50-91a7-a752a110946c","status":"InProgress","startTime":"2020-12-29T03:00:34.287Z"}' headers: cache-control: - no-cache content-length: - - '107' + - '108' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:00:56 GMT + - Tue, 29 Dec 2020 03:07:40 GMT expires: - '-1' pragma: @@ -866,21 +866,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/a989c621-2a41-49af-9e3e-29c4e34ca141?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/4f8d2705-afce-4f50-91a7-a752a110946c?api-version=2017-12-01 response: body: - string: '{"name":"a989c621-2a41-49af-9e3e-29c4e34ca141","status":"InProgress","startTime":"2020-11-16T01:53:19.56Z"}' + string: '{"name":"4f8d2705-afce-4f50-91a7-a752a110946c","status":"InProgress","startTime":"2020-12-29T03:00:34.287Z"}' headers: cache-control: - no-cache content-length: - - '107' + - '108' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:01:27 GMT + - Tue, 29 Dec 2020 03:08:10 GMT expires: - '-1' pragma: @@ -908,21 +908,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/a989c621-2a41-49af-9e3e-29c4e34ca141?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/4f8d2705-afce-4f50-91a7-a752a110946c?api-version=2017-12-01 response: body: - string: '{"name":"a989c621-2a41-49af-9e3e-29c4e34ca141","status":"InProgress","startTime":"2020-11-16T01:53:19.56Z"}' + string: '{"name":"4f8d2705-afce-4f50-91a7-a752a110946c","status":"InProgress","startTime":"2020-12-29T03:00:34.287Z"}' headers: cache-control: - no-cache content-length: - - '107' + - '108' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:01:57 GMT + - Tue, 29 Dec 2020 03:08:40 GMT expires: - '-1' pragma: @@ -950,21 +950,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/a989c621-2a41-49af-9e3e-29c4e34ca141?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/4f8d2705-afce-4f50-91a7-a752a110946c?api-version=2017-12-01 response: body: - string: '{"name":"a989c621-2a41-49af-9e3e-29c4e34ca141","status":"InProgress","startTime":"2020-11-16T01:53:19.56Z"}' + string: '{"name":"4f8d2705-afce-4f50-91a7-a752a110946c","status":"InProgress","startTime":"2020-12-29T03:00:34.287Z"}' headers: cache-control: - no-cache content-length: - - '107' + - '108' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:02:28 GMT + - Tue, 29 Dec 2020 03:09:11 GMT expires: - '-1' pragma: @@ -992,21 +992,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/a989c621-2a41-49af-9e3e-29c4e34ca141?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/4f8d2705-afce-4f50-91a7-a752a110946c?api-version=2017-12-01 response: body: - string: '{"name":"a989c621-2a41-49af-9e3e-29c4e34ca141","status":"Succeeded","startTime":"2020-11-16T01:53:19.56Z"}' + string: '{"name":"4f8d2705-afce-4f50-91a7-a752a110946c","status":"Succeeded","startTime":"2020-12-29T03:00:34.287Z"}' headers: cache-control: - no-cache content-length: - - '106' + - '107' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:02:58 GMT + - Tue, 29 Dec 2020 03:09:41 GMT expires: - '-1' pragma: @@ -1034,21 +1034,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBForMySQL/servers/serverreplica2134?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBForMySQL/servers/serverreplica21341?api-version=2017-12-01 response: body: - string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":128000,"backupRetentionDays":7,"geoRedundantBackup":"Enabled","storageAutogrow":"Enabled"},"version":"5.7","sslEnforcement":"Enabled","minimalTlsVersion":"TLSEnforcementDisabled","userVisibleState":"Ready","fullyQualifiedDomainName":"serverreplica2134.mysql.database.azure.com","earliestRestoreDate":"2020-11-16T02:05:21.17+00:00","replicationRole":"Replica","masterServerId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/testserver2134","replicaCapacity":0,"byokEnforcement":"Disabled","privateEndpointConnections":[],"infrastructureEncryption":"Disabled","publicNetworkAccess":"Enabled"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/serverreplica2134","name":"serverreplica2134","type":"Microsoft.DBforMySQL/servers"}' + string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":128000,"backupRetentionDays":7,"geoRedundantBackup":"Enabled","storageAutogrow":"Enabled"},"version":"5.7","sslEnforcement":"Enabled","minimalTlsVersion":"TLSEnforcementDisabled","userVisibleState":"Ready","fullyQualifiedDomainName":"serverreplica21341.mysql.database.azure.com","earliestRestoreDate":"2020-12-29T03:11:50.943+00:00","replicationRole":"Replica","masterServerId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/testserver21341","replicaCapacity":0,"byokEnforcement":"Disabled","privateEndpointConnections":[],"infrastructureEncryption":"Disabled","publicNetworkAccess":"Enabled"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/serverreplica21341","name":"serverreplica21341","type":"Microsoft.DBforMySQL/servers"}' headers: cache-control: - no-cache content-length: - - '1101' + - '1106' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:02:59 GMT + - Tue, 29 Dec 2020 03:09:42 GMT expires: - '-1' pragma: @@ -1080,15 +1080,15 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBForMySQL/servers/testserver2134/databases/testdatabase2134?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBForMySQL/servers/testserver21341/databases/testdatabase21341?api-version=2017-12-01 response: body: - string: '{"operation":"UpsertElasticServerDatabase","startTime":"2020-11-16T02:02:59.92Z"}' + string: '{"operation":"UpsertElasticServerDatabase","startTime":"2020-12-29T03:09:42.84Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/fc3b5383-149e-4428-8dbc-0bd26e4cbfd9?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/8b9ba731-2ff5-4c26-b542-58222601447b?api-version=2017-12-01 cache-control: - no-cache content-length: @@ -1096,11 +1096,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:02:59 GMT + - Tue, 29 Dec 2020 03:09:42 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/operationResults/fc3b5383-149e-4428-8dbc-0bd26e4cbfd9?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/operationResults/8b9ba731-2ff5-4c26-b542-58222601447b?api-version=2017-12-01 pragma: - no-cache server: @@ -1124,12 +1124,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/fc3b5383-149e-4428-8dbc-0bd26e4cbfd9?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/8b9ba731-2ff5-4c26-b542-58222601447b?api-version=2017-12-01 response: body: - string: '{"name":"fc3b5383-149e-4428-8dbc-0bd26e4cbfd9","status":"Succeeded","startTime":"2020-11-16T02:02:59.92Z"}' + string: '{"name":"8b9ba731-2ff5-4c26-b542-58222601447b","status":"Succeeded","startTime":"2020-12-29T03:09:42.84Z"}' headers: cache-control: - no-cache @@ -1138,7 +1138,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:03:15 GMT + - Tue, 29 Dec 2020 03:09:58 GMT expires: - '-1' pragma: @@ -1166,21 +1166,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBForMySQL/servers/testserver2134/databases/testdatabase2134?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBForMySQL/servers/testserver21341/databases/testdatabase21341?api-version=2017-12-01 response: body: - string: '{"properties":{"charset":"utf8","collation":"utf8_general_ci"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/testserver2134/databases/testdatabase2134","name":"testdatabase2134","type":"Microsoft.DBforMySQL/servers/databases"}' + string: '{"properties":{"charset":"utf8","collation":"utf8_general_ci"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/testserver21341/databases/testdatabase21341","name":"testdatabase21341","type":"Microsoft.DBforMySQL/servers/databases"}' headers: cache-control: - no-cache content-length: - - '331' + - '334' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:03:15 GMT + - Tue, 29 Dec 2020 03:09:59 GMT expires: - '-1' pragma: @@ -1212,15 +1212,15 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBForMySQL/servers/testserver2134/firewallRules/firewallrule?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBForMySQL/servers/testserver21341/firewallRules/firewallrule?api-version=2017-12-01 response: body: - string: '{"operation":"UpsertElasticServerFirewallRules","startTime":"2020-11-16T02:03:16.56Z"}' + string: '{"operation":"UpsertElasticServerFirewallRules","startTime":"2020-12-29T03:09:59.98Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/9e9e9064-14a4-4ce8-9348-76846d060adf?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/35c43d8b-91b3-4e69-839d-aca437ee37bd?api-version=2017-12-01 cache-control: - no-cache content-length: @@ -1228,11 +1228,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:03:19 GMT + - Tue, 29 Dec 2020 03:09:59 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/operationResults/9e9e9064-14a4-4ce8-9348-76846d060adf?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/operationResults/35c43d8b-91b3-4e69-839d-aca437ee37bd?api-version=2017-12-01 pragma: - no-cache server: @@ -1256,12 +1256,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/9e9e9064-14a4-4ce8-9348-76846d060adf?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/35c43d8b-91b3-4e69-839d-aca437ee37bd?api-version=2017-12-01 response: body: - string: '{"name":"9e9e9064-14a4-4ce8-9348-76846d060adf","status":"Succeeded","startTime":"2020-11-16T02:03:16.56Z"}' + string: '{"name":"35c43d8b-91b3-4e69-839d-aca437ee37bd","status":"Succeeded","startTime":"2020-12-29T03:09:59.98Z"}' headers: cache-control: - no-cache @@ -1270,7 +1270,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:03:34 GMT + - Tue, 29 Dec 2020 03:10:15 GMT expires: - '-1' pragma: @@ -1298,21 +1298,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBForMySQL/servers/testserver2134/firewallRules/firewallrule?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBForMySQL/servers/testserver21341/firewallRules/firewallrule?api-version=2017-12-01 response: body: - string: '{"properties":{"startIpAddress":"0.0.0.0","endIpAddress":"255.255.255.255"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/testserver2134/firewallRules/firewallrule","name":"firewallrule","type":"Microsoft.DBforMySQL/servers/firewallRules"}' + string: '{"properties":{"startIpAddress":"0.0.0.0","endIpAddress":"255.255.255.255"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/testserver21341/firewallRules/firewallrule","name":"firewallrule","type":"Microsoft.DBforMySQL/servers/firewallRules"}' headers: cache-control: - no-cache content-length: - - '344' + - '345' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:03:35 GMT + - Tue, 29 Dec 2020 03:10:15 GMT expires: - '-1' pragma: @@ -1344,15 +1344,15 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/testserver2134/securityAlertPolicies/securityalertpolicy?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/testserver21341/securityAlertPolicies/securityalertpolicy?api-version=2017-12-01 response: body: - string: '{"operation":"UpsertServerThreatDetectionPolicy","startTime":"2020-11-16T02:03:36.107Z"}' + string: '{"operation":"UpsertServerThreatDetectionPolicy","startTime":"2020-12-29T03:10:16.947Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/East%20US/securityAlertPoliciesAzureAsyncOperation/ee5c8be1-cb28-4849-9acc-467fe79414f2?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/East%20US/securityAlertPoliciesAzureAsyncOperation/51dc8c8a-d2bd-48ff-8871-5101a64830d9?api-version=2017-12-01 cache-control: - no-cache content-length: @@ -1360,11 +1360,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:03:35 GMT + - Tue, 29 Dec 2020 03:10:16 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/East%20US/securityAlertPoliciesOperationResults/ee5c8be1-cb28-4849-9acc-467fe79414f2?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/East%20US/securityAlertPoliciesOperationResults/51dc8c8a-d2bd-48ff-8871-5101a64830d9?api-version=2017-12-01 pragma: - no-cache server: @@ -1388,12 +1388,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/East%20US/securityAlertPoliciesAzureAsyncOperation/ee5c8be1-cb28-4849-9acc-467fe79414f2?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/East%20US/securityAlertPoliciesAzureAsyncOperation/51dc8c8a-d2bd-48ff-8871-5101a64830d9?api-version=2017-12-01 response: body: - string: '{"name":"ee5c8be1-cb28-4849-9acc-467fe79414f2","status":"Succeeded","startTime":"2020-11-16T02:03:36.107Z"}' + string: '{"name":"51dc8c8a-d2bd-48ff-8871-5101a64830d9","status":"Succeeded","startTime":"2020-12-29T03:10:16.947Z"}' headers: cache-control: - no-cache @@ -1402,7 +1402,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:03:39 GMT + - Tue, 29 Dec 2020 03:10:20 GMT expires: - '-1' pragma: @@ -1430,21 +1430,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/testserver2134/securityAlertPolicies/securityalertpolicy?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/testserver21341/securityAlertPolicies/securityalertpolicy?api-version=2017-12-01 response: body: - string: '{"properties":{"state":"Enabled","disabledAlerts":[""],"emailAddresses":[""],"emailAccountAdmins":false,"storageEndpoint":"","storageAccountAccessKey":"","retentionDays":0,"creationTime":"2020-11-16T02:03:36.217Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/testserver2134/securityAlertPolicies/securityalertpolicy","name":"securityalertpolicy","type":"Microsoft.DBforMySQL/servers/securityAlertPolicies"}' + string: '{"properties":{"state":"Enabled","disabledAlerts":[""],"emailAddresses":[""],"emailAccountAdmins":false,"storageEndpoint":"","storageAccountAccessKey":"","retentionDays":0,"creationTime":"2020-12-29T03:10:17.073Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/testserver21341/securityAlertPolicies/securityalertpolicy","name":"securityalertpolicy","type":"Microsoft.DBforMySQL/servers/securityAlertPolicies"}' headers: cache-control: - no-cache content-length: - - '513' + - '514' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:03:39 GMT + - Tue, 29 Dec 2020 03:10:20 GMT expires: - '-1' pragma: @@ -1476,15 +1476,15 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/testserver2134/securityAlertPolicies/securityalertpolicy?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/testserver21341/securityAlertPolicies/securityalertpolicy?api-version=2017-12-01 response: body: - string: '{"operation":"UpsertServerThreatDetectionPolicy","startTime":"2020-11-16T02:03:40.577Z"}' + string: '{"operation":"UpsertServerThreatDetectionPolicy","startTime":"2020-12-29T03:10:21.903Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/East%20US/securityAlertPoliciesAzureAsyncOperation/dc4bc701-2e7b-429e-85f6-46a905bd13ec?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/East%20US/securityAlertPoliciesAzureAsyncOperation/cf9ec490-0e96-4207-9f01-973066bb313a?api-version=2017-12-01 cache-control: - no-cache content-length: @@ -1492,11 +1492,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:03:40 GMT + - Tue, 29 Dec 2020 03:10:21 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/East%20US/securityAlertPoliciesOperationResults/dc4bc701-2e7b-429e-85f6-46a905bd13ec?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/East%20US/securityAlertPoliciesOperationResults/cf9ec490-0e96-4207-9f01-973066bb313a?api-version=2017-12-01 pragma: - no-cache server: @@ -1520,12 +1520,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/East%20US/securityAlertPoliciesAzureAsyncOperation/dc4bc701-2e7b-429e-85f6-46a905bd13ec?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/East%20US/securityAlertPoliciesAzureAsyncOperation/cf9ec490-0e96-4207-9f01-973066bb313a?api-version=2017-12-01 response: body: - string: '{"name":"dc4bc701-2e7b-429e-85f6-46a905bd13ec","status":"Succeeded","startTime":"2020-11-16T02:03:40.577Z"}' + string: '{"name":"cf9ec490-0e96-4207-9f01-973066bb313a","status":"Succeeded","startTime":"2020-12-29T03:10:21.903Z"}' headers: cache-control: - no-cache @@ -1534,7 +1534,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:03:43 GMT + - Tue, 29 Dec 2020 03:10:24 GMT expires: - '-1' pragma: @@ -1562,21 +1562,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/testserver2134/securityAlertPolicies/securityalertpolicy?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/testserver21341/securityAlertPolicies/securityalertpolicy?api-version=2017-12-01 response: body: - string: '{"properties":{"state":"Disabled","disabledAlerts":[""],"emailAddresses":[""],"emailAccountAdmins":false,"storageEndpoint":"","storageAccountAccessKey":"","retentionDays":0,"creationTime":"2020-11-16T02:03:36.217Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/testserver2134/securityAlertPolicies/securityalertpolicy","name":"securityalertpolicy","type":"Microsoft.DBforMySQL/servers/securityAlertPolicies"}' + string: '{"properties":{"state":"Disabled","disabledAlerts":[""],"emailAddresses":[""],"emailAccountAdmins":false,"storageEndpoint":"","storageAccountAccessKey":"","retentionDays":0,"creationTime":"2020-12-29T03:10:17.073Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/testserver21341/securityAlertPolicies/securityalertpolicy","name":"securityalertpolicy","type":"Microsoft.DBforMySQL/servers/securityAlertPolicies"}' headers: cache-control: - no-cache content-length: - - '514' + - '515' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:03:43 GMT + - Tue, 29 Dec 2020 03:10:25 GMT expires: - '-1' pragma: @@ -1604,21 +1604,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/testserver2134/securityAlertPolicies/securityalertpolicy?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/testserver21341/securityAlertPolicies/securityalertpolicy?api-version=2017-12-01 response: body: - string: '{"properties":{"state":"Disabled","disabledAlerts":[""],"emailAddresses":[""],"emailAccountAdmins":false,"storageEndpoint":"","storageAccountAccessKey":"","retentionDays":0,"creationTime":"2020-11-16T02:03:36.217Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/testserver2134/securityAlertPolicies/securityalertpolicy","name":"securityalertpolicy","type":"Microsoft.DBforMySQL/servers/securityAlertPolicies"}' + string: '{"properties":{"state":"Disabled","disabledAlerts":[""],"emailAddresses":[""],"emailAccountAdmins":false,"storageEndpoint":"","storageAccountAccessKey":"","retentionDays":0,"creationTime":"2020-12-29T03:10:17.073Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/testserver21341/securityAlertPolicies/securityalertpolicy","name":"securityalertpolicy","type":"Microsoft.DBforMySQL/servers/securityAlertPolicies"}' headers: cache-control: - no-cache content-length: - - '514' + - '515' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:03:44 GMT + - Tue, 29 Dec 2020 03:10:25 GMT expires: - '-1' pragma: @@ -1646,21 +1646,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBForMySQL/servers/testserver2134/firewallRules/firewallrule?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBForMySQL/servers/testserver21341/firewallRules/firewallrule?api-version=2017-12-01 response: body: - string: '{"properties":{"startIpAddress":"0.0.0.0","endIpAddress":"255.255.255.255"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/testserver2134/firewallRules/firewallrule","name":"firewallrule","type":"Microsoft.DBforMySQL/servers/firewallRules"}' + string: '{"properties":{"startIpAddress":"0.0.0.0","endIpAddress":"255.255.255.255"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/testserver21341/firewallRules/firewallrule","name":"firewallrule","type":"Microsoft.DBforMySQL/servers/firewallRules"}' headers: cache-control: - no-cache content-length: - - '344' + - '345' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:03:44 GMT + - Tue, 29 Dec 2020 03:10:26 GMT expires: - '-1' pragma: @@ -1688,21 +1688,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBForMySQL/servers/testserver2134/databases/testdatabase2134?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBForMySQL/servers/testserver21341/databases/testdatabase21341?api-version=2017-12-01 response: body: - string: '{"properties":{"charset":"utf8","collation":"utf8_general_ci"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/testserver2134/databases/testdatabase2134","name":"testdatabase2134","type":"Microsoft.DBforMySQL/servers/databases"}' + string: '{"properties":{"charset":"utf8","collation":"utf8_general_ci"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/testserver21341/databases/testdatabase21341","name":"testdatabase21341","type":"Microsoft.DBforMySQL/servers/databases"}' headers: cache-control: - no-cache content-length: - - '331' + - '334' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:03:45 GMT + - Tue, 29 Dec 2020 03:10:26 GMT expires: - '-1' pragma: @@ -1730,21 +1730,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBForMySQL/servers/testserver2134?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBForMySQL/servers/testserver21341?api-version=2017-12-01 response: body: - string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":128000,"backupRetentionDays":7,"geoRedundantBackup":"Enabled","storageAutogrow":"Disabled"},"version":"5.7","sslEnforcement":"Enabled","minimalTlsVersion":"TLSEnforcementDisabled","userVisibleState":"Ready","fullyQualifiedDomainName":"testserver2134.mysql.database.azure.com","earliestRestoreDate":"2020-11-16T02:01:10.49+00:00","replicationRole":"Master","masterServerId":"","replicaCapacity":5,"byokEnforcement":"Disabled","privateEndpointConnections":[],"infrastructureEncryption":"Disabled","publicNetworkAccess":"Enabled"},"location":"eastus","tags":{"elastic_server":"1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/testserver2134","name":"testserver2134","type":"Microsoft.DBforMySQL/servers"}' + string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":128000,"backupRetentionDays":7,"geoRedundantBackup":"Enabled","storageAutogrow":"Disabled"},"version":"5.7","sslEnforcement":"Enabled","minimalTlsVersion":"TLSEnforcementDisabled","userVisibleState":"Ready","fullyQualifiedDomainName":"testserver21341.mysql.database.azure.com","earliestRestoreDate":"2020-12-29T03:07:24.473+00:00","replicationRole":"Master","masterServerId":"","replicaCapacity":5,"byokEnforcement":"Disabled","privateEndpointConnections":[],"infrastructureEncryption":"Disabled","publicNetworkAccess":"Enabled"},"location":"eastus","tags":{"elastic_server":"1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/testserver21341","name":"testserver21341","type":"Microsoft.DBforMySQL/servers"}' headers: cache-control: - no-cache content-length: - - '963' + - '967' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:03:45 GMT + - Tue, 29 Dec 2020 03:10:26 GMT expires: - '-1' pragma: @@ -1772,7 +1772,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/providers/Microsoft.DBForMySQL/operations?api-version=2017-12-01 response: @@ -1976,21 +1976,21 @@ interactions: DB for MySQL","resource":"Database Metric Definition","operation":"Get database metric definitions","description":"Return types of metrics that are available for databases"},"properties":{"serviceSpecification":{"metricSpecifications":[{"name":"cpu_percent","displayName":"CPU - percent","displayDescription":"CPU percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":true},{"name":"memory_percent","displayName":"Memory - percent","displayDescription":"Memory percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":true},{"name":"io_consumption_percent","displayName":"IO - percent","displayDescription":"IO percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":true},{"name":"storage_percent","displayName":"Storage - percent","displayDescription":"Storage percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":true},{"name":"storage_used","displayName":"Storage - used","displayDescription":"Storage used","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":true},{"name":"storage_limit","displayName":"Storage - limit","displayDescription":"Storage limit","unit":"Bytes","aggregationType":"Maximum","supportedAggregationTypes":["Maximum"],"fillGapWithZero":true},{"name":"serverlog_storage_percent","displayName":"Server - Log storage percent","displayDescription":"Server Log storage percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":true},{"name":"serverlog_storage_usage","displayName":"Server - Log storage used","displayDescription":"Server Log storage used","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":true},{"name":"serverlog_storage_limit","displayName":"Server - Log storage limit","displayDescription":"Server Log storage limit","unit":"Bytes","aggregationType":"Maximum","supportedAggregationTypes":["Maximum"],"fillGapWithZero":true},{"name":"active_connections","displayName":"Active - Connections","displayDescription":"Active Connections","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":true},{"name":"connections_failed","displayName":"Failed - Connections","displayDescription":"Failed Connections","unit":"Count","aggregationType":"Total","supportedAggregationTypes":["Total"],"fillGapWithZero":true},{"name":"seconds_behind_master","displayName":"Replication - lag in seconds","displayDescription":"Replication lag in seconds","unit":"Count","aggregationType":"Maximum","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":true},{"name":"backup_storage_used","displayName":"Backup - Storage used","displayDescription":"Backup Storage used","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"supportedTimeGrainTypes":["PT15M","PT30M","PT1H","PT6H","PT12H","P1D"],"fillGapWithZero":true},{"name":"network_bytes_egress","displayName":"Network - Out","displayDescription":"Network Out across active connections","unit":"Bytes","aggregationType":"Total","supportedAggregationTypes":["Total"],"fillGapWithZero":true},{"name":"network_bytes_ingress","displayName":"Network - In","displayDescription":"Network In across active connections","unit":"Bytes","aggregationType":"Total","supportedAggregationTypes":["Total"],"fillGapWithZero":true}]}}},{"name":"Microsoft.DBforMySQL/servers/providers/Microsoft.Insights/logDefinitions/read","display":{"provider":"Microsoft + percent","displayDescription":"CPU percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":false,"category":"Saturation"},{"name":"memory_percent","displayName":"Memory + percent","displayDescription":"Memory percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":false,"category":"Saturation"},{"name":"io_consumption_percent","displayName":"IO + percent","displayDescription":"IO percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":false,"category":"Saturation"},{"name":"storage_percent","displayName":"Storage + percent","displayDescription":"Storage percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":false,"category":"Saturation"},{"name":"storage_used","displayName":"Storage + used","displayDescription":"Storage used","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":false,"category":"Saturation"},{"name":"storage_limit","displayName":"Storage + limit","displayDescription":"Storage limit","unit":"Bytes","aggregationType":"Maximum","supportedAggregationTypes":["Maximum"],"fillGapWithZero":false,"category":"Saturation"},{"name":"serverlog_storage_percent","displayName":"Server + Log storage percent","displayDescription":"Server Log storage percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":false,"category":"Saturation"},{"name":"serverlog_storage_usage","displayName":"Server + Log storage used","displayDescription":"Server Log storage used","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":false,"category":"Saturation"},{"name":"serverlog_storage_limit","displayName":"Server + Log storage limit","displayDescription":"Server Log storage limit","unit":"Bytes","aggregationType":"Maximum","supportedAggregationTypes":["Maximum"],"fillGapWithZero":false,"category":"Saturation"},{"name":"active_connections","displayName":"Active + Connections","displayDescription":"Active Connections","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":false,"category":"Traffic"},{"name":"connections_failed","displayName":"Failed + Connections","displayDescription":"Failed Connections","unit":"Count","aggregationType":"Total","supportedAggregationTypes":["Total"],"fillGapWithZero":false,"category":"Errors"},{"name":"seconds_behind_master","displayName":"Replication + lag in seconds","displayDescription":"Replication lag in seconds","unit":"Count","aggregationType":"Maximum","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":false,"category":"Latency"},{"name":"backup_storage_used","displayName":"Backup + Storage used","displayDescription":"Backup Storage used","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"supportedTimeGrainTypes":["PT15M","PT30M","PT1H","PT6H","PT12H","P1D"],"fillGapWithZero":false,"category":"Saturation"},{"name":"network_bytes_egress","displayName":"Network + Out","displayDescription":"Network Out across active connections","unit":"Bytes","aggregationType":"Total","supportedAggregationTypes":["Total"],"fillGapWithZero":false,"category":"Traffic"},{"name":"network_bytes_ingress","displayName":"Network + In","displayDescription":"Network In across active connections","unit":"Bytes","aggregationType":"Total","supportedAggregationTypes":["Total"],"fillGapWithZero":false,"category":"Traffic"}]}}},{"name":"Microsoft.DBforMySQL/servers/providers/Microsoft.Insights/logDefinitions/read","display":{"provider":"Microsoft DB for MySQL","resource":"The log definition of servers","operation":"Read the log definitions","description":"Gets the available logs for MySQL servers"},"properties":{"serviceSpecification":{"logSpecifications":[{"name":"MySqlSlowLogs","displayName":"MySQL Server Logs","blobDuration":"PT1H"},{"name":"MySqlAuditLogs","displayName":"MySQL @@ -2003,19 +2003,19 @@ interactions: DB for MySQL","resource":"Database Metric Definition","operation":"Get database metric definitions","description":"Return types of metrics that are available for databases"},"properties":{"serviceSpecification":{"metricSpecifications":[{"name":"cpu_percent","displayName":"Host - CPU Percent","displayDescription":"Host CPU Percent","unit":"Percent","aggregationType":"Maximum","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":false},{"name":"memory_percent","displayName":"Host - Memory Percent","displayDescription":"Host Memory Percent","unit":"Percent","aggregationType":"Maximum","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":false},{"name":"network_bytes_egress","displayName":"Host - Network Out","displayDescription":"Host Network egress in bytes","unit":"Bytes","aggregationType":"Total","supportedAggregationTypes":["Total"],"fillGapWithZero":false},{"name":"network_bytes_ingress","displayName":"Host - Network In","displayDescription":"Host Network ingress in bytes","unit":"Bytes","aggregationType":"Total","supportedAggregationTypes":["Total"],"fillGapWithZero":false},{"name":"active_connections","displayName":"Active - Connections","displayDescription":"Active Connections","unit":"Count","aggregationType":"Maximum","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":false},{"name":"total_connections","displayName":"Total - Connections","displayDescription":"Total Connections","unit":"Count","aggregationType":"Total","supportedAggregationTypes":["Total"],"fillGapWithZero":false},{"name":"aborted_connections","displayName":"Aborted - Connections","displayDescription":"Aborted Connections","unit":"Count","aggregationType":"Total","supportedAggregationTypes":["Total"],"fillGapWithZero":false},{"name":"Queries","displayName":"Queries","displayDescription":"Queries","unit":"Count","aggregationType":"Total","supportedAggregationTypes":["Total"],"fillGapWithZero":false},{"name":"io_consumption_percent","displayName":"IO - Percent","displayDescription":"IO Percent","unit":"Percent","aggregationType":"Maximum","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":false},{"name":"storage_percent","displayName":"Storage - Percent","displayDescription":"Storage Percent","unit":"Percent","aggregationType":"Maximum","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":false},{"name":"storage_used","displayName":"Storage - Used","displayDescription":"Storage Used","unit":"Bytes","aggregationType":"Maximum","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":false},{"name":"storage_limit","displayName":"Storage - Limit","displayDescription":"Storage Limit","unit":"Bytes","aggregationType":"Maximum","supportedAggregationTypes":["Maximum"],"fillGapWithZero":false},{"name":"backup_storage_used","displayName":"Backup - Storage Used","displayDescription":"Backup Storage Used","unit":"Bytes","aggregationType":"Maximum","supportedAggregationTypes":["Average","Maximum","Minimum"],"supportedTimeGrainTypes":["PT15M","PT30M","PT1H","PT6H","PT12H","P1D"],"fillGapWithZero":false},{"name":"replication_lag","displayName":"Replication - Lag In Seconds","displayDescription":"Replication lag in seconds","unit":"Seconds","aggregationType":"Maximum","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":false}]}}},{"name":"Microsoft.DBforMySQL/flexibleServers/providers/Microsoft.Insights/logDefinitions/read","display":{"provider":"Microsoft + CPU Percent","displayDescription":"Host CPU Percent","unit":"Percent","aggregationType":"Maximum","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":false,"category":"Saturation"},{"name":"memory_percent","displayName":"Host + Memory Percent","displayDescription":"Host Memory Percent","unit":"Percent","aggregationType":"Maximum","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":false,"category":"Saturation"},{"name":"network_bytes_egress","displayName":"Host + Network Out","displayDescription":"Host Network egress in bytes","unit":"Bytes","aggregationType":"Total","supportedAggregationTypes":["Total"],"fillGapWithZero":false,"category":"Traffic"},{"name":"network_bytes_ingress","displayName":"Host + Network In","displayDescription":"Host Network ingress in bytes","unit":"Bytes","aggregationType":"Total","supportedAggregationTypes":["Total"],"fillGapWithZero":false,"category":"Traffic"},{"name":"active_connections","displayName":"Active + Connections","displayDescription":"Active Connections","unit":"Count","aggregationType":"Maximum","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":false,"category":"Traffic"},{"name":"total_connections","displayName":"Total + Connections","displayDescription":"Total Connections","unit":"Count","aggregationType":"Total","supportedAggregationTypes":["Total"],"fillGapWithZero":false,"category":"Traffic"},{"name":"aborted_connections","displayName":"Aborted + Connections","displayDescription":"Aborted Connections","unit":"Count","aggregationType":"Total","supportedAggregationTypes":["Total"],"fillGapWithZero":false,"category":"Errors"},{"name":"Queries","displayName":"Queries","displayDescription":"Queries","unit":"Count","aggregationType":"Total","supportedAggregationTypes":["Total"],"fillGapWithZero":false,"category":"Traffic"},{"name":"io_consumption_percent","displayName":"IO + Percent","displayDescription":"IO Percent","unit":"Percent","aggregationType":"Maximum","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":false,"category":"Saturation"},{"name":"storage_percent","displayName":"Storage + Percent","displayDescription":"Storage Percent","unit":"Percent","aggregationType":"Maximum","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":false,"category":"Saturation"},{"name":"storage_used","displayName":"Storage + Used","displayDescription":"Storage Used","unit":"Bytes","aggregationType":"Maximum","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":false,"category":"Saturation"},{"name":"storage_limit","displayName":"Storage + Limit","displayDescription":"Storage Limit","unit":"Bytes","aggregationType":"Maximum","supportedAggregationTypes":["Maximum"],"fillGapWithZero":false,"category":"Saturation"},{"name":"backup_storage_used","displayName":"Backup + Storage Used","displayDescription":"Backup Storage Used","unit":"Bytes","aggregationType":"Maximum","supportedAggregationTypes":["Average","Maximum","Minimum"],"supportedTimeGrainTypes":["PT15M","PT30M","PT1H","PT6H","PT12H","P1D"],"fillGapWithZero":false,"category":"Saturation"},{"name":"replication_lag","displayName":"Replication + Lag In Seconds","displayDescription":"Replication lag in seconds","unit":"Seconds","aggregationType":"Maximum","supportedAggregationTypes":["Average","Maximum","Minimum"],"fillGapWithZero":false,"category":"Latency"}]}}},{"name":"Microsoft.DBforMySQL/flexibleServers/providers/Microsoft.Insights/logDefinitions/read","display":{"provider":"Microsoft DB for MySQL","resource":"The log definition of servers","operation":"Read the log definitions","description":"Gets the available logs for MySQL servers"},"properties":{"serviceSpecification":{"logSpecifications":[{"name":"MySqlSlowLogs","displayName":"MySQL Slow Logs","blobDuration":"PT1H"},{"name":"MySqlAuditLogs","displayName":"MySQL @@ -2036,11 +2036,11 @@ interactions: cache-control: - no-cache content-length: - - '30966' + - '31639' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:03:46 GMT + - Tue, 29 Dec 2020 03:10:27 GMT expires: - '-1' pragma: @@ -2070,15 +2070,15 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBForMySQL/servers/testserver2134/restart?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBForMySQL/servers/testserver21341/restart?api-version=2017-12-01 response: body: - string: '{"operation":"RestartElasticServer","startTime":"2020-11-16T02:03:47.857Z"}' + string: '{"operation":"RestartElasticServer","startTime":"2020-12-29T03:10:28.937Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/a43fa885-395f-4bee-ad4f-158292a89cc5?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/411bd491-3357-4908-83d8-76d3074a2c69?api-version=2017-12-01 cache-control: - no-cache content-length: @@ -2086,11 +2086,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:03:47 GMT + - Tue, 29 Dec 2020 03:10:28 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/operationResults/a43fa885-395f-4bee-ad4f-158292a89cc5?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/operationResults/411bd491-3357-4908-83d8-76d3074a2c69?api-version=2017-12-01 pragma: - no-cache server: @@ -2114,12 +2114,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/a43fa885-395f-4bee-ad4f-158292a89cc5?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/411bd491-3357-4908-83d8-76d3074a2c69?api-version=2017-12-01 response: body: - string: '{"name":"a43fa885-395f-4bee-ad4f-158292a89cc5","status":"InProgress","startTime":"2020-11-16T02:03:47.857Z"}' + string: '{"name":"411bd491-3357-4908-83d8-76d3074a2c69","status":"InProgress","startTime":"2020-12-29T03:10:28.937Z"}' headers: cache-control: - no-cache @@ -2128,7 +2128,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:04:02 GMT + - Tue, 29 Dec 2020 03:10:43 GMT expires: - '-1' pragma: @@ -2156,12 +2156,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/a43fa885-395f-4bee-ad4f-158292a89cc5?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/411bd491-3357-4908-83d8-76d3074a2c69?api-version=2017-12-01 response: body: - string: '{"name":"a43fa885-395f-4bee-ad4f-158292a89cc5","status":"InProgress","startTime":"2020-11-16T02:03:47.857Z"}' + string: '{"name":"411bd491-3357-4908-83d8-76d3074a2c69","status":"InProgress","startTime":"2020-12-29T03:10:28.937Z"}' headers: cache-control: - no-cache @@ -2170,7 +2170,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:04:17 GMT + - Tue, 29 Dec 2020 03:10:59 GMT expires: - '-1' pragma: @@ -2198,12 +2198,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/a43fa885-395f-4bee-ad4f-158292a89cc5?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/411bd491-3357-4908-83d8-76d3074a2c69?api-version=2017-12-01 response: body: - string: '{"name":"a43fa885-395f-4bee-ad4f-158292a89cc5","status":"InProgress","startTime":"2020-11-16T02:03:47.857Z"}' + string: '{"name":"411bd491-3357-4908-83d8-76d3074a2c69","status":"InProgress","startTime":"2020-12-29T03:10:28.937Z"}' headers: cache-control: - no-cache @@ -2212,7 +2212,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:04:33 GMT + - Tue, 29 Dec 2020 03:11:14 GMT expires: - '-1' pragma: @@ -2240,12 +2240,180 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/a43fa885-395f-4bee-ad4f-158292a89cc5?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/411bd491-3357-4908-83d8-76d3074a2c69?api-version=2017-12-01 response: body: - string: '{"name":"a43fa885-395f-4bee-ad4f-158292a89cc5","status":"Succeeded","startTime":"2020-11-16T02:03:47.857Z"}' + string: '{"name":"411bd491-3357-4908-83d8-76d3074a2c69","status":"InProgress","startTime":"2020-12-29T03:10:28.937Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 29 Dec 2020 03:11:30 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/411bd491-3357-4908-83d8-76d3074a2c69?api-version=2017-12-01 + response: + body: + string: '{"name":"411bd491-3357-4908-83d8-76d3074a2c69","status":"InProgress","startTime":"2020-12-29T03:10:28.937Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 29 Dec 2020 03:11:45 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/411bd491-3357-4908-83d8-76d3074a2c69?api-version=2017-12-01 + response: + body: + string: '{"name":"411bd491-3357-4908-83d8-76d3074a2c69","status":"InProgress","startTime":"2020-12-29T03:10:28.937Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 29 Dec 2020 03:12:01 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/411bd491-3357-4908-83d8-76d3074a2c69?api-version=2017-12-01 + response: + body: + string: '{"name":"411bd491-3357-4908-83d8-76d3074a2c69","status":"InProgress","startTime":"2020-12-29T03:10:28.937Z"}' + headers: + cache-control: + - no-cache + content-length: + - '108' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 29 Dec 2020 03:12:16 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/411bd491-3357-4908-83d8-76d3074a2c69?api-version=2017-12-01 + response: + body: + string: '{"name":"411bd491-3357-4908-83d8-76d3074a2c69","status":"Succeeded","startTime":"2020-12-29T03:10:28.937Z"}' headers: cache-control: - no-cache @@ -2254,7 +2422,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:04:49 GMT + - Tue, 29 Dec 2020 03:12:31 GMT expires: - '-1' pragma: @@ -2282,9 +2450,9 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/operationResults/a43fa885-395f-4bee-ad4f-158292a89cc5?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/operationResults/411bd491-3357-4908-83d8-76d3074a2c69?api-version=2017-12-01 response: body: string: '' @@ -2294,7 +2462,7 @@ interactions: content-length: - '0' date: - - Mon, 16 Nov 2020 02:04:50 GMT + - Tue, 29 Dec 2020 03:12:32 GMT expires: - '-1' pragma: @@ -2322,15 +2490,15 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBForMySQL/servers/testserver2134?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBForMySQL/servers/testserver21341?api-version=2017-12-01 response: body: - string: '{"operation":"UpsertElasticServer","startTime":"2020-11-16T02:04:50.563Z"}' + string: '{"operation":"UpsertElasticServer","startTime":"2020-12-29T03:12:32.873Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/5a414d62-d6f9-492f-bade-d7a3557baed7?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/3a888c53-61d9-4d64-bae2-82fef7070b75?api-version=2017-12-01 cache-control: - no-cache content-length: @@ -2338,11 +2506,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:04:51 GMT + - Tue, 29 Dec 2020 03:12:33 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/operationResults/5a414d62-d6f9-492f-bade-d7a3557baed7?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/operationResults/3a888c53-61d9-4d64-bae2-82fef7070b75?api-version=2017-12-01 pragma: - no-cache server: @@ -2366,12 +2534,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/5a414d62-d6f9-492f-bade-d7a3557baed7?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/3a888c53-61d9-4d64-bae2-82fef7070b75?api-version=2017-12-01 response: body: - string: '{"name":"5a414d62-d6f9-492f-bade-d7a3557baed7","status":"Succeeded","startTime":"2020-11-16T02:04:50.563Z"}' + string: '{"name":"3a888c53-61d9-4d64-bae2-82fef7070b75","status":"Succeeded","startTime":"2020-12-29T03:12:32.873Z"}' headers: cache-control: - no-cache @@ -2380,7 +2548,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:05:52 GMT + - Tue, 29 Dec 2020 03:13:33 GMT expires: - '-1' pragma: @@ -2408,21 +2576,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBForMySQL/servers/testserver2134?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBForMySQL/servers/testserver21341?api-version=2017-12-01 response: body: - string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":128000,"backupRetentionDays":7,"geoRedundantBackup":"Enabled","storageAutogrow":"Disabled"},"version":"5.7","sslEnforcement":"Enabled","minimalTlsVersion":"TLSEnforcementDisabled","userVisibleState":"Ready","fullyQualifiedDomainName":"testserver2134.mysql.database.azure.com","earliestRestoreDate":"2020-11-16T02:01:10.49+00:00","replicationRole":"Master","masterServerId":"","replicaCapacity":5,"byokEnforcement":"Disabled","privateEndpointConnections":[],"infrastructureEncryption":"Disabled","publicNetworkAccess":"Enabled"},"location":"eastus","tags":{"elastic_server":"1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/testserver2134","name":"testserver2134","type":"Microsoft.DBforMySQL/servers"}' + string: '{"sku":{"name":"GP_Gen5_2","tier":"GeneralPurpose","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":128000,"backupRetentionDays":7,"geoRedundantBackup":"Enabled","storageAutogrow":"Disabled"},"version":"5.7","sslEnforcement":"Enabled","minimalTlsVersion":"TLSEnforcementDisabled","userVisibleState":"Ready","fullyQualifiedDomainName":"testserver21341.mysql.database.azure.com","earliestRestoreDate":"2020-12-29T03:07:24.473+00:00","replicationRole":"Master","masterServerId":"","replicaCapacity":5,"byokEnforcement":"Disabled","privateEndpointConnections":[],"infrastructureEncryption":"Disabled","publicNetworkAccess":"Enabled"},"location":"eastus","tags":{"elastic_server":"1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBforMySQL/servers/testserver21341","name":"testserver21341","type":"Microsoft.DBforMySQL/servers"}' headers: cache-control: - no-cache content-length: - - '963' + - '967' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:05:53 GMT + - Tue, 29 Dec 2020 03:13:33 GMT expires: - '-1' pragma: @@ -2454,7 +2622,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBForMySQL/checkNameAvailability?api-version=2017-12-01 response: @@ -2468,7 +2636,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:06:27 GMT + - Tue, 29 Dec 2020 03:13:35 GMT expires: - '-1' pragma: @@ -2500,27 +2668,27 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBForMySQL/servers/testserver2134/firewallRules/firewallrule?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBForMySQL/servers/testserver21341/firewallRules/firewallrule?api-version=2017-12-01 response: body: - string: '{"operation":"DropElasticServerFirewallRule","startTime":"2020-11-16T02:06:29.087Z"}' + string: '{"operation":"DropElasticServerFirewallRule","startTime":"2020-12-29T03:13:36.89Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/046b7afd-9f20-470d-abdb-deffb4cba3a5?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/2f8024c7-171a-4da4-92f3-cce183edc439?api-version=2017-12-01 cache-control: - no-cache content-length: - - '84' + - '83' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:06:29 GMT + - Tue, 29 Dec 2020 03:13:37 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/operationResults/046b7afd-9f20-470d-abdb-deffb4cba3a5?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/operationResults/2f8024c7-171a-4da4-92f3-cce183edc439?api-version=2017-12-01 pragma: - no-cache server: @@ -2544,21 +2712,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/046b7afd-9f20-470d-abdb-deffb4cba3a5?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/2f8024c7-171a-4da4-92f3-cce183edc439?api-version=2017-12-01 response: body: - string: '{"name":"046b7afd-9f20-470d-abdb-deffb4cba3a5","status":"Succeeded","startTime":"2020-11-16T02:06:29.087Z"}' + string: '{"name":"2f8024c7-171a-4da4-92f3-cce183edc439","status":"Succeeded","startTime":"2020-12-29T03:13:36.89Z"}' headers: cache-control: - no-cache content-length: - - '107' + - '106' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:06:44 GMT + - Tue, 29 Dec 2020 03:13:52 GMT expires: - '-1' pragma: @@ -2588,27 +2756,27 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBForMySQL/servers/testserver2134/databases/testdatabase2134?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBForMySQL/servers/testserver21341/databases/testdatabase21341?api-version=2017-12-01 response: body: - string: '{"operation":"DropElasticServerDatabase","startTime":"2020-11-16T02:06:46.12Z"}' + string: '{"operation":"DropElasticServerDatabase","startTime":"2020-12-29T03:13:53.733Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/2704c7f5-5032-4322-863d-1f26c68e2822?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/293836f3-0e7f-472b-8210-e164fc0f5045?api-version=2017-12-01 cache-control: - no-cache content-length: - - '79' + - '80' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:06:45 GMT + - Tue, 29 Dec 2020 03:13:52 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/operationResults/2704c7f5-5032-4322-863d-1f26c68e2822?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/operationResults/293836f3-0e7f-472b-8210-e164fc0f5045?api-version=2017-12-01 pragma: - no-cache server: @@ -2632,21 +2800,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/2704c7f5-5032-4322-863d-1f26c68e2822?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/293836f3-0e7f-472b-8210-e164fc0f5045?api-version=2017-12-01 response: body: - string: '{"name":"2704c7f5-5032-4322-863d-1f26c68e2822","status":"Succeeded","startTime":"2020-11-16T02:06:46.12Z"}' + string: '{"name":"293836f3-0e7f-472b-8210-e164fc0f5045","status":"Succeeded","startTime":"2020-12-29T03:13:53.733Z"}' headers: cache-control: - no-cache content-length: - - '106' + - '107' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:07:00 GMT + - Tue, 29 Dec 2020 03:14:09 GMT expires: - '-1' pragma: @@ -2676,27 +2844,27 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBForMySQL/servers/testserver2134?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_mysql_test_mysqlc1430c84/providers/Microsoft.DBForMySQL/servers/testserver21341?api-version=2017-12-01 response: body: - string: '{"operation":"DropElasticServer","startTime":"2020-11-16T02:07:02.263Z"}' + string: '{"operation":"DropElasticServer","startTime":"2020-12-29T03:14:10.47Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/002a4980-22ba-46a8-865f-630b41d744cd?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/55ccc733-a4fc-48c3-8716-d83d59e48454?api-version=2017-12-01 cache-control: - no-cache content-length: - - '72' + - '71' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:07:02 GMT + - Tue, 29 Dec 2020 03:14:10 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/operationResults/002a4980-22ba-46a8-865f-630b41d744cd?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/operationResults/55ccc733-a4fc-48c3-8716-d83d59e48454?api-version=2017-12-01 pragma: - no-cache server: @@ -2720,21 +2888,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/002a4980-22ba-46a8-865f-630b41d744cd?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforMySQL/locations/eastus/azureAsyncOperation/55ccc733-a4fc-48c3-8716-d83d59e48454?api-version=2017-12-01 response: body: - string: '{"name":"002a4980-22ba-46a8-865f-630b41d744cd","status":"Succeeded","startTime":"2020-11-16T02:07:02.263Z"}' + string: '{"name":"55ccc733-a4fc-48c3-8716-d83d59e48454","status":"Succeeded","startTime":"2020-12-29T03:14:10.47Z"}' headers: cache-control: - no-cache content-length: - - '107' + - '106' content-type: - application/json; charset=utf-8 date: - - Mon, 16 Nov 2020 02:07:18 GMT + - Tue, 29 Dec 2020 03:14:25 GMT expires: - '-1' pragma: diff --git a/sdk/rdbms/azure-mgmt-rdbms/tests/recordings/test_cli_mgmt_postgresql.test_postgresql.yaml b/sdk/rdbms/azure-mgmt-rdbms/tests/recordings/test_cli_mgmt_postgresql.test_postgresql.yaml index fee306267b6f..3cccb96d5634 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/tests/recordings/test_cli_mgmt_postgresql.test_postgresql.yaml +++ b/sdk/rdbms/azure-mgmt-rdbms/tests/recordings/test_cli_mgmt_postgresql.test_postgresql.yaml @@ -17,15 +17,15 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_postgresql_test_postgresql562b10c0/providers/Microsoft.DBForPostgreSQL/servers/testserver21345?api-version=2017-12-01 response: body: - string: '{"operation":"UpsertElasticServer","startTime":"2020-11-09T03:20:41.61Z"}' + string: '{"operation":"UpsertElasticServer","startTime":"2020-12-29T03:14:53.83Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/55f4f490-a384-4b06-8064-6979729f9039?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/8a7a5ada-3e86-4bae-bcb6-17c64f2a383f?api-version=2017-12-01 cache-control: - no-cache content-length: @@ -33,11 +33,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:20:42 GMT + - Tue, 29 Dec 2020 03:14:54 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/55f4f490-a384-4b06-8064-6979729f9039?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/8a7a5ada-3e86-4bae-bcb6-17c64f2a383f?api-version=2017-12-01 pragma: - no-cache server: @@ -61,12 +61,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/55f4f490-a384-4b06-8064-6979729f9039?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/8a7a5ada-3e86-4bae-bcb6-17c64f2a383f?api-version=2017-12-01 response: body: - string: '{"name":"55f4f490-a384-4b06-8064-6979729f9039","status":"InProgress","startTime":"2020-11-09T03:20:41.61Z"}' + string: '{"name":"8a7a5ada-3e86-4bae-bcb6-17c64f2a383f","status":"InProgress","startTime":"2020-12-29T03:14:53.83Z"}' headers: cache-control: - no-cache @@ -75,7 +75,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:21:42 GMT + - Tue, 29 Dec 2020 03:15:55 GMT expires: - '-1' pragma: @@ -103,12 +103,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/55f4f490-a384-4b06-8064-6979729f9039?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/8a7a5ada-3e86-4bae-bcb6-17c64f2a383f?api-version=2017-12-01 response: body: - string: '{"name":"55f4f490-a384-4b06-8064-6979729f9039","status":"InProgress","startTime":"2020-11-09T03:20:41.61Z"}' + string: '{"name":"8a7a5ada-3e86-4bae-bcb6-17c64f2a383f","status":"InProgress","startTime":"2020-12-29T03:14:53.83Z"}' headers: cache-control: - no-cache @@ -117,7 +117,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:22:43 GMT + - Tue, 29 Dec 2020 03:16:56 GMT expires: - '-1' pragma: @@ -145,12 +145,54 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/55f4f490-a384-4b06-8064-6979729f9039?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/8a7a5ada-3e86-4bae-bcb6-17c64f2a383f?api-version=2017-12-01 response: body: - string: '{"name":"55f4f490-a384-4b06-8064-6979729f9039","status":"Succeeded","startTime":"2020-11-09T03:20:41.61Z"}' + string: '{"name":"8a7a5ada-3e86-4bae-bcb6-17c64f2a383f","status":"InProgress","startTime":"2020-12-29T03:14:53.83Z"}' + headers: + cache-control: + - no-cache + content-length: + - '107' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 29 Dec 2020 03:17:57 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/8a7a5ada-3e86-4bae-bcb6-17c64f2a383f?api-version=2017-12-01 + response: + body: + string: '{"name":"8a7a5ada-3e86-4bae-bcb6-17c64f2a383f","status":"Succeeded","startTime":"2020-12-29T03:14:53.83Z"}' headers: cache-control: - no-cache @@ -159,7 +201,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:23:43 GMT + - Tue, 29 Dec 2020 03:18:57 GMT expires: - '-1' pragma: @@ -187,21 +229,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_postgresql_test_postgresql562b10c0/providers/Microsoft.DBForPostgreSQL/servers/testserver21345?api-version=2017-12-01 response: body: - string: '{"sku":{"name":"B_Gen5_2","tier":"Basic","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":128000,"backupRetentionDays":7,"geoRedundantBackup":"Disabled","storageAutogrow":"Disabled"},"version":"9.6","sslEnforcement":"Enabled","minimalTlsVersion":"TLSEnforcementDisabled","userVisibleState":"Ready","fullyQualifiedDomainName":"testserver21345.postgres.database.azure.com","earliestRestoreDate":"2020-11-09T03:30:41.937+00:00","replicationRole":"None","masterServerId":"","replicaCapacity":5,"byokEnforcement":"Disabled","privateEndpointConnections":[],"infrastructureEncryption":"Disabled","publicNetworkAccess":"Enabled"},"location":"eastus","tags":{"elastic_server":"1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_postgresql_test_postgresql562b10c0/providers/Microsoft.DBforPostgreSQL/servers/testserver21345","name":"testserver21345","type":"Microsoft.DBforPostgreSQL/servers"}' + string: '{"sku":{"name":"B_Gen5_2","tier":"Basic","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":128000,"backupRetentionDays":7,"geoRedundantBackup":"Disabled","storageAutogrow":"Disabled"},"version":"9.6","sslEnforcement":"Enabled","minimalTlsVersion":"TLSEnforcementDisabled","userVisibleState":"Ready","fullyQualifiedDomainName":"testserver21345.postgres.database.azure.com","earliestRestoreDate":"2020-12-29T03:24:54.13+00:00","replicationRole":"None","masterServerId":"","replicaCapacity":5,"byokEnforcement":"Disabled","privateEndpointConnections":[],"infrastructureEncryption":"Disabled","publicNetworkAccess":"Enabled"},"location":"eastus","tags":{"elastic_server":"1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_postgresql_test_postgresql562b10c0/providers/Microsoft.DBforPostgreSQL/servers/testserver21345","name":"testserver21345","type":"Microsoft.DBforPostgreSQL/servers"}' headers: cache-control: - no-cache content-length: - - '979' + - '978' content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:23:44 GMT + - Tue, 29 Dec 2020 03:18:58 GMT expires: - '-1' pragma: @@ -233,15 +275,15 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_postgresql_test_postgresql562b10c0/providers/Microsoft.DBForPostgreSQL/servers/testserver21345/databases/testdatabase21345?api-version=2017-12-01 response: body: - string: '{"operation":"UpsertElasticServerDatabase","startTime":"2020-11-09T03:23:45.553Z"}' + string: '{"operation":"UpsertElasticServerDatabase","startTime":"2020-12-29T03:18:59.293Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/11b27361-0a32-4371-89a9-b475da158b5e?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/6bb957a0-35e9-411d-9f3f-ca727e67ccc8?api-version=2017-12-01 cache-control: - no-cache content-length: @@ -249,11 +291,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:23:44 GMT + - Tue, 29 Dec 2020 03:18:58 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/11b27361-0a32-4371-89a9-b475da158b5e?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/6bb957a0-35e9-411d-9f3f-ca727e67ccc8?api-version=2017-12-01 pragma: - no-cache server: @@ -277,12 +319,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/11b27361-0a32-4371-89a9-b475da158b5e?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/6bb957a0-35e9-411d-9f3f-ca727e67ccc8?api-version=2017-12-01 response: body: - string: '{"name":"11b27361-0a32-4371-89a9-b475da158b5e","status":"InProgress","startTime":"2020-11-09T03:23:45.553Z"}' + string: '{"name":"6bb957a0-35e9-411d-9f3f-ca727e67ccc8","status":"InProgress","startTime":"2020-12-29T03:18:59.293Z"}' headers: cache-control: - no-cache @@ -291,7 +333,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:24:00 GMT + - Tue, 29 Dec 2020 03:19:14 GMT expires: - '-1' pragma: @@ -319,12 +361,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/11b27361-0a32-4371-89a9-b475da158b5e?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/6bb957a0-35e9-411d-9f3f-ca727e67ccc8?api-version=2017-12-01 response: body: - string: '{"name":"11b27361-0a32-4371-89a9-b475da158b5e","status":"InProgress","startTime":"2020-11-09T03:23:45.553Z"}' + string: '{"name":"6bb957a0-35e9-411d-9f3f-ca727e67ccc8","status":"InProgress","startTime":"2020-12-29T03:18:59.293Z"}' headers: cache-control: - no-cache @@ -333,7 +375,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:24:16 GMT + - Tue, 29 Dec 2020 03:19:29 GMT expires: - '-1' pragma: @@ -361,12 +403,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/11b27361-0a32-4371-89a9-b475da158b5e?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/6bb957a0-35e9-411d-9f3f-ca727e67ccc8?api-version=2017-12-01 response: body: - string: '{"name":"11b27361-0a32-4371-89a9-b475da158b5e","status":"Succeeded","startTime":"2020-11-09T03:23:45.553Z"}' + string: '{"name":"6bb957a0-35e9-411d-9f3f-ca727e67ccc8","status":"Succeeded","startTime":"2020-12-29T03:18:59.293Z"}' headers: cache-control: - no-cache @@ -375,7 +417,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:24:32 GMT + - Tue, 29 Dec 2020 03:19:45 GMT expires: - '-1' pragma: @@ -403,7 +445,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_postgresql_test_postgresql562b10c0/providers/Microsoft.DBForPostgreSQL/servers/testserver21345/databases/testdatabase21345?api-version=2017-12-01 response: @@ -417,7 +459,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:24:34 GMT + - Tue, 29 Dec 2020 03:19:46 GMT expires: - '-1' pragma: @@ -449,15 +491,15 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_postgresql_test_postgresql562b10c0/providers/Microsoft.DBForPostgreSQL/servers/testserver21345/firewallRules/firewallrule?api-version=2017-12-01 response: body: - string: '{"operation":"UpsertElasticServerFirewallRules","startTime":"2020-11-09T03:24:34.583Z"}' + string: '{"operation":"UpsertElasticServerFirewallRules","startTime":"2020-12-29T03:19:46.747Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/1338f2fe-261d-4466-9b0e-224b0796b71e?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/5b624a74-6e47-42fe-87c5-f85a221cc01d?api-version=2017-12-01 cache-control: - no-cache content-length: @@ -465,11 +507,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:24:35 GMT + - Tue, 29 Dec 2020 03:19:46 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/1338f2fe-261d-4466-9b0e-224b0796b71e?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/5b624a74-6e47-42fe-87c5-f85a221cc01d?api-version=2017-12-01 pragma: - no-cache server: @@ -493,12 +535,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/1338f2fe-261d-4466-9b0e-224b0796b71e?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/5b624a74-6e47-42fe-87c5-f85a221cc01d?api-version=2017-12-01 response: body: - string: '{"name":"1338f2fe-261d-4466-9b0e-224b0796b71e","status":"Succeeded","startTime":"2020-11-09T03:24:34.583Z"}' + string: '{"name":"5b624a74-6e47-42fe-87c5-f85a221cc01d","status":"Succeeded","startTime":"2020-12-29T03:19:46.747Z"}' headers: cache-control: - no-cache @@ -507,7 +549,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:24:51 GMT + - Tue, 29 Dec 2020 03:20:02 GMT expires: - '-1' pragma: @@ -535,7 +577,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_postgresql_test_postgresql562b10c0/providers/Microsoft.DBForPostgreSQL/servers/testserver21345/firewallRules/firewallrule?api-version=2017-12-01 response: @@ -549,7 +591,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:24:52 GMT + - Tue, 29 Dec 2020 03:20:02 GMT expires: - '-1' pragma: @@ -577,7 +619,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_postgresql_test_postgresql562b10c0/providers/Microsoft.DBForPostgreSQL/servers/testserver21345/firewallRules/firewallrule?api-version=2017-12-01 response: @@ -591,7 +633,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:24:53 GMT + - Tue, 29 Dec 2020 03:20:03 GMT expires: - '-1' pragma: @@ -619,7 +661,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_postgresql_test_postgresql562b10c0/providers/Microsoft.DBForPostgreSQL/servers/testserver21345/databases/testdatabase21345?api-version=2017-12-01 response: @@ -633,7 +675,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:24:53 GMT + - Tue, 29 Dec 2020 03:20:03 GMT expires: - '-1' pragma: @@ -661,21 +703,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_postgresql_test_postgresql562b10c0/providers/Microsoft.DBForPostgreSQL/servers/testserver21345?api-version=2017-12-01 response: body: - string: '{"sku":{"name":"B_Gen5_2","tier":"Basic","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":128000,"backupRetentionDays":7,"geoRedundantBackup":"Disabled","storageAutogrow":"Disabled"},"version":"9.6","sslEnforcement":"Enabled","minimalTlsVersion":"TLSEnforcementDisabled","userVisibleState":"Ready","fullyQualifiedDomainName":"testserver21345.postgres.database.azure.com","earliestRestoreDate":"2020-11-09T03:30:41.937+00:00","replicationRole":"None","masterServerId":"","replicaCapacity":5,"byokEnforcement":"Disabled","privateEndpointConnections":[],"infrastructureEncryption":"Disabled","publicNetworkAccess":"Enabled"},"location":"eastus","tags":{"elastic_server":"1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_postgresql_test_postgresql562b10c0/providers/Microsoft.DBforPostgreSQL/servers/testserver21345","name":"testserver21345","type":"Microsoft.DBforPostgreSQL/servers"}' + string: '{"sku":{"name":"B_Gen5_2","tier":"Basic","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":128000,"backupRetentionDays":7,"geoRedundantBackup":"Disabled","storageAutogrow":"Disabled"},"version":"9.6","sslEnforcement":"Enabled","minimalTlsVersion":"TLSEnforcementDisabled","userVisibleState":"Ready","fullyQualifiedDomainName":"testserver21345.postgres.database.azure.com","earliestRestoreDate":"2020-12-29T03:24:54.13+00:00","replicationRole":"None","masterServerId":"","replicaCapacity":5,"byokEnforcement":"Disabled","privateEndpointConnections":[],"infrastructureEncryption":"Disabled","publicNetworkAccess":"Enabled"},"location":"eastus","tags":{"elastic_server":"1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_postgresql_test_postgresql562b10c0/providers/Microsoft.DBforPostgreSQL/servers/testserver21345","name":"testserver21345","type":"Microsoft.DBforPostgreSQL/servers"}' headers: cache-control: - no-cache content-length: - - '979' + - '978' content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:24:54 GMT + - Tue, 29 Dec 2020 03:20:03 GMT expires: - '-1' pragma: @@ -703,7 +745,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/providers/Microsoft.DBForPostgreSQL/operations?api-version=2017-12-01 response: @@ -899,23 +941,23 @@ interactions: DB for PostgreSQL","resource":"Database Metric Definition","operation":"Get database metric definitions","description":"Return types of metrics that are available for databases"},"properties":{"serviceSpecification":{"metricSpecifications":[{"name":"cpu_percent","displayName":"CPU - percent","displayDescription":"CPU percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"memory_percent","displayName":"Memory - percent","displayDescription":"Memory percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"io_consumption_percent","displayName":"IO - percent","displayDescription":"IO percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"storage_percent","displayName":"Storage - percent","displayDescription":"Storage percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"storage_used","displayName":"Storage - used","displayDescription":"Storage used","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"storage_limit","displayName":"Storage - limit","displayDescription":"Storage limit","unit":"Bytes","aggregationType":"Maximum","supportedAggregationTypes":["Maximum"]},{"name":"serverlog_storage_percent","displayName":"Server - Log storage percent","displayDescription":"Server Log storage percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"serverlog_storage_usage","displayName":"Server - Log storage used","displayDescription":"Server Log storage used","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"serverlog_storage_limit","displayName":"Server - Log storage limit","displayDescription":"Server Log storage limit","unit":"Bytes","aggregationType":"Maximum","supportedAggregationTypes":["Maximum"]},{"name":"active_connections","displayName":"Active - Connections","displayDescription":"Active Connections","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"connections_failed","displayName":"Failed - Connections","displayDescription":"Failed Connections","unit":"Count","aggregationType":"Total","supportedAggregationTypes":["Total"]},{"name":"backup_storage_used","displayName":"Backup - Storage Used","displayDescription":"Backup Storage Used","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"supportedTimeGrainTypes":["PT15M","PT30M","PT1H","PT6H","PT12H","P1D"]},{"name":"network_bytes_egress","displayName":"Network - Out","displayDescription":"Network Out across active connections","unit":"Bytes","aggregationType":"Total","supportedAggregationTypes":["Total"]},{"name":"network_bytes_ingress","displayName":"Network - In","displayDescription":"Network In across active connections","unit":"Bytes","aggregationType":"Total","supportedAggregationTypes":["Total"]},{"name":"pg_replica_log_delay_in_seconds","displayName":"Replica - Lag","displayDescription":"Replica lag in seconds","unit":"Seconds","aggregationType":"Maximum","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"pg_replica_log_delay_in_bytes","displayName":"Max + percent","displayDescription":"CPU percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"memory_percent","displayName":"Memory + percent","displayDescription":"Memory percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"io_consumption_percent","displayName":"IO + percent","displayDescription":"IO percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"storage_percent","displayName":"Storage + percent","displayDescription":"Storage percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"storage_used","displayName":"Storage + used","displayDescription":"Storage used","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"storage_limit","displayName":"Storage + limit","displayDescription":"Storage limit","unit":"Bytes","aggregationType":"Maximum","supportedAggregationTypes":["Maximum"],"category":"Saturation"},{"name":"serverlog_storage_percent","displayName":"Server + Log storage percent","displayDescription":"Server Log storage percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"serverlog_storage_usage","displayName":"Server + Log storage used","displayDescription":"Server Log storage used","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"serverlog_storage_limit","displayName":"Server + Log storage limit","displayDescription":"Server Log storage limit","unit":"Bytes","aggregationType":"Maximum","supportedAggregationTypes":["Maximum"],"category":"Saturation"},{"name":"active_connections","displayName":"Active + Connections","displayDescription":"Active Connections","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Traffic"},{"name":"connections_failed","displayName":"Failed + Connections","displayDescription":"Failed Connections","unit":"Count","aggregationType":"Total","supportedAggregationTypes":["Total"],"category":"Errors"},{"name":"backup_storage_used","displayName":"Backup + Storage Used","displayDescription":"Backup Storage Used","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"supportedTimeGrainTypes":["PT15M","PT30M","PT1H","PT6H","PT12H","P1D"],"category":"Saturation"},{"name":"network_bytes_egress","displayName":"Network + Out","displayDescription":"Network Out across active connections","unit":"Bytes","aggregationType":"Total","supportedAggregationTypes":["Total"],"category":"Traffic"},{"name":"network_bytes_ingress","displayName":"Network + In","displayDescription":"Network In across active connections","unit":"Bytes","aggregationType":"Total","supportedAggregationTypes":["Total"],"category":"Traffic"},{"name":"pg_replica_log_delay_in_seconds","displayName":"Replica + Lag","displayDescription":"Replica lag in seconds","unit":"Seconds","aggregationType":"Maximum","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Latency"},{"name":"pg_replica_log_delay_in_bytes","displayName":"Max Lag Across Replicas","displayDescription":"Lag in bytes of the most lagging - replica","unit":"Bytes","aggregationType":"Maximum","supportedAggregationTypes":["Average","Maximum","Minimum"]}]}}},{"name":"Microsoft.DBforPostgreSQL/servers/providers/Microsoft.Insights/logDefinitions/read","display":{"provider":"Microsoft + replica","unit":"Bytes","aggregationType":"Maximum","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Latency"}]}}},{"name":"Microsoft.DBforPostgreSQL/servers/providers/Microsoft.Insights/logDefinitions/read","display":{"provider":"Microsoft DB for PostgreSQL","resource":"The log definition of servers","operation":"Read server log definitions","description":"Gets the available logs for PostgreSQL servers"},"properties":{"serviceSpecification":{"logSpecifications":[{"name":"PostgreSQLLogs","displayName":"PostgreSQL @@ -930,14 +972,14 @@ interactions: DB for PostgreSQL","resource":"Database Metric Definition","operation":"Get database metric definitions","description":"Return types of metrics that are available for databases"},"properties":{"serviceSpecification":{"metricSpecifications":[{"name":"cpu_percent","displayName":"CPU - percent","displayDescription":"CPU percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"memory_percent","displayName":"Memory - percent","displayDescription":"Memory percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"iops","displayName":"IOPS","displayDescription":"IO - Operations per second","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"storage_percent","displayName":"Storage - percent","displayDescription":"Storage percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"storage_used","displayName":"Storage - used","displayDescription":"Storage used","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"active_connections","displayName":"Active - Connections","displayDescription":"Active Connections","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"network_bytes_egress","displayName":"Network - Out","displayDescription":"Network Out across active connections","unit":"Bytes","aggregationType":"Total","supportedAggregationTypes":["Total"]},{"name":"network_bytes_ingress","displayName":"Network - In","displayDescription":"Network In across active connections","unit":"Bytes","aggregationType":"Total","supportedAggregationTypes":["Total"]}]}}},{"name":"Microsoft.DBforPostgreSQL/serversv2/providers/Microsoft.Insights/logDefinitions/read","display":{"provider":"Microsoft + percent","displayDescription":"CPU percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"memory_percent","displayName":"Memory + percent","displayDescription":"Memory percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"iops","displayName":"IOPS","displayDescription":"IO + Operations per second","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"storage_percent","displayName":"Storage + percent","displayDescription":"Storage percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"storage_used","displayName":"Storage + used","displayDescription":"Storage used","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"active_connections","displayName":"Active + Connections","displayDescription":"Active Connections","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Traffic"},{"name":"network_bytes_egress","displayName":"Network + Out","displayDescription":"Network Out across active connections","unit":"Bytes","aggregationType":"Total","supportedAggregationTypes":["Total"],"category":"Traffic"},{"name":"network_bytes_ingress","displayName":"Network + In","displayDescription":"Network In across active connections","unit":"Bytes","aggregationType":"Total","supportedAggregationTypes":["Total"],"category":"Traffic"}]}}},{"name":"Microsoft.DBforPostgreSQL/serversv2/providers/Microsoft.Insights/logDefinitions/read","display":{"provider":"Microsoft DB for PostgreSQL","resource":"The log definition of servers","operation":"Read server log definitions","description":"Gets the available logs for PostgreSQL servers"},"properties":{"serviceSpecification":{"logSpecifications":[{"name":"PostgreSQLLogs","displayName":"PostgreSQL @@ -974,32 +1016,32 @@ interactions: DB for PostgreSQL","resource":"Database Metric Definition","operation":"Get database metric definitions","description":"Return types of metrics that are available for databases"},"properties":{"serviceSpecification":{"metricSpecifications":[{"name":"backup_storage_used","displayName":"Backup - Storage Used","displayDescription":"Backup Storage Used","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"cpu_credits_consumed","displayName":"CPU + Storage Used","displayDescription":"Backup Storage Used","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"cpu_credits_consumed","displayName":"CPU Credits Consumed","displayDescription":"Total number of credits consumed by - the database server","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"cpu_credits_remaining","displayName":"CPU + the database server","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"cpu_credits_remaining","displayName":"CPU Credits Remaining","displayDescription":"Total number of credits available - to burst","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"cpu_percent","displayName":"CPU - percent","displayDescription":"CPU percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"memory_percent","displayName":"Memory - percent","displayDescription":"Memory percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"iops","displayName":"IOPS","displayDescription":"IO - Operations per second","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"disk_queue_depth","displayName":"Disk + to burst","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"cpu_percent","displayName":"CPU + percent","displayDescription":"CPU percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"memory_percent","displayName":"Memory + percent","displayDescription":"Memory percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"iops","displayName":"IOPS","displayDescription":"IO + Operations per second","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"disk_queue_depth","displayName":"Disk Queue Depth","displayDescription":"Number of outstanding I/O operations to - the data disk","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"read_throughput","displayName":"Read + the data disk","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"read_throughput","displayName":"Read Throughput Bytes/Sec","displayDescription":"Bytes read per second from the - data disk during monitoring period","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"write_throughput","displayName":"Write + data disk during monitoring period","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"write_throughput","displayName":"Write Throughput Bytes/Sec","displayDescription":"Bytes written per second to the - data disk during monitoring period","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"read_iops","displayName":"Read - IOPS","displayDescription":"Number of data disk I/O read operations per second","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"write_iops","displayName":"Write - IOPS","displayDescription":"Number of data disk I/O write operations per second","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"storage_percent","displayName":"Storage - percent","displayDescription":"Storage percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"storage_used","displayName":"Storage - used","displayDescription":"Storage used","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"storage_free","displayName":"Storage - Free","displayDescription":"Storage Free","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"txlogs_storage_used","displayName":"Transaction - Log Storage Used","displayDescription":"Transaction Log Storage Used","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"active_connections","displayName":"Active - Connections","displayDescription":"Active Connections","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"network_bytes_egress","displayName":"Network - Out","displayDescription":"Network Out across active connections","unit":"Bytes","aggregationType":"Total","supportedAggregationTypes":["Total"]},{"name":"network_bytes_ingress","displayName":"Network - In","displayDescription":"Network In across active connections","unit":"Bytes","aggregationType":"Total","supportedAggregationTypes":["Total"]},{"name":"connections_failed","displayName":"Failed - Connections","displayDescription":"Failed Connections","unit":"Count","aggregationType":"Total","supportedAggregationTypes":["Total"]},{"name":"connections_succeeded","displayName":"Succeeded - Connections","displayDescription":"Succeeded Connections","unit":"Count","aggregationType":"Total","supportedAggregationTypes":["Total"]},{"name":"maximum_used_transactionIDs","displayName":"Maximum - Used Transaction IDs","displayDescription":"Maximum Used Transaction IDs","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]}]}}},{"name":"Microsoft.DBforPostgreSQL/singleservers/providers/Microsoft.Insights/logDefinitions/read","display":{"provider":"Microsoft + data disk during monitoring period","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"read_iops","displayName":"Read + IOPS","displayDescription":"Number of data disk I/O read operations per second","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"write_iops","displayName":"Write + IOPS","displayDescription":"Number of data disk I/O write operations per second","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"storage_percent","displayName":"Storage + percent","displayDescription":"Storage percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"storage_used","displayName":"Storage + used","displayDescription":"Storage used","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"storage_free","displayName":"Storage + Free","displayDescription":"Storage Free","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"txlogs_storage_used","displayName":"Transaction + Log Storage Used","displayDescription":"Transaction Log Storage Used","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"active_connections","displayName":"Active + Connections","displayDescription":"Active Connections","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Traffic"},{"name":"network_bytes_egress","displayName":"Network + Out","displayDescription":"Network Out across active connections","unit":"Bytes","aggregationType":"Total","supportedAggregationTypes":["Total"],"category":"Traffic"},{"name":"network_bytes_ingress","displayName":"Network + In","displayDescription":"Network In across active connections","unit":"Bytes","aggregationType":"Total","supportedAggregationTypes":["Total"],"category":"Traffic"},{"name":"connections_failed","displayName":"Failed + Connections","displayDescription":"Failed Connections","unit":"Count","aggregationType":"Total","supportedAggregationTypes":["Total"],"category":"Errors"},{"name":"connections_succeeded","displayName":"Succeeded + Connections","displayDescription":"Succeeded Connections","unit":"Count","aggregationType":"Total","supportedAggregationTypes":["Total"],"category":"Traffic"},{"name":"maximum_used_transactionIDs","displayName":"Maximum + Used Transaction IDs","displayDescription":"Maximum Used Transaction IDs","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Traffic"}]}}},{"name":"Microsoft.DBforPostgreSQL/singleservers/providers/Microsoft.Insights/logDefinitions/read","display":{"provider":"Microsoft DB for PostgreSQL","resource":"The log definition of servers","operation":"Read server log definitions","description":"Gets the available logs for PostgreSQL servers"},"properties":{"serviceSpecification":{"logSpecifications":[{"name":"PostgreSQLLogs","displayName":"PostgreSQL @@ -1020,32 +1062,32 @@ interactions: DB for PostgreSQL","resource":"Database Metric Definition","operation":"Get database metric definitions","description":"Return types of metrics that are available for databases"},"properties":{"serviceSpecification":{"metricSpecifications":[{"name":"backup_storage_used","displayName":"Backup - Storage Used","displayDescription":"Backup Storage Used","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"cpu_credits_consumed","displayName":"CPU + Storage Used","displayDescription":"Backup Storage Used","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"cpu_credits_consumed","displayName":"CPU Credits Consumed","displayDescription":"Total number of credits consumed by - the database server","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"cpu_credits_remaining","displayName":"CPU + the database server","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"cpu_credits_remaining","displayName":"CPU Credits Remaining","displayDescription":"Total number of credits available - to burst","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"cpu_percent","displayName":"CPU - percent","displayDescription":"CPU percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"memory_percent","displayName":"Memory - percent","displayDescription":"Memory percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"iops","displayName":"IOPS","displayDescription":"IO - Operations per second","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"disk_queue_depth","displayName":"Disk + to burst","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"cpu_percent","displayName":"CPU + percent","displayDescription":"CPU percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"memory_percent","displayName":"Memory + percent","displayDescription":"Memory percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"iops","displayName":"IOPS","displayDescription":"IO + Operations per second","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"disk_queue_depth","displayName":"Disk Queue Depth","displayDescription":"Number of outstanding I/O operations to - the data disk","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"read_throughput","displayName":"Read + the data disk","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"read_throughput","displayName":"Read Throughput Bytes/Sec","displayDescription":"Bytes read per second from the - data disk during monitoring period","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"write_throughput","displayName":"Write + data disk during monitoring period","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"write_throughput","displayName":"Write Throughput Bytes/Sec","displayDescription":"Bytes written per second to the - data disk during monitoring period","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"read_iops","displayName":"Read - IOPS","displayDescription":"Number of data disk I/O read operations per second","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"write_iops","displayName":"Write - IOPS","displayDescription":"Number of data disk I/O write operations per second","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"storage_percent","displayName":"Storage - percent","displayDescription":"Storage percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"storage_used","displayName":"Storage - used","displayDescription":"Storage used","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"storage_free","displayName":"Storage - Free","displayDescription":"Storage Free","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"txlogs_storage_used","displayName":"Transaction - Log Storage Used","displayDescription":"Transaction Log Storage Used","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"active_connections","displayName":"Active - Connections","displayDescription":"Active Connections","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]},{"name":"network_bytes_egress","displayName":"Network - Out","displayDescription":"Network Out across active connections","unit":"Bytes","aggregationType":"Total","supportedAggregationTypes":["Total"]},{"name":"network_bytes_ingress","displayName":"Network - In","displayDescription":"Network In across active connections","unit":"Bytes","aggregationType":"Total","supportedAggregationTypes":["Total"]},{"name":"connections_failed","displayName":"Failed - Connections","displayDescription":"Failed Connections","unit":"Count","aggregationType":"Total","supportedAggregationTypes":["Total"]},{"name":"connections_succeeded","displayName":"Succeeded - Connections","displayDescription":"Succeeded Connections","unit":"Count","aggregationType":"Total","supportedAggregationTypes":["Total"]},{"name":"maximum_used_transactionIDs","displayName":"Maximum - Used Transaction IDs","displayDescription":"Maximum Used Transaction IDs","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"]}]}}},{"name":"Microsoft.DBforPostgreSQL/flexibleServers/providers/Microsoft.Insights/logDefinitions/read","display":{"provider":"Microsoft + data disk during monitoring period","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"read_iops","displayName":"Read + IOPS","displayDescription":"Number of data disk I/O read operations per second","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"write_iops","displayName":"Write + IOPS","displayDescription":"Number of data disk I/O write operations per second","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"storage_percent","displayName":"Storage + percent","displayDescription":"Storage percent","unit":"Percent","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"storage_used","displayName":"Storage + used","displayDescription":"Storage used","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"storage_free","displayName":"Storage + Free","displayDescription":"Storage Free","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"txlogs_storage_used","displayName":"Transaction + Log Storage Used","displayDescription":"Transaction Log Storage Used","unit":"Bytes","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Saturation"},{"name":"active_connections","displayName":"Active + Connections","displayDescription":"Active Connections","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Traffic"},{"name":"network_bytes_egress","displayName":"Network + Out","displayDescription":"Network Out across active connections","unit":"Bytes","aggregationType":"Total","supportedAggregationTypes":["Total"],"category":"Traffic"},{"name":"network_bytes_ingress","displayName":"Network + In","displayDescription":"Network In across active connections","unit":"Bytes","aggregationType":"Total","supportedAggregationTypes":["Total"],"category":"Traffic"},{"name":"connections_failed","displayName":"Failed + Connections","displayDescription":"Failed Connections","unit":"Count","aggregationType":"Total","supportedAggregationTypes":["Total"],"category":"Errors"},{"name":"connections_succeeded","displayName":"Succeeded + Connections","displayDescription":"Succeeded Connections","unit":"Count","aggregationType":"Total","supportedAggregationTypes":["Total"],"category":"Traffic"},{"name":"maximum_used_transactionIDs","displayName":"Maximum + Used Transaction IDs","displayDescription":"Maximum Used Transaction IDs","unit":"Count","aggregationType":"Average","supportedAggregationTypes":["Average","Maximum","Minimum"],"category":"Traffic"}]}}},{"name":"Microsoft.DBforPostgreSQL/flexibleServers/providers/Microsoft.Insights/logDefinitions/read","display":{"provider":"Microsoft DB for PostgreSQL","resource":"The log definition of servers","operation":"Read server log definitions","description":"Gets the available logs for PostgreSQL servers"},"properties":{"serviceSpecification":{"logSpecifications":[{"name":"PostgreSQLLogs","displayName":"PostgreSQL @@ -1067,11 +1109,11 @@ interactions: cache-control: - no-cache content-length: - - '43382' + - '44900' content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:24:55 GMT + - Tue, 29 Dec 2020 03:20:04 GMT expires: - '-1' pragma: @@ -1101,15 +1143,15 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_postgresql_test_postgresql562b10c0/providers/Microsoft.DBForPostgreSQL/servers/testserver21345/restart?api-version=2017-12-01 response: body: - string: '{"operation":"RestartElasticServer","startTime":"2020-11-09T03:24:56.147Z"}' + string: '{"operation":"RestartElasticServer","startTime":"2020-12-29T03:20:05.433Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/38ebcd30-16d2-4ac8-a797-b48ed3ec27b3?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/d37ed45c-0287-4650-8727-8d2e1ebd30c5?api-version=2017-12-01 cache-control: - no-cache content-length: @@ -1117,11 +1159,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:24:56 GMT + - Tue, 29 Dec 2020 03:20:05 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/38ebcd30-16d2-4ac8-a797-b48ed3ec27b3?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/d37ed45c-0287-4650-8727-8d2e1ebd30c5?api-version=2017-12-01 pragma: - no-cache server: @@ -1145,12 +1187,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/38ebcd30-16d2-4ac8-a797-b48ed3ec27b3?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/d37ed45c-0287-4650-8727-8d2e1ebd30c5?api-version=2017-12-01 response: body: - string: '{"name":"38ebcd30-16d2-4ac8-a797-b48ed3ec27b3","status":"InProgress","startTime":"2020-11-09T03:24:56.147Z"}' + string: '{"name":"d37ed45c-0287-4650-8727-8d2e1ebd30c5","status":"InProgress","startTime":"2020-12-29T03:20:05.433Z"}' headers: cache-control: - no-cache @@ -1159,7 +1201,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:25:11 GMT + - Tue, 29 Dec 2020 03:20:20 GMT expires: - '-1' pragma: @@ -1187,12 +1229,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/38ebcd30-16d2-4ac8-a797-b48ed3ec27b3?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/d37ed45c-0287-4650-8727-8d2e1ebd30c5?api-version=2017-12-01 response: body: - string: '{"name":"38ebcd30-16d2-4ac8-a797-b48ed3ec27b3","status":"InProgress","startTime":"2020-11-09T03:24:56.147Z"}' + string: '{"name":"d37ed45c-0287-4650-8727-8d2e1ebd30c5","status":"InProgress","startTime":"2020-12-29T03:20:05.433Z"}' headers: cache-control: - no-cache @@ -1201,7 +1243,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:25:26 GMT + - Tue, 29 Dec 2020 03:20:35 GMT expires: - '-1' pragma: @@ -1229,12 +1271,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/38ebcd30-16d2-4ac8-a797-b48ed3ec27b3?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/d37ed45c-0287-4650-8727-8d2e1ebd30c5?api-version=2017-12-01 response: body: - string: '{"name":"38ebcd30-16d2-4ac8-a797-b48ed3ec27b3","status":"InProgress","startTime":"2020-11-09T03:24:56.147Z"}' + string: '{"name":"d37ed45c-0287-4650-8727-8d2e1ebd30c5","status":"InProgress","startTime":"2020-12-29T03:20:05.433Z"}' headers: cache-control: - no-cache @@ -1243,7 +1285,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:25:42 GMT + - Tue, 29 Dec 2020 03:20:51 GMT expires: - '-1' pragma: @@ -1271,12 +1313,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/38ebcd30-16d2-4ac8-a797-b48ed3ec27b3?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/d37ed45c-0287-4650-8727-8d2e1ebd30c5?api-version=2017-12-01 response: body: - string: '{"name":"38ebcd30-16d2-4ac8-a797-b48ed3ec27b3","status":"InProgress","startTime":"2020-11-09T03:24:56.147Z"}' + string: '{"name":"d37ed45c-0287-4650-8727-8d2e1ebd30c5","status":"InProgress","startTime":"2020-12-29T03:20:05.433Z"}' headers: cache-control: - no-cache @@ -1285,7 +1327,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:25:57 GMT + - Tue, 29 Dec 2020 03:21:06 GMT expires: - '-1' pragma: @@ -1313,12 +1355,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/38ebcd30-16d2-4ac8-a797-b48ed3ec27b3?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/d37ed45c-0287-4650-8727-8d2e1ebd30c5?api-version=2017-12-01 response: body: - string: '{"name":"38ebcd30-16d2-4ac8-a797-b48ed3ec27b3","status":"InProgress","startTime":"2020-11-09T03:24:56.147Z"}' + string: '{"name":"d37ed45c-0287-4650-8727-8d2e1ebd30c5","status":"InProgress","startTime":"2020-12-29T03:20:05.433Z"}' headers: cache-control: - no-cache @@ -1327,7 +1369,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:26:13 GMT + - Tue, 29 Dec 2020 03:21:21 GMT expires: - '-1' pragma: @@ -1355,12 +1397,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/38ebcd30-16d2-4ac8-a797-b48ed3ec27b3?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/d37ed45c-0287-4650-8727-8d2e1ebd30c5?api-version=2017-12-01 response: body: - string: '{"name":"38ebcd30-16d2-4ac8-a797-b48ed3ec27b3","status":"InProgress","startTime":"2020-11-09T03:24:56.147Z"}' + string: '{"name":"d37ed45c-0287-4650-8727-8d2e1ebd30c5","status":"InProgress","startTime":"2020-12-29T03:20:05.433Z"}' headers: cache-control: - no-cache @@ -1369,7 +1411,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:26:29 GMT + - Tue, 29 Dec 2020 03:21:36 GMT expires: - '-1' pragma: @@ -1397,12 +1439,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/38ebcd30-16d2-4ac8-a797-b48ed3ec27b3?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/d37ed45c-0287-4650-8727-8d2e1ebd30c5?api-version=2017-12-01 response: body: - string: '{"name":"38ebcd30-16d2-4ac8-a797-b48ed3ec27b3","status":"InProgress","startTime":"2020-11-09T03:24:56.147Z"}' + string: '{"name":"d37ed45c-0287-4650-8727-8d2e1ebd30c5","status":"InProgress","startTime":"2020-12-29T03:20:05.433Z"}' headers: cache-control: - no-cache @@ -1411,7 +1453,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:26:45 GMT + - Tue, 29 Dec 2020 03:21:52 GMT expires: - '-1' pragma: @@ -1439,12 +1481,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/38ebcd30-16d2-4ac8-a797-b48ed3ec27b3?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/d37ed45c-0287-4650-8727-8d2e1ebd30c5?api-version=2017-12-01 response: body: - string: '{"name":"38ebcd30-16d2-4ac8-a797-b48ed3ec27b3","status":"InProgress","startTime":"2020-11-09T03:24:56.147Z"}' + string: '{"name":"d37ed45c-0287-4650-8727-8d2e1ebd30c5","status":"InProgress","startTime":"2020-12-29T03:20:05.433Z"}' headers: cache-control: - no-cache @@ -1453,7 +1495,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:27:01 GMT + - Tue, 29 Dec 2020 03:22:08 GMT expires: - '-1' pragma: @@ -1481,12 +1523,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/38ebcd30-16d2-4ac8-a797-b48ed3ec27b3?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/d37ed45c-0287-4650-8727-8d2e1ebd30c5?api-version=2017-12-01 response: body: - string: '{"name":"38ebcd30-16d2-4ac8-a797-b48ed3ec27b3","status":"InProgress","startTime":"2020-11-09T03:24:56.147Z"}' + string: '{"name":"d37ed45c-0287-4650-8727-8d2e1ebd30c5","status":"InProgress","startTime":"2020-12-29T03:20:05.433Z"}' headers: cache-control: - no-cache @@ -1495,7 +1537,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:27:16 GMT + - Tue, 29 Dec 2020 03:22:23 GMT expires: - '-1' pragma: @@ -1523,12 +1565,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/38ebcd30-16d2-4ac8-a797-b48ed3ec27b3?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/d37ed45c-0287-4650-8727-8d2e1ebd30c5?api-version=2017-12-01 response: body: - string: '{"name":"38ebcd30-16d2-4ac8-a797-b48ed3ec27b3","status":"InProgress","startTime":"2020-11-09T03:24:56.147Z"}' + string: '{"name":"d37ed45c-0287-4650-8727-8d2e1ebd30c5","status":"InProgress","startTime":"2020-12-29T03:20:05.433Z"}' headers: cache-control: - no-cache @@ -1537,7 +1579,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:27:31 GMT + - Tue, 29 Dec 2020 03:22:39 GMT expires: - '-1' pragma: @@ -1565,12 +1607,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/38ebcd30-16d2-4ac8-a797-b48ed3ec27b3?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/d37ed45c-0287-4650-8727-8d2e1ebd30c5?api-version=2017-12-01 response: body: - string: '{"name":"38ebcd30-16d2-4ac8-a797-b48ed3ec27b3","status":"InProgress","startTime":"2020-11-09T03:24:56.147Z"}' + string: '{"name":"d37ed45c-0287-4650-8727-8d2e1ebd30c5","status":"InProgress","startTime":"2020-12-29T03:20:05.433Z"}' headers: cache-control: - no-cache @@ -1579,7 +1621,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:27:47 GMT + - Tue, 29 Dec 2020 03:22:54 GMT expires: - '-1' pragma: @@ -1607,12 +1649,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/38ebcd30-16d2-4ac8-a797-b48ed3ec27b3?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/d37ed45c-0287-4650-8727-8d2e1ebd30c5?api-version=2017-12-01 response: body: - string: '{"name":"38ebcd30-16d2-4ac8-a797-b48ed3ec27b3","status":"InProgress","startTime":"2020-11-09T03:24:56.147Z"}' + string: '{"name":"d37ed45c-0287-4650-8727-8d2e1ebd30c5","status":"InProgress","startTime":"2020-12-29T03:20:05.433Z"}' headers: cache-control: - no-cache @@ -1621,7 +1663,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:28:02 GMT + - Tue, 29 Dec 2020 03:23:09 GMT expires: - '-1' pragma: @@ -1649,12 +1691,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/38ebcd30-16d2-4ac8-a797-b48ed3ec27b3?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/d37ed45c-0287-4650-8727-8d2e1ebd30c5?api-version=2017-12-01 response: body: - string: '{"name":"38ebcd30-16d2-4ac8-a797-b48ed3ec27b3","status":"InProgress","startTime":"2020-11-09T03:24:56.147Z"}' + string: '{"name":"d37ed45c-0287-4650-8727-8d2e1ebd30c5","status":"InProgress","startTime":"2020-12-29T03:20:05.433Z"}' headers: cache-control: - no-cache @@ -1663,7 +1705,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:28:18 GMT + - Tue, 29 Dec 2020 03:23:24 GMT expires: - '-1' pragma: @@ -1691,12 +1733,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/38ebcd30-16d2-4ac8-a797-b48ed3ec27b3?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/d37ed45c-0287-4650-8727-8d2e1ebd30c5?api-version=2017-12-01 response: body: - string: '{"name":"38ebcd30-16d2-4ac8-a797-b48ed3ec27b3","status":"InProgress","startTime":"2020-11-09T03:24:56.147Z"}' + string: '{"name":"d37ed45c-0287-4650-8727-8d2e1ebd30c5","status":"InProgress","startTime":"2020-12-29T03:20:05.433Z"}' headers: cache-control: - no-cache @@ -1705,7 +1747,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:28:33 GMT + - Tue, 29 Dec 2020 03:23:40 GMT expires: - '-1' pragma: @@ -1733,12 +1775,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/38ebcd30-16d2-4ac8-a797-b48ed3ec27b3?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/d37ed45c-0287-4650-8727-8d2e1ebd30c5?api-version=2017-12-01 response: body: - string: '{"name":"38ebcd30-16d2-4ac8-a797-b48ed3ec27b3","status":"InProgress","startTime":"2020-11-09T03:24:56.147Z"}' + string: '{"name":"d37ed45c-0287-4650-8727-8d2e1ebd30c5","status":"InProgress","startTime":"2020-12-29T03:20:05.433Z"}' headers: cache-control: - no-cache @@ -1747,7 +1789,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:28:48 GMT + - Tue, 29 Dec 2020 03:23:55 GMT expires: - '-1' pragma: @@ -1775,12 +1817,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/38ebcd30-16d2-4ac8-a797-b48ed3ec27b3?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/d37ed45c-0287-4650-8727-8d2e1ebd30c5?api-version=2017-12-01 response: body: - string: '{"name":"38ebcd30-16d2-4ac8-a797-b48ed3ec27b3","status":"Succeeded","startTime":"2020-11-09T03:24:56.147Z"}' + string: '{"name":"d37ed45c-0287-4650-8727-8d2e1ebd30c5","status":"Succeeded","startTime":"2020-12-29T03:20:05.433Z"}' headers: cache-control: - no-cache @@ -1789,7 +1831,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:29:05 GMT + - Tue, 29 Dec 2020 03:24:10 GMT expires: - '-1' pragma: @@ -1817,9 +1859,9 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/38ebcd30-16d2-4ac8-a797-b48ed3ec27b3?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/d37ed45c-0287-4650-8727-8d2e1ebd30c5?api-version=2017-12-01 response: body: string: '' @@ -1829,7 +1871,7 @@ interactions: content-length: - '0' date: - - Mon, 09 Nov 2020 03:29:05 GMT + - Tue, 29 Dec 2020 03:24:11 GMT expires: - '-1' pragma: @@ -1858,15 +1900,15 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: PATCH uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_postgresql_test_postgresql562b10c0/providers/Microsoft.DBForPostgreSQL/servers/testserver21345?api-version=2017-12-01 response: body: - string: '{"operation":"UpsertElasticServer","startTime":"2020-11-09T03:29:06.29Z"}' + string: '{"operation":"UpsertElasticServer","startTime":"2020-12-29T03:24:12.71Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/b7368002-a911-4d25-8ab5-1bf376c636ec?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/3115dcb9-d9a2-4b98-baf6-ef06dc6a1c33?api-version=2017-12-01 cache-control: - no-cache content-length: @@ -1874,11 +1916,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:29:07 GMT + - Tue, 29 Dec 2020 03:24:13 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/b7368002-a911-4d25-8ab5-1bf376c636ec?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/3115dcb9-d9a2-4b98-baf6-ef06dc6a1c33?api-version=2017-12-01 pragma: - no-cache server: @@ -1902,12 +1944,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/b7368002-a911-4d25-8ab5-1bf376c636ec?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/3115dcb9-d9a2-4b98-baf6-ef06dc6a1c33?api-version=2017-12-01 response: body: - string: '{"name":"b7368002-a911-4d25-8ab5-1bf376c636ec","status":"Succeeded","startTime":"2020-11-09T03:29:06.29Z"}' + string: '{"name":"3115dcb9-d9a2-4b98-baf6-ef06dc6a1c33","status":"Succeeded","startTime":"2020-12-29T03:24:12.71Z"}' headers: cache-control: - no-cache @@ -1916,7 +1958,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:30:07 GMT + - Tue, 29 Dec 2020 03:25:14 GMT expires: - '-1' pragma: @@ -1944,21 +1986,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_postgresql_test_postgresql562b10c0/providers/Microsoft.DBForPostgreSQL/servers/testserver21345?api-version=2017-12-01 response: body: - string: '{"sku":{"name":"B_Gen5_2","tier":"Basic","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":128000,"backupRetentionDays":7,"geoRedundantBackup":"Disabled","storageAutogrow":"Disabled"},"version":"9.6","sslEnforcement":"Enabled","minimalTlsVersion":"TLSEnforcementDisabled","userVisibleState":"Ready","fullyQualifiedDomainName":"testserver21345.postgres.database.azure.com","earliestRestoreDate":"2020-11-09T03:30:41.937+00:00","replicationRole":"None","masterServerId":"","replicaCapacity":5,"byokEnforcement":"Disabled","privateEndpointConnections":[],"infrastructureEncryption":"Disabled","publicNetworkAccess":"Enabled"},"location":"eastus","tags":{"elastic_server":"1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_postgresql_test_postgresql562b10c0/providers/Microsoft.DBforPostgreSQL/servers/testserver21345","name":"testserver21345","type":"Microsoft.DBforPostgreSQL/servers"}' + string: '{"sku":{"name":"B_Gen5_2","tier":"Basic","family":"Gen5","capacity":2},"properties":{"administratorLogin":"cloudsa","storageProfile":{"storageMB":128000,"backupRetentionDays":7,"geoRedundantBackup":"Disabled","storageAutogrow":"Disabled"},"version":"9.6","sslEnforcement":"Enabled","minimalTlsVersion":"TLSEnforcementDisabled","userVisibleState":"Ready","fullyQualifiedDomainName":"testserver21345.postgres.database.azure.com","earliestRestoreDate":"2020-12-29T03:24:54.13+00:00","replicationRole":"None","masterServerId":"","replicaCapacity":5,"byokEnforcement":"Disabled","privateEndpointConnections":[],"infrastructureEncryption":"Disabled","publicNetworkAccess":"Enabled"},"location":"eastus","tags":{"elastic_server":"1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_postgresql_test_postgresql562b10c0/providers/Microsoft.DBforPostgreSQL/servers/testserver21345","name":"testserver21345","type":"Microsoft.DBforPostgreSQL/servers"}' headers: cache-control: - no-cache content-length: - - '979' + - '978' content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:30:08 GMT + - Tue, 29 Dec 2020 03:25:15 GMT expires: - '-1' pragma: @@ -1990,7 +2032,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBForPostgreSQL/checkNameAvailability?api-version=2017-12-01 response: @@ -2004,7 +2046,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:30:09 GMT + - Tue, 29 Dec 2020 03:25:17 GMT expires: - '-1' pragma: @@ -2036,15 +2078,15 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_postgresql_test_postgresql562b10c0/providers/Microsoft.DBForPostgreSQL/servers/testserver21345/firewallRules/firewallrule?api-version=2017-12-01 response: body: - string: '{"operation":"DropElasticServerFirewallRule","startTime":"2020-11-09T03:30:10.463Z"}' + string: '{"operation":"DropElasticServerFirewallRule","startTime":"2020-12-29T03:25:18.127Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/ef065ecc-e9d3-4d08-b30c-317aa59c1d11?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/a3c1cb1e-df24-4b73-a060-6d849f77a8e3?api-version=2017-12-01 cache-control: - no-cache content-length: @@ -2052,11 +2094,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:30:11 GMT + - Tue, 29 Dec 2020 03:25:19 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/ef065ecc-e9d3-4d08-b30c-317aa59c1d11?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/a3c1cb1e-df24-4b73-a060-6d849f77a8e3?api-version=2017-12-01 pragma: - no-cache server: @@ -2066,7 +2108,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-deletes: - - '14999' + - '14998' status: code: 202 message: Accepted @@ -2080,12 +2122,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/ef065ecc-e9d3-4d08-b30c-317aa59c1d11?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/a3c1cb1e-df24-4b73-a060-6d849f77a8e3?api-version=2017-12-01 response: body: - string: '{"name":"ef065ecc-e9d3-4d08-b30c-317aa59c1d11","status":"Succeeded","startTime":"2020-11-09T03:30:10.463Z"}' + string: '{"name":"a3c1cb1e-df24-4b73-a060-6d849f77a8e3","status":"Succeeded","startTime":"2020-12-29T03:25:18.127Z"}' headers: cache-control: - no-cache @@ -2094,7 +2136,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:30:26 GMT + - Tue, 29 Dec 2020 03:25:34 GMT expires: - '-1' pragma: @@ -2124,27 +2166,27 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_postgresql_test_postgresql562b10c0/providers/Microsoft.DBForPostgreSQL/servers/testserver21345/databases/testdatabase21345?api-version=2017-12-01 response: body: - string: '{"operation":"DropElasticServerDatabase","startTime":"2020-11-09T03:30:27.68Z"}' + string: '{"operation":"DropElasticServerDatabase","startTime":"2020-12-29T03:25:34.973Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/8492c5f8-065e-417b-8a52-20769978bde8?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/6d8bbc5b-3948-4386-9a6f-59aa7018575e?api-version=2017-12-01 cache-control: - no-cache content-length: - - '79' + - '80' content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:30:27 GMT + - Tue, 29 Dec 2020 03:25:34 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/8492c5f8-065e-417b-8a52-20769978bde8?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/6d8bbc5b-3948-4386-9a6f-59aa7018575e?api-version=2017-12-01 pragma: - no-cache server: @@ -2154,7 +2196,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-deletes: - - '14998' + - '14997' status: code: 202 message: Accepted @@ -2168,21 +2210,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/8492c5f8-065e-417b-8a52-20769978bde8?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/6d8bbc5b-3948-4386-9a6f-59aa7018575e?api-version=2017-12-01 response: body: - string: '{"name":"8492c5f8-065e-417b-8a52-20769978bde8","status":"InProgress","startTime":"2020-11-09T03:30:27.68Z"}' + string: '{"name":"6d8bbc5b-3948-4386-9a6f-59aa7018575e","status":"InProgress","startTime":"2020-12-29T03:25:34.973Z"}' headers: cache-control: - no-cache content-length: - - '107' + - '108' content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:30:42 GMT + - Tue, 29 Dec 2020 03:25:50 GMT expires: - '-1' pragma: @@ -2210,21 +2252,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/8492c5f8-065e-417b-8a52-20769978bde8?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/6d8bbc5b-3948-4386-9a6f-59aa7018575e?api-version=2017-12-01 response: body: - string: '{"name":"8492c5f8-065e-417b-8a52-20769978bde8","status":"Succeeded","startTime":"2020-11-09T03:30:27.68Z"}' + string: '{"name":"6d8bbc5b-3948-4386-9a6f-59aa7018575e","status":"Succeeded","startTime":"2020-12-29T03:25:34.973Z"}' headers: cache-control: - no-cache content-length: - - '106' + - '107' content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:30:58 GMT + - Tue, 29 Dec 2020 03:26:05 GMT expires: - '-1' pragma: @@ -2254,27 +2296,27 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_postgresql_test_postgresql562b10c0/providers/Microsoft.DBForPostgreSQL/servers/testserver21345?api-version=2017-12-01 response: body: - string: '{"operation":"DropElasticServer","startTime":"2020-11-09T03:30:59.65Z"}' + string: '{"operation":"DropElasticServer","startTime":"2020-12-29T03:26:06.377Z"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/51b91a6c-e380-497e-836d-b4120f1f44ff?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/d8e7663f-345d-46af-abf4-df93cfc5e810?api-version=2017-12-01 cache-control: - no-cache content-length: - - '71' + - '72' content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:31:00 GMT + - Tue, 29 Dec 2020 03:26:06 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/51b91a6c-e380-497e-836d-b4120f1f44ff?api-version=2017-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/d8e7663f-345d-46af-abf4-df93cfc5e810?api-version=2017-12-01 pragma: - no-cache server: @@ -2284,7 +2326,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-deletes: - - '14997' + - '14996' status: code: 202 message: Accepted @@ -2298,21 +2340,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-rdbms/8.0.0b1 Python/3.6.9 (Linux-4.19.128-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-mgmt-rdbms/unknown Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/51b91a6c-e380-497e-836d-b4120f1f44ff?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/d8e7663f-345d-46af-abf4-df93cfc5e810?api-version=2017-12-01 response: body: - string: '{"name":"51b91a6c-e380-497e-836d-b4120f1f44ff","status":"Succeeded","startTime":"2020-11-09T03:30:59.65Z"}' + string: '{"name":"d8e7663f-345d-46af-abf4-df93cfc5e810","status":"Succeeded","startTime":"2020-12-29T03:26:06.377Z"}' headers: cache-control: - no-cache content-length: - - '106' + - '107' content-type: - application/json; charset=utf-8 date: - - Mon, 09 Nov 2020 03:31:15 GMT + - Tue, 29 Dec 2020 03:26:21 GMT expires: - '-1' pragma: diff --git a/sdk/rdbms/azure-mgmt-rdbms/tests/test_cli_mgmt_mysql.py b/sdk/rdbms/azure-mgmt-rdbms/tests/test_cli_mgmt_mysql.py index 830495ea7cb6..cd68dcfbe7ed 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/tests/test_cli_mgmt_mysql.py +++ b/sdk/rdbms/azure-mgmt-rdbms/tests/test_cli_mgmt_mysql.py @@ -49,13 +49,13 @@ def setUp(self): @ResourceGroupPreparer(location=AZURE_LOCATION) def test_mysql(self, resource_group): - SERVER_NAME = "testserver2134" + SERVER_NAME = "testserver21341" SUBSCRIPTION_ID = self.settings.SUBSCRIPTION_ID RESOURCE_GROUP = resource_group.name - SERVER_GEO_NAME = "servergeo2134" - SERVER_REPLICA_NAME = "serverreplica2134" - SERVER_POINT_NAME = "serverpoint2134" - DATABASE_NAME = "testdatabase2134" + SERVER_GEO_NAME = "servergeo21341" + SERVER_REPLICA_NAME = "serverreplica21341" + SERVER_POINT_NAME = "serverpoint21341" + DATABASE_NAME = "testdatabase21341" FIREWALL_RULE_NAME = "firewallrule" CONFIGURATION_NAME = "configuration" VIRTUAL_NETWORK_RULE_NAME = "virutal_networkrule" @@ -159,7 +159,7 @@ def test_mysql(self, resource_group): # "end_ip_address": "255.255.255.255" # } # } - from azure.mgmt.rdbms.mysql.v2020_01_01.models import FirewallRule + from azure.mgmt.rdbms.mysql.models import FirewallRule firewall_rule = FirewallRule(start_ip_address='0.0.0.0', end_ip_address='255.255.255.255') result = self.mgmt_client.firewall_rules.begin_create_or_update(resource_group.name, SERVER_NAME, FIREWALL_RULE_NAME, firewall_rule) result = result.result() @@ -292,7 +292,7 @@ def test_mysql(self, resource_group): # "type": "Microsoft.DBforMySQL" # } NAME = self.create_random_name("name1") - from azure.mgmt.rdbms.mysql.v2020_01_01.models import NameAvailabilityRequest + from azure.mgmt.rdbms.mysql.models import NameAvailabilityRequest nameAvailabilityRequest = NameAvailabilityRequest(name=NAME, type="Microsoft.DBforMySQL") result = self.mgmt_client.check_name_availability.execute(nameAvailabilityRequest) diff --git a/sdk/rdbms/azure-mgmt-rdbms/tests/test_cli_mgmt_postgresql.py b/sdk/rdbms/azure-mgmt-rdbms/tests/test_cli_mgmt_postgresql.py index 8ad3723b8703..6e3f675a8613 100644 --- a/sdk/rdbms/azure-mgmt-rdbms/tests/test_cli_mgmt_postgresql.py +++ b/sdk/rdbms/azure-mgmt-rdbms/tests/test_cli_mgmt_postgresql.py @@ -138,7 +138,7 @@ def test_postgresql(self, resource_group): # "collation": "English_United States.1252" # } # } - from azure.mgmt.rdbms.postgresql.v2020_01_01.models import Database + from azure.mgmt.rdbms.postgresql.models import Database database = Database(charset='UTF8', collation='English_United States.1252') result = self.mgmt_client.databases.begin_create_or_update(resource_group.name, SERVER_NAME, DATABASE_NAME, database) @@ -151,7 +151,7 @@ def test_postgresql(self, resource_group): # "end_ip_address": "255.255.255.255" # } # } - from azure.mgmt.rdbms.postgresql.v2020_01_01.models import FirewallRule + from azure.mgmt.rdbms.postgresql.models import FirewallRule firewall_rule = FirewallRule(start_ip_address='0.0.0.0', end_ip_address='255.255.255.255') result = self.mgmt_client.firewall_rules.begin_create_or_update(resource_group.name, SERVER_NAME, FIREWALL_RULE_NAME, firewall_rule) @@ -260,11 +260,11 @@ def test_postgresql(self, resource_group): result = result.result() # ServerUpdate[patch] - from azure.mgmt.rdbms.postgresql.v2020_01_01.models import ServerPropertiesForDefaultCreate + from azure.mgmt.rdbms.postgresql.models import ServerPropertiesForDefaultCreate serverPropertiesForDefaultCreate = ServerPropertiesForDefaultCreate(ssl_enforcement="Enabled", administrator_login='cloudsa', administrator_login_password='newpa$$w0rd') - from azure.mgmt.rdbms.postgresql.v2020_01_01.models import ServerForCreate + from azure.mgmt.rdbms.postgresql.models import ServerForCreate server_for_create = ServerForCreate(properties=serverPropertiesForDefaultCreate, location=LOCATION_NAME) result = self.mgmt_client.servers.begin_update(resource_group.name, SERVER_NAME, server_for_create) result = result.result() @@ -275,7 +275,7 @@ def test_postgresql(self, resource_group): # "type": "Microsoft.DBforPostgreSQL" # } NAME = self.create_random_name("name1") - from azure.mgmt.rdbms.postgresql.v2020_01_01.models import NameAvailabilityRequest + from azure.mgmt.rdbms.postgresql.models import NameAvailabilityRequest name_availability_request = NameAvailabilityRequest(name=NAME, type="Microsoft.DBforMariaDB") result = self.mgmt_client.check_name_availability.execute(name_availability_request)