diff --git a/sdk/sql/azure-mgmt-sql/HISTORY.rst b/sdk/sql/azure-mgmt-sql/HISTORY.rst index b21aa32252e9..a9d53490c3aa 100644 --- a/sdk/sql/azure-mgmt-sql/HISTORY.rst +++ b/sdk/sql/azure-mgmt-sql/HISTORY.rst @@ -3,6 +3,16 @@ Release History =============== +0.15.0 (2019-11-12) ++++++++++++++++++++ + +**Breaking changes** + +- Operation DatabasesOperations.failover has a new signature +- Operation ManagedInstanceAdministratorsOperations.get has a new signature +- Operation ManagedInstanceAdministratorsOperations.delete has a new signature +- Operation ManagedInstanceAdministratorsOperations.create_or_update has a new signature + 0.14.0 (2019-10-04) +++++++++++++++++++ diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py index 49ea960e993e..fb4487981b53 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py @@ -489,6 +489,7 @@ VulnerabilityAssessmentPolicyBaselineName, SensitivityLabelSource, CapabilityGroup, + ReplicaType, ) __all__ = [ @@ -807,4 +808,5 @@ 'VulnerabilityAssessmentPolicyBaselineName', 'SensitivityLabelSource', 'CapabilityGroup', + 'ReplicaType', ] diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py index a95758afa368..c8d28b1da195 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py @@ -1372,9 +1372,9 @@ class DatabaseVulnerabilityAssessment(ProxyResource): is required if server level vulnerability assessment policy doesn't set :type storage_container_path: str :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. + has read and write access to the blob container specified in + 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't + specified, StorageContainerSasKey is required. :type storage_container_sas_key: str :param storage_account_access_key: Specifies the identifier key of the storage account for vulnerability assessment scan results. If @@ -5490,9 +5490,9 @@ class ManagedInstanceVulnerabilityAssessment(ProxyResource): https://myStorage.blob.core.windows.net/VaScans/). :type storage_container_path: str :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. + has read and write access to the blob container specified in + 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't + specified, StorageContainerSasKey is required. :type storage_container_sas_key: str :param storage_account_access_key: Specifies the identifier key of the storage account for vulnerability assessment scan results. If @@ -7765,9 +7765,9 @@ class ServerVulnerabilityAssessment(ProxyResource): https://myStorage.blob.core.windows.net/VaScans/). :type storage_container_path: str :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. + has read and write access to the blob container specified in + 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't + specified, StorageContainerSasKey is required. :type storage_container_sas_key: str :param storage_account_access_key: Specifies the identifier key of the storage account for vulnerability assessment scan results. If diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py index 5e4ee3184444..bcf7c72187fd 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py @@ -1372,9 +1372,9 @@ class DatabaseVulnerabilityAssessment(ProxyResource): is required if server level vulnerability assessment policy doesn't set :type storage_container_path: str :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. + has read and write access to the blob container specified in + 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't + specified, StorageContainerSasKey is required. :type storage_container_sas_key: str :param storage_account_access_key: Specifies the identifier key of the storage account for vulnerability assessment scan results. If @@ -5490,9 +5490,9 @@ class ManagedInstanceVulnerabilityAssessment(ProxyResource): https://myStorage.blob.core.windows.net/VaScans/). :type storage_container_path: str :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. + has read and write access to the blob container specified in + 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't + specified, StorageContainerSasKey is required. :type storage_container_sas_key: str :param storage_account_access_key: Specifies the identifier key of the storage account for vulnerability assessment scan results. If @@ -7765,9 +7765,9 @@ class ServerVulnerabilityAssessment(ProxyResource): https://myStorage.blob.core.windows.net/VaScans/). :type storage_container_path: str :param storage_container_sas_key: A shared access signature (SAS Key) that - has write access to the blob container specified in 'storageContainerPath' - parameter. If 'storageAccountAccessKey' isn't specified, - StorageContainerSasKey is required. + has read and write access to the blob container specified in + 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't + specified, StorageContainerSasKey is required. :type storage_container_sas_key: str :param storage_account_access_key: Specifies the identifier key of the storage account for vulnerability assessment scan results. If diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py index 063f31975a3f..386641c76dfd 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py @@ -710,3 +710,9 @@ class CapabilityGroup(str, Enum): supported_editions = "supportedEditions" supported_elastic_pool_editions = "supportedElasticPoolEditions" supported_managed_instance_versions = "supportedManagedInstanceVersions" + + +class ReplicaType(str, Enum): + + primary = "Primary" + readable_secondary = "ReadableSecondary" diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_databases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_databases_operations.py index e9d76c5430f9..e0aa41fadadd 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_databases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_databases_operations.py @@ -1414,7 +1414,7 @@ def rename( def _failover_initial( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, server_name, database_name, replica_type=None, custom_headers=None, raw=False, **operation_config): api_version = "2018-06-01-preview" # Construct URL @@ -1429,6 +1429,8 @@ def _failover_initial( # Construct parameters query_parameters = {} + if replica_type is not None: + query_parameters['replicaType'] = self._serialize.query("replica_type", replica_type, 'str') query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers @@ -1454,7 +1456,7 @@ def _failover_initial( return client_raw_response def failover( - self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, server_name, database_name, replica_type=None, custom_headers=None, raw=False, polling=True, **operation_config): """Failovers a database. :param resource_group_name: The name of the resource group that @@ -1465,6 +1467,9 @@ def failover( :type server_name: str :param database_name: The name of the database to failover. :type database_name: str + :param replica_type: The type of replica to be failed over. Possible + values include: 'Primary', 'ReadableSecondary' + :type replica_type: str or ~azure.mgmt.sql.models.ReplicaType :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -1480,6 +1485,7 @@ def failover( resource_group_name=resource_group_name, server_name=server_name, database_name=database_name, + replica_type=replica_type, custom_headers=custom_headers, raw=True, **operation_config diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_administrators_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_administrators_operations.py index fd4465fbbca3..5851bb683248 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_administrators_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_administrators_operations.py @@ -28,6 +28,7 @@ class ManagedInstanceAdministratorsOperations(object): :param serializer: An object model serializer. :param deserializer: An object model deserializer. :ivar api_version: The API version to use for the request. Constant value: "2017-03-01-preview". + :ivar administrator_name: The administrator name. Constant value: "ActiveDirectory". """ models = models @@ -38,6 +39,7 @@ def __init__(self, client, config, serializer, deserializer): self._serialize = serializer self._deserialize = deserializer self.api_version = "2017-03-01-preview" + self.administrator_name = "ActiveDirectory" self.config = config @@ -116,7 +118,7 @@ def internal_paging(next_link=None): list_by_instance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/administrators'} def get( - self, resource_group_name, managed_instance_name, administrator_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, managed_instance_name, custom_headers=None, raw=False, **operation_config): """Gets a managed instance administrator. :param resource_group_name: The name of the resource group that @@ -125,8 +127,6 @@ def get( :type resource_group_name: str :param managed_instance_name: The name of the managed instance. :type managed_instance_name: str - :param administrator_name: The administrator name. - :type administrator_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -142,7 +142,7 @@ def get( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), - 'administratorName': self._serialize.url("administrator_name", administrator_name, 'str'), + 'administratorName': self._serialize.url("self.administrator_name", self.administrator_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -183,13 +183,13 @@ def get( def _create_or_update_initial( - self, resource_group_name, managed_instance_name, administrator_name, parameters, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, managed_instance_name, parameters, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), - 'administratorName': self._serialize.url("administrator_name", administrator_name, 'str'), + 'administratorName': self._serialize.url("self.administrator_name", self.administrator_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -235,7 +235,7 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, resource_group_name, managed_instance_name, administrator_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, managed_instance_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Creates or updates a managed instance administrator. :param resource_group_name: The name of the resource group that @@ -244,8 +244,6 @@ def create_or_update( :type resource_group_name: str :param managed_instance_name: The name of the managed instance. :type managed_instance_name: str - :param administrator_name: The requested administrator name. - :type administrator_name: str :param parameters: The requested administrator parameters. :type parameters: ~azure.mgmt.sql.models.ManagedInstanceAdministrator :param dict custom_headers: headers that will be added to the request @@ -265,7 +263,6 @@ def create_or_update( raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, managed_instance_name=managed_instance_name, - administrator_name=administrator_name, parameters=parameters, custom_headers=custom_headers, raw=True, @@ -292,13 +289,13 @@ def get_long_running_output(response): def _delete_initial( - self, resource_group_name, managed_instance_name, administrator_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, managed_instance_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'managedInstanceName': self._serialize.url("managed_instance_name", managed_instance_name, 'str'), - 'administratorName': self._serialize.url("administrator_name", administrator_name, 'str'), + 'administratorName': self._serialize.url("self.administrator_name", self.administrator_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -330,7 +327,7 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, managed_instance_name, administrator_name, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, managed_instance_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes a managed instance administrator. :param resource_group_name: The name of the resource group that @@ -339,8 +336,6 @@ def delete( :type resource_group_name: str :param managed_instance_name: The name of the managed instance. :type managed_instance_name: str - :param administrator_name: The administrator name. - :type administrator_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -355,7 +350,6 @@ def delete( raw_result = self._delete_initial( resource_group_name=resource_group_name, managed_instance_name=managed_instance_name, - administrator_name=administrator_name, custom_headers=custom_headers, raw=True, **operation_config diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/version.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/version.py index d68bbc52e693..34604e38f416 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/version.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/version.py @@ -9,4 +9,4 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.14.0" +VERSION = "0.15.0"