npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@datafire/azure_sql_advisors

v5.0.0

Published

DataFire integration for SqlManagementClient

Readme

@datafire/azure_sql_advisors

Client library for SqlManagementClient

Installation and Usage

npm install --save @datafire/azure_sql_advisors
let azure_sql_advisors = require('@datafire/azure_sql_advisors').create({
  access_token: "",
  refresh_token: "",
  client_id: "",
  client_secret: "",
  redirect_uri: ""
});

.then(data => {
  console.log(data);
});

Description

The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities.

Actions

ServerAdvisors_ListByServer

Gets a list of server advisors.

azure_sql_advisors.ServerAdvisors_ListByServer({
  "resourceGroupName": "",
  "serverName": "",
  "subscriptionId": "",
  "api-version": ""
}, context)

Input

  • input object
    • resourceGroupName required string: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    • serverName required string: The name of the server.
    • subscriptionId required string: The subscription ID that identifies an Azure subscription.
    • api-version required string: The API version to use for the request.

Output

ServerAdvisors_Get

Gets a server advisor.

azure_sql_advisors.ServerAdvisors_Get({
  "resourceGroupName": "",
  "serverName": "",
  "advisorName": "",
  "subscriptionId": "",
  "api-version": ""
}, context)

Input

  • input object
    • resourceGroupName required string: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    • serverName required string: The name of the server.
    • advisorName required string: The name of the Server Advisor.
    • subscriptionId required string: The subscription ID that identifies an Azure subscription.
    • api-version required string: The API version to use for the request.

Output

ServerAdvisors_Update

Updates a server advisor.

azure_sql_advisors.ServerAdvisors_Update({
  "resourceGroupName": "",
  "serverName": "",
  "advisorName": "",
  "parameters": {},
  "subscriptionId": "",
  "api-version": ""
}, context)

Input

  • input object
    • resourceGroupName required string: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    • serverName required string: The name of the server.
    • advisorName required string: The name of the Server Advisor.
    • parameters required Advisor
    • subscriptionId required string: The subscription ID that identifies an Azure subscription.
    • api-version required string: The API version to use for the request.

Output

DatabaseAdvisors_ListByDatabase

Gets a list of database advisors.

azure_sql_advisors.DatabaseAdvisors_ListByDatabase({
  "resourceGroupName": "",
  "serverName": "",
  "databaseName": "",
  "subscriptionId": "",
  "api-version": ""
}, context)

Input

  • input object
    • resourceGroupName required string: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    • serverName required string: The name of the server.
    • databaseName required string: The name of the database.
    • subscriptionId required string: The subscription ID that identifies an Azure subscription.
    • api-version required string: The API version to use for the request.

Output

DatabaseAdvisors_Get

Gets a database advisor.

azure_sql_advisors.DatabaseAdvisors_Get({
  "resourceGroupName": "",
  "serverName": "",
  "databaseName": "",
  "advisorName": "",
  "subscriptionId": "",
  "api-version": ""
}, context)

Input

  • input object
    • resourceGroupName required string: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    • serverName required string: The name of the server.
    • databaseName required string: The name of the database.
    • advisorName required string: The name of the Database Advisor.
    • subscriptionId required string: The subscription ID that identifies an Azure subscription.
    • api-version required string: The API version to use for the request.

Output

DatabaseAdvisors_Update

Updates a database advisor.

azure_sql_advisors.DatabaseAdvisors_Update({
  "resourceGroupName": "",
  "serverName": "",
  "databaseName": "",
  "advisorName": "",
  "parameters": {},
  "subscriptionId": "",
  "api-version": ""
}, context)

Input

  • input object
    • resourceGroupName required string: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    • serverName required string: The name of the server.
    • databaseName required string: The name of the database.
    • advisorName required string: The name of the Database Advisor.
    • parameters required Advisor
    • subscriptionId required string: The subscription ID that identifies an Azure subscription.
    • api-version required string: The API version to use for the request.

Output

DatabaseRecommendedActions_ListByDatabaseAdvisor

Gets list of Database Recommended Actions.

azure_sql_advisors.DatabaseRecommendedActions_ListByDatabaseAdvisor({
  "resourceGroupName": "",
  "serverName": "",
  "databaseName": "",
  "advisorName": "",
  "subscriptionId": "",
  "api-version": ""
}, context)

Input

  • input object
    • resourceGroupName required string: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    • serverName required string: The name of the server.
    • databaseName required string: The name of the database.
    • advisorName required string: The name of the Database Advisor.
    • subscriptionId required string: The subscription ID that identifies an Azure subscription.
    • api-version required string: The API version to use for the request.

