Interface SqlServer

    • Method Detail

      • fullyQualifiedDomainName

        String fullyQualifiedDomainName()
        Returns:
        fully qualified name of the SQL Server
      • administratorLogin

        String administratorLogin()
        Returns:
        the administrator login user name for the SQL Server
      • version

        String version()
        Returns:
        the SQL Server version
      • kind

        String kind()
        Returns:
        the SQL Server "kind"
      • state

        String state()
        Returns:
        the state of the server.
      • isManagedServiceIdentityEnabled

        boolean isManagedServiceIdentityEnabled()
        Returns:
        true if Managed Service Identity is enabled for the SQL server
      • systemAssignedManagedServiceIdentityTenantId

        String systemAssignedManagedServiceIdentityTenantId()
        Returns:
        the System Assigned (Local) Managed Service Identity specific Active Directory tenant ID assigned to the SQL server.
      • systemAssignedManagedServiceIdentityPrincipalId

        String systemAssignedManagedServiceIdentityPrincipalId()
        Returns:
        the System Assigned (Local) Managed Service Identity specific Active Directory service principal ID assigned to the SQL server.
      • managedServiceIdentityType

        IdentityType managedServiceIdentityType()
        Returns:
        the type of Managed Service Identity used for the SQL server.
      • listUsageMetrics

        List<ServerMetric> listUsageMetrics()
        Returns:
        returns the list of usage metrics for an Azure SQL Server
      • listServiceObjectives

        List<ServiceObjective> listServiceObjectives()
        Returns:
        the list of information on all service objectives
      • getServiceObjective

        ServiceObjective getServiceObjective​(String serviceObjectiveName)
        Gets the information on a particular Sql Server Service Objective.
        Parameters:
        serviceObjectiveName - name of the service objective to be fetched
        Returns:
        information of the service objective
      • listRecommendedElasticPools

        Map<String,​RecommendedElasticPool> listRecommendedElasticPools()
        Returns all the recommended elastic pools for the server.
        Returns:
        list of recommended elastic pools for the server
      • listRestorableDroppedDatabasesAsync

        com.azure.core.http.rest.PagedFlux<SqlRestorableDroppedDatabase> listRestorableDroppedDatabasesAsync()
        Returns:
        the list of all restorable dropped databases
      • enableAccessFromAzureServices

        SqlFirewallRule enableAccessFromAzureServices()
        Sets the Azure services default access to this server to true.

        A firewall rule named "AllowAllWindowsAzureIps" with the start IP "0.0.0.0" will be added to the SQL server if one does not exist.

        Returns:
        the SQL Firewall rule
      • removeAccessFromAzureServices

        void removeAccessFromAzureServices()
        Sets the Azure services default access to this server to false.

        The firewall rule named "AllowAllWindowsAzureIps" will be removed from the SQL server.

      • setActiveDirectoryAdministrator

        SqlActiveDirectoryAdministrator setActiveDirectoryAdministrator​(String userLogin,
                                                                        String id)
        Sets an Active Directory administrator to this server.

        Azure Active Directory authentication allows you to centrally manage identity and access to your Azure SQL Database V12.

        Parameters:
        userLogin - the user or group login; it can be the name or the email address
        id - the user or group unique ID
        Returns:
        a representation of a SQL Server Active Directory administrator object
      • getActiveDirectoryAdministrator

        SqlActiveDirectoryAdministrator getActiveDirectoryAdministrator()
        Gets the Active Directory administrator for this server.
        Returns:
        a representation of a SQL Server Active Directory administrator object (null if one is not set)
      • removeActiveDirectoryAdministrator

        void removeActiveDirectoryAdministrator()
        Removes the Active Directory administrator from this server.
      • getServerAutomaticTuning

        SqlServerAutomaticTuning getServerAutomaticTuning()
        Gets a SQL server automatic tuning state and options.
        Returns:
        the SQL server automatic tuning state and options