{ "swagger": "2.0", "info": { "title": "SqlManagementClient", "version": "2025-01-01", "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.", "x-typespec-generated": [ { "emitter": "@azure-tools/typespec-autorest" } ] }, "schemes": [ "https" ], "host": "management.azure.com", "produces": [ "application/json" ], "consumes": [ "application/json" ], "security": [ { "azure_auth": [ "user_impersonation" ] } ], "securityDefinitions": { "azure_auth": { "type": "oauth2", "description": "Azure Active Directory OAuth2 Flow.", "flow": "implicit", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "scopes": { "user_impersonation": "impersonate your user account" } } }, "tags": [ { "name": "DatabaseAutomaticTuning" } ], "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/automaticTuning/current": { "get": { "operationId": "DatabaseAutomaticTuning_Get", "tags": [ "DatabaseAutomaticTuning" ], "description": "Gets a database's automatic tuning.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "serverName", "in": "path", "description": "The name of the server.", "required": true, "type": "string" }, { "name": "databaseName", "in": "path", "description": "The name of the database.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/DatabaseAutomaticTuning" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Get a database's automatic tuning settings": { "$ref": "./examples/DatabaseAutomaticTuningGet.json" } } }, "patch": { "operationId": "DatabaseAutomaticTuning_Update", "tags": [ "DatabaseAutomaticTuning" ], "description": "Update automatic tuning properties for target database.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "serverName", "in": "path", "description": "The name of the server.", "required": true, "type": "string" }, { "name": "databaseName", "in": "path", "description": "The name of the database.", "required": true, "type": "string" }, { "name": "parameters", "in": "body", "description": "The requested automatic tuning resource state.", "required": true, "schema": { "$ref": "#/definitions/DatabaseAutomaticTuning" } } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/DatabaseAutomaticTuning" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Updates database automatic tuning settings with all properties": { "$ref": "./examples/DatabaseAutomaticTuningUpdateMax.json" }, "Updates database automatic tuning settings with minimal properties": { "$ref": "./examples/DatabaseAutomaticTuningUpdateMin.json" } } } } }, "definitions": { "AutomaticTuningOptions": { "type": "object", "description": "Automatic tuning properties for individual advisors.", "properties": { "desiredState": { "$ref": "./common.json#/definitions/AutomaticTuningOptionModeDesired", "description": "Automatic tuning option desired state." }, "actualState": { "$ref": "./common.json#/definitions/AutomaticTuningOptionModeActual", "description": "Automatic tuning option actual state.", "readOnly": true }, "reasonCode": { "type": "integer", "format": "int32", "description": "Reason code if desired and actual state are different.", "readOnly": true }, "reasonDesc": { "$ref": "./common.json#/definitions/AutomaticTuningDisabledReason", "description": "Reason description if desired and actual state are different.", "readOnly": true } } }, "DatabaseAutomaticTuning": { "type": "object", "description": "Database-level Automatic Tuning.", "properties": { "properties": { "$ref": "#/definitions/DatabaseAutomaticTuningProperties", "description": "Resource properties.", "x-ms-client-flatten": true } }, "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" } ] }, "DatabaseAutomaticTuningProperties": { "type": "object", "description": "Database-level Automatic Tuning properties.", "properties": { "desiredState": { "$ref": "./common.json#/definitions/AutomaticTuningMode", "description": "Automatic tuning desired state." }, "actualState": { "$ref": "./common.json#/definitions/AutomaticTuningMode", "description": "Automatic tuning actual state.", "readOnly": true }, "options": { "type": "object", "description": "Automatic tuning options definition.", "additionalProperties": { "$ref": "#/definitions/AutomaticTuningOptions" } } } } }, "parameters": {} }