From 7b4310323765757e5bef9eba5c74c83fbe60f5e4 Mon Sep 17 00:00:00 2001 From: Deepak S Date: Tue, 8 Jun 2021 03:25:51 -0700 Subject: [PATCH 1/6] Adding iperf APIs --- .../IntelligentPerformance.json | 335 +++++++++ .../QueryPerformanceInsights.json | 696 ++++++++++++++++++ .../examples/AdvisorsGet.json | 19 + .../examples/AdvisorsListByServer.json | 22 + .../QueryPerformanceInsightResetData.json | 16 + .../examples/QueryTextsGet.json | 22 + .../examples/QueryTextsListByServer.json | 38 + .../RecommendedActionsListByServer.json | 67 ++ .../examples/TopQueryStatisticsGet.json | 32 + .../TopQueryStatisticsListByServer.json | 64 ++ .../examples/WaitStatisticsListByServer.json | 55 ++ .../postgresql/resource-manager/readme.md | 4 + 12 files changed, 1370 insertions(+) create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/IntelligentPerformance.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/QueryPerformanceInsights.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/AdvisorsGet.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/AdvisorsListByServer.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/QueryPerformanceInsightResetData.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/QueryTextsGet.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/QueryTextsListByServer.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/RecommendedActionsListByServer.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/TopQueryStatisticsGet.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/TopQueryStatisticsListByServer.json create mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/WaitStatisticsListByServer.json diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/IntelligentPerformance.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/IntelligentPerformance.json new file mode 100644 index 000000000000..7bd817221b64 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/IntelligentPerformance.json @@ -0,0 +1,335 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "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.", + "version": "2021-06-01-preview" + }, + "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/flexibleServers/{serverName}/advisors/{advisorName}": { + "get": { + "tags": [ + "Advisors" + ], + "operationId": "Advisors_Get", + "x-ms-examples": { + "AdvisorsGet": { + "$ref": "./examples/AdvisorsGet.json" + } + }, + "description": "Get a recommendation action advisor.", + "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" + }, + { + "$ref": "#/parameters/AdvisorNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Advisor" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advisors": { + "get": { + "tags": [ + "Advisors" + ], + "operationId": "Advisors_ListByServer", + "x-ms-examples": { + "AdvisorsListByServer": { + "$ref": "./examples/AdvisorsListByServer.json" + } + }, + "description": "List recommendation action advisors.", + "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/AdvisorsResultList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advisors/{advisorName}/recommendedActions": { + "get": { + "tags": [ + "RecommendedActions" + ], + "operationId": "RecommendedActions_ListByServer", + "x-ms-examples": { + "RecommendedActionsListByServer": { + "$ref": "./examples/RecommendedActionsListByServer.json" + } + }, + "description": "Retrieve recommended actions from the advisor.", + "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" + }, + { + "$ref": "#/parameters/AdvisorNameParameter" + }, + { + "name": "sessionId", + "in": "query", + "required": false, + "type": "string", + "description": "The recommendation action session identifier." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/RecommendationActionsResultList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "AdvisorProperties": { + "properties": {}, + "description": "The properties of a recommendation action advisor." + }, + "Advisor": { + "properties": { + "properties": { + "$ref": "#/definitions/AdvisorProperties", + "x-ms-client-flatten": true, + "description": "The properties of a recommendation action advisor." + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ProxyResource" + } + ], + "description": "Represents a recommendation action advisor." + }, + "AdvisorsResultList": { + "description": "A list of query statistics.", + "type": "object", + "properties": { + "value": { + "description": "The list of recommendation action advisors.", + "type": "array", + "items": { + "$ref": "#/definitions/Advisor" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "RecommendationActionProperties": { + "properties": { + "advisorName": { + "type": "string", + "description": "Advisor name." + }, + "sessionId": { + "type": "string", + "description": "Recommendation action session identifier." + }, + "actionId": { + "type": "integer", + "format": "int32", + "description": "Recommendation action identifier." + }, + "createdTime": { + "type": "string", + "format": "date-time", + "description": "Recommendation action creation time." + }, + "expirationTime": { + "type": "string", + "format": "date-time", + "description": "Recommendation action expiration time." + }, + "reason": { + "type": "string", + "description": "Recommendation action reason." + }, + "recommendationType": { + "type": "string", + "description": "Recommendation action type." + }, + "details": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Recommendation action details." + } + }, + "description": "The properties of a recommendation action." + }, + "RecommendationAction": { + "properties": { + "properties": { + "$ref": "#/definitions/RecommendationActionProperties", + "x-ms-client-flatten": true, + "description": "The properties of a recommendation action." + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ProxyResource" + } + ], + "description": "Represents a Recommendation Action." + }, + "RecommendationActionsResultList": { + "description": "A list of recommendation actions.", + "type": "object", + "properties": { + "value": { + "description": "The list of recommendation action advisors.", + "type": "array", + "items": { + "$ref": "#/definitions/RecommendationAction" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "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" + }, + "AdvisorNameParameter": { + "name": "advisorName", + "in": "path", + "required": true, + "type": "string", + "description": "The advisor name for recommendation action.", + "x-ms-parameter-location": "method" + }, + "RecommendedActionNameParameter": { + "name": "recommendedActionName", + "in": "path", + "required": true, + "type": "string", + "description": "The recommended action name.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/QueryPerformanceInsights.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/QueryPerformanceInsights.json new file mode 100644 index 000000000000..afe7cc2ad60f --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/QueryPerformanceInsights.json @@ -0,0 +1,696 @@ +{ + "swagger": "2.0", + "info": { + "title": "PostgreSQLServerManagementClient", + "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.", + "version": "2021-06-01-preview" + }, + "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/flexibleServers/{serverName}/resetQueryPerformanceInsightData": { + "post": { + "tags": [ + "ResetQueryPerformanceInsightData" + ], + "operationId": "QueryPerformanceInsightData_Reset", + "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" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/queryTexts/{queryId}": { + "get": { + "tags": [ + "QueryTexts" + ], + "operationId": "QueryTexts_Get", + "x-ms-examples": { + "QueryTextsGet": { + "$ref": "./examples/QueryTextsGet.json" + } + }, + "description": "Retrieve the Query-Store query texts for the queryId.", + "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" + }, + { + "$ref": "#/parameters/QueryIdParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/QueryText" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/queryTexts": { + "get": { + "tags": [ + "QueryTexts" + ], + "operationId": "QueryTexts_ListByServer", + "x-ms-examples": { + "QueryTextsListByServer": { + "$ref": "./examples/QueryTextsListByServer.json" + } + }, + "description": "Retrieve the Query-Store query texts for specified queryIds.", + "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" + }, + { + "name": "queryIds", + "in": "query", + "required": true, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "description": "The query identifiers" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/QueryTextsResultList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/topQueryStatistics/{queryStatisticId}": { + "get": { + "tags": [ + "TopQueryStatistics" + ], + "operationId": "TopQueryStatistics_Get", + "x-ms-examples": { + "TopQueryStatisticsGet": { + "$ref": "./examples/TopQueryStatisticsGet.json" + } + }, + "description": "Retrieve the query statistic for specified identifier.", + "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" + }, + { + "$ref": "#/parameters/QueryStatisticIdParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/QueryStatistic" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/topQueryStatistics": { + "get": { + "tags": [ + "TopQueryStatistics" + ], + "operationId": "TopQueryStatistics_ListByServer", + "x-ms-examples": { + "TopQueryStatisticsListByServer": { + "$ref": "./examples/TopQueryStatisticsListByServer.json" + } + }, + "description": "Retrieve the Query-Store top queries for specified metric and aggregation.", + "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/TopQueryStatisticsResultList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/waitStatistics": { + "get": { + "tags": [ + "WaitStatistics" + ], + "operationId": "WaitStatistics_ListByServer", + "x-ms-examples": { + "WaitStatisticsListByServer": { + "$ref": "./examples/WaitStatisticsListByServer.json" + } + }, + "description": "Retrieve wait statistics for specified aggregation window.", + "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" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WaitStatisticsInput" + }, + "description": "The required parameters for retrieving wait statistics." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/WaitStatisticsResultList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "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." + }, + "QueryTextProperties": { + "properties": { + "queryId": { + "type": "string", + "description": "Query identifier unique to the server." + }, + "queryText": { + "type": "string", + "description": "Query text." + } + }, + "description": "The properties of a query text." + }, + "QueryText": { + "properties": { + "properties": { + "$ref": "#/definitions/QueryTextProperties", + "x-ms-client-flatten": true, + "description": "The properties of a query text." + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ProxyResource" + } + ], + "description": "Represents a Query Text." + }, + "QueryTextsResultList": { + "description": "A list of query texts.", + "type": "object", + "properties": { + "value": { + "description": "The list of query texts.", + "type": "array", + "items": { + "$ref": "#/definitions/QueryText" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "TopQueryStatisticsInputProperties": { + "properties": { + "numberOfTopQueries": { + "type": "integer", + "format": "int32", + "description": "Max number of top queries to return." + }, + "aggregationFunction": { + "type": "string", + "description": "Aggregation function name." + }, + "observedMetric": { + "type": "string", + "description": "Observed metric name." + }, + "observationStartTime": { + "type": "string", + "format": "date-time", + "description": "Observation start time." + }, + "observationEndTime": { + "type": "string", + "format": "date-time", + "description": "Observation end time." + }, + "aggregationWindow": { + "type": "string", + "description": "Aggregation interval type in ISO 8601 format." + } + }, + "required": [ + "numberOfTopQueries", + "aggregationFunction", + "observedMetric", + "observationStartTime", + "observationEndTime", + "aggregationWindow" + ], + "description": "The properties for input to get top query statistics" + }, + "TopQueryStatisticsInput": { + "properties": { + "properties": { + "$ref": "#/definitions/TopQueryStatisticsInputProperties", + "x-ms-client-flatten": true, + "description": "The properties of a wait statistics input." + } + }, + "required": [ + "properties" + ], + "description": "Input to get top query statistics" + }, + "QueryStatisticProperties": { + "properties": { + "queryId": { + "type": "string", + "description": "Database query identifier." + }, + "startTime": { + "type": "string", + "format": "date-time", + "description": "Observation start time." + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "Observation end time." + }, + "aggregationFunction": { + "type": "string", + "description": "Aggregation function name." + }, + "databaseNames": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The list of database names." + }, + "queryExecutionCount": { + "type": "integer", + "format": "int64", + "description": "Number of query executions in this time interval." + }, + "metricName": { + "type": "string", + "description": "Metric name." + }, + "metricDisplayName": { + "type": "string", + "description": "Metric display name." + }, + "metricValue": { + "type": "number", + "format": "double", + "description": "Metric value." + }, + "metricValueUnit": { + "type": "string", + "description": "Metric value unit." + } + }, + "description": "The properties of a query statistic." + }, + "QueryStatistic": { + "properties": { + "properties": { + "$ref": "#/definitions/QueryStatisticProperties", + "x-ms-client-flatten": true, + "description": "The properties of a query statistic." + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ProxyResource" + } + ], + "description": "Represents a Query Statistic." + }, + "TopQueryStatisticsResultList": { + "description": "A list of query statistics.", + "type": "object", + "properties": { + "value": { + "description": "The list of top query statistics.", + "type": "array", + "items": { + "$ref": "#/definitions/QueryStatistic" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "WaitStatisticsInputProperties": { + "properties": { + "observationStartTime": { + "type": "string", + "format": "date-time", + "description": "Observation start time." + }, + "observationEndTime": { + "type": "string", + "format": "date-time", + "description": "Observation end time." + }, + "aggregationWindow": { + "type": "string", + "description": "Aggregation interval type in ISO 8601 format." + } + }, + "required": [ + "observationStartTime", + "observationEndTime", + "aggregationWindow" + ], + "description": "The properties for input to get wait statistics" + }, + "WaitStatisticsInput": { + "properties": { + "properties": { + "$ref": "#/definitions/WaitStatisticsInputProperties", + "x-ms-client-flatten": true, + "description": "The properties of a wait statistics input." + } + }, + "required": [ + "properties" + ], + "description": "Input to get wait statistics" + }, + "WaitStatisticProperties": { + "properties": { + "startTime": { + "type": "string", + "format": "date-time", + "description": "Observation start time." + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "Observation end time." + }, + "eventName": { + "type": "string", + "description": "Wait event name." + }, + "eventTypeName": { + "type": "string", + "description": "Wait event type name." + }, + "queryId": { + "type": "integer", + "format": "int64", + "description": "Database query identifier." + }, + "databaseName": { + "type": "string", + "description": "Database Name." + }, + "userId": { + "type": "integer", + "format": "int64", + "description": "Database user identifier." + }, + "count": { + "type": "integer", + "format": "int64", + "description": "Wait event count observed in this time interval." + }, + "totalTimeInMs": { + "type": "number", + "format": "double", + "description": "Total time of wait in milliseconds in this time interval." + } + }, + "description": "The properties of a wait statistic." + }, + "WaitStatistic": { + "properties": { + "properties": { + "$ref": "#/definitions/WaitStatisticProperties", + "x-ms-client-flatten": true, + "description": "The properties of a wait statistic." + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ProxyResource" + } + ], + "description": "Represents a Wait Statistic." + }, + "WaitStatisticsResultList": { + "description": "A list of wait statistics.", + "type": "object", + "properties": { + "value": { + "description": "The list of wait statistics.", + "type": "array", + "items": { + "$ref": "#/definitions/WaitStatistic" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "QueryIdParameter": { + "name": "queryId", + "in": "path", + "required": true, + "type": "string", + "description": "The Query-Store query identifier.", + "x-ms-parameter-location": "method" + }, + "QueryStatisticIdParameter": { + "name": "queryStatisticId", + "in": "path", + "required": true, + "type": "string", + "description": "The Query Statistic identifier.", + "x-ms-parameter-location": "method" + }, + "WaitStatisticsIdParameter": { + "name": "waitStatisticsId", + "in": "path", + "required": true, + "type": "string", + "description": "The Wait Statistic identifier.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/AdvisorsGet.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/AdvisorsGet.json new file mode 100644 index 000000000000..59427387778a --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/AdvisorsGet.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2021-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testResourceGroupName", + "serverName": "testServerName", + "advisorName": "Index" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testResourceGroupName/providers/Microsoft.DBforPostgreSQL/flexibleServers/testServerName/advisors/Index", + "name": "Index", + "type": "Microsoft.DBforPostgreSQL/flexibleServers/advisors", + "properties": {} + } + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/AdvisorsListByServer.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/AdvisorsListByServer.json new file mode 100644 index 000000000000..cc25bb6522d6 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/AdvisorsListByServer.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2021-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testResourceGroupName", + "serverName": "testServerName" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testResourceGroupName/providers/Microsoft.DBforPostgreSQL/flexibleServers/testServerName/advisors/Index", + "name": "Index", + "type": "Microsoft.DBforPostgreSQL/flexibleServers/advisors", + "properties": {} + } + ] + } + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/QueryPerformanceInsightResetData.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/QueryPerformanceInsightResetData.json new file mode 100644 index 000000000000..38210d965e4d --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/QueryPerformanceInsightResetData.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2021-06-01-preview", + "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/preview/2021-06-01-preview/examples/QueryTextsGet.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/QueryTextsGet.json new file mode 100644 index 000000000000..858eb6497e01 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/QueryTextsGet.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2021-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testResourceGroupName", + "serverName": "testServerName", + "queryId": 1 + }, + "responses": { + "200": { + "body": { + "id": "queryTexts-1", + "name": "1", + "type": "Microsoft.DBforPostgreSQL/flexibleServers/queryTexts", + "properties": { + "queryId": "1", + "queryText": "UPDATE `performance_schema`.`setup_instruments` SET `ENABLED` = ? , `TIMED` = ? WHERE NAME = ?" + } + } + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/QueryTextsListByServer.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/QueryTextsListByServer.json new file mode 100644 index 000000000000..bda2c533b040 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/QueryTextsListByServer.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2021-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testResourceGroupName", + "serverName": "testServerName", + "queryIds": [ + "1", + "2" + ] + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "queryTexts-1", + "name": "1", + "type": "Microsoft.DBforPostgreSQL/flexibleServers/queryTexts", + "properties": { + "queryId": "1", + "queryText": "UPDATE `performance_schema`.`setup_instruments` SET `ENABLED` = ? , `TIMED` = ? WHERE NAME = ?" + } + }, + { + "id": "queryTexts-2", + "name": "2", + "type": "Microsoft.DBforPostgreSQL/flexibleServers/queryTexts", + "properties": { + "queryId": "2", + "queryText": "UPDATE `performance_schema`.`setup_instruments` SET `ENABLED` = ? , `TIMED` = ? WHERE NAME LIKE ?" + } + } + ] + } + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/RecommendedActionsListByServer.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/RecommendedActionsListByServer.json new file mode 100644 index 000000000000..7499eb946c0a --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/RecommendedActionsListByServer.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2021-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testResourceGroupName", + "serverName": "testServerName", + "advisorName": "Index" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testResourceGroupName/providers/Microsoft.Sql/flexibleServers/testServerName/advisors/Index/recommendedActions/Index-1", + "name": "Index-1", + "type": "Microsoft.DBforPostgreSQL/flexibleServers/advisors/recommendedActions", + "properties": { + "advisorName": "Index", + "sessionId": "c63c2114-e2a4-4c7a-98c1-85577d1a5d50", + "actionId": 1, + "createdTime": "2019-05-01T23:43:24Z", + "expirationTime": "2019-05-08T23:43:24Z", + "reason": "Column `movies_genres`.`movie_id` appear in Join On clause(s).", + "recommendationType": "Add", + "details": { + "engine": "InnoDB", + "script": "alter table `movies`.`movies_genres` add index `idx_movie_id` (`movie_id`)", + "queryIds": "779", + "indexName": "idx_movie_id", + "indexType": "BTREE", + "tableName": "movies_genres", + "schemaName": "movies", + "indexColumns": "`movies_genres`.`movie_id`", + "parentTableName": "movies_genres" + } + } + }, + { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testResourceGroupName/providers/Microsoft.Sql/flexibleServers/testServerName/advisors/Index/recommendedActions/Index-2", + "name": "Index-2", + "type": "Microsoft.DBforPostgreSQL/flexibleServers/advisors/recommendedActions", + "properties": { + "advisorName": "Index", + "sessionId": "c63c2114-e2a4-4c7a-98c1-85577d1a5d50", + "actionId": 2, + "createdTime": "2019-05-01T23:43:24Z", + "expirationTime": "2019-05-08T23:43:24Z", + "reason": "Column `movies_genres`.`genre` appear in Group By clause(s).", + "recommendationType": "Add", + "details": { + "engine": "InnoDB", + "script": "alter table `movies`.`movies_genres` add index `idx_genre` (`genre`)", + "queryIds": "779", + "indexName": "idx_genre", + "indexType": "BTREE", + "tableName": "movies_genres", + "schemaName": "movies", + "indexColumns": "`movies_genres`.`genre`", + "parentTableName": "movies_genres" + } + } + } + ] + } + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/TopQueryStatisticsGet.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/TopQueryStatisticsGet.json new file mode 100644 index 000000000000..a59fbbf6d457 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/TopQueryStatisticsGet.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2021-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testResourceGroupName", + "serverName": "testServerName", + "queryStatisticId": "66-636923268000000000-636923277000000000-avg-duration" + }, + "responses": { + "200": { + "body": { + "id": "66-636923268000000000-636923277000000000-avg-duration", + "name": "66-636923268000000000-636923277000000000-avg-duration", + "type": "Microsoft.DBforPostgreSQL/flexibleServers/queryStatistics", + "properties": { + "aggregationFunction": "avg", + "databaseNames": [ + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testResourceGroupName/providers/Microsoft.DBforPostgreSQL/flexibleServers/testServerName/databases/postgresql" + ], + "startTime": "2019-05-01T17:00:00Z", + "endTime": "2019-05-01T17:15:00Z", + "metricDisplayName": "Query duration", + "metricName": "duration", + "metricValue": 123.301446136, + "metricValueUnit": "milliseconds", + "queryExecutionCount": 1, + "queryId": "66" + } + } + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/TopQueryStatisticsListByServer.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/TopQueryStatisticsListByServer.json new file mode 100644 index 000000000000..c2b0c97ac24a --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/TopQueryStatisticsListByServer.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "api-version": "2021-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testResourceGroupName", + "serverName": "testServerName", + "parameters": { + "properties": { + "numberOfTopQueries": 5, + "aggregationFunction": "avg", + "observedMetric": "duration", + "observationStartTime": "2019-05-01T20:00:00.000Z", + "observationEndTime": "2019-05-07T20:00:00.000Z", + "aggregationWindow": "PT15M" + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "66-636923268000000000-636923277000000000-avg-duration", + "name": "66-636923268000000000-636923277000000000-avg-duration", + "type": "Microsoft.DBforPostgreSQL/flexibleServers/queryStatistics", + "properties": { + "aggregationFunction": "avg", + "databaseNames": [ + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testResourceGroupName/providers/Microsoft.DBforPostgreSQL/flexibleServers/testServerName/databases/postgresql" + ], + "startTime": "2019-05-01T17:00:00Z", + "endTime": "2019-05-01T17:15:00Z", + "metricDisplayName": "Query duration", + "metricName": "duration", + "metricValue": 123.301446136, + "metricValueUnit": "milliseconds", + "queryExecutionCount": 1, + "queryId": "66" + } + }, + { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testResourceGroupName/providers/Microsoft.DBforPostgreSQL/flexibleServers/testServerName/queryStatistic/66-636924483000000000-636924492000000000-avg-duration", + "name": "66-636924483000000000-636924492000000000-avg-duration", + "type": "Microsoft.DBforPostgreSQL/flexibleServers/queryStatistics", + "properties": { + "aggregationFunction": "avg", + "databaseNames": [ + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testResourceGroupName/providers/Microsoft.DBforPostgreSQL/flexibleServers/testServerName/databases/postgresql" + ], + "startTime": "2019-05-03T02:45:00Z", + "endTime": "2019-05-03T03:00:00Z", + "metricDisplayName": "Query duration", + "metricName": "duration", + "metricValue": 1712.301446136, + "metricValueUnit": "milliseconds", + "queryExecutionCount": 1, + "queryId": "66" + } + } + ] + } + } + } +} diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/WaitStatisticsListByServer.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/WaitStatisticsListByServer.json new file mode 100644 index 000000000000..49dfbc7d9ae0 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/WaitStatisticsListByServer.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "api-version": "2021-06-01-preview", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "resourceGroupName": "testResourceGroupName", + "serverName": "testServerName", + "parameters": { + "properties": { + "observationStartTime": "2019-05-01T20:00:00.000Z", + "observationEndTime": "2019-05-07T20:00:00.000Z", + "aggregationWindow": "PT15M" + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "636927606000000000-636927615000000000-send-wait/io/socket/sql/client_connection-2--0", + "name": "636927606000000000-636927615000000000-send-wait/io/socket/sql/client_connection-2--0", + "type": "Microsoft.DBforPostgreSQL/flexibleServers/waitStatistics", + "properties": { + "startTime": "2019-05-06T17:30:00Z", + "endTime": "2019-05-06T17:45:00Z", + "eventName": "wait/io/socket/sql/client_connection", + "eventTypeName": "send", + "queryId": 2, + "databaseName": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testResourceGroupName/providers/Microsoft.DBforPostgreSQL/flexibleServers/testServerName/databases/postgresql", + "userId": 0, + "count": 2, + "totalTimeInMs": 12.345 + } + }, + { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/hyshim-test/providers/Microsoft.DBforPostgreSQL/flexibleServers/hyshim-wait-stats-fix/waitStatistics/636927606000000000-636927615000000000-lock-wait/synch/mutex/mysys/THR_LOCK::mutex-2--0", + "name": "636927606000000000-636927615000000000-lock-wait/synch/mutex/mysys/THR_LOCK::mutex-2--0", + "type": "Microsoft.DBforPostgreSQL/flexibleServers/waitStatistics", + "properties": { + "startTime": "2019-05-06T17:30:00Z", + "endTime": "2019-05-06T17:45:00Z", + "eventName": "wait/synch/mutex/mysys/THR_LOCK::mutex", + "eventTypeName": "lock", + "queryId": 2, + "databaseName": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/hyshim-test/providers/Microsoft.DBforPostgreSQL/flexibleServers/hyshim-wait-stats-fix/databases/", + "userId": 0, + "count": 4, + "totalTimeInMs": 56.789 + } + } + ] + } + } + } +} diff --git a/specification/postgresql/resource-manager/readme.md b/specification/postgresql/resource-manager/readme.md index 9fab2b751ee5..264598c66500 100644 --- a/specification/postgresql/resource-manager/readme.md +++ b/specification/postgresql/resource-manager/readme.md @@ -50,6 +50,8 @@ input-file: - Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/postgresql.json - Microsoft.DBforPostgreSQL/preview/2020-11-05-preview/Databases.json - Microsoft.DBforPostgreSQL/preview/2021-03-31-privatepreview/PrivateDnsZone.json +- Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/IntelligentPerformance.json +- Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/QueryPerformanceInsights.json ``` ### Tag: package-2021-04-10-privatepreview @@ -259,6 +261,8 @@ input-file: - $(this-folder)/Microsoft.DBforPostgreSQL/preview/2020-01-01-privatepreview/DataEncryptionKeys.json - $(this-folder)/Microsoft.DBforPostgreSQL/preview/2021-03-31-privatepreview/PrivateDnsZone.json - $(this-folder)/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/postgresql.json + - $(this-folder)/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/IntelligentPerformance.json + - $(this-folder)/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/QueryPerformanceInsights.json - $(this-folder)/Microsoft.DBforPostgreSQL/stable/2017-12-01/postgresql.json - $(this-folder)/Microsoft.DBforPostgreSQL/stable/2017-12-01/ServerSecurityAlertPolicies.json - $(this-folder)/Microsoft.DBforPostgreSQL/stable/2018-06-01/PrivateEndpointConnections.json From c8840ba5cb491ac7ae7abc429b175f2f5a6795ff Mon Sep 17 00:00:00 2001 From: Deepak S Date: Thu, 10 Jun 2021 12:47:10 -0700 Subject: [PATCH 2/6] Addressing review comments --- .../IntelligentPerformance.json | 6 ++++-- .../examples/QueryTextsGet.json | 2 +- .../examples/QueryTextsListByServer.json | 4 ++-- .../examples/TopQueryStatisticsGet.json | 2 +- .../examples/TopQueryStatisticsListByServer.json | 2 +- .../examples/WaitStatisticsListByServer.json | 16 ++++++++-------- 6 files changed, 17 insertions(+), 15 deletions(-) diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/IntelligentPerformance.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/IntelligentPerformance.json index 7bd817221b64..568ba428795f 100644 --- a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/IntelligentPerformance.json +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/IntelligentPerformance.json @@ -191,7 +191,8 @@ "$ref": "#/definitions/AdvisorProperties", "x-ms-client-flatten": true, "description": "The properties of a recommendation action advisor." - } + }, + "readOnly": true }, "allOf": [ { @@ -268,7 +269,8 @@ "$ref": "#/definitions/RecommendationActionProperties", "x-ms-client-flatten": true, "description": "The properties of a recommendation action." - } + }, + "readOnly": true }, "allOf": [ { diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/QueryTextsGet.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/QueryTextsGet.json index 858eb6497e01..46e29b056d15 100644 --- a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/QueryTextsGet.json +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/QueryTextsGet.json @@ -9,7 +9,7 @@ "responses": { "200": { "body": { - "id": "queryTexts-1", + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testResourceGroupName/providers/Microsoft.DBforMySQL/servers/testServerName/queryTexts/1", "name": "1", "type": "Microsoft.DBforPostgreSQL/flexibleServers/queryTexts", "properties": { diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/QueryTextsListByServer.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/QueryTextsListByServer.json index bda2c533b040..24c84011360f 100644 --- a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/QueryTextsListByServer.json +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/QueryTextsListByServer.json @@ -14,7 +14,7 @@ "body": { "value": [ { - "id": "queryTexts-1", + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testResourceGroupName/providers/Microsoft.DBforMySQL/servers/testServerName/queryTexts/1", "name": "1", "type": "Microsoft.DBforPostgreSQL/flexibleServers/queryTexts", "properties": { @@ -23,7 +23,7 @@ } }, { - "id": "queryTexts-2", + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testResourceGroupName/providers/Microsoft.DBforMySQL/servers/testServerName/queryTexts/2", "name": "2", "type": "Microsoft.DBforPostgreSQL/flexibleServers/queryTexts", "properties": { diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/TopQueryStatisticsGet.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/TopQueryStatisticsGet.json index a59fbbf6d457..b63b8afdfca3 100644 --- a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/TopQueryStatisticsGet.json +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/TopQueryStatisticsGet.json @@ -9,7 +9,7 @@ "responses": { "200": { "body": { - "id": "66-636923268000000000-636923277000000000-avg-duration", + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testResourceGroupName/providers/Microsoft.DBforMySQL/servers/testServerName/queryStatistic/66-636923268000000000-636923277000000000-avg-duration", "name": "66-636923268000000000-636923277000000000-avg-duration", "type": "Microsoft.DBforPostgreSQL/flexibleServers/queryStatistics", "properties": { diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/TopQueryStatisticsListByServer.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/TopQueryStatisticsListByServer.json index c2b0c97ac24a..488621f9cf13 100644 --- a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/TopQueryStatisticsListByServer.json +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/TopQueryStatisticsListByServer.json @@ -20,7 +20,7 @@ "body": { "value": [ { - "id": "66-636923268000000000-636923277000000000-avg-duration", + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testResourceGroupName/providers/Microsoft.DBforMySQL/servers/testServerName/queryStatistic/66-636923268000000000-636923277000000000-avg-duration", "name": "66-636923268000000000-636923277000000000-avg-duration", "type": "Microsoft.DBforPostgreSQL/flexibleServers/queryStatistics", "properties": { diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/WaitStatisticsListByServer.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/WaitStatisticsListByServer.json index 49dfbc7d9ae0..a292fe488ab4 100644 --- a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/WaitStatisticsListByServer.json +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/WaitStatisticsListByServer.json @@ -17,32 +17,32 @@ "body": { "value": [ { - "id": "636927606000000000-636927615000000000-send-wait/io/socket/sql/client_connection-2--0", - "name": "636927606000000000-636927615000000000-send-wait/io/socket/sql/client_connection-2--0", - "type": "Microsoft.DBforPostgreSQL/flexibleServers/waitStatistics", + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/hyshim-test/providers/Microsoft.DBforPostgreSQL/servers/hyshim-wait-stats-fix/waitStatistics/636927606000000000-636927615000000000-send-wait/io/socket/sql/client_connection-2--0", + "name": "636927606000000000-636927615000000000-send-wait", + "type": "Microsoft.DBforPostgreSQL/servers/waitStatistics", "properties": { "startTime": "2019-05-06T17:30:00Z", "endTime": "2019-05-06T17:45:00Z", "eventName": "wait/io/socket/sql/client_connection", "eventTypeName": "send", "queryId": 2, - "databaseName": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testResourceGroupName/providers/Microsoft.DBforPostgreSQL/flexibleServers/testServerName/databases/postgresql", + "databaseName": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testResourceGroupName/providers/Microsoft.DBforPostgreSQL/servers/testServerName/databases/mysql", "userId": 0, "count": 2, "totalTimeInMs": 12.345 } }, { - "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/hyshim-test/providers/Microsoft.DBforPostgreSQL/flexibleServers/hyshim-wait-stats-fix/waitStatistics/636927606000000000-636927615000000000-lock-wait/synch/mutex/mysys/THR_LOCK::mutex-2--0", - "name": "636927606000000000-636927615000000000-lock-wait/synch/mutex/mysys/THR_LOCK::mutex-2--0", - "type": "Microsoft.DBforPostgreSQL/flexibleServers/waitStatistics", + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/hyshim-test/providers/Microsoft.DBforPostgreSQL/servers/hyshim-wait-stats-fix/waitStatistics/636927606000000000-636927615000000000-lock-wait", + "name": "636927606000000000-636927615000000000-lock-wait", + "type": "Microsoft.DBforPostgreSQL/servers/waitStatistics", "properties": { "startTime": "2019-05-06T17:30:00Z", "endTime": "2019-05-06T17:45:00Z", "eventName": "wait/synch/mutex/mysys/THR_LOCK::mutex", "eventTypeName": "lock", "queryId": 2, - "databaseName": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/hyshim-test/providers/Microsoft.DBforPostgreSQL/flexibleServers/hyshim-wait-stats-fix/databases/", + "databaseName": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/hyshim-test/providers/Microsoft.DBforPostgreSQL/servers/hyshim-wait-stats-fix/databases/", "userId": 0, "count": 4, "totalTimeInMs": 56.789 From cf7097d1d54bb32c1520ec03cb07d3dfb80499ed Mon Sep 17 00:00:00 2001 From: Deepak S Date: Sun, 13 Jun 2021 21:08:08 -0700 Subject: [PATCH 3/6] Addressing PR comments --- .../examples/WaitStatisticsListByServer.json | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/WaitStatisticsListByServer.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/WaitStatisticsListByServer.json index a292fe488ab4..94907f5bdea0 100644 --- a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/WaitStatisticsListByServer.json +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/WaitStatisticsListByServer.json @@ -16,22 +16,6 @@ "200": { "body": { "value": [ - { - "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/hyshim-test/providers/Microsoft.DBforPostgreSQL/servers/hyshim-wait-stats-fix/waitStatistics/636927606000000000-636927615000000000-send-wait/io/socket/sql/client_connection-2--0", - "name": "636927606000000000-636927615000000000-send-wait", - "type": "Microsoft.DBforPostgreSQL/servers/waitStatistics", - "properties": { - "startTime": "2019-05-06T17:30:00Z", - "endTime": "2019-05-06T17:45:00Z", - "eventName": "wait/io/socket/sql/client_connection", - "eventTypeName": "send", - "queryId": 2, - "databaseName": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testResourceGroupName/providers/Microsoft.DBforPostgreSQL/servers/testServerName/databases/mysql", - "userId": 0, - "count": 2, - "totalTimeInMs": 12.345 - } - }, { "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/hyshim-test/providers/Microsoft.DBforPostgreSQL/servers/hyshim-wait-stats-fix/waitStatistics/636927606000000000-636927615000000000-lock-wait", "name": "636927606000000000-636927615000000000-lock-wait", From f2ffaf1e563fca75a4f1df290fb4ff1783552656 Mon Sep 17 00:00:00 2001 From: Deepak S Date: Mon, 14 Jun 2021 16:01:42 -0700 Subject: [PATCH 4/6] Removing APIs unimplemented in Sterling --- .../QueryPerformanceInsights.json | 45 ------------------- .../examples/TopQueryStatisticsGet.json | 32 ------------- 2 files changed, 77 deletions(-) delete mode 100644 specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/TopQueryStatisticsGet.json diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/QueryPerformanceInsights.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/QueryPerformanceInsights.json index afe7cc2ad60f..058004fe380f 100644 --- a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/QueryPerformanceInsights.json +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/QueryPerformanceInsights.json @@ -177,51 +177,6 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/topQueryStatistics/{queryStatisticId}": { - "get": { - "tags": [ - "TopQueryStatistics" - ], - "operationId": "TopQueryStatistics_Get", - "x-ms-examples": { - "TopQueryStatisticsGet": { - "$ref": "./examples/TopQueryStatisticsGet.json" - } - }, - "description": "Retrieve the query statistic for specified identifier.", - "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" - }, - { - "$ref": "#/parameters/QueryStatisticIdParameter" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/QueryStatistic" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/CloudError" - } - } - } - } - }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/topQueryStatistics": { "get": { "tags": [ diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/TopQueryStatisticsGet.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/TopQueryStatisticsGet.json deleted file mode 100644 index b63b8afdfca3..000000000000 --- a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/TopQueryStatisticsGet.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "parameters": { - "api-version": "2021-06-01-preview", - "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff", - "resourceGroupName": "testResourceGroupName", - "serverName": "testServerName", - "queryStatisticId": "66-636923268000000000-636923277000000000-avg-duration" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testResourceGroupName/providers/Microsoft.DBforMySQL/servers/testServerName/queryStatistic/66-636923268000000000-636923277000000000-avg-duration", - "name": "66-636923268000000000-636923277000000000-avg-duration", - "type": "Microsoft.DBforPostgreSQL/flexibleServers/queryStatistics", - "properties": { - "aggregationFunction": "avg", - "databaseNames": [ - "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testResourceGroupName/providers/Microsoft.DBforPostgreSQL/flexibleServers/testServerName/databases/postgresql" - ], - "startTime": "2019-05-01T17:00:00Z", - "endTime": "2019-05-01T17:15:00Z", - "metricDisplayName": "Query duration", - "metricName": "duration", - "metricValue": 123.301446136, - "metricValueUnit": "milliseconds", - "queryExecutionCount": 1, - "queryId": "66" - } - } - } - } -} From e7742c9f2464f9b14b4bcb7b75a0d7da220b7b8e Mon Sep 17 00:00:00 2001 From: Deepak S Date: Wed, 16 Jun 2021 05:53:19 -0700 Subject: [PATCH 5/6] Fixing resource schemas --- .../2021-06-01-preview/IntelligentPerformance.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/IntelligentPerformance.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/IntelligentPerformance.json index 568ba428795f..accbca05aa98 100644 --- a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/IntelligentPerformance.json +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/IntelligentPerformance.json @@ -191,14 +191,14 @@ "$ref": "#/definitions/AdvisorProperties", "x-ms-client-flatten": true, "description": "The properties of a recommendation action advisor." - }, - "readOnly": true + } }, "allOf": [ { "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ProxyResource" } ], + "readOnly": true, "description": "Represents a recommendation action advisor." }, "AdvisorsResultList": { @@ -269,14 +269,14 @@ "$ref": "#/definitions/RecommendationActionProperties", "x-ms-client-flatten": true, "description": "The properties of a recommendation action." - }, - "readOnly": true + } }, "allOf": [ { "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ProxyResource" } ], + "readOnly": true, "description": "Represents a Recommendation Action." }, "RecommendationActionsResultList": { From 7a3eeb8530e1935618f79c2927de6e86c92b71b0 Mon Sep 17 00:00:00 2001 From: Deepak S Date: Sun, 20 Jun 2021 20:33:21 -0700 Subject: [PATCH 6/6] Fixing linting errors --- .../2021-06-01-preview/IntelligentPerformance.json | 4 ++++ .../2021-06-01-preview/QueryPerformanceInsights.json | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/IntelligentPerformance.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/IntelligentPerformance.json index accbca05aa98..fc1e1a167bd7 100644 --- a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/IntelligentPerformance.json +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/IntelligentPerformance.json @@ -182,10 +182,12 @@ }, "definitions": { "AdvisorProperties": { + "type": "object", "properties": {}, "description": "The properties of a recommendation action advisor." }, "Advisor": { + "type": "object", "properties": { "properties": { "$ref": "#/definitions/AdvisorProperties", @@ -221,6 +223,7 @@ } }, "RecommendationActionProperties": { + "type": "object", "properties": { "advisorName": { "type": "string", @@ -264,6 +267,7 @@ "description": "The properties of a recommendation action." }, "RecommendationAction": { + "type": "object", "properties": { "properties": { "$ref": "#/definitions/RecommendationActionProperties", diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/QueryPerformanceInsights.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/QueryPerformanceInsights.json index 058004fe380f..e1bc6547fd5a 100644 --- a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/QueryPerformanceInsights.json +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/QueryPerformanceInsights.json @@ -310,6 +310,7 @@ "description": "An error response from the Batch service." }, "QueryTextProperties": { + "type": "object", "properties": { "queryId": { "type": "string", @@ -323,6 +324,7 @@ "description": "The properties of a query text." }, "QueryText": { + "type": "object", "properties": { "properties": { "$ref": "#/definitions/QueryTextProperties", @@ -357,6 +359,7 @@ } }, "TopQueryStatisticsInputProperties": { + "type": "object", "properties": { "numberOfTopQueries": { "type": "integer", @@ -397,6 +400,7 @@ "description": "The properties for input to get top query statistics" }, "TopQueryStatisticsInput": { + "type": "object", "properties": { "properties": { "$ref": "#/definitions/TopQueryStatisticsInputProperties", @@ -410,6 +414,7 @@ "description": "Input to get top query statistics" }, "QueryStatisticProperties": { + "type": "object", "properties": { "queryId": { "type": "string", @@ -462,6 +467,7 @@ "description": "The properties of a query statistic." }, "QueryStatistic": { + "type": "object", "properties": { "properties": { "$ref": "#/definitions/QueryStatisticProperties", @@ -496,6 +502,7 @@ } }, "WaitStatisticsInputProperties": { + "type": "object", "properties": { "observationStartTime": { "type": "string", @@ -520,6 +527,7 @@ "description": "The properties for input to get wait statistics" }, "WaitStatisticsInput": { + "type": "object", "properties": { "properties": { "$ref": "#/definitions/WaitStatisticsInputProperties", @@ -533,6 +541,7 @@ "description": "Input to get wait statistics" }, "WaitStatisticProperties": { + "type": "object", "properties": { "startTime": { "type": "string", @@ -580,6 +589,7 @@ "description": "The properties of a wait statistic." }, "WaitStatistic": { + "type": "object", "properties": { "properties": { "$ref": "#/definitions/WaitStatisticProperties",