diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/dataWarehouseUserActivities.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/dataWarehouseUserActivities.json new file mode 100644 index 000000000000..2f5edfd5272f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/dataWarehouseUserActivities.json @@ -0,0 +1,234 @@ +{ + "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}/databases/{databaseName}/dataWarehouseUserActivities/{dataWarehouseUserActivityName}": { + "get": { + "tags": [ + "DataWarehouseUserActivities" + ], + "description": "Gets the user activities of a data warehouse which includes running and suspended queries", + "operationId": "DataWarehouseUserActivities_Get", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "dataWarehouseUserActivityName", + "in": "path", + "description": "The activity name of the data warehouse. ", + "required": true, + "type": "string", + "enum": [ + "current" + ], + "x-ms-enum": { + "name": "DataWarehouseUserActivityName", + "modelAsString": true + } + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully get the data warehouse user activities.", + "schema": { + "$ref": "#/definitions/DataWarehouseUserActivities" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\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 specified resource was not found." + } + }, + "x-ms-examples": { + "Get the list of the user activities of a data warehouse": { + "$ref": "./examples/GetDataWarehouseUserActivities.json" + } + } + } + } + }, + "definitions": { + "DataWarehouseUserActivitiesProperties": { + "description": "User activities of a data warehouse. This currently includes the count of running or suspended queries. For more information, please view the sys.dm_pdw_exec_requests dynamic management view (DMV).", + "type": "object", + "properties": { + "activeQueriesCount": { + "format": "int32", + "description": "Count of running and suspended queries.", + "type": "integer", + "readOnly": true + } + } + }, + "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": {} + }, + "DataWarehouseUserActivities": { + "description": "User activities of a data warehouse", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DataWarehouseUserActivitiesProperties", + "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" + }, + "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" + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetDataWarehouseUserActivities.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetDataWarehouseUserActivities.json new file mode 100644 index 000000000000..a0f45d02041c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetDataWarehouseUserActivities.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "Default-SQL-SouthEastAsia", + "serverName": "testsvr", + "databaseName": "testdb", + "api-version": "2017-03-01-preview", + "dataWarehouseUserActivityName": "current" + }, + "responses": { + "200": { + "body": { + "properties":{ + "activeQueriesCount":0 + }, + "id":"subscriptions/326affc3-21f4-4471-a545-e37430b70113/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/testsvr/databases/dwdb01/dataWarehouseUserActivities/current", + "name":"current", + "type":"Microsoft.Sql/servers/databases/dataWarehouseUserActivities" + } + } + } +} diff --git a/specification/sql/resource-manager/readme.md b/specification/sql/resource-manager/readme.md index cbb50daac040..5fec64a5f7b8 100644 --- a/specification/sql/resource-manager/readme.md +++ b/specification/sql/resource-manager/readme.md @@ -126,6 +126,7 @@ input-file: - Microsoft.Sql/preview/2015-05-01-preview/usages.json - Microsoft.Sql/preview/2015-05-01-preview/virtualNetworkRules.json - Microsoft.Sql/preview/2017-03-01-preview/cancelOperations.json +- Microsoft.Sql/preview/2017-03-01-preview/dataWarehouseUserActivities.json - Microsoft.Sql/preview/2017-03-01-preview/renameDatabase.json - Microsoft.Sql/preview/2017-03-01-preview/serverAutomaticTuning.json - Microsoft.Sql/preview/2017-03-01-preview/serverDnsAliases.json