diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/managed_database.py b/azure-mgmt-sql/azure/mgmt/sql/models/managed_database.py index 92d1c06510f0..0c5141eaaef5 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/managed_database.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/managed_database.py @@ -32,8 +32,8 @@ class ManagedDatabase(TrackedResource): :type tags: dict[str, str] :param collation: Collation of the managed database. :type collation: str - :ivar status: Status for the database. Possible values include: 'Online', - 'Offline', 'Shutdown', 'Creating', 'Inaccessible' + :ivar status: Status of the database. Possible values include: 'Online', + 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus :ivar creation_date: Creation date of the database. :vartype creation_date: datetime @@ -56,8 +56,11 @@ class ManagedDatabase(TrackedResource): database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and - StorageContainerSasToken must be specified. Possible values include: - 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' + StorageContainerSasToken must be specified. Recovery: Creates a database + by restoring a geo-replicated backup. RecoverableDatabaseId must be + specified as the recoverable database resource ID to restore. Possible + values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', + 'Recovery' :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode :param storage_container_uri: Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the @@ -66,6 +69,9 @@ class ManagedDatabase(TrackedResource): :param source_database_id: The resource identifier of the source database associated with create operation of this database. :type source_database_id: str + :param restorable_dropped_database_id: The restorable dropped database + resource id to restore when creating this database. + :type restorable_dropped_database_id: str :param storage_container_sas_token: Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the storage container sas token. @@ -73,6 +79,9 @@ class ManagedDatabase(TrackedResource): :ivar failover_group_id: Instance Failover Group resource identifier that this managed database belongs to. :vartype failover_group_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str """ _validation = { @@ -103,8 +112,10 @@ class ManagedDatabase(TrackedResource): 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, } def __init__(self, **kwargs): @@ -119,5 +130,7 @@ def __init__(self, **kwargs): self.create_mode = kwargs.get('create_mode', None) self.storage_container_uri = kwargs.get('storage_container_uri', None) self.source_database_id = kwargs.get('source_database_id', None) + self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) self.storage_container_sas_token = kwargs.get('storage_container_sas_token', None) self.failover_group_id = None + self.recoverable_database_id = kwargs.get('recoverable_database_id', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_py3.py index 4470afe5bb7e..cc5b655604ad 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_py3.py @@ -32,8 +32,8 @@ class ManagedDatabase(TrackedResource): :type tags: dict[str, str] :param collation: Collation of the managed database. :type collation: str - :ivar status: Status for the database. Possible values include: 'Online', - 'Offline', 'Shutdown', 'Creating', 'Inaccessible' + :ivar status: Status of the database. Possible values include: 'Online', + 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus :ivar creation_date: Creation date of the database. :vartype creation_date: datetime @@ -56,8 +56,11 @@ class ManagedDatabase(TrackedResource): database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and - StorageContainerSasToken must be specified. Possible values include: - 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' + StorageContainerSasToken must be specified. Recovery: Creates a database + by restoring a geo-replicated backup. RecoverableDatabaseId must be + specified as the recoverable database resource ID to restore. Possible + values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', + 'Recovery' :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode :param storage_container_uri: Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the @@ -66,6 +69,9 @@ class ManagedDatabase(TrackedResource): :param source_database_id: The resource identifier of the source database associated with create operation of this database. :type source_database_id: str + :param restorable_dropped_database_id: The restorable dropped database + resource id to restore when creating this database. + :type restorable_dropped_database_id: str :param storage_container_sas_token: Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the storage container sas token. @@ -73,6 +79,9 @@ class ManagedDatabase(TrackedResource): :ivar failover_group_id: Instance Failover Group resource identifier that this managed database belongs to. :vartype failover_group_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str """ _validation = { @@ -103,11 +112,13 @@ class ManagedDatabase(TrackedResource): 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, } - def __init__(self, *, location: str, tags=None, collation: str=None, restore_point_in_time=None, catalog_collation=None, create_mode=None, storage_container_uri: str=None, source_database_id: str=None, storage_container_sas_token: str=None, **kwargs) -> None: + def __init__(self, *, location: str, tags=None, collation: str=None, restore_point_in_time=None, catalog_collation=None, create_mode=None, storage_container_uri: str=None, source_database_id: str=None, restorable_dropped_database_id: str=None, storage_container_sas_token: str=None, recoverable_database_id: str=None, **kwargs) -> None: super(ManagedDatabase, self).__init__(location=location, tags=tags, **kwargs) self.collation = collation self.status = None @@ -119,5 +130,7 @@ def __init__(self, *, location: str, tags=None, collation: str=None, restore_poi self.create_mode = create_mode self.storage_container_uri = storage_container_uri self.source_database_id = source_database_id + self.restorable_dropped_database_id = restorable_dropped_database_id self.storage_container_sas_token = storage_container_sas_token self.failover_group_id = None + self.recoverable_database_id = recoverable_database_id diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update.py b/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update.py index 4335e9b19dfa..5ce3a036dcb9 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update.py @@ -20,8 +20,8 @@ class ManagedDatabaseUpdate(Model): :param collation: Collation of the managed database. :type collation: str - :ivar status: Status for the database. Possible values include: 'Online', - 'Offline', 'Shutdown', 'Creating', 'Inaccessible' + :ivar status: Status of the database. Possible values include: 'Online', + 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus :ivar creation_date: Creation date of the database. :vartype creation_date: datetime @@ -44,8 +44,11 @@ class ManagedDatabaseUpdate(Model): database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and - StorageContainerSasToken must be specified. Possible values include: - 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' + StorageContainerSasToken must be specified. Recovery: Creates a database + by restoring a geo-replicated backup. RecoverableDatabaseId must be + specified as the recoverable database resource ID to restore. Possible + values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', + 'Recovery' :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode :param storage_container_uri: Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the @@ -54,6 +57,9 @@ class ManagedDatabaseUpdate(Model): :param source_database_id: The resource identifier of the source database associated with create operation of this database. :type source_database_id: str + :param restorable_dropped_database_id: The restorable dropped database + resource id to restore when creating this database. + :type restorable_dropped_database_id: str :param storage_container_sas_token: Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the storage container sas token. @@ -61,6 +67,9 @@ class ManagedDatabaseUpdate(Model): :ivar failover_group_id: Instance Failover Group resource identifier that this managed database belongs to. :vartype failover_group_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str :param tags: Resource tags. :type tags: dict[str, str] """ @@ -84,8 +93,10 @@ class ManagedDatabaseUpdate(Model): 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, } @@ -101,6 +112,8 @@ def __init__(self, **kwargs): self.create_mode = kwargs.get('create_mode', None) self.storage_container_uri = kwargs.get('storage_container_uri', None) self.source_database_id = kwargs.get('source_database_id', None) + self.restorable_dropped_database_id = kwargs.get('restorable_dropped_database_id', None) self.storage_container_sas_token = kwargs.get('storage_container_sas_token', None) self.failover_group_id = None + self.recoverable_database_id = kwargs.get('recoverable_database_id', None) self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update_py3.py b/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update_py3.py index 668eec38f38b..34ae1be2b3fe 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update_py3.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/managed_database_update_py3.py @@ -20,8 +20,8 @@ class ManagedDatabaseUpdate(Model): :param collation: Collation of the managed database. :type collation: str - :ivar status: Status for the database. Possible values include: 'Online', - 'Offline', 'Shutdown', 'Creating', 'Inaccessible' + :ivar status: Status of the database. Possible values include: 'Online', + 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating' :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus :ivar creation_date: Creation date of the database. :vartype creation_date: datetime @@ -44,8 +44,11 @@ class ManagedDatabaseUpdate(Model): database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and - StorageContainerSasToken must be specified. Possible values include: - 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' + StorageContainerSasToken must be specified. Recovery: Creates a database + by restoring a geo-replicated backup. RecoverableDatabaseId must be + specified as the recoverable database resource ID to restore. Possible + values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', + 'Recovery' :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode :param storage_container_uri: Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the @@ -54,6 +57,9 @@ class ManagedDatabaseUpdate(Model): :param source_database_id: The resource identifier of the source database associated with create operation of this database. :type source_database_id: str + :param restorable_dropped_database_id: The restorable dropped database + resource id to restore when creating this database. + :type restorable_dropped_database_id: str :param storage_container_sas_token: Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the storage container sas token. @@ -61,6 +67,9 @@ class ManagedDatabaseUpdate(Model): :ivar failover_group_id: Instance Failover Group resource identifier that this managed database belongs to. :vartype failover_group_id: str + :param recoverable_database_id: The resource identifier of the recoverable + database associated with create operation of this database. + :type recoverable_database_id: str :param tags: Resource tags. :type tags: dict[str, str] """ @@ -84,12 +93,14 @@ class ManagedDatabaseUpdate(Model): 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, + 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, + 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, *, collation: str=None, restore_point_in_time=None, catalog_collation=None, create_mode=None, storage_container_uri: str=None, source_database_id: str=None, storage_container_sas_token: str=None, tags=None, **kwargs) -> None: + def __init__(self, *, collation: str=None, restore_point_in_time=None, catalog_collation=None, create_mode=None, storage_container_uri: str=None, source_database_id: str=None, restorable_dropped_database_id: str=None, storage_container_sas_token: str=None, recoverable_database_id: str=None, tags=None, **kwargs) -> None: super(ManagedDatabaseUpdate, self).__init__(**kwargs) self.collation = collation self.status = None @@ -101,6 +112,8 @@ def __init__(self, *, collation: str=None, restore_point_in_time=None, catalog_c self.create_mode = create_mode self.storage_container_uri = storage_container_uri self.source_database_id = source_database_id + self.restorable_dropped_database_id = restorable_dropped_database_id self.storage_container_sas_token = storage_container_sas_token self.failover_group_id = None + self.recoverable_database_id = recoverable_database_id self.tags = tags diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/sql_management_client_enums.py b/azure-mgmt-sql/azure/mgmt/sql/models/sql_management_client_enums.py index 90b01d122079..0dc68e9eb6b5 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/sql_management_client_enums.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/sql_management_client_enums.py @@ -486,6 +486,7 @@ class ManagedDatabaseStatus(str, Enum): shutdown = "Shutdown" creating = "Creating" inaccessible = "Inaccessible" + updating = "Updating" class CatalogCollationType(str, Enum): @@ -499,6 +500,7 @@ class ManagedDatabaseCreateMode(str, Enum): default = "Default" restore_external_backup = "RestoreExternalBackup" point_in_time_restore = "PointInTimeRestore" + recovery = "Recovery" class AutomaticTuningServerMode(str, Enum): diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/managed_databases_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/managed_databases_operations.py index 8761e7adbc83..e2b8d02ae534 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/managed_databases_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/managed_databases_operations.py @@ -417,7 +417,7 @@ def _delete_initial( def delete( self, resource_group_name, managed_instance_name, database_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes the managed database. + """Deletes a managed database. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure