Skip to content

Commit

Permalink
New API: QPI Reset (Azure#11884)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssen-msft authored and giromm2ms committed Dec 20, 2020
1 parent a328887 commit 6e9046e
Show file tree
Hide file tree
Showing 7 changed files with 391 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@
"schema": {
"$ref": "#/definitions/QueryText"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
}
}
Expand Down Expand Up @@ -116,6 +122,12 @@
"schema": {
"$ref": "#/definitions/QueryTextsResultList"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
},
"x-ms-pageable": {
Expand Down Expand Up @@ -158,6 +170,12 @@
"schema": {
"$ref": "#/definitions/QueryStatistic"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
}
}
Expand Down Expand Up @@ -203,6 +221,12 @@
"schema": {
"$ref": "#/definitions/TopQueryStatisticsResultList"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
},
"x-ms-pageable": {
Expand Down Expand Up @@ -245,6 +269,12 @@
"schema": {
"$ref": "#/definitions/WaitStatistic"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
}
}
Expand Down Expand Up @@ -290,12 +320,60 @@
"schema": {
"$ref": "#/definitions/WaitStatisticsResultList"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/resetQueryPerformanceInsightData": {
"post": {
"tags": [
"ResetQueryPerformanceInsightData"
],
"operationId": "ResetQueryPerformanceInsightData",
"x-ms-examples": {
"QueryPerformanceInsightResetData": {
"$ref": "./examples/QueryPerformanceInsightResetData.json"
}
},
"description": "Reset data for Query Performance Insight.",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/QueryPerformanceInsightResetDataResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
}
}
}
},
"definitions": {
Expand Down Expand Up @@ -602,6 +680,37 @@
"readOnly": true
}
}
},
"QueryPerformanceInsightResetDataResult": {
"description": "Result of Query Performance Insight data reset.",
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"Succeeded",
"Failed"
],
"x-ms-enum": {
"name": "QueryPerformanceInsightResetDataResultState",
"modelAsString": true
},
"description": "Indicates result of the operation."
},
"message": {
"type": "string",
"description": "operation message."
}
}
},
"CloudError": {
"x-ms-external": true,
"properties": {
"error": {
"$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse"
}
},
"description": "An error response from the Batch service."
}
},
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"parameters": {
"api-version": "2018-06-01",
"subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff",
"resourceGroupName": "testResourceGroupName",
"serverName": "testServerName"
},
"responses": {
"200": {
"body": {
"status": "Succeeded",
"message": "QPI reset data successful"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@
"schema": {
"$ref": "#/definitions/QueryText"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
}
}
Expand Down Expand Up @@ -116,6 +122,12 @@
"schema": {
"$ref": "#/definitions/QueryTextsResultList"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
},
"x-ms-pageable": {
Expand Down Expand Up @@ -158,6 +170,12 @@
"schema": {
"$ref": "#/definitions/QueryStatistic"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
}
}
Expand Down Expand Up @@ -203,6 +221,12 @@
"schema": {
"$ref": "#/definitions/TopQueryStatisticsResultList"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
},
"x-ms-pageable": {
Expand Down Expand Up @@ -245,6 +269,12 @@
"schema": {
"$ref": "#/definitions/WaitStatistic"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
}
}
Expand Down Expand Up @@ -290,12 +320,60 @@
"schema": {
"$ref": "#/definitions/WaitStatisticsResultList"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/resetQueryPerformanceInsightData": {
"post": {
"tags": [
"ResetQueryPerformanceInsightData"
],
"operationId": "ResetQueryPerformanceInsightData",
"x-ms-examples": {
"QueryPerformanceInsightResetData": {
"$ref": "./examples/QueryPerformanceInsightResetData.json"
}
},
"description": "Reset data for Query Performance Insight.",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/QueryPerformanceInsightResetDataResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
}
}
}
},
"definitions": {
Expand Down Expand Up @@ -602,6 +680,37 @@
"readOnly": true
}
}
},
"QueryPerformanceInsightResetDataResult": {
"description": "Result of Query Performance Insight data reset.",
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"Succeeded",
"Failed"
],
"x-ms-enum": {
"name": "QueryPerformanceInsightResetDataResultState",
"modelAsString": true
},
"description": "Indicates result of the operation."
},
"message": {
"type": "string",
"description": "operation message."
}
}
},
"CloudError": {
"x-ms-external": true,
"properties": {
"error": {
"$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse"
}
},
"description": "An error response from the Batch service."
}
},
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"parameters": {
"api-version": "2018-06-01",
"subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff",
"resourceGroupName": "testResourceGroupName",
"serverName": "testServerName"
},
"responses": {
"200": {
"body": {
"status": "Succeeded",
"message": "QPI reset data successful"
}
}
}
}
Loading

0 comments on commit 6e9046e

Please sign in to comment.