Interface SqlDatabase

    • Method Detail

      • 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

        OffsetDateTime creationDate()
        Returns:
        the creation date of the Azure SQL Database
      • currentServiceObjectiveName

        String currentServiceObjectiveName()
        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()
        Returns:
        the Id of the Azure SQL Database
      • earliestRestoreDate

        OffsetDateTime 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
      • maxSizeBytes

        long maxSizeBytes()
        Returns:
        the max size of the Azure SQL Database expressed in bytes.
      • requestedServiceObjectiveName

        String 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
      • status

        DatabaseStatus status()
        Returns:
        the status of the Azure SQL Database
      • elasticPoolId

        String elasticPoolId()
        Returns:
        the elasticPoolId value
      • 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

        com.azure.core.management.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

        com.azure.core.http.rest.PagedFlux<RestorePoint> listRestorePointsAsync()
        Returns:
        the list of all restore points on this database
      • listMetrics

        List<SqlDatabaseMetric> listMetrics​(String filter)
        Parameters:
        filter - an OData filter expression that describes a subset of metrics to return.
        Returns:
        the list of metrics for this database
      • listMetricsAsync

        com.azure.core.http.rest.PagedFlux<SqlDatabaseMetric> listMetricsAsync​(String filter)
        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
      • listMetricDefinitionsAsync

        com.azure.core.http.rest.PagedFlux<SqlDatabaseMetricDefinition> 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

        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
      • listServiceTierAdvisors

        Map<String,​ServiceTierAdvisor> listServiceTierAdvisors()
        Returns:
        information about service tier advisors for the current database
      • listServiceTierAdvisorsAsync

        com.azure.core.http.rest.PagedFlux<ServiceTierAdvisor> 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

        com.azure.core.http.rest.PagedFlux<ReplicationLink> listReplicationLinksAsync()
        Returns:
        a representation of the deferred computation of all the replication links associated with this database
      • defineThreatDetectionPolicy

        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

        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

        SqlDatabase rename​(String newDatabaseName)
        Renames the database.
        Parameters:
        newDatabaseName - the new name for the database
        Returns:
        the renamed SQL database
      • renameAsync

        Mono<SqlDatabase> renameAsync​(String newDatabaseName)
        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

        Mono<Void> deleteAsync()
        Deletes the database asynchronously.
        Returns:
        a representation of the deferred computation of this call