-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add swagger for dataWarehouseUserActivities API (#2389)
* Add swagger for dataWarehouseUserActivities Add swagger for dataWarehouseUserActivities * add example file add example file * correct case sensitive name datawarehouseUserActivities to dataWarehouseUserActivities * add dataWarehouseUserActivityName add dataWarehouseUserActivityName * remove "value" GET ".../activities/current" should be a get single API, so it should not have "value" * Replace tab spaces with blank spaces * add missing "body"
- Loading branch information
1 parent
6a0907f
commit 90d5e29
Showing
3 changed files
with
257 additions
and
0 deletions.
There are no files selected for viewing
234 changes: 234 additions & 0 deletions
234
...esource-manager/Microsoft.Sql/preview/2017-03-01-preview/dataWarehouseUserActivities.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} | ||
} | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
...ger/Microsoft.Sql/preview/2017-03-01-preview/examples/GetDataWarehouseUserActivities.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters