Interface SqlDatabase
- All Superinterfaces:
ChildResource<SqlServer>, ExternalChildResource<SqlDatabase, SqlServer>, HasInnerModel<DatabaseInner>, HasName, HasParent<SqlServer>, HasResourceGroup, Indexable, Refreshable<SqlDatabase>, Updatable<SqlDatabase.Update>
- All Known Subinterfaces:
SqlWarehouse
public interface SqlDatabase
extends ExternalChildResource<SqlDatabase, SqlServer>, HasInnerModel<DatabaseInner>, HasResourceGroup, Refreshable<SqlDatabase>, Updatable<SqlDatabase.Update>
An immutable client-side representation of an Azure SQL Server Database.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceGrouping of all the SQL Database definition stages.static interfaceContainer interface for all the definitions that need to be implemented.static interfaceThe template for a SqlDatabase update operation, containing all the settings that can be modified.static interfaceGrouping of all the SqlDatabase update stages. -
Method Summary
Modifier and TypeMethodDescriptionGets SqlWarehouse instance for more operations.Gets the collation of the Azure SQL Database.Gets the creation date of the Azure SQL Database.Gets the current Service Level Objective Name of the Azure SQL Database.Gets the ID of the Azure SQL Database.Gets the default secondary location.defineThreatDetectionPolicy(SecurityAlertPolicyName policyName) Begins a definition for a security alert policy.defineThreatDetectionPolicy(String policyName) Deprecated.voiddelete()Deletes the database from the server.Deletes the database asynchronously.Gets the recovery period start date of the Azure SQL Database.edition()Gets the edition of the Azure SQL Database.Gets ID of the elastic pool.Gets name of the elastic pool.exportTo(Creatable<StorageAccount> storageAccountCreatable, String containerName, String fileName) Exports the current database to a new storage account and relative path.exportTo(StorageAccount storageAccount, String containerName, String fileName) Exports the current database to an existing storage account and relative path.Exports the current database to a specified URI path.Gets a SQL database automatic tuning state and options.Gets a SQL database threat detection policy.Gets an Azure SQL Database Transparent Data Encryption for this database.Gets an Azure SQL Database Transparent Data Encryption for this database.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.importBacpac(String storageUri) Imports into the current database from a specified URI path; the current database must be empty.booleanChecks whether this Database is SqlWarehouse.Gets all the replication links associated with this database.com.azure.core.http.rest.PagedFlux<ReplicationLink> Gets a representation of the deferred computation of all the replication links associated with this database.Gets the list of all restore points on this database.com.azure.core.http.rest.PagedFlux<RestorePoint> Gets the list of all restore points on this database.Lists the SQL database usage metrics.com.azure.core.http.rest.PagedFlux<SqlDatabaseUsageMetric> Asynchronously lists the SQL database usage metrics.longGets the max size of the Azure SQL Database expressed in bytes.parentId()Gets the parent SQL server ID.com.azure.core.management.Regionregion()Gets the region the resource is in.Gets the name of the region the resource is in.Renames the database.renameAsync(String newDatabaseName) Renames the database asynchronously.Gets the name of the configured Service Level Objective of the Azure SQL Database.Gets name of the SQL Server to which this database belongs.status()Gets the status of the Azure SQL Database.Gets the SQL Sync Group entry point for the current database.Methods inherited from interface ExternalChildResource
idMethods inherited from interface HasInnerModel
innerModelMethods inherited from interface HasResourceGroup
resourceGroupNameMethods inherited from interface Refreshable
refresh, refreshAsync
-
Method Details
-
sqlServerName
String sqlServerName()Gets name of the SQL Server to which this database belongs.- Returns:
- name of the SQL Server to which this database belongs
-
collation
String collation()Gets the collation of the Azure SQL Database.- Returns:
- the collation of the Azure SQL Database
-
creationDate
OffsetDateTime creationDate()Gets the creation date of the Azure SQL Database.- Returns:
- the creation date of the Azure SQL Database
-
currentServiceObjectiveName
String currentServiceObjectiveName()Gets the current Service Level Objective Name of the Azure SQL Database.- Returns:
- the current Service Level Objective Name of the Azure SQL Database, this is the Name of the Service Level Objective that is currently active
-
databaseId
String databaseId()Gets the ID of the Azure SQL Database.- Returns:
- the ID of the Azure SQL Database
-
earliestRestoreDate
OffsetDateTime earliestRestoreDate()Gets the recovery period start date of the Azure SQL Database.- Returns:
- the recovery period start date of the Azure SQL Database. This records the start date and time when recovery is available for this Azure SQL Database.
-
edition
DatabaseEdition edition()Gets the edition of the Azure SQL Database.- Returns:
- the edition of the Azure SQL Database
-
maxSizeBytes
long maxSizeBytes()Gets the max size of the Azure SQL Database expressed in bytes.- Returns:
- the max size of the Azure SQL Database expressed in bytes.
-
requestedServiceObjectiveName
String requestedServiceObjectiveName()Gets the name of the configured Service Level Objective of the Azure SQL Database.- Returns:
- the name of the configured Service Level Objective of the Azure SQL Database, this is the Service Level Objective that is being applied to the Azure SQL Database
-
status
DatabaseStatus status()Gets the status of the Azure SQL Database.- Returns:
- the status of the Azure SQL Database
-
elasticPoolId
-
elasticPoolName
-
defaultSecondaryLocation
String defaultSecondaryLocation()Gets the default secondary location.- Returns:
- the defaultSecondaryLocation value
-
parentId
-
regionName
String regionName()Gets the name of the region the resource is in.- Returns:
- the name of the region the resource is in
-
region
com.azure.core.management.Region region()Gets the region the resource is in.- Returns:
- the region the resource is in
-
isDataWarehouse
boolean isDataWarehouse()Checks whether this Database is SqlWarehouse.- Returns:
- true if this Database is SqlWarehouse
-
asWarehouse
SqlWarehouse asWarehouse()Gets SqlWarehouse instance for more operations.- Returns:
- SqlWarehouse instance for more operations
-
listRestorePoints
List<RestorePoint> listRestorePoints()Gets the list of all restore points on this database.- Returns:
- the list of all restore points on this database
-
listRestorePointsAsync
com.azure.core.http.rest.PagedFlux<RestorePoint> listRestorePointsAsync()Gets the list of all restore points on this database.- Returns:
- the list of all restore points on this database
-
getTransparentDataEncryption
TransparentDataEncryption getTransparentDataEncryption()Gets an Azure SQL Database Transparent Data Encryption for this database.- Returns:
- an Azure SQL Database Transparent Data Encryption for this database
-
getTransparentDataEncryptionAsync
Mono<TransparentDataEncryption> getTransparentDataEncryptionAsync()Gets an Azure SQL Database Transparent Data Encryption for this database.- Returns:
- a representation of the deferred computation of an Azure SQL Database Transparent Data Encryption for this database
-
listReplicationLinks
Map<String, ReplicationLink> listReplicationLinks()Gets all the replication links associated with this database.- Returns:
- all the replication links associated with this database
-
listReplicationLinksAsync
com.azure.core.http.rest.PagedFlux<ReplicationLink> listReplicationLinksAsync()Gets a representation of the deferred computation of all the replication links associated with this database.- Returns:
- a representation of the deferred computation of all the replication links associated with this database
-
exportTo
Exports the current database to a specified URI path.- Parameters:
storageUri- the storage URI to use- Returns:
- response object
-
exportTo
SqlDatabaseExportRequest.DefinitionStages.WithAuthenticationTypeAndLoginPassword exportTo(StorageAccount storageAccount, String containerName, String fileName) Exports the current database to an existing storage account and relative path.- Parameters:
storageAccount- an existing storage account to be usedcontainerName- the container name within the storage account to usefileName- the exported database file name- Returns:
- response object
-
exportTo
SqlDatabaseExportRequest.DefinitionStages.WithAuthenticationTypeAndLoginPassword exportTo(Creatable<StorageAccount> storageAccountCreatable, String containerName, String fileName) Exports the current database to a new storage account and relative path.- Parameters:
storageAccountCreatable- a storage account to be created as part of this execution flowcontainerName- the container name within the storage account to usefileName- the exported database file name- Returns:
- response object
-
importBacpac
Imports into the current database from a specified URI path; the current database must be empty.- Parameters:
storageUri- the storage URI to use- Returns:
- response object
-
importBacpac
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:
storageAccount- an existing storage account to be usedcontainerName- the container name within the storage account to usefileName- the exported database file name- Returns:
- response object
-
defineThreatDetectionPolicy
@Deprecated SqlDatabaseThreatDetectionPolicy.DefinitionStages.Blank defineThreatDetectionPolicy(String policyName) Deprecated.Begins a definition for a security alert policy.- Parameters:
policyName- the name of the security alert policy- Returns:
- the first stage of the SqlDatabaseThreatDetectionPolicy definition
-
defineThreatDetectionPolicy
SqlDatabaseThreatDetectionPolicy.DefinitionStages.Blank defineThreatDetectionPolicy(SecurityAlertPolicyName policyName) Begins a definition for a security alert policy.- Parameters:
policyName- the name of the security alert policy- Returns:
- the first stage of the SqlDatabaseThreatDetectionPolicy definition
-
getThreatDetectionPolicy
SqlDatabaseThreatDetectionPolicy getThreatDetectionPolicy()Gets a SQL database threat detection policy.- Returns:
- the SQL database threat detection policy for the current database
-
getDatabaseAutomaticTuning
SqlDatabaseAutomaticTuning getDatabaseAutomaticTuning()Gets a SQL database automatic tuning state and options.- Returns:
- the SQL database automatic tuning state and options
-
listUsageMetrics
List<SqlDatabaseUsageMetric> listUsageMetrics()Lists the SQL database usage metrics.- Returns:
- the SQL database usage metrics
-
listUsageMetricsAsync
com.azure.core.http.rest.PagedFlux<SqlDatabaseUsageMetric> listUsageMetricsAsync()Asynchronously lists the SQL database usage metrics.- Returns:
- a representation of the deferred computation of this call returning the SQL database usage metrics
-
rename
Renames the database.- Parameters:
newDatabaseName- the new name for the database- Returns:
- the renamed SQL database
-
renameAsync
Renames the database asynchronously.- Parameters:
newDatabaseName- the new name for the database- Returns:
- a representation of the deferred computation of this call
-
delete
void delete()Deletes the database from the server. -
deleteAsync
-
syncGroups
SqlSyncGroupOperations.SqlSyncGroupActionsDefinition syncGroups()Gets the SQL Sync Group entry point for the current database.- Returns:
- the SQL Sync Group entry point for the current database
-
defineThreatDetectionPolicy(SecurityAlertPolicyName)