SqlDatabase Interface
Implements
public interface SqlDatabase
extends ExternalChildResource<SqlDatabase,SqlServer>, HasInnerModel<DatabaseInner>, HasResourceGroup, Refreshable<SqlDatabase>, Updatable<Update>
An immutable client-side representation of an Azure SQL Server Database.
Method Summary
Modifier and Type | Method and Description |
---|---|
abstract
Sql |
asWarehouse()
Gets Sql |
abstract String |
collation()
Gets the collation of the Azure SQL Database. |
abstract
Offset |
creationDate()
Gets the creation date of the Azure SQL Database. |
abstract String |
currentServiceObjectiveName()
Gets the current Service Level Objective Name of the Azure SQL Database. |
abstract String |
databaseId()
Gets the ID of the Azure SQL Database. |
abstract String |
defaultSecondaryLocation()
Gets the default secondary location. |
abstract Blank |
defineThreatDetectionPolicy(SecurityAlertPolicyName policyName)
Begins a definition for a security alert policy. |
abstract Blank |
defineThreatDetectionPolicy(String policyName)
Deprecated Begins a definition for a security alert policy. |
abstract void |
delete()
Deletes the database from the server. |
abstract Mono<Void> |
deleteAsync()
Deletes the database asynchronously. |
abstract
Offset |
earliestRestoreDate()
Gets the recovery period start date of the Azure SQL Database. |
abstract
Database |
edition()
Gets the edition of the Azure SQL Database. |
abstract String |
elasticPoolId()
Gets ID of the elastic pool. |
abstract String |
elasticPoolName()
Gets name of the elastic pool. |
abstract
With |
exportTo(Creatable<StorageAccount> storageAccountCreatable, String containerName, String fileName)
Exports the current database to a new storage account and relative path. |
abstract
With |
exportTo(StorageAccount storageAccount, String containerName, String fileName)
Exports the current database to an existing storage account and relative path. |
abstract
With |
exportTo(String storageUri)
Exports the current database to a specified URI path. |
abstract
Sql |
getDatabaseAutomaticTuning()
Gets a SQL database automatic tuning state and options. |
abstract
Sql |
getThreatDetectionPolicy()
Gets a SQL database threat detection policy. |
abstract
Transparent |
getTransparentDataEncryption()
Gets an Azure SQL Database Transparent Data Encryption for this database. |
abstract
Mono<Transparent |
getTransparentDataEncryptionAsync()
Gets an Azure SQL Database Transparent Data Encryption for this database. |
abstract
With |
importBacpac(StorageAccount storageAccount, String containerName, String fileName)
Imports into the current database from an existing storage account and relative path; the current database must be empty. |
abstract
With |
importBacpac(String storageUri)
Imports into the current database from a specified URI path; the current database must be empty. |
abstract boolean |
isDataWarehouse()
Checks whether this Database is Sql |
abstract
Map<String,Replication |
listReplicationLinks()
Gets all the replication links associated with this database. |
abstract
Paged |
listReplicationLinksAsync()
Gets a representation of the deferred computation of all the replication links associated with this database. |
abstract
List<Restore |
listRestorePoints()
Gets the list of all restore points on this database. |
abstract
Paged |
listRestorePointsAsync()
Gets the list of all restore points on this database. |
abstract
List<Sql |
listUsageMetrics()
Lists the SQL database usage metrics. |
abstract
Paged |
listUsageMetricsAsync()
Asynchronously lists the SQL database usage metrics. |
abstract long |
maxSizeBytes()
Gets the max size of the Azure SQL Database expressed in bytes. |
abstract String |
parentId()
Gets the parent SQL server ID. |
abstract Region |
region()
Gets the region the resource is in. |
abstract String |
regionName()
Gets the name of the region the resource is in. |
abstract
Sql |
rename(String newDatabaseName)
Renames the database. |
abstract
Mono<Sql |
renameAsync(String newDatabaseName)
Renames the database asynchronously. |
abstract String |
requestedServiceObjectiveName()
Gets the name of the configured Service Level Objective of the Azure SQL Database. |
abstract String |
sqlServerName()
Gets name of the SQL Server to which this database belongs. |
abstract
Database |
status()
Gets the status of the Azure SQL Database. |
abstract
Sql |
syncGroups()
Gets the SQL Sync Group entry point for the current database. |
Method Details
asWarehouse
public abstract SqlWarehouse asWarehouse()
Gets SqlWarehouse instance for more operations.
Returns:
collation
public abstract String collation()
Gets the collation of the Azure SQL Database.
Returns:
creationDate
public abstract OffsetDateTime creationDate()
Gets the creation date of the Azure SQL Database.
Returns:
currentServiceObjectiveName
public abstract String currentServiceObjectiveName()
Gets the current Service Level Objective Name of the Azure SQL Database.
Returns:
databaseId
public abstract String databaseId()
Gets the ID of the Azure SQL Database.
Returns:
defaultSecondaryLocation
public abstract String defaultSecondaryLocation()
Gets the default secondary location.
Returns:
defineThreatDetectionPolicy
public abstract SqlDatabaseThreatDetectionPolicy.DefinitionStages.Blank defineThreatDetectionPolicy(SecurityAlertPolicyName policyName)
Begins a definition for a security alert policy.
Parameters:
Returns:
defineThreatDetectionPolicy
@Deprecated
public abstract SqlDatabaseThreatDetectionPolicy.DefinitionStages.Blank defineThreatDetectionPolicy(String policyName)
Deprecated
Begins a definition for a security alert policy.
Parameters:
Returns:
delete
public abstract void delete()
Deletes the database from the server.
deleteAsync
public abstract Mono
Deletes the database asynchronously.
Returns:
earliestRestoreDate
public abstract OffsetDateTime earliestRestoreDate()
Gets the recovery period start date of the Azure SQL Database.
Returns:
edition
public abstract DatabaseEdition edition()
Gets the edition of the Azure SQL Database.
Returns:
elasticPoolId
public abstract String elasticPoolId()
Gets ID of the elastic pool.
Returns:
elasticPoolName
public abstract String elasticPoolName()
Gets name of the elastic pool.
Returns:
exportTo
public abstract SqlDatabaseExportRequest.DefinitionStages.WithAuthenticationTypeAndLoginPassword exportTo(Creatable
Exports the current database to a new storage account and relative path.
Parameters:
Returns:
exportTo
public abstract SqlDatabaseExportRequest.DefinitionStages.WithAuthenticationTypeAndLoginPassword exportTo(StorageAccount storageAccount, String containerName, String fileName)
Exports the current database to an existing storage account and relative path.
Parameters:
Returns:
exportTo
public abstract SqlDatabaseExportRequest.DefinitionStages.WithStorageTypeAndKey exportTo(String storageUri)
Exports the current database to a specified URI path.
Parameters:
Returns:
getDatabaseAutomaticTuning
public abstract SqlDatabaseAutomaticTuning getDatabaseAutomaticTuning()
Gets a SQL database automatic tuning state and options.
Returns:
getThreatDetectionPolicy
public abstract SqlDatabaseThreatDetectionPolicy getThreatDetectionPolicy()
Gets a SQL database threat detection policy.
Returns:
getTransparentDataEncryption
public abstract TransparentDataEncryption getTransparentDataEncryption()
Gets an Azure SQL Database Transparent Data Encryption for this database.
Returns:
getTransparentDataEncryptionAsync
public abstract Mono
Gets an Azure SQL Database Transparent Data Encryption for this database.
Returns:
importBacpac
public abstract SqlDatabaseImportRequest.DefinitionStages.WithAuthenticationTypeAndLoginPassword importBacpac(StorageAccount storageAccount, String containerName, String fileName)
Imports into the current database from an existing storage account and relative path; the current database must be empty.
Parameters:
Returns:
importBacpac
public abstract SqlDatabaseImportRequest.DefinitionStages.WithStorageTypeAndKey importBacpac(String storageUri)
Imports into the current database from a specified URI path; the current database must be empty.
Parameters:
Returns:
isDataWarehouse
public abstract boolean isDataWarehouse()
Checks whether this Database is SqlWarehouse.
Returns:
listReplicationLinks
public abstract Map
Gets all the replication links associated with this database.
Returns:
listReplicationLinksAsync
public abstract PagedFlux
Gets a representation of the deferred computation of all the replication links associated with this database.
Returns:
listRestorePoints
public abstract List
Gets the list of all restore points on this database.
Returns:
listRestorePointsAsync
public abstract PagedFlux
Gets the list of all restore points on this database.
Returns:
listUsageMetrics
public abstract List
Lists the SQL database usage metrics.
Returns:
listUsageMetricsAsync
public abstract PagedFlux
Asynchronously lists the SQL database usage metrics.
Returns:
maxSizeBytes
public abstract long maxSizeBytes()
Gets the max size of the Azure SQL Database expressed in bytes.
Returns:
parentId
public abstract String parentId()
Gets the parent SQL server ID.
Returns:
region
public abstract Region region()
Gets the region the resource is in.
Returns:
regionName
public abstract String regionName()
Gets the name of the region the resource is in.
Returns:
rename
public abstract SqlDatabase rename(String newDatabaseName)
Renames the database.
Parameters:
Returns:
renameAsync
public abstract Mono
Renames the database asynchronously.
Parameters:
Returns:
requestedServiceObjectiveName
public abstract String requestedServiceObjectiveName()
Gets the name of the configured Service Level Objective of the Azure SQL Database.
Returns:
sqlServerName
public abstract String sqlServerName()
Gets name of the SQL Server to which this database belongs.
Returns:
status
public abstract DatabaseStatus status()
Gets the status of the Azure SQL Database.
Returns:
syncGroups
public abstract SqlSyncGroupOperations.SqlSyncGroupActionsDefinition syncGroups()
Gets the SQL Sync Group entry point for the current database.
Returns: