Class DatabaseInner
java.lang.Object
com.azure.core.management.ProxyResource
com.azure.core.management.Resource
com.azure.resourcemanager.sql.fluent.models.DatabaseInner
- All Implemented Interfaces:
com.azure.json.JsonSerializable<com.azure.core.management.ProxyResource>
public final class DatabaseInner
extends com.azure.core.management.Resource
A database resource.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the autoPauseDelay property: Time in minutes after which database is automatically paused.Get the catalogCollation property: Collation of the metadata catalog.Get the collation property: The collation of the database.Get the createMode property: Specifies the mode of database creation.Get the creationDate property: The creation date of the database (ISO8601 format).Get the currentBackupStorageRedundancy property: The storage account type used to store backups for this database.Get the currentServiceObjectiveName property: The current service level objective name of the database.Get the currentSku property: The name and tier of the SKU.Get the databaseId property: The ID of the database.Get the defaultSecondaryLocation property: The default secondary region for this database.Get the earliestRestoreDate property: This records the earliest start date and time that restore is available for this database (ISO8601 format).Get the elasticPoolId property: The resource identifier of the elastic pool containing this database.Get the failoverGroupId property: Failover Group resource identifier that this database belongs to.Get the federatedClientId property: The Client id used for cross tenant per database CMK scenario.static DatabaseInnerfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of DatabaseInner from the JsonReader.Get the highAvailabilityReplicaCount property: The number of secondary replicas associated with the database that are used to provide high availability.id()Get the id property: Fully qualified resource Id for the resource.identity()Get the identity property: The Azure Active Directory identity of the database.Get the isInfraEncryptionEnabled property: Infra encryption is enabled for this database.Get the isLedgerOn property: Whether or not this database is a ledger database, which means all tables in the database are ledger tables.kind()Get the kind property: Kind of database.Get the licenseType property: The license type to apply for this database.Get the longTermRetentionBackupResourceId property: The resource identifier of the long term retention backup associated with create operation of this database.Get the maintenanceConfigurationId property: Maintenance configuration id assigned to the database.Get the managedBy property: Resource that manages the database.Get the maxLogSizeBytes property: The max log size for this database.Get the maxSizeBytes property: The max size of the database expressed in bytes.Get the minCapacity property: Minimal capacity that database will always have allocated, if not paused.name()Get the name property: The name of the resource.Get the pausedDate property: The date when database was paused by user configuration or action(ISO8601 format).Get the readScale property: The state of read-only routing.Get the recoverableDatabaseId property: The resource identifier of the recoverable database associated with create operation of this database.Get the recoveryServicesRecoveryPointId property: The resource identifier of the recovery point associated with create operation of this database.Get the requestedBackupStorageRedundancy property: The storage account type to be used to store backups for this database.Get the requestedServiceObjectiveName property: The requested service level objective name of the database.Get the restorableDroppedDatabaseId property: The resource identifier of the restorable dropped database associated with create operation of this database.Get the restorePointInTime property: Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.Get the resumedDate property: The date when database was resumed by user action or database login (ISO8601 format).Get the sampleName property: The name of the sample schema to apply when creating this database.Get the secondaryType property: The secondary type of the database if it is a secondary.sku()Get the sku property: The database SKU.Get the sourceDatabaseDeletionDate property: Specifies the time that the database was deleted.Get the sourceDatabaseId property: The resource identifier of the source database associated with create operation of this database.Get the sourceResourceId property: The resource identifier of the source associated with the create operation of this database.status()Get the status property: The status of the database.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) type()Get the type property: The type of the resource.voidvalidate()Validates the instance.withAutoPauseDelay(Integer autoPauseDelay) Set the autoPauseDelay property: Time in minutes after which database is automatically paused.withCatalogCollation(CatalogCollationType catalogCollation) Set the catalogCollation property: Collation of the metadata catalog.withCollation(String collation) Set the collation property: The collation of the database.withCreateMode(CreateMode createMode) Set the createMode property: Specifies the mode of database creation.withElasticPoolId(String elasticPoolId) Set the elasticPoolId property: The resource identifier of the elastic pool containing this database.withFederatedClientId(UUID federatedClientId) Set the federatedClientId property: The Client id used for cross tenant per database CMK scenario.withHighAvailabilityReplicaCount(Integer highAvailabilityReplicaCount) Set the highAvailabilityReplicaCount property: The number of secondary replicas associated with the database that are used to provide high availability.withIdentity(DatabaseIdentity identity) Set the identity property: The Azure Active Directory identity of the database.withIsLedgerOn(Boolean isLedgerOn) Set the isLedgerOn property: Whether or not this database is a ledger database, which means all tables in the database are ledger tables.withLicenseType(DatabaseLicenseType licenseType) Set the licenseType property: The license type to apply for this database.withLocation(String location) withLongTermRetentionBackupResourceId(String longTermRetentionBackupResourceId) Set the longTermRetentionBackupResourceId property: The resource identifier of the long term retention backup associated with create operation of this database.withMaintenanceConfigurationId(String maintenanceConfigurationId) Set the maintenanceConfigurationId property: Maintenance configuration id assigned to the database.withMaxSizeBytes(Long maxSizeBytes) Set the maxSizeBytes property: The max size of the database expressed in bytes.withMinCapacity(Double minCapacity) Set the minCapacity property: Minimal capacity that database will always have allocated, if not paused.withReadScale(DatabaseReadScale readScale) Set the readScale property: The state of read-only routing.withRecoverableDatabaseId(String recoverableDatabaseId) Set the recoverableDatabaseId property: The resource identifier of the recoverable database associated with create operation of this database.withRecoveryServicesRecoveryPointId(String recoveryServicesRecoveryPointId) Set the recoveryServicesRecoveryPointId property: The resource identifier of the recovery point associated with create operation of this database.withRequestedBackupStorageRedundancy(BackupStorageRedundancy requestedBackupStorageRedundancy) Set the requestedBackupStorageRedundancy property: The storage account type to be used to store backups for this database.withRestorableDroppedDatabaseId(String restorableDroppedDatabaseId) Set the restorableDroppedDatabaseId property: The resource identifier of the restorable dropped database associated with create operation of this database.withRestorePointInTime(OffsetDateTime restorePointInTime) Set the restorePointInTime property: Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.withSampleName(SampleName sampleName) Set the sampleName property: The name of the sample schema to apply when creating this database.withSecondaryType(SecondaryType secondaryType) Set the secondaryType property: The secondary type of the database if it is a secondary.Set the sku property: The database SKU.withSourceDatabaseDeletionDate(OffsetDateTime sourceDatabaseDeletionDate) Set the sourceDatabaseDeletionDate property: Specifies the time that the database was deleted.withSourceDatabaseId(String sourceDatabaseId) Set the sourceDatabaseId property: The resource identifier of the source database associated with create operation of this database.withSourceResourceId(String sourceResourceId) Set the sourceResourceId property: The resource identifier of the source associated with the create operation of this database.withZoneRedundant(Boolean zoneRedundant) Set the zoneRedundant property: Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.Get the zoneRedundant property: Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.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
-
DatabaseInner
public DatabaseInner()Creates an instance of DatabaseInner class.
-
-
Method Details
-
sku
Get the sku property: The database SKU. The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands: ```azurecli az sql db list-editions -l <location> -o table ```` ```powershell Get-AzSqlServerServiceObjective -Location <location> ````.- Returns:
- the sku value.
-
withSku
Set the sku property: The database SKU. The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands: ```azurecli az sql db list-editions -l <location> -o table ```` ```powershell Get-AzSqlServerServiceObjective -Location <location> ````.- Parameters:
sku- the sku value to set.- Returns:
- the DatabaseInner object itself.
-
kind
Get the kind property: Kind of database. This is metadata used for the Azure portal experience.- Returns:
- the kind value.
-
managedBy
Get the managedBy property: Resource that manages the database.- Returns:
- the managedBy value.
-
identity
Get the identity property: The Azure Active Directory identity of the database.- Returns:
- the identity value.
-
withIdentity
Set the identity property: The Azure Active Directory identity of the database.- Parameters:
identity- the identity value to set.- Returns:
- the DatabaseInner object itself.
-
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
-
createMode
Get the createMode property: Specifies the mode of database creation. Default: regular database creation. Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID of the source database. Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified as the resource ID of the existing primary database. PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. sourceDatabaseId must be specified as the resource ID of the existing database, and restorePointInTime must be specified. Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the recoverable database resource ID to restore. Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime may also be specified to restore from an earlier point in time. RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID. Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition.- Returns:
- the createMode value.
-
withCreateMode
Set the createMode property: Specifies the mode of database creation. Default: regular database creation. Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID of the source database. Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified as the resource ID of the existing primary database. PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. sourceDatabaseId must be specified as the resource ID of the existing database, and restorePointInTime must be specified. Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the recoverable database resource ID to restore. Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime may also be specified to restore from an earlier point in time. RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID. Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition.- Parameters:
createMode- the createMode value to set.- Returns:
- the DatabaseInner object itself.
-
collation
Get the collation property: The collation of the database.- Returns:
- the collation value.
-
withCollation
Set the collation property: The collation of the database.- Parameters:
collation- the collation value to set.- Returns:
- the DatabaseInner object itself.
-
maxSizeBytes
Get the maxSizeBytes property: The max size of the database expressed in bytes.- Returns:
- the maxSizeBytes value.
-
withMaxSizeBytes
Set the maxSizeBytes property: The max size of the database expressed in bytes.- Parameters:
maxSizeBytes- the maxSizeBytes value to set.- Returns:
- the DatabaseInner object itself.
-
sampleName
Get the sampleName property: The name of the sample schema to apply when creating this database.- Returns:
- the sampleName value.
-
withSampleName
Set the sampleName property: The name of the sample schema to apply when creating this database.- Parameters:
sampleName- the sampleName value to set.- Returns:
- the DatabaseInner object itself.
-
elasticPoolId
Get the elasticPoolId property: The resource identifier of the elastic pool containing this database.- Returns:
- the elasticPoolId value.
-
withElasticPoolId
Set the elasticPoolId property: The resource identifier of the elastic pool containing this database.- Parameters:
elasticPoolId- the elasticPoolId value to set.- Returns:
- the DatabaseInner 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 DatabaseInner object itself.
-
status
Get the status property: The status of the database.- Returns:
- the status value.
-
databaseId
Get the databaseId property: The ID of the database.- Returns:
- the databaseId value.
-
creationDate
Get the creationDate property: The creation date of the database (ISO8601 format).- Returns:
- the creationDate value.
-
currentServiceObjectiveName
Get the currentServiceObjectiveName property: The current service level objective name of the database.- Returns:
- the currentServiceObjectiveName value.
-
requestedServiceObjectiveName
Get the requestedServiceObjectiveName property: The requested service level objective name of the database.- Returns:
- the requestedServiceObjectiveName value.
-
defaultSecondaryLocation
Get the defaultSecondaryLocation property: The default secondary region for this database.- Returns:
- the defaultSecondaryLocation value.
-
failoverGroupId
Get the failoverGroupId property: Failover Group resource identifier that this database belongs to.- Returns:
- the failoverGroupId value.
-
restorePointInTime
Get the restorePointInTime property: 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: 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 DatabaseInner object itself.
-
sourceDatabaseDeletionDate
Get the sourceDatabaseDeletionDate property: Specifies the time that the database was deleted.- Returns:
- the sourceDatabaseDeletionDate value.
-
withSourceDatabaseDeletionDate
Set the sourceDatabaseDeletionDate property: Specifies the time that the database was deleted.- Parameters:
sourceDatabaseDeletionDate- the sourceDatabaseDeletionDate value to set.- Returns:
- the DatabaseInner object itself.
-
recoveryServicesRecoveryPointId
Get the recoveryServicesRecoveryPointId property: The resource identifier of the recovery point associated with create operation of this database.- Returns:
- the recoveryServicesRecoveryPointId value.
-
withRecoveryServicesRecoveryPointId
Set the recoveryServicesRecoveryPointId property: The resource identifier of the recovery point associated with create operation of this database.- Parameters:
recoveryServicesRecoveryPointId- the recoveryServicesRecoveryPointId value to set.- Returns:
- the DatabaseInner object itself.
-
longTermRetentionBackupResourceId
Get the longTermRetentionBackupResourceId property: The resource identifier of the long term retention backup associated with create operation of this database.- Returns:
- the longTermRetentionBackupResourceId value.
-
withLongTermRetentionBackupResourceId
public DatabaseInner withLongTermRetentionBackupResourceId(String longTermRetentionBackupResourceId) Set the longTermRetentionBackupResourceId property: The resource identifier of the long term retention backup associated with create operation of this database.- Parameters:
longTermRetentionBackupResourceId- the longTermRetentionBackupResourceId value to set.- Returns:
- the DatabaseInner object itself.
-
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 DatabaseInner object itself.
-
restorableDroppedDatabaseId
Get the restorableDroppedDatabaseId property: The resource identifier of the restorable dropped database associated with create operation of this database.- Returns:
- the restorableDroppedDatabaseId value.
-
withRestorableDroppedDatabaseId
Set the restorableDroppedDatabaseId property: The resource identifier of the restorable dropped database associated with create operation of this database.- Parameters:
restorableDroppedDatabaseId- the restorableDroppedDatabaseId value to set.- Returns:
- the DatabaseInner object itself.
-
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 DatabaseInner object itself.
-
zoneRedundant
Get the zoneRedundant property: Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.- Returns:
- the zoneRedundant value.
-
withZoneRedundant
Set the zoneRedundant property: Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.- Parameters:
zoneRedundant- the zoneRedundant value to set.- Returns:
- the DatabaseInner object itself.
-
licenseType
Get the licenseType property: The license type to apply for this database. `LicenseIncluded` if you need a license, or `BasePrice` if you have a license and are eligible for the Azure Hybrid Benefit.- Returns:
- the licenseType value.
-
withLicenseType
Set the licenseType property: The license type to apply for this database. `LicenseIncluded` if you need a license, or `BasePrice` if you have a license and are eligible for the Azure Hybrid Benefit.- Parameters:
licenseType- the licenseType value to set.- Returns:
- the DatabaseInner object itself.
-
maxLogSizeBytes
Get the maxLogSizeBytes property: The max log size for this database.- Returns:
- the maxLogSizeBytes value.
-
earliestRestoreDate
Get the earliestRestoreDate property: This records the earliest start date and time that restore is available for this database (ISO8601 format).- Returns:
- the earliestRestoreDate value.
-
readScale
Get the readScale property: The state of read-only routing. If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica in the same region. Not applicable to a Hyperscale database within an elastic pool.- Returns:
- the readScale value.
-
withReadScale
Set the readScale property: The state of read-only routing. If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica in the same region. Not applicable to a Hyperscale database within an elastic pool.- Parameters:
readScale- the readScale value to set.- Returns:
- the DatabaseInner object itself.
-
highAvailabilityReplicaCount
Get the highAvailabilityReplicaCount property: The number of secondary replicas associated with the database that are used to provide high availability. Not applicable to a Hyperscale database within an elastic pool.- Returns:
- the highAvailabilityReplicaCount value.
-
withHighAvailabilityReplicaCount
Set the highAvailabilityReplicaCount property: The number of secondary replicas associated with the database that are used to provide high availability. Not applicable to a Hyperscale database within an elastic pool.- Parameters:
highAvailabilityReplicaCount- the highAvailabilityReplicaCount value to set.- Returns:
- the DatabaseInner object itself.
-
secondaryType
Get the secondaryType property: The secondary type of the database if it is a secondary. Valid values are Geo and Named.- Returns:
- the secondaryType value.
-
withSecondaryType
Set the secondaryType property: The secondary type of the database if it is a secondary. Valid values are Geo and Named.- Parameters:
secondaryType- the secondaryType value to set.- Returns:
- the DatabaseInner object itself.
-
currentSku
Get the currentSku property: The name and tier of the SKU.- Returns:
- the currentSku value.
-
autoPauseDelay
Get the autoPauseDelay property: Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled.- Returns:
- the autoPauseDelay value.
-
withAutoPauseDelay
Set the autoPauseDelay property: Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled.- Parameters:
autoPauseDelay- the autoPauseDelay value to set.- Returns:
- the DatabaseInner object itself.
-
currentBackupStorageRedundancy
Get the currentBackupStorageRedundancy property: The storage account type used to store backups for this database.- Returns:
- the currentBackupStorageRedundancy value.
-
requestedBackupStorageRedundancy
Get the requestedBackupStorageRedundancy property: The storage account type to be used to store backups for this database.- Returns:
- the requestedBackupStorageRedundancy value.
-
withRequestedBackupStorageRedundancy
public DatabaseInner withRequestedBackupStorageRedundancy(BackupStorageRedundancy requestedBackupStorageRedundancy) Set the requestedBackupStorageRedundancy property: The storage account type to be used to store backups for this database.- Parameters:
requestedBackupStorageRedundancy- the requestedBackupStorageRedundancy value to set.- Returns:
- the DatabaseInner object itself.
-
minCapacity
Get the minCapacity property: Minimal capacity that database will always have allocated, if not paused.- Returns:
- the minCapacity value.
-
withMinCapacity
Set the minCapacity property: Minimal capacity that database will always have allocated, if not paused.- Parameters:
minCapacity- the minCapacity value to set.- Returns:
- the DatabaseInner object itself.
-
pausedDate
Get the pausedDate property: The date when database was paused by user configuration or action(ISO8601 format). Null if the database is ready.- Returns:
- the pausedDate value.
-
resumedDate
Get the resumedDate property: The date when database was resumed by user action or database login (ISO8601 format). Null if the database is paused.- Returns:
- the resumedDate value.
-
maintenanceConfigurationId
Get the maintenanceConfigurationId property: Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates will occur.- Returns:
- the maintenanceConfigurationId value.
-
withMaintenanceConfigurationId
Set the maintenanceConfigurationId property: Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates will occur.- Parameters:
maintenanceConfigurationId- the maintenanceConfigurationId value to set.- Returns:
- the DatabaseInner object itself.
-
isLedgerOn
Get the isLedgerOn property: Whether or not this database is a ledger database, which means all tables in the database are ledger tables. Note: the value of this property cannot be changed after the database has been created.- Returns:
- the isLedgerOn value.
-
withIsLedgerOn
Set the isLedgerOn property: Whether or not this database is a ledger database, which means all tables in the database are ledger tables. Note: the value of this property cannot be changed after the database has been created.- Parameters:
isLedgerOn- the isLedgerOn value to set.- Returns:
- the DatabaseInner object itself.
-
isInfraEncryptionEnabled
Get the isInfraEncryptionEnabled property: Infra encryption is enabled for this database.- Returns:
- the isInfraEncryptionEnabled value.
-
federatedClientId
Get the federatedClientId property: The Client id used for cross tenant per database CMK scenario.- Returns:
- the federatedClientId value.
-
withFederatedClientId
Set the federatedClientId property: The Client id used for cross tenant per database CMK scenario.- Parameters:
federatedClientId- the federatedClientId value to set.- Returns:
- the DatabaseInner object itself.
-
sourceResourceId
Get the sourceResourceId property: The resource identifier of the source associated with the create operation of this database. This property is only supported for DataWarehouse edition and allows to restore across subscriptions. When sourceResourceId is specified, sourceDatabaseId, recoverableDatabaseId, restorableDroppedDatabaseId and sourceDatabaseDeletionDate must not be specified and CreateMode must be PointInTimeRestore, Restore or Recover. When createMode is PointInTimeRestore, sourceResourceId must be the resource ID of the existing database or existing sql pool, and restorePointInTime must be specified. When createMode is Restore, sourceResourceId must be the resource ID of restorable dropped database or restorable dropped sql pool. When createMode is Recover, sourceResourceId must be the resource ID of recoverable database or recoverable sql pool. When source subscription belongs to a different tenant than target subscription, “x-ms-authorization-auxiliary” header must contain authentication token for the source tenant. For more details about “x-ms-authorization-auxiliary” header see https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant.- Returns:
- the sourceResourceId value.
-
withSourceResourceId
Set the sourceResourceId property: The resource identifier of the source associated with the create operation of this database. This property is only supported for DataWarehouse edition and allows to restore across subscriptions. When sourceResourceId is specified, sourceDatabaseId, recoverableDatabaseId, restorableDroppedDatabaseId and sourceDatabaseDeletionDate must not be specified and CreateMode must be PointInTimeRestore, Restore or Recover. When createMode is PointInTimeRestore, sourceResourceId must be the resource ID of the existing database or existing sql pool, and restorePointInTime must be specified. When createMode is Restore, sourceResourceId must be the resource ID of restorable dropped database or restorable dropped sql pool. When createMode is Recover, sourceResourceId must be the resource ID of recoverable database or recoverable sql pool. When source subscription belongs to a different tenant than target subscription, “x-ms-authorization-auxiliary” header must contain authentication token for the source tenant. For more details about “x-ms-authorization-auxiliary” header see https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant.- Parameters:
sourceResourceId- the sourceResourceId value to set.- Returns:
- the DatabaseInner 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
Reads an instance of DatabaseInner from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of DatabaseInner 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 DatabaseInner.
-