{ "swagger": "2.0", "info": { "version": "2019-06-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}/databases/{databaseName}/workloadGroups/{workloadGroupName}/workloadClassifiers/{workloadClassifierName}": { "get": { "tags": [ "WorkloadClassifiers" ], "description": "Gets a workload classifier", "operationId": "WorkloadClassifiers_Get", "parameters": [ { "$ref": "#/parameters/ResourceGroupParameter" }, { "$ref": "#/parameters/ServerNameParameter" }, { "$ref": "#/parameters/DatabaseNameParameter" }, { "name": "workloadGroupName", "in": "path", "description": "The name of the workload group from which to receive the classifier from.", "required": true, "type": "string" }, { "name": "workloadClassifierName", "in": "path", "description": "The name of the workload classifier.", "required": true, "type": "string" }, { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Successfully retrieved the specifies workload classifier.", "schema": { "$ref": "#/definitions/WorkloadClassifier" } }, "default": { "description": "*** Error Responses: ***\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 OperationNotAllowedOnPausedDatabase - Operation is not allowed on a paused database.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." } }, "x-ms-examples": { "Gets a workload classifier for a data warehouse": { "$ref": "./examples/GetWorkloadClassifier.json" } } }, "put": { "tags": [ "WorkloadClassifiers" ], "description": "Creates or updates a workload classifier.", "operationId": "WorkloadClassifiers_CreateOrUpdate", "parameters": [ { "$ref": "#/parameters/ResourceGroupParameter" }, { "$ref": "#/parameters/ServerNameParameter" }, { "$ref": "#/parameters/DatabaseNameParameter" }, { "name": "workloadGroupName", "in": "path", "description": "The name of the workload group from which to receive the classifier from.", "required": true, "type": "string" }, { "name": "workloadClassifierName", "in": "path", "description": "The name of the workload classifier to create/update.", "required": true, "type": "string" }, { "name": "parameters", "in": "body", "description": "The properties of the workload classifier.", "required": true, "schema": { "$ref": "#/definitions/WorkloadClassifier" } }, { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Successfully updated the workload classifier.", "schema": { "$ref": "#/definitions/WorkloadClassifier" } }, "default": { "description": "*** Error Responses: ***\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 OperationNotAllowedOnPausedDatabase - Operation is not allowed on a paused database.\n\n * 400 InvalidMemberNameParameter - Invalid member name parameter for this workload classifier.\n\n * 400 InvalidStartTimeAndEndTimeParameters - Invalid start time and end time parameters for the workload classifier.\n\n * 400 InvalidImportanceParameter - Importance must be one of the following strings: Low, Below_Normal, Normal, Above_Normal, High.\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\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 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." }, "202": { "description": "Create or update for the workload classifier is in progress." }, "201": { "description": "Successfully created the workload classifier.", "schema": { "$ref": "#/definitions/WorkloadClassifier" } } }, "x-ms-long-running-operation": true, "x-ms-examples": { "Create a workload group with the required properties specified.": { "$ref": "./examples/CreateOrUpdateWorkloadClassifierMin.json" }, "Create a workload group with all properties specified.": { "$ref": "./examples/CreateOrUpdateWorkloadClassifierMax.json" } } }, "delete": { "tags": [ "WorkloadClassifiers" ], "description": "Deletes a workload classifier.", "operationId": "WorkloadClassifiers_Delete", "parameters": [ { "$ref": "#/parameters/ResourceGroupParameter" }, { "$ref": "#/parameters/ServerNameParameter" }, { "$ref": "#/parameters/DatabaseNameParameter" }, { "name": "workloadGroupName", "in": "path", "description": "The name of the workload group from which to receive the classifier from.", "required": true, "type": "string" }, { "name": "workloadClassifierName", "in": "path", "description": "The name of the workload classifier to delete.", "required": true, "type": "string" }, { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Successfully deleted the workload classifier." }, "default": { "description": "*** Error Responses: ***\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 OperationNotAllowedOnPausedDatabase - Operation is not allowed on a paused database.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\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 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." }, "202": { "description": "Deleting the workload classifier is in progress." }, "204": { "description": "The specified workload classifier does not exist." } }, "x-ms-long-running-operation": true, "x-ms-examples": { "Delete a workload classifier": { "$ref": "./examples/DeleteWorkloadClassifier.json" } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}/workloadClassifiers": { "get": { "tags": [ "WorkloadClassifiers" ], "description": "Gets the list of workload classifiers for a workload group", "operationId": "WorkloadClassifiers_ListByWorkloadGroup", "parameters": [ { "$ref": "#/parameters/ResourceGroupParameter" }, { "$ref": "#/parameters/ServerNameParameter" }, { "$ref": "#/parameters/DatabaseNameParameter" }, { "name": "workloadGroupName", "in": "path", "description": "The name of the workload group from which to receive the classifiers from.", "required": true, "type": "string" }, { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Successfully retrieved the list of workload groups.", "schema": { "$ref": "#/definitions/WorkloadClassifierListResult" } }, "default": { "description": "*** Error Responses: ***\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 400 OperationNotAllowedOnPausedDatabase - Operation is not allowed on a paused database.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ConflictingSystemOperationInProgress - A system maintenance operation is in progress on the database and further operations need to wait until it is completed.\n\n * 409 ConflictingDatabaseOperation - There is already some operation on the database and the current operation should wait till it is done.\n\n * 503 DatabaseUnavailable - The operation failed because the database is unavailable.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "x-ms-examples": { "Get the list of workload classifiers for a workload group": { "$ref": "./examples/GetWorkloadClassifierList.json" } } } } }, "definitions": { "WorkloadClassifierProperties": { "description": "Workload classifier definition. For more information look at sys.workload_management_workload_classifiers (DMV).", "required": [ "memberName" ], "type": "object", "properties": { "memberName": { "description": "The workload classifier member name.", "type": "string" }, "label": { "description": "The workload classifier label.", "type": "string" }, "context": { "description": "The workload classifier context.", "type": "string" }, "startTime": { "description": "The workload classifier start time for classification.", "type": "string" }, "endTime": { "description": "The workload classifier end time for classification.", "type": "string" }, "importance": { "description": "The workload classifier importance.", "type": "string" } } }, "Resource": { "description": "ARM resource.", "type": "object", "properties": { "id": { "description": "Resource ID.", "type": "string", "readOnly": true }, "name": { "description": "Resource name.", "type": "string", "readOnly": true }, "type": { "description": "Resource type.", "type": "string", "readOnly": true } }, "x-ms-azure-resource": true }, "ProxyResource": { "description": "ARM proxy resource.", "type": "object", "allOf": [ { "$ref": "#/definitions/Resource" } ], "properties": {} }, "WorkloadClassifier": { "description": "Workload classifier operations for a data warehouse", "type": "object", "allOf": [ { "$ref": "#/definitions/ProxyResource" } ], "properties": { "properties": { "$ref": "#/definitions/WorkloadClassifierProperties", "description": "Resource properties.", "x-ms-client-flatten": true } } }, "WorkloadClassifierListResult": { "description": "A list of workload classifiers for a workload group.", "type": "object", "properties": { "value": { "description": "Array of results.", "type": "array", "items": { "$ref": "#/definitions/WorkloadClassifier" }, "readOnly": true }, "nextLink": { "description": "Link to retrieve next page of results.", "type": "string", "readOnly": 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" }, "BlobAuditingPolicyNameParameter": { "name": "blobAuditingPolicyName", "in": "path", "description": "The name of the blob auditing policy.", "required": true, "type": "string", "enum": [ "default" ], "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" } } } }