From 6e9046ed654a83de31ae108374aaeec94d9a7af2 Mon Sep 17 00:00:00 2001 From: ssen-msft <57732747+ssen-msft@users.noreply.github.com> Date: Mon, 14 Dec 2020 08:00:39 -0800 Subject: [PATCH] New API: QPI Reset (#11884) --- .../2018-06-01/QueryPerformanceInsights.json | 109 ++++++++++++++++ .../QueryPerformanceInsightResetData.json | 16 +++ .../2018-06-01/QueryPerformanceInsights.json | 109 ++++++++++++++++ .../QueryPerformanceInsightResetData.json | 16 +++ .../2018-06-01/QueryPerformanceInsights.json | 123 ++++++++++++++++++ .../QueryPerformanceInsightResetData.json | 16 +++ .../postgresql/resource-manager/readme.md | 2 + 7 files changed, 391 insertions(+) create mode 100644 specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/QueryPerformanceInsightResetData.json create mode 100644 specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2018-06-01/examples/QueryPerformanceInsightResetData.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2018-06-01/QueryPerformanceInsights.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2018-06-01/examples/QueryPerformanceInsightResetData.json diff --git a/specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/QueryPerformanceInsights.json b/specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/QueryPerformanceInsights.json index eff98a2d7447..03cea2952824 100644 --- a/specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/QueryPerformanceInsights.json +++ b/specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/QueryPerformanceInsights.json @@ -69,6 +69,12 @@ "schema": { "$ref": "#/definitions/QueryText" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } } } } @@ -116,6 +122,12 @@ "schema": { "$ref": "#/definitions/QueryTextsResultList" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } } }, "x-ms-pageable": { @@ -158,6 +170,12 @@ "schema": { "$ref": "#/definitions/QueryStatistic" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } } } } @@ -203,6 +221,12 @@ "schema": { "$ref": "#/definitions/TopQueryStatisticsResultList" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } } }, "x-ms-pageable": { @@ -245,6 +269,12 @@ "schema": { "$ref": "#/definitions/WaitStatistic" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } } } } @@ -290,12 +320,60 @@ "schema": { "$ref": "#/definitions/WaitStatisticsResultList" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/resetQueryPerformanceInsightData": { + "post": { + "tags": [ + "ResetQueryPerformanceInsightData" + ], + "operationId": "ResetQueryPerformanceInsightData", + "x-ms-examples": { + "QueryPerformanceInsightResetData": { + "$ref": "./examples/QueryPerformanceInsightResetData.json" + } + }, + "description": "Reset data for Query Performance Insight.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/QueryPerformanceInsightResetDataResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + } + } } }, "definitions": { @@ -602,6 +680,37 @@ "readOnly": true } } + }, + "QueryPerformanceInsightResetDataResult": { + "description": "Result of Query Performance Insight data reset.", + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "Succeeded", + "Failed" + ], + "x-ms-enum": { + "name": "QueryPerformanceInsightResetDataResultState", + "modelAsString": true + }, + "description": "Indicates result of the operation." + }, + "message": { + "type": "string", + "description": "operation message." + } + } + }, + "CloudError": { + "x-ms-external": true, + "properties": { + "error": { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse" + } + }, + "description": "An error response from the Batch service." } }, "parameters": { diff --git a/specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/QueryPerformanceInsightResetData.json b/specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/QueryPerformanceInsightResetData.json new file mode 100644 index 000000000000..20ccc408ed12 --- /dev/null +++ b/specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/QueryPerformanceInsightResetData.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2018-06-01", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testResourceGroupName", + "serverName": "testServerName" + }, + "responses": { + "200": { + "body": { + "status": "Succeeded", + "message": "QPI reset data successful" + } + } + } +} diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2018-06-01/QueryPerformanceInsights.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2018-06-01/QueryPerformanceInsights.json index f8f5aa52d1bc..aa7c26857770 100644 --- a/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2018-06-01/QueryPerformanceInsights.json +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2018-06-01/QueryPerformanceInsights.json @@ -69,6 +69,12 @@ "schema": { "$ref": "#/definitions/QueryText" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } } } } @@ -116,6 +122,12 @@ "schema": { "$ref": "#/definitions/QueryTextsResultList" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } } }, "x-ms-pageable": { @@ -158,6 +170,12 @@ "schema": { "$ref": "#/definitions/QueryStatistic" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } } } } @@ -203,6 +221,12 @@ "schema": { "$ref": "#/definitions/TopQueryStatisticsResultList" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } } }, "x-ms-pageable": { @@ -245,6 +269,12 @@ "schema": { "$ref": "#/definitions/WaitStatistic" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } } } } @@ -290,12 +320,60 @@ "schema": { "$ref": "#/definitions/WaitStatisticsResultList" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/resetQueryPerformanceInsightData": { + "post": { + "tags": [ + "ResetQueryPerformanceInsightData" + ], + "operationId": "ResetQueryPerformanceInsightData", + "x-ms-examples": { + "QueryPerformanceInsightResetData": { + "$ref": "./examples/QueryPerformanceInsightResetData.json" + } + }, + "description": "Reset data for Query Performance Insight.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/QueryPerformanceInsightResetDataResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + } + } } }, "definitions": { @@ -602,6 +680,37 @@ "readOnly": true } } + }, + "QueryPerformanceInsightResetDataResult": { + "description": "Result of Query Performance Insight data reset.", + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "Succeeded", + "Failed" + ], + "x-ms-enum": { + "name": "QueryPerformanceInsightResetDataResultState", + "modelAsString": true + }, + "description": "Indicates result of the operation." + }, + "message": { + "type": "string", + "description": "operation message." + } + } + }, + "CloudError": { + "x-ms-external": true, + "properties": { + "error": { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse" + } + }, + "description": "An error response from the Batch service." } }, "parameters": { diff --git a/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2018-06-01/examples/QueryPerformanceInsightResetData.json b/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2018-06-01/examples/QueryPerformanceInsightResetData.json new file mode 100644 index 000000000000..20ccc408ed12 --- /dev/null +++ b/specification/mysql/resource-manager/Microsoft.DBforMySQL/stable/2018-06-01/examples/QueryPerformanceInsightResetData.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2018-06-01", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testResourceGroupName", + "serverName": "testServerName" + }, + "responses": { + "200": { + "body": { + "status": "Succeeded", + "message": "QPI reset data successful" + } + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2018-06-01/QueryPerformanceInsights.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2018-06-01/QueryPerformanceInsights.json new file mode 100644 index 000000000000..740993cf3fa7 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2018-06-01/QueryPerformanceInsights.json @@ -0,0 +1,123 @@ +{ + "swagger": "2.0", + "info": { + "version": "2018-06-01", + "title": "PostgreSQLManagementClient", + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/resetQueryPerformanceInsightData": { + "post": { + "tags": [ + "ResetQueryPerformanceInsightData" + ], + "operationId": "ResetQueryPerformanceInsightData", + "x-ms-examples": { + "QueryPerformanceInsightResetData": { + "$ref": "./examples/QueryPerformanceInsightResetData.json" + } + }, + "description": "Reset data for Query Performance Insight.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/QueryPerformanceInsightResetDataResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + } + } + } + }, + "definitions": { + "QueryPerformanceInsightResetDataResult": { + "description": "Result of Query Performance Insight data reset.", + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "Succeeded", + "Failed" + ], + "x-ms-enum": { + "name": "QueryPerformanceInsightResetDataResultState", + "modelAsString": true + }, + "description": "Indicates result of the operation." + }, + "message": { + "type": "string", + "description": "result operation message." + } + } + }, + "CloudError": { + "x-ms-external": true, + "properties": { + "error": { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse" + } + }, + "description": "An error response from the Batch service." + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2018-06-01/examples/QueryPerformanceInsightResetData.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2018-06-01/examples/QueryPerformanceInsightResetData.json new file mode 100644 index 000000000000..20ccc408ed12 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2018-06-01/examples/QueryPerformanceInsightResetData.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2018-06-01", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testResourceGroupName", + "serverName": "testServerName" + }, + "responses": { + "200": { + "body": { + "status": "Succeeded", + "message": "QPI reset data successful" + } + } + } +} diff --git a/specification/postgresql/resource-manager/readme.md b/specification/postgresql/resource-manager/readme.md index 59c38896da02..91b29e7740fa 100644 --- a/specification/postgresql/resource-manager/readme.md +++ b/specification/postgresql/resource-manager/readme.md @@ -111,6 +111,7 @@ input-file: - Microsoft.DBforPostgreSQL/stable/2017-12-01/ServerSecurityAlertPolicies.json - Microsoft.DBforPostgreSQL/stable/2018-06-01/PrivateEndpointConnections.json - Microsoft.DBforPostgreSQL/stable/2018-06-01/PrivateLinkResources.json +- Microsoft.DBforPostgreSQL/stable/2018-06-01/QueryPerformanceInsights.json ``` @@ -215,6 +216,7 @@ input-file: - $(this-folder)/Microsoft.DBforPostgreSQL/stable/2017-12-01/ServerSecurityAlertPolicies.json - $(this-folder)/Microsoft.DBforPostgreSQL/stable/2018-06-01/PrivateEndpointConnections.json - $(this-folder)/Microsoft.DBforPostgreSQL/stable/2018-06-01/PrivateLinkResources.json + - $(this-folder)/Microsoft.DBforPostgreSQL/stable/2018-06-01/QueryPerformanceInsights.json - $(this-folder)/Microsoft.DBforPostgreSQL/stable/2020-01-01/DataEncryptionKeys.json - $(this-folder)/Microsoft.DBforPostgreSQL/preview/2018-06-01-privatepreview/PrivateEndpointConnections.json - $(this-folder)/Microsoft.DBforPostgreSQL/preview/2018-06-01-privatepreview/PrivateLinkResources.json