Output

DatabaseRecommendedActions_Get

Gets a database recommended action.

azure_sql_advisors.DatabaseRecommendedActions_Get({
  "resourceGroupName": "",
  "serverName": "",
  "databaseName": "",
  "advisorName": "",
  "recommendedActionName": "",
  "subscriptionId": "",
  "api-version": ""
}, context)

Input

  • input object
    • resourceGroupName required string: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    • serverName required string: The name of the server.
    • databaseName required string: The name of the database.
    • advisorName required string: The name of the Database Advisor.
    • recommendedActionName required string: The name of Database Recommended Action.
    • subscriptionId required string: The subscription ID that identifies an Azure subscription.
    • api-version required string: The API version to use for the request.

Output

DatabaseRecommendedActions_Update

Updates a database recommended action.

azure_sql_advisors.DatabaseRecommendedActions_Update({
  "resourceGroupName": "",
  "serverName": "",
  "databaseName": "",
  "advisorName": "",
  "recommendedActionName": "",
  "parameters": {},
  "subscriptionId": "",
  "api-version": ""
}, context)

Input

  • input object
    • resourceGroupName required string: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    • serverName required string: The name of the server.
    • databaseName required string: The name of the database.
    • advisorName required string: The name of the Database Advisor.
    • recommendedActionName required string: The name of Database Recommended Action.
    • parameters required RecommendedAction
    • subscriptionId required string: The subscription ID that identifies an Azure subscription.
    • api-version required string: The API version to use for the request.

Output

Definitions

Advisor

  • Advisor object: Database, Server or Elastic Pool Advisor.
    • kind string: Resource kind.
    • location string: Resource location.
    • properties AdvisorProperties
    • id string: Resource ID.
    • name string: Resource name.
    • type string: Resource type.

AdvisorProperties

  • AdvisorProperties object: Properties for a Database, Server or Elastic Pool Advisor.
    • advisorStatus string (values: GA, PublicPreview, LimitedPublicPreview, PrivatePreview): Gets the status of availability of this advisor to customers. Possible values are 'GA', 'PublicPreview', 'LimitedPublicPreview' and 'PrivatePreview'.
    • autoExecuteStatus required string (values: Enabled, Disabled, Default): Gets the auto-execute status (whether to let the system execute the recommendations) of this advisor. Possible values are 'Enabled' and 'Disabled'
    • autoExecuteStatusInheritedFrom string (values: Default, Subscription, Server, ElasticPool, Database): Gets the resource from which current value of auto-execute status is inherited. Auto-execute status can be set on (and inherited from) different levels in the resource hierarchy. Possible values are 'Subscription', 'Server', 'ElasticPool', 'Database' and 'Default' (when status is not explicitly set on any level).
    • lastChecked string: Gets the time when the current resource was analyzed for recommendations by this advisor.
    • recommendationsStatus string: Gets that status of recommendations for this advisor and reason for not having any recommendations. Possible values include, but are not limited to, 'Ok' (Recommendations available),LowActivity (not enough workload to analyze), 'DbSeemsTuned' (Database is doing well), etc.
    • recommendedActions array: Gets the recommended actions for this advisor.

RecommendedAction

  • RecommendedAction object: Database, Server or Elastic Pool Recommended Action.
    • kind string: Resource kind.
    • location string: Resource location.
    • properties RecommendedActionProperties
    • id string: Resource ID.
    • name string: Resource name.
    • type string: Resource type.

RecommendedActionErrorInfo

  • RecommendedActionErrorInfo object: Contains error information for an Azure SQL Database, Server or Elastic Pool Recommended Action.
    • errorCode string: Gets the reason why the recommended action was put to error state. e.g., DatabaseHasQdsOff, IndexAlreadyExists
    • isRetryable string (values: Yes, No): Gets whether the error could be ignored and recommended action could be retried. Possible values are: Yes/No

RecommendedActionImpactRecord

  • RecommendedActionImpactRecord object: Contains information of estimated or observed impact on various metrics for an Azure SQL Database, Server or Elastic Pool Recommended Action.
    • absoluteValue number: Gets the absolute value of this dimension if applicable. e.g., Number of Queries affected
    • changeValueAbsolute number: Gets the absolute change in the value of this dimension. e.g., Absolute Disk space change in Megabytes
    • changeValueRelative number: Gets the relative change in the value of this dimension. e.g., Relative Disk space change in Percentage
    • dimensionName string: Gets the name of the impact dimension. e.g., CPUChange, DiskSpaceChange, NumberOfQueriesAffected.
    • unit string: Gets the name of the impact dimension. e.g., CPUChange, DiskSpaceChange, NumberOfQueriesAffected.

