{ "swagger": "2.0", "info": { "version": "2017-03-01-preview", "title": "SqlManagementClient", "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." }, "host": "management.azure.com", "schemes": [ "https" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/automaticTuning/current": { "get": { "tags": [ "ServerAutomaticTuning" ], "description": "Retrieves server automatic tuning options.", "operationId": "ServerAutomaticTuning_Get", "parameters": [ { "$ref": "#/parameters/ResourceGroupParameter" }, { "$ref": "#/parameters/ServerNameParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Successfully retrieved server automatic tuning properties.", "schema": { "$ref": "#/definitions/ServerAutomaticTuning" } }, "default": { "description": "*** Error Responses: ***\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - The requested database was not found\n\n * 404 SubscriptionDoesNotHaveElasticPool - The requested elastic pool was not found\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 Conflict - Request could not be processed because of conflict in the request.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable." } }, "x-ms-examples": { "Get a server's automatic tuning settings": { "$ref": "./examples/ServerAutomaticTuningGet.json" } } }, "patch": { "tags": [ "ServerAutomaticTuning" ], "description": "Update automatic tuning options on server.", "operationId": "ServerAutomaticTuning_Update", "parameters": [ { "$ref": "#/parameters/ResourceGroupParameter" }, { "$ref": "#/parameters/ServerNameParameter" }, { "name": "parameters", "in": "body", "description": "The requested automatic tuning resource state.", "required": true, "schema": { "$ref": "#/definitions/ServerAutomaticTuning" } }, { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Successfully updated the server-level automatic tuning options.", "schema": { "$ref": "#/definitions/ServerAutomaticTuning" } }, "default": { "description": "*** Error Responses: ***\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 InvalidAutomaticTuningUpsertRequest - The update automatic tuning request body does not exist or has no properties object.\n\n * 400 InvalidAdvisorAutoExecuteStatus - Specified auto-execute status for the advisor is not allowed.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - The requested database was not found\n\n * 404 SubscriptionDoesNotHaveElasticPool - The requested elastic pool was not found\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 405 NotSupported - This functionality is not supported.\n\n * 409 Conflict - Request could not be processed because of conflict in the request.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 ServiceTemporarilyUnavailable - Feature temporarily unavailable." } }, "x-ms-examples": { "Updates server automatic tuning settings with minimal properties": { "$ref": "./examples/ServerAutomaticTuningUpdateMin.json" }, "Updates server automatic tuning settings with all properties": { "$ref": "./examples/ServerAutomaticTuningUpdateMax.json" } } } } }, "definitions": { "AutomaticTuningServerProperties": { "description": "Server-level Automatic Tuning properties.", "type": "object", "properties": { "desiredState": { "description": "Automatic tuning desired state.", "enum": [ "Custom", "Auto", "Unspecified" ], "type": "string", "x-ms-enum": { "name": "AutomaticTuningServerMode", "modelAsString": false } }, "actualState": { "description": "Automatic tuning actual state.", "enum": [ "Custom", "Auto", "Unspecified" ], "type": "string", "readOnly": true, "x-ms-enum": { "name": "AutomaticTuningServerMode", "modelAsString": false } }, "options": { "description": "Automatic tuning options definition.", "type": "object", "additionalProperties": { "$ref": "#/definitions/AutomaticTuningServerOptions" } } } }, "AutomaticTuningServerOptions": { "description": "Automatic tuning properties for individual advisors.", "type": "object", "properties": { "desiredState": { "description": "Automatic tuning option desired state.", "enum": [ "Off", "On", "Default" ], "type": "string", "x-ms-enum": { "name": "AutomaticTuningOptionModeDesired", "modelAsString": false } }, "actualState": { "description": "Automatic tuning option actual state.", "enum": [ "Off", "On" ], "type": "string", "readOnly": true, "x-ms-enum": { "name": "AutomaticTuningOptionModeActual", "modelAsString": false } }, "reasonCode": { "format": "int32", "description": "Reason code if desired and actual state are different.", "type": "integer", "readOnly": true }, "reasonDesc": { "description": "Reason description if desired and actual state are different.", "enum": [ "Default", "Disabled", "AutoConfigured" ], "type": "string", "readOnly": true, "x-ms-enum": { "name": "AutomaticTuningServerReason", "modelAsString": false } } } }, "ServerAutomaticTuning": { "description": "Server-level Automatic Tuning.", "type": "object", "allOf": [ { "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" } ], "properties": { "properties": { "$ref": "#/definitions/AutomaticTuningServerProperties", "description": "Resource properties.", "x-ms-client-flatten": true } } } }, "parameters": { "SubscriptionIdParameter": { "name": "subscriptionId", "in": "path", "description": "The subscription ID that identifies an Azure subscription.", "required": true, "type": "string", "x-ms-parameter-location": "client" }, "ApiVersionParameter": { "name": "api-version", "in": "query", "description": "The API version to use for the request.", "required": true, "type": "string", "x-ms-parameter-location": "client" }, "ResourceGroupParameter": { "name": "resourceGroupName", "in": "path", "description": "The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.", "required": true, "type": "string", "x-ms-parameter-location": "method" }, "ServerNameParameter": { "name": "serverName", "in": "path", "description": "The name of the server.", "required": true, "type": "string", "x-ms-parameter-location": "method" }, "ManagedInstanceNameParameter": { "name": "managedInstanceName", "in": "path", "description": "The name of the managed instance.", "required": true, "type": "string", "x-ms-parameter-location": "method" }, "DatabaseNameParameter": { "name": "databaseName", "in": "path", "description": "The name of the database.", "required": true, "type": "string", "x-ms-parameter-location": "method" }, "SqlVirtualMachineInstanceNameParameter": { "name": "sqlVirtualMachineInstanceName", "in": "path", "description": "The name of the SqlVirtualMachineInstance.", "required": true, "type": "string", "x-ms-parameter-location": "method" }, "SqlVirtualMachineContainerNameParameter": { "name": "sqlVirtualMachineContainerName", "in": "path", "description": "The name of the SqlVirtualMachineContainer.", "required": true, "type": "string", "x-ms-parameter-location": "method" }, "VirtualClusterNameParameter": { "name": "virtualClusterName", "in": "path", "description": "The name of the virtual cluster.", "required": true, "type": "string", "x-ms-parameter-location": "method" } }, "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" } } } }