Interface SqlDatabase
- All Superinterfaces:
ChildResource<SqlServer>
,ExternalChildResource<SqlDatabase,
,SqlServer> HasInner<com.microsoft.azure.management.sql.implementation.DatabaseInner>
,HasName
,HasParent<SqlServer>
,HasResourceGroup
,Indexable
,Refreshable<SqlDatabase>
,Updatable<SqlDatabase.Update>
- All Known Subinterfaces:
SqlWarehouse
@Beta(V1_7_0)
public interface SqlDatabase
extends ExternalChildResource<SqlDatabase,SqlServer>, HasInner<com.microsoft.azure.management.sql.implementation.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 interface
Grouping of all the SQL Database definition stages.static interface
Container interface for all the definitions that need to be implemented.static interface
The template for a SqlDatabase update operation, containing all the settings that can be modified.static interface
Grouping of all the SqlDatabase update stages. -
Method Summary
Modifier and TypeMethodDescriptionorg.joda.time.DateTime
defineThreatDetectionPolicy
(String policyName) Begins a definition for a security alert policy.void
delete()
Deletes the database from the server.rx.Completable
Deletes the database asynchronously.org.joda.time.DateTime
edition()
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.rx.Observable<TransparentDataEncryption>
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.boolean
rx.Observable<SqlDatabaseMetricDefinition>
listMetrics
(String filter) rx.Observable<SqlDatabaseMetric>
listMetricsAsync
(String filter) rx.Observable<ReplicationLink>
rx.Observable<RestorePoint>
rx.Observable<ServiceTierAdvisor>
Lists the SQL database usage metrics.rx.Observable<SqlDatabaseUsageMetric>
Asynchronously lists the SQL database usage metrics.Deprecated.long
parentId()
region()
Renames the database.rx.Observable<SqlDatabase>
renameAsync
(String newDatabaseName) Renames the database asynchronously.status()
Methods inherited from interface com.microsoft.azure.management.resources.fluentcore.arm.models.ExternalChildResource
id
Methods inherited from interface com.microsoft.azure.management.resources.fluentcore.model.HasInner
inner
Methods inherited from interface com.microsoft.azure.management.resources.fluentcore.arm.models.HasName
name
Methods inherited from interface com.microsoft.azure.management.resources.fluentcore.arm.models.HasParent
parent
Methods inherited from interface com.microsoft.azure.management.resources.fluentcore.arm.models.HasResourceGroup
resourceGroupName
Methods inherited from interface com.microsoft.azure.management.resources.fluentcore.model.Indexable
key
Methods inherited from interface com.microsoft.azure.management.resources.fluentcore.model.Refreshable
refresh, refreshAsync
-
Method Details
-
sqlServerName
String sqlServerName()- Returns:
- name of the SQL Server to which this database belongs
-
collation
String collation()- Returns:
- the collation of the Azure SQL Database
-
creationDate
org.joda.time.DateTime creationDate()- Returns:
- the creation date of the Azure SQL Database
-
currentServiceObjectiveId
UUID currentServiceObjectiveId()- Returns:
- the current Service Level Objective Id of the Azure SQL Database, this is the Id of the Service Level Objective that is currently active
-
databaseId
String databaseId()- Returns:
- the Id of the Azure SQL Database
-
earliestRestoreDate
org.joda.time.DateTime earliestRestoreDate()- 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()- Returns:
- the edition of the Azure SQL Database
-
requestedServiceObjectiveId
UUID requestedServiceObjectiveId()- Returns:
- the configured Service Level Objective Id of the Azure SQL Database, this is the Service Level Objective that is being applied to the Azure SQL Database
-
maxSizeBytes
long maxSizeBytes()- Returns:
- the max size of the Azure SQL Database expressed in bytes.
-
requestedServiceObjectiveName
ServiceObjectiveName requestedServiceObjectiveName()- 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
-
serviceLevelObjective
ServiceObjectiveName serviceLevelObjective()- Returns:
- the Service Level Objective of the Azure SQL Database.
-
status
String status()- Returns:
- the status of the Azure SQL Database
-
elasticPoolName
String elasticPoolName()- Returns:
- the elasticPoolName value
-
defaultSecondaryLocation
String defaultSecondaryLocation()- Returns:
- the defaultSecondaryLocation value
-
parentId
String parentId()- Returns:
- the parent SQL server ID
-
regionName
String regionName()- Returns:
- the name of the region the resource is in
-
region
Region region()- Returns:
- the region the resource is in
-
isDataWarehouse
boolean isDataWarehouse()- Returns:
- true if this Database is SqlWarehouse
-
asWarehouse
SqlWarehouse asWarehouse()- Returns:
- SqlWarehouse instance for more operations
-
listRestorePoints
List<RestorePoint> listRestorePoints()- Returns:
- the list of all restore points on this database
-
listRestorePointsAsync
- Returns:
- the list of all restore points on this database
-
listUsages
Deprecated.- Returns:
- the list of usages (DatabaseMetrics) of this database
-
listMetrics
- Parameters:
filter
- an OData filter expression that describes a subset of metrics to return.- Returns:
- the list of metrics for this database
-
listMetricsAsync
- Parameters:
filter
- an OData filter expression that describes a subset of metrics to return.- Returns:
- a representation of the deferred computation of the metrics for this database
-
listMetricDefinitions
- Returns:
- the list of metric definitions for this database
-
listMetricDefinitionsAsync
- Returns:
- a representation of the deferred computation of the metric definitions for 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
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
-
listServiceTierAdvisors
Map<String,ServiceTierAdvisor> listServiceTierAdvisors()- Returns:
- information about service tier advisors for the current database
-
listServiceTierAdvisorsAsync
- Returns:
- a representation of the deferred computation of the information about service tier advisors for this database
-
listReplicationLinks
Map<String,ReplicationLink> listReplicationLinks()- Returns:
- all the replication links associated with this database
-
listReplicationLinksAsync
- Returns:
- a representation of the deferred computation of all the replication links associated with this database
-
exportTo
@Beta(V1_7_0) SqlDatabaseExportRequest.DefinitionStages.WithStorageTypeAndKey exportTo(String storageUri) Exports the current database to a specified URI path.- Parameters:
storageUri
- the storage URI to use- Returns:
- response object
-
exportTo
@Beta(V1_7_0) 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
@Beta(V1_7_0) 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
@Beta(V1_7_0) SqlDatabaseImportRequest.DefinitionStages.WithStorageTypeAndKey importBacpac(String storageUri) 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
@Beta(V1_7_0) 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
@Beta(V1_7_0) SqlDatabaseThreatDetectionPolicy.DefinitionStages.Blank defineThreatDetectionPolicy(String 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
Gets a SQL database threat detection policy.- Returns:
- the SQL database threat detection policy for the current database
-
getDatabaseAutomaticTuning
Gets a SQL database automatic tuning state and options.- Returns:
- the SQL database automatic tuning state and options
-
listUsageMetrics
Lists the SQL database usage metrics.- Returns:
- the SQL database usage metrics
-
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
@Beta(V1_7_0) rx.Completable deleteAsync()Deletes the database asynchronously.- Returns:
- a representation of the deferred computation of this call
-
syncGroups
- Returns:
- the SQL Sync Group entry point for the current database
-