RecommendedActionImplementationInfo

  • RecommendedActionImplementationInfo object: Contains information for manual implementation for an Azure SQL Database, Server or Elastic Pool Recommended Action.
    • method string (values: TSql, AzurePowerShell): Gets the method in which this recommended action can be manually implemented. e.g., TSql, AzurePowerShell.
    • script string: Gets the manual implementation script. e.g., T-SQL script that could be executed on the database.

RecommendedActionMetricInfo

  • RecommendedActionMetricInfo object: Contains time series of various impacted metrics for an Azure SQL Database, Server or Elastic Pool Recommended Action.
    • metricName string: Gets the name of the metric. e.g., CPU, Number of Queries.
    • startTime string: Gets the start time of time interval given by this MetricInfo.
    • timeGrain string: Gets the duration of time interval for the value given by this MetricInfo. e.g., PT1H (1 hour)
    • unit string: Gets the unit in which metric is measured. e.g., DTU, Frequency
    • value number: Gets the value of the metric in the time interval given by this MetricInfo.

RecommendedActionProperties

  • RecommendedActionProperties object: Properties for a Database, Server or Elastic Pool Recommended Action.
    • details object: Gets additional details specific to this recommended action.
    • errorDetails RecommendedActionErrorInfo
    • estimatedImpact array: Gets the estimated impact info for this recommended action e.g., Estimated CPU gain, Estimated Disk Space change
    • executeActionDuration string: Gets the time taken for applying this recommended action on user resource. e.g., time taken for index creation
    • executeActionInitiatedBy string (values: User, System): Gets if approval for applying this recommended action was given by user/system.
    • executeActionInitiatedTime string: Gets the time when this recommended action was approved for execution.
    • executeActionStartTime string: Gets the time when system started applying this recommended action on the user resource. e.g., index creation start time
    • implementationDetails RecommendedActionImplementationInfo
    • isArchivedAction boolean: Gets if this recommended action was suggested some time ago but user chose to ignore this and system added a new recommended action again.
    • isExecutableAction boolean: Gets if this recommended action is actionable by user
    • isRevertableAction boolean: Gets if changes applied by this recommended action can be reverted by user
    • lastRefresh string: Gets time when this recommended action was last refreshed.
    • linkedObjects array: Gets the linked objects, if any.
      • items string
    • observedImpact array: Gets the observed/actual impact info for this recommended action e.g., Actual CPU gain, Actual Disk Space change
    • recommendationReason string: Gets the reason for recommending this action. e.g., DuplicateIndex
    • revertActionDuration string: Gets the time taken for reverting changes of this recommended action on user resource. e.g., time taken for dropping the created index.
    • revertActionInitiatedBy string (values: User, System): Gets if approval for reverting this recommended action was given by user/system.
    • revertActionInitiatedTime string: Gets the time when this recommended action was approved for revert.
    • revertActionStartTime string: Gets the time when system started reverting changes of this recommended action on user resource. e.g., time when index drop is executed.
    • score integer: Gets the impact of this recommended action. Possible values are 1 - Low impact, 2 - Medium Impact and 3 - High Impact
    • state required RecommendedActionStateInfo
    • timeSeries array: Gets the time series info of metrics for this recommended action e.g., CPU consumption time series
    • validSince string: Gets the time since when this recommended action is valid.

RecommendedActionStateInfo

  • RecommendedActionStateInfo object: Contains information of current state for an Azure SQL Database, Server or Elastic Pool Recommended Action.
    • actionInitiatedBy string (values: User, System): Gets who initiated the execution of this recommended action. Possible Value are: User -> When user explicitly notified system to apply the recommended action. System -> When auto-execute status of this advisor was set to 'Enabled', in which case the system applied it.
    • currentValue required string (values: Active, Pending, Executing, Verifying, PendingRevert, RevertCancelled, Reverting, Reverted, Ignored, Expired, Monitoring, Resolved, Success, Error): Current state the recommended action is in. Some commonly used states are: Active -> recommended action is active and no action has been taken yet. Pending -> recommended action is approved for and is awaiting execution. Executing -> recommended action is being applied on the user database. Verifying -> recommended action was applied and is being verified of its usefulness by the system. Success -> recommended action was applied and improvement found during verification. Pending Revert -> verification found little or no improvement so recommended action is queued for revert or user has manually reverted. Reverting -> changes made while applying recommended action are being reverted on the user database. Reverted -> successfully reverted the changes made by recommended action on user database. Ignored -> user explicitly ignored/discarded the recommended action.
    • lastModified string: Gets the time when the state was last modified