Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing s360 violations related to recommendedactions APIs #12951

Merged
merged 4 commits into from
Feb 25, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"parameters": {
"api-version": "2018-06-01",
"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/servers/testServerName/advisors/Index",
"name": "Index",
"type": "Microsoft.DBforPostgreSQL/servers/advisors",
"properties": {}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"parameters": {
"api-version": "2018-06-01",
"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/servers/testServerName/advisors/Index",
"name": "Index",
"type": "Microsoft.DBforPostgreSQL/servers/advisors",
"properties": {}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"parameters": {
"api-version": "2018-06-01",
"subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff",
"resourceGroupName": "testResourceGroupName",
"serverName": "testServerName",
"advisorName": "Index",
"databaseName": "someDatabaseName"
},
"responses": {
"200": {},
"202": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"parameters": {
"api-version": "2018-06-01",
"subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff",
"locationName": "WestUS",
"operationId": "aaaabbbb-cccc-dddd-0000-111122223333"
},
"responses": {
"200": {
"body": {
"name": "aaaabbbb-cccc-dddd-0000-111122223333",
"startTime": "2019-05-01T17:15:00Z",
"status": "succeeded"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
{
"parameters": {
"api-version": "2018-06-01",
"subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff",
"locationName": "WestUS",
"operationId": "aaaabbbb-cccc-dddd-0000-111122223333"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testResourceGroupName/providers/Microsoft.Sql/servers/testServerName/advisors/Index/recommendedActions/Index-1",
"name": "Index-1",
"type": "Microsoft.DBforPostgreSQL/servers/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/servers/testServerName/advisors/Index/recommendedActions/Index-2",
"name": "Index-2",
"type": "Microsoft.DBforPostgreSQL/servers/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"
}
}
}
]
}
},
"201": {
"body": {
"value": [
{
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testResourceGroupName/providers/Microsoft.Sql/servers/testServerName/advisors/Index/recommendedActions/Index-1",
"name": "Index-1",
"type": "Microsoft.DBforPostgreSQL/servers/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/servers/testServerName/advisors/Index/recommendedActions/Index-2",
"name": "Index-2",
"type": "Microsoft.DBforPostgreSQL/servers/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"
}
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"parameters": {
"api-version": "2018-06-01",
"subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff",
"resourceGroupName": "testResourceGroupName",
"serverName": "testServerName",
"advisorName": "Index",
"recommendedActionName": "Index-1"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testResourceGroupName/providers/Microsoft.Sql/servers/testServerName/advisors/Index/recommendedActions/Index-1",
"name": "Index-1",
"type": "Microsoft.DBforPostgreSQL/servers/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"
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"parameters": {
"api-version": "2018-06-01",
"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/servers/testServerName/advisors/Index/recommendedActions/Index-1",
"name": "Index-1",
"type": "Microsoft.DBforPostgreSQL/servers/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/servers/testServerName/advisors/Index/recommendedActions/Index-2",
"name": "Index-2",
"type": "Microsoft.DBforPostgreSQL/servers/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"
}
}
}
]
}
}
}
}
2 changes: 2 additions & 0 deletions specification/postgresql/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ These settings apply only when `--tag=package-2018-06-01-privatepreview` is spec
input-file:
- Microsoft.DBforPostgreSQL/preview/2018-06-01-privatepreview/PrivateEndpointConnections.json
- Microsoft.DBforPostgreSQL/preview/2018-06-01-privatepreview/PrivateLinkResources.json
- Microsoft.DBforPostgreSQL/preview/2018-06-01-privatepreview/PerformanceRecommendations.json
- Microsoft.DBforPostgreSQL/preview/2018-06-01-privatepreview/QueryPerformanceInsights.json
```

### Tag: package-2018-06-01
Expand Down