DatabaseInner Class
- java.
lang. Object - com.
azure. core. management. ProxyResource - com.
azure. core. management. Resource - com.
azure. resourcemanager. sql. fluent. models. DatabaseInner
- com.
- com.
- com.
public final class DatabaseInner
extends Resource
A database resource.
Constructor Summary
Constructor | Description |
---|---|
DatabaseInner() |
Creates an instance of Database |
Method Summary
Modifier and Type | Method and Description |
---|---|
Integer |
autoPauseDelay()
Get the auto |
Catalog |
catalogCollation()
Get the catalog |
String |
collation()
Get the collation property: The collation of the database. |
Create |
createMode()
Get the create |
Offset |
creationDate()
Get the creation |
Backup |
currentBackupStorageRedundancy()
Get the current |
String |
currentServiceObjectiveName()
Get the current |
Sku |
currentSku()
Get the current |
UUID |
databaseId()
Get the database |
String |
defaultSecondaryLocation()
Get the default |
Offset |
earliestRestoreDate()
Get the earliest |
String |
elasticPoolId()
Get the elastic |
String |
failoverGroupId()
Get the failover |
UUID |
federatedClientId()
Get the federated |
static
Database |
fromJson(JsonReader jsonReader)
Reads an instance of Database |
Integer |
highAvailabilityReplicaCount()
Get the high |
String |
id()
Get the id property: Fully qualified resource Id for the resource. |
Database |
identity()
Get the identity property: The Azure Active Directory identity of the database. |
Boolean |
isInfraEncryptionEnabled()
Get the is |
Boolean |
isLedgerOn()
Get the is |
String |
kind()
Get the kind property: Kind of database. |
Database |
licenseType()
Get the license |
String |
longTermRetentionBackupResourceId()
Get the long |
String |
maintenanceConfigurationId()
Get the maintenance |
String |
managedBy()
Get the managed |
Long |
maxLogSizeBytes()
Get the max |
Long |
maxSizeBytes()
Get the max |
Double |
minCapacity()
Get the min |
String |
name()
Get the name property: The name of the resource. |
Offset |
pausedDate()
Get the paused |
Database |
readScale()
Get the read |
String |
recoverableDatabaseId()
Get the recoverable |
String |
recoveryServicesRecoveryPointId()
Get the recovery |
Backup |
requestedBackupStorageRedundancy()
Get the requested |
String |
requestedServiceObjectiveName()
Get the requested |
String |
restorableDroppedDatabaseId()
Get the restorable |
Offset |
restorePointInTime()
Get the restore |
Offset |
resumedDate()
Get the resumed |
Sample |
sampleName()
Get the sample |
Secondary |
secondaryType()
Get the secondary |
Sku |
sku()
Get the sku property: The database SKU. |
Offset |
sourceDatabaseDeletionDate()
Get the source |
String |
sourceDatabaseId()
Get the source |
String |
sourceResourceId()
Get the source |
Database |
status()
Get the status property: The status of the database. |
Json |
toJson(JsonWriter jsonWriter) |
String |
type()
Get the type property: The type of the resource. |
void |
validate()
Validates the instance. |
Database |
withAutoPauseDelay(Integer autoPauseDelay)
Set the auto |
Database |
withCatalogCollation(CatalogCollationType catalogCollation)
Set the catalog |
Database |
withCollation(String collation)
Set the collation property: The collation of the database. |
Database |
withCreateMode(CreateMode createMode)
Set the create |
Database |
withElasticPoolId(String elasticPoolId)
Set the elastic |
Database |
withFederatedClientId(UUID federatedClientId)
Set the federated |
Database |
withHighAvailabilityReplicaCount(Integer highAvailabilityReplicaCount)
Set the high |
Database |
withIdentity(DatabaseIdentity identity)
Set the identity property: The Azure Active Directory identity of the database. |
Database |
withIsLedgerOn(Boolean isLedgerOn)
Set the is |
Database |
withLicenseType(DatabaseLicenseType licenseType)
Set the license |
Database |
withLocation(String location) |
Database |
withLongTermRetentionBackupResourceId(String longTermRetentionBackupResourceId)
Set the long |
Database |
withMaintenanceConfigurationId(String maintenanceConfigurationId)
Set the maintenance |
Database |
withMaxSizeBytes(Long maxSizeBytes)
Set the max |
Database |
withMinCapacity(Double minCapacity)
Set the min |
Database |
withReadScale(DatabaseReadScale readScale)
Set the read |
Database |
withRecoverableDatabaseId(String recoverableDatabaseId)
Set the recoverable |
Database |
withRecoveryServicesRecoveryPointId(String recoveryServicesRecoveryPointId)
Set the recovery |
Database |
withRequestedBackupStorageRedundancy(BackupStorageRedundancy requestedBackupStorageRedundancy)
Set the requested |
Database |
withRestorableDroppedDatabaseId(String restorableDroppedDatabaseId)
Set the restorable |
Database |
withRestorePointInTime(OffsetDateTime restorePointInTime)
Set the restore |
Database |
withSampleName(SampleName sampleName)
Set the sample |
Database |
withSecondaryType(SecondaryType secondaryType)
Set the secondary |
Database |
withSku(Sku sku)
Set the sku property: The database SKU. |
Database |
withSourceDatabaseDeletionDate(OffsetDateTime sourceDatabaseDeletionDate)
Set the source |
Database |
withSourceDatabaseId(String sourceDatabaseId)
Set the source |
Database |
withSourceResourceId(String sourceResourceId)
Set the source |
Database |
withTags(Map<String,String> tags) |
Database |
withZoneRedundant(Boolean zoneRedundant)
Set the zone |
Boolean |
zoneRedundant()
Get the zone |
Methods inherited from ProxyResource
Methods inherited from Resource
Methods inherited from java.lang.Object
Constructor Details
DatabaseInner
public DatabaseInner()
Creates an instance of DatabaseInner class.
Method Details
autoPauseDelay
public Integer 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:
catalogCollation
public CatalogCollationType catalogCollation()
Get the catalogCollation property: Collation of the metadata catalog.
Returns:
collation
public String collation()
Get the collation property: The collation of the database.
Returns:
createMode
public CreateMode 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:
creationDate
public OffsetDateTime creationDate()
Get the creationDate property: The creation date of the database (ISO8601 format).
Returns:
currentBackupStorageRedundancy
public BackupStorageRedundancy currentBackupStorageRedundancy()
Get the currentBackupStorageRedundancy property: The storage account type used to store backups for this database.
Returns:
currentServiceObjectiveName
public String currentServiceObjectiveName()
Get the currentServiceObjectiveName property: The current service level objective name of the database.
Returns:
currentSku
public Sku currentSku()
Get the currentSku property: The name and tier of the SKU.
Returns:
databaseId
public UUID databaseId()
Get the databaseId property: The ID of the database.
Returns:
defaultSecondaryLocation
public String defaultSecondaryLocation()
Get the defaultSecondaryLocation property: The default secondary region for this database.
Returns:
earliestRestoreDate
public OffsetDateTime earliestRestoreDate()
Get the earliestRestoreDate property: This records the earliest start date and time that restore is available for this database (ISO8601 format).
Returns:
elasticPoolId
public String elasticPoolId()
Get the elasticPoolId property: The resource identifier of the elastic pool containing this database.
Returns:
failoverGroupId
public String failoverGroupId()
Get the failoverGroupId property: Failover Group resource identifier that this database belongs to.
Returns:
federatedClientId
public UUID federatedClientId()
Get the federatedClientId property: The Client id used for cross tenant per database CMK scenario.
Returns:
fromJson
public static DatabaseInner fromJson(JsonReader jsonReader)
Reads an instance of DatabaseInner from the JsonReader.
Parameters:
Returns:
Throws:
highAvailabilityReplicaCount
public Integer 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:
id
public String id()
Get the id property: Fully qualified resource Id for the resource.
Overrides:
DatabaseInner.id()Returns:
identity
public DatabaseIdentity identity()
Get the identity property: The Azure Active Directory identity of the database.
Returns:
isInfraEncryptionEnabled
public Boolean isInfraEncryptionEnabled()
Get the isInfraEncryptionEnabled property: Infra encryption is enabled for this database.
Returns:
isLedgerOn
public Boolean 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:
kind
public String kind()
Get the kind property: Kind of database. This is metadata used for the Azure portal experience.
Returns:
licenseType
public DatabaseLicenseType 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:
longTermRetentionBackupResourceId
public String longTermRetentionBackupResourceId()
Get the longTermRetentionBackupResourceId property: The resource identifier of the long term retention backup associated with create operation of this database.
Returns:
maintenanceConfigurationId
public String maintenanceConfigurationId()
Get the maintenanceConfigurationId property: Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates will occur.
Returns:
managedBy
public String managedBy()
Get the managedBy property: Resource that manages the database.
Returns:
maxLogSizeBytes
public Long maxLogSizeBytes()
Get the maxLogSizeBytes property: The max log size for this database.
Returns:
maxSizeBytes
public Long maxSizeBytes()
Get the maxSizeBytes property: The max size of the database expressed in bytes.
Returns:
minCapacity
public Double minCapacity()
Get the minCapacity property: Minimal capacity that database will always have allocated, if not paused.
Returns:
name
public String name()
Get the name property: The name of the resource.
Overrides:
DatabaseInner.name()Returns:
pausedDate
public OffsetDateTime 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:
readScale
public DatabaseReadScale 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:
recoverableDatabaseId
public String recoverableDatabaseId()
Get the recoverableDatabaseId property: The resource identifier of the recoverable database associated with create operation of this database.
Returns:
recoveryServicesRecoveryPointId
public String recoveryServicesRecoveryPointId()
Get the recoveryServicesRecoveryPointId property: The resource identifier of the recovery point associated with create operation of this database.
Returns:
requestedBackupStorageRedundancy
public BackupStorageRedundancy requestedBackupStorageRedundancy()
Get the requestedBackupStorageRedundancy property: The storage account type to be used to store backups for this database.
Returns:
requestedServiceObjectiveName
public String requestedServiceObjectiveName()
Get the requestedServiceObjectiveName property: The requested service level objective name of the database.
Returns:
restorableDroppedDatabaseId
public String restorableDroppedDatabaseId()
Get the restorableDroppedDatabaseId property: The resource identifier of the restorable dropped database associated with create operation of this database.
Returns:
restorePointInTime
public OffsetDateTime 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:
resumedDate
public OffsetDateTime 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:
sampleName
public SampleName sampleName()
Get the sampleName property: The name of the sample schema to apply when creating this database.
Returns:
secondaryType
public SecondaryType secondaryType()
Get the secondaryType property: The secondary type of the database if it is a secondary. Valid values are Geo and Named.
Returns:
sku
public Sku 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 -o table ```` ```powershell Get-AzSqlServerServiceObjective -Location ````.
Returns:
sourceDatabaseDeletionDate
public OffsetDateTime sourceDatabaseDeletionDate()
Get the sourceDatabaseDeletionDate property: Specifies the time that the database was deleted.
Returns:
sourceDatabaseId
public String sourceDatabaseId()
Get the sourceDatabaseId property: The resource identifier of the source database associated with create operation of this database.
Returns:
sourceResourceId
public String 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, \u201cx-ms-authorization-auxiliary\u201d header must contain authentication token for the source tenant. For more details about \u201cx-ms-authorization-auxiliary\u201d header see https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant.
Returns:
status
public DatabaseStatus status()
Get the status property: The status of the database.
Returns:
toJson
public JsonWriter toJson(JsonWriter jsonWriter)
Overrides:
DatabaseInner.toJson(JsonWriter jsonWriter)Parameters:
Throws:
type
public String type()
Get the type property: The type of the resource.
Overrides:
DatabaseInner.type()Returns:
validate
public void validate()
Validates the instance.
withAutoPauseDelay
public DatabaseInner withAutoPauseDelay(Integer autoPauseDelay)
Set the autoPauseDelay property: Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled.
Parameters:
Returns:
withCatalogCollation
public DatabaseInner withCatalogCollation(CatalogCollationType catalogCollation)
Set the catalogCollation property: Collation of the metadata catalog.
Parameters:
Returns:
withCollation
public DatabaseInner withCollation(String collation)
Set the collation property: The collation of the database.
Parameters:
Returns:
withCreateMode
public DatabaseInner withCreateMode(CreateMode createMode)
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:
Returns:
withElasticPoolId
public DatabaseInner withElasticPoolId(String elasticPoolId)
Set the elasticPoolId property: The resource identifier of the elastic pool containing this database.
Parameters:
Returns:
withFederatedClientId
public DatabaseInner withFederatedClientId(UUID federatedClientId)
Set the federatedClientId property: The Client id used for cross tenant per database CMK scenario.
Parameters:
Returns:
withHighAvailabilityReplicaCount
public DatabaseInner withHighAvailabilityReplicaCount(Integer highAvailabilityReplicaCount)
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:
Returns:
withIdentity
public DatabaseInner withIdentity(DatabaseIdentity identity)
Set the identity property: The Azure Active Directory identity of the database.
Parameters:
Returns:
withIsLedgerOn
public DatabaseInner 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. Note: the value of this property cannot be changed after the database has been created.
Parameters:
Returns:
withLicenseType
public DatabaseInner withLicenseType(DatabaseLicenseType licenseType)
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:
Returns:
withLocation
public DatabaseInner withLocation(String location)
Overrides:
DatabaseInner.withLocation(String location)Parameters:
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:
Returns:
withMaintenanceConfigurationId
public DatabaseInner withMaintenanceConfigurationId(String maintenanceConfigurationId)
Set the maintenanceConfigurationId property: Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates will occur.
Parameters:
Returns:
withMaxSizeBytes
public DatabaseInner withMaxSizeBytes(Long maxSizeBytes)
Set the maxSizeBytes property: The max size of the database expressed in bytes.
Parameters:
Returns:
withMinCapacity
public DatabaseInner withMinCapacity(Double minCapacity)
Set the minCapacity property: Minimal capacity that database will always have allocated, if not paused.
Parameters:
Returns:
withReadScale
public DatabaseInner withReadScale(DatabaseReadScale readScale)
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:
Returns:
withRecoverableDatabaseId
public DatabaseInner withRecoverableDatabaseId(String recoverableDatabaseId)
Set the recoverableDatabaseId property: The resource identifier of the recoverable database associated with create operation of this database.
Parameters:
Returns:
withRecoveryServicesRecoveryPointId
public DatabaseInner withRecoveryServicesRecoveryPointId(String recoveryServicesRecoveryPointId)
Set the recoveryServicesRecoveryPointId property: The resource identifier of the recovery point associated with create operation of this database.
Parameters:
Returns:
withRequestedBackupStorageRedundancy
public DatabaseInner withRequestedBackupStorageRedundancy(BackupStorageRedundancy requestedBackupStorageRedundancy)
Set the requestedBackupStorageRedundancy property: The storage account type to be used to store backups for this database.
Parameters:
Returns:
withRestorableDroppedDatabaseId
public DatabaseInner withRestorableDroppedDatabaseId(String restorableDroppedDatabaseId)
Set the restorableDroppedDatabaseId property: The resource identifier of the restorable dropped database associated with create operation of this database.
Parameters:
Returns:
withRestorePointInTime
public DatabaseInner 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.
Parameters:
Returns:
withSampleName
public DatabaseInner withSampleName(SampleName sampleName)
Set the sampleName property: The name of the sample schema to apply when creating this database.
Parameters:
Returns:
withSecondaryType
public DatabaseInner withSecondaryType(SecondaryType secondaryType)
Set the secondaryType property: The secondary type of the database if it is a secondary. Valid values are Geo and Named.
Parameters:
Returns:
withSku
public DatabaseInner withSku(Sku sku)
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 -o table ```` ```powershell Get-AzSqlServerServiceObjective -Location ````.
Parameters:
Returns:
withSourceDatabaseDeletionDate
public DatabaseInner withSourceDatabaseDeletionDate(OffsetDateTime sourceDatabaseDeletionDate)
Set the sourceDatabaseDeletionDate property: Specifies the time that the database was deleted.
Parameters:
Returns:
withSourceDatabaseId
public DatabaseInner withSourceDatabaseId(String sourceDatabaseId)
Set the sourceDatabaseId property: The resource identifier of the source database associated with create operation of this database.
Parameters:
Returns:
withSourceResourceId
public DatabaseInner withSourceResourceId(String sourceResourceId)
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, \u201cx-ms-authorization-auxiliary\u201d header must contain authentication token for the source tenant. For more details about \u201cx-ms-authorization-auxiliary\u201d header see https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant.
Parameters:
Returns:
withTags
public DatabaseInner withTags(Map
Overrides:
DatabaseInner.withTags(Map<String,String> tags)Parameters:
withZoneRedundant
public DatabaseInner 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.
Parameters:
Returns:
zoneRedundant
public Boolean 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:
Applies to
Azure SDK for Java