Class ManagedDatabaseInner
java.lang.Object
com.azure.core.management.ProxyResource
com.azure.core.management.Resource
com.azure.resourcemanager.sql.fluent.models.ManagedDatabaseInner
- All Implemented Interfaces:
com.azure.json.JsonSerializable<com.azure.core.management.ProxyResource>
public final class ManagedDatabaseInner
extends com.azure.core.management.Resource
A managed database resource.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the autoCompleteRestore property: Whether to auto complete restore of this managed database.Get the catalogCollation property: Collation of the metadata catalog.Get the collation property: Collation of the managed database.Get the createMode property: Managed database create mode.Get the creationDate property: Creation date of the database.Get the defaultSecondaryLocation property: Geo paired region.Get the earliestRestorePoint property: Earliest restore point in time for point in time restore.Get the failoverGroupId property: Instance Failover Group resource identifier that this managed database belongs to.static ManagedDatabaseInnerfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ManagedDatabaseInner from the JsonReader.id()Get the id property: Fully qualified resource Id for the resource.Get the lastBackupName property: Last backup file name for restore of this managed database.Get the longTermRetentionBackupResourceId property: The name of the Long Term Retention backup to be used for restore of this managed database.name()Get the name property: The name of the resource.Get the recoverableDatabaseId property: The resource identifier of the recoverable database associated with create operation of this database.Get the restorableDroppedDatabaseId property: The restorable dropped database resource id to restore when creating this database.Get the restorePointInTime property: Conditional.Get the sourceDatabaseId property: The resource identifier of the source database associated with create operation of this database.status()Get the status property: Status of the database.Get the storageContainerSasToken property: Conditional.Get the storageContainerUri property: Conditional.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) type()Get the type property: The type of the resource.voidvalidate()Validates the instance.withAutoCompleteRestore(Boolean autoCompleteRestore) Set the autoCompleteRestore property: Whether to auto complete restore of this managed database.withCatalogCollation(CatalogCollationType catalogCollation) Set the catalogCollation property: Collation of the metadata catalog.withCollation(String collation) Set the collation property: Collation of the managed database.withCreateMode(ManagedDatabaseCreateMode createMode) Set the createMode property: Managed database create mode.withLastBackupName(String lastBackupName) Set the lastBackupName property: Last backup file name for restore of this managed database.withLocation(String location) withLongTermRetentionBackupResourceId(String longTermRetentionBackupResourceId) Set the longTermRetentionBackupResourceId property: The name of the Long Term Retention backup to be used for restore of this managed database.withRecoverableDatabaseId(String recoverableDatabaseId) Set the recoverableDatabaseId property: The resource identifier of the recoverable database associated with create operation of this database.withRestorableDroppedDatabaseId(String restorableDroppedDatabaseId) Set the restorableDroppedDatabaseId property: The restorable dropped database resource id to restore when creating this database.withRestorePointInTime(OffsetDateTime restorePointInTime) Set the restorePointInTime property: Conditional.withSourceDatabaseId(String sourceDatabaseId) Set the sourceDatabaseId property: The resource identifier of the source database associated with create operation of this database.withStorageContainerSasToken(String storageContainerSasToken) Set the storageContainerSasToken property: Conditional.withStorageContainerUri(String storageContainerUri) Set the storageContainerUri property: Conditional.Methods inherited from class com.azure.core.management.Resource
location, tagsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ManagedDatabaseInner
public ManagedDatabaseInner()Creates an instance of ManagedDatabaseInner class.
-
-
Method Details
-
type
Get the type property: The type of the resource.- Overrides:
typein classcom.azure.core.management.ProxyResource- Returns:
- the type value.
-
name
Get the name property: The name of the resource.- Overrides:
namein classcom.azure.core.management.ProxyResource- Returns:
- the name value.
-
id
Get the id property: Fully qualified resource Id for the resource.- Overrides:
idin classcom.azure.core.management.ProxyResource- Returns:
- the id value.
-
withLocation
- Overrides:
withLocationin classcom.azure.core.management.Resource
-
withTags
- Overrides:
withTagsin classcom.azure.core.management.Resource
-
collation
Get the collation property: Collation of the managed database.- Returns:
- the collation value.
-
withCollation
Set the collation property: Collation of the managed database.- Parameters:
collation- the collation value to set.- Returns:
- the ManagedDatabaseInner object itself.
-
status
Get the status property: Status of the database.- Returns:
- the status value.
-
creationDate
Get the creationDate property: Creation date of the database.- Returns:
- the creationDate value.
-
earliestRestorePoint
Get the earliestRestorePoint property: Earliest restore point in time for point in time restore.- Returns:
- the earliestRestorePoint value.
-
restorePointInTime
Get the restorePointInTime property: Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.- Returns:
- the restorePointInTime value.
-
withRestorePointInTime
Set the restorePointInTime property: Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.- Parameters:
restorePointInTime- the restorePointInTime value to set.- Returns:
- the ManagedDatabaseInner object itself.
-
defaultSecondaryLocation
Get the defaultSecondaryLocation property: Geo paired region.- Returns:
- the defaultSecondaryLocation value.
-
catalogCollation
Get the catalogCollation property: Collation of the metadata catalog.- Returns:
- the catalogCollation value.
-
withCatalogCollation
Set the catalogCollation property: Collation of the metadata catalog.- Parameters:
catalogCollation- the catalogCollation value to set.- Returns:
- the ManagedDatabaseInner object itself.
-
createMode
Get the createMode property: Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing 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. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup (longTermRetentionBackupResourceId required).- Returns:
- the createMode value.
-
withCreateMode
Set the createMode property: Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing 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. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup (longTermRetentionBackupResourceId required).- Parameters:
createMode- the createMode value to set.- Returns:
- the ManagedDatabaseInner object itself.
-
storageContainerUri
Get the storageContainerUri property: Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage container where backups for this restore are stored.- Returns:
- the storageContainerUri value.
-
withStorageContainerUri
Set the storageContainerUri property: Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage container where backups for this restore are stored.- Parameters:
storageContainerUri- the storageContainerUri value to set.- Returns:
- the ManagedDatabaseInner object itself.
-
sourceDatabaseId
Get the sourceDatabaseId property: The resource identifier of the source database associated with create operation of this database.- Returns:
- the sourceDatabaseId value.
-
withSourceDatabaseId
Set the sourceDatabaseId property: The resource identifier of the source database associated with create operation of this database.- Parameters:
sourceDatabaseId- the sourceDatabaseId value to set.- Returns:
- the ManagedDatabaseInner object itself.
-
restorableDroppedDatabaseId
Get the restorableDroppedDatabaseId property: The restorable dropped database resource id to restore when creating this database.- Returns:
- the restorableDroppedDatabaseId value.
-
withRestorableDroppedDatabaseId
Set the restorableDroppedDatabaseId property: The restorable dropped database resource id to restore when creating this database.- Parameters:
restorableDroppedDatabaseId- the restorableDroppedDatabaseId value to set.- Returns:
- the ManagedDatabaseInner object itself.
-
storageContainerSasToken
Get the storageContainerSasToken property: Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the storage container sas token.- Returns:
- the storageContainerSasToken value.
-
withStorageContainerSasToken
Set the storageContainerSasToken property: Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the storage container sas token.- Parameters:
storageContainerSasToken- the storageContainerSasToken value to set.- Returns:
- the ManagedDatabaseInner object itself.
-
failoverGroupId
Get the failoverGroupId property: Instance Failover Group resource identifier that this managed database belongs to.- Returns:
- the failoverGroupId value.
-
recoverableDatabaseId
Get the recoverableDatabaseId property: The resource identifier of the recoverable database associated with create operation of this database.- Returns:
- the recoverableDatabaseId value.
-
withRecoverableDatabaseId
Set the recoverableDatabaseId property: The resource identifier of the recoverable database associated with create operation of this database.- Parameters:
recoverableDatabaseId- the recoverableDatabaseId value to set.- Returns:
- the ManagedDatabaseInner object itself.
-
longTermRetentionBackupResourceId
Get the longTermRetentionBackupResourceId property: The name of the Long Term Retention backup to be used for restore of this managed database.- Returns:
- the longTermRetentionBackupResourceId value.
-
withLongTermRetentionBackupResourceId
public ManagedDatabaseInner withLongTermRetentionBackupResourceId(String longTermRetentionBackupResourceId) Set the longTermRetentionBackupResourceId property: The name of the Long Term Retention backup to be used for restore of this managed database.- Parameters:
longTermRetentionBackupResourceId- the longTermRetentionBackupResourceId value to set.- Returns:
- the ManagedDatabaseInner object itself.
-
autoCompleteRestore
Get the autoCompleteRestore property: Whether to auto complete restore of this managed database.- Returns:
- the autoCompleteRestore value.
-
withAutoCompleteRestore
Set the autoCompleteRestore property: Whether to auto complete restore of this managed database.- Parameters:
autoCompleteRestore- the autoCompleteRestore value to set.- Returns:
- the ManagedDatabaseInner object itself.
-
lastBackupName
Get the lastBackupName property: Last backup file name for restore of this managed database.- Returns:
- the lastBackupName value.
-
withLastBackupName
Set the lastBackupName property: Last backup file name for restore of this managed database.- Parameters:
lastBackupName- the lastBackupName value to set.- Returns:
- the ManagedDatabaseInner object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<com.azure.core.management.ProxyResource>- Overrides:
toJsonin classcom.azure.core.management.Resource- Throws:
IOException
-
fromJson
public static ManagedDatabaseInner fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ManagedDatabaseInner from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ManagedDatabaseInner if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the ManagedDatabaseInner.
-