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..fc1e1a167bd7 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/IntelligentPerformance.json @@ -0,0 +1,341 @@ +{ + "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": { + "type": "object", + "properties": {}, + "description": "The properties of a recommendation action advisor." + }, + "Advisor": { + "type": "object", + "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" + } + ], + "readOnly": true, + "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": { + "type": "object", + "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": { + "type": "object", + "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" + } + ], + "readOnly": true, + "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..e1bc6547fd5a --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/QueryPerformanceInsights.json @@ -0,0 +1,661 @@ +{ + "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": { + "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": { + "type": "object", + "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": { + "type": "object", + "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": { + "type": "object", + "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": { + "type": "object", + "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": { + "type": "object", + "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": { + "type": "object", + "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": { + "type": "object", + "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": { + "type": "object", + "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": { + "type": "object", + "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": { + "type": "object", + "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..46e29b056d15 --- /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": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testResourceGroupName/providers/Microsoft.DBforMySQL/servers/testServerName/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..24c84011360f --- /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": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testResourceGroupName/providers/Microsoft.DBforMySQL/servers/testServerName/queryTexts/1", + "name": "1", + "type": "Microsoft.DBforPostgreSQL/flexibleServers/queryTexts", + "properties": { + "queryId": "1", + "queryText": "UPDATE `performance_schema`.`setup_instruments` SET `ENABLED` = ? , `TIMED` = ? WHERE NAME = ?" + } + }, + { + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testResourceGroupName/providers/Microsoft.DBforMySQL/servers/testServerName/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/TopQueryStatisticsListByServer.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/TopQueryStatisticsListByServer.json new file mode 100644 index 000000000000..488621f9cf13 --- /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": "/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" + } + }, + { + "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..94907f5bdea0 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2021-06-01-preview/examples/WaitStatisticsListByServer.json @@ -0,0 +1,39 @@ +{ + "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": "/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/servers/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