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..4ce5123d8bb0 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 @@ -750,7 +750,7 @@ class DatabaseBlobAuditingPolicy(ProxyResource): :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState :param storage_endpoint: Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. + storageEndpoint or isAzureMonitorTargetEnabled is required. :type storage_endpoint: str :param storage_account_access_key: Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is @@ -843,6 +843,11 @@ class DatabaseBlobAuditingPolicy(ProxyResource): or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) :type is_azure_monitor_target_enabled: bool + :param queue_delay_ms: Specifies the amount of time in milliseconds that + can elapse before audit actions are forced to be processed. + The default minimum value is 1000 (1 second). The maximum is + 2,147,483,647. + :type queue_delay_ms: int """ _validation = { @@ -866,6 +871,7 @@ class DatabaseBlobAuditingPolicy(ProxyResource): 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + 'queue_delay_ms': {'key': 'properties.queueDelayMs', 'type': 'int'}, } def __init__(self, **kwargs): @@ -879,6 +885,7 @@ def __init__(self, **kwargs): self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) + self.queue_delay_ms = kwargs.get('queue_delay_ms', None) class DatabaseOperation(ProxyResource): @@ -1372,9 +1379,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 @@ -2594,7 +2601,7 @@ class ExtendedDatabaseBlobAuditingPolicy(ProxyResource): :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState :param storage_endpoint: Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. + storageEndpoint or isAzureMonitorTargetEnabled is required. :type storage_endpoint: str :param storage_account_access_key: Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is @@ -2687,6 +2694,11 @@ class ExtendedDatabaseBlobAuditingPolicy(ProxyResource): or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) :type is_azure_monitor_target_enabled: bool + :param queue_delay_ms: Specifies the amount of time in milliseconds that + can elapse before audit actions are forced to be processed. + The default minimum value is 1000 (1 second). The maximum is + 2,147,483,647. + :type queue_delay_ms: int """ _validation = { @@ -2709,6 +2721,7 @@ class ExtendedDatabaseBlobAuditingPolicy(ProxyResource): 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + 'queue_delay_ms': {'key': 'properties.queueDelayMs', 'type': 'int'}, } def __init__(self, **kwargs): @@ -2722,6 +2735,7 @@ def __init__(self, **kwargs): self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) + self.queue_delay_ms = kwargs.get('queue_delay_ms', None) class ExtendedServerBlobAuditingPolicy(ProxyResource): @@ -2747,7 +2761,7 @@ class ExtendedServerBlobAuditingPolicy(ProxyResource): :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState :param storage_endpoint: Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. + storageEndpoint or isAzureMonitorTargetEnabled is required. :type storage_endpoint: str :param storage_account_access_key: Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is @@ -2840,6 +2854,11 @@ class ExtendedServerBlobAuditingPolicy(ProxyResource): or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) :type is_azure_monitor_target_enabled: bool + :param queue_delay_ms: Specifies the amount of time in milliseconds that + can elapse before audit actions are forced to be processed. + The default minimum value is 1000 (1 second). The maximum is + 2,147,483,647. + :type queue_delay_ms: int """ _validation = { @@ -2862,6 +2881,7 @@ class ExtendedServerBlobAuditingPolicy(ProxyResource): 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + 'queue_delay_ms': {'key': 'properties.queueDelayMs', 'type': 'int'}, } def __init__(self, **kwargs): @@ -2875,6 +2895,7 @@ def __init__(self, **kwargs): self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) + self.queue_delay_ms = kwargs.get('queue_delay_ms', None) class FailoverGroup(ProxyResource): @@ -5490,9 +5511,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 @@ -7176,7 +7197,7 @@ class ServerBlobAuditingPolicy(ProxyResource): :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState :param storage_endpoint: Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. + storageEndpoint or isAzureMonitorTargetEnabled is required. :type storage_endpoint: str :param storage_account_access_key: Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is @@ -7269,6 +7290,11 @@ class ServerBlobAuditingPolicy(ProxyResource): or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) :type is_azure_monitor_target_enabled: bool + :param queue_delay_ms: Specifies the amount of time in milliseconds that + can elapse before audit actions are forced to be processed. + The default minimum value is 1000 (1 second). The maximum is + 2,147,483,647. + :type queue_delay_ms: int """ _validation = { @@ -7290,6 +7316,7 @@ class ServerBlobAuditingPolicy(ProxyResource): 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + 'queue_delay_ms': {'key': 'properties.queueDelayMs', 'type': 'int'}, } def __init__(self, **kwargs): @@ -7302,6 +7329,7 @@ def __init__(self, **kwargs): self.storage_account_subscription_id = kwargs.get('storage_account_subscription_id', None) self.is_storage_secondary_key_in_use = kwargs.get('is_storage_secondary_key_in_use', None) self.is_azure_monitor_target_enabled = kwargs.get('is_azure_monitor_target_enabled', None) + self.queue_delay_ms = kwargs.get('queue_delay_ms', None) class ServerCommunicationLink(ProxyResource): @@ -7765,9 +7793,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..7a6646a15ec2 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 @@ -750,7 +750,7 @@ class DatabaseBlobAuditingPolicy(ProxyResource): :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState :param storage_endpoint: Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. + storageEndpoint or isAzureMonitorTargetEnabled is required. :type storage_endpoint: str :param storage_account_access_key: Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is @@ -843,6 +843,11 @@ class DatabaseBlobAuditingPolicy(ProxyResource): or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) :type is_azure_monitor_target_enabled: bool + :param queue_delay_ms: Specifies the amount of time in milliseconds that + can elapse before audit actions are forced to be processed. + The default minimum value is 1000 (1 second). The maximum is + 2,147,483,647. + :type queue_delay_ms: int """ _validation = { @@ -866,9 +871,10 @@ class DatabaseBlobAuditingPolicy(ProxyResource): 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + 'queue_delay_ms': {'key': 'properties.queueDelayMs', 'type': 'int'}, } - def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: + def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, queue_delay_ms: int=None, **kwargs) -> None: super(DatabaseBlobAuditingPolicy, self).__init__(**kwargs) self.kind = None self.state = state @@ -879,6 +885,7 @@ def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_ self.storage_account_subscription_id = storage_account_subscription_id self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled + self.queue_delay_ms = queue_delay_ms class DatabaseOperation(ProxyResource): @@ -1372,9 +1379,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 @@ -2594,7 +2601,7 @@ class ExtendedDatabaseBlobAuditingPolicy(ProxyResource): :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState :param storage_endpoint: Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. + storageEndpoint or isAzureMonitorTargetEnabled is required. :type storage_endpoint: str :param storage_account_access_key: Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is @@ -2687,6 +2694,11 @@ class ExtendedDatabaseBlobAuditingPolicy(ProxyResource): or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) :type is_azure_monitor_target_enabled: bool + :param queue_delay_ms: Specifies the amount of time in milliseconds that + can elapse before audit actions are forced to be processed. + The default minimum value is 1000 (1 second). The maximum is + 2,147,483,647. + :type queue_delay_ms: int """ _validation = { @@ -2709,9 +2721,10 @@ class ExtendedDatabaseBlobAuditingPolicy(ProxyResource): 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + 'queue_delay_ms': {'key': 'properties.queueDelayMs', 'type': 'int'}, } - def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: + def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, queue_delay_ms: int=None, **kwargs) -> None: super(ExtendedDatabaseBlobAuditingPolicy, self).__init__(**kwargs) self.predicate_expression = predicate_expression self.state = state @@ -2722,6 +2735,7 @@ def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: s self.storage_account_subscription_id = storage_account_subscription_id self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled + self.queue_delay_ms = queue_delay_ms class ExtendedServerBlobAuditingPolicy(ProxyResource): @@ -2747,7 +2761,7 @@ class ExtendedServerBlobAuditingPolicy(ProxyResource): :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState :param storage_endpoint: Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. + storageEndpoint or isAzureMonitorTargetEnabled is required. :type storage_endpoint: str :param storage_account_access_key: Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is @@ -2840,6 +2854,11 @@ class ExtendedServerBlobAuditingPolicy(ProxyResource): or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) :type is_azure_monitor_target_enabled: bool + :param queue_delay_ms: Specifies the amount of time in milliseconds that + can elapse before audit actions are forced to be processed. + The default minimum value is 1000 (1 second). The maximum is + 2,147,483,647. + :type queue_delay_ms: int """ _validation = { @@ -2862,9 +2881,10 @@ class ExtendedServerBlobAuditingPolicy(ProxyResource): 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + 'queue_delay_ms': {'key': 'properties.queueDelayMs', 'type': 'int'}, } - def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: + def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, queue_delay_ms: int=None, **kwargs) -> None: super(ExtendedServerBlobAuditingPolicy, self).__init__(**kwargs) self.predicate_expression = predicate_expression self.state = state @@ -2875,6 +2895,7 @@ def __init__(self, *, state, predicate_expression: str=None, storage_endpoint: s self.storage_account_subscription_id = storage_account_subscription_id self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled + self.queue_delay_ms = queue_delay_ms class FailoverGroup(ProxyResource): @@ -5490,9 +5511,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 @@ -7176,7 +7197,7 @@ class ServerBlobAuditingPolicy(ProxyResource): :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState :param storage_endpoint: Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, - storageEndpoint is required. + storageEndpoint or isAzureMonitorTargetEnabled is required. :type storage_endpoint: str :param storage_account_access_key: Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is @@ -7269,6 +7290,11 @@ class ServerBlobAuditingPolicy(ProxyResource): or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) :type is_azure_monitor_target_enabled: bool + :param queue_delay_ms: Specifies the amount of time in milliseconds that + can elapse before audit actions are forced to be processed. + The default minimum value is 1000 (1 second). The maximum is + 2,147,483,647. + :type queue_delay_ms: int """ _validation = { @@ -7290,9 +7316,10 @@ class ServerBlobAuditingPolicy(ProxyResource): 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, + 'queue_delay_ms': {'key': 'properties.queueDelayMs', 'type': 'int'}, } - def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, **kwargs) -> None: + def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, audit_actions_and_groups=None, storage_account_subscription_id: str=None, is_storage_secondary_key_in_use: bool=None, is_azure_monitor_target_enabled: bool=None, queue_delay_ms: int=None, **kwargs) -> None: super(ServerBlobAuditingPolicy, self).__init__(**kwargs) self.state = state self.storage_endpoint = storage_endpoint @@ -7302,6 +7329,7 @@ def __init__(self, *, state, storage_endpoint: str=None, storage_account_access_ self.storage_account_subscription_id = storage_account_subscription_id self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled + self.queue_delay_ms = queue_delay_ms class ServerCommunicationLink(ProxyResource): @@ -7765,9 +7793,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"