From ae7b7a4da3f0961a10865ca0ca0956343b638ec9 Mon Sep 17 00:00:00 2001 From: dabenhamMic Date: Tue, 5 Jul 2022 11:29:42 +0300 Subject: [PATCH 1/5] added 201 return status to QueryPacks_CreateOrUpdate --- .../stable/2019-09-01/QueryPacks.json | 6 ++++++ .../2019-09-01/examples/QueryPacksCreate.json | 15 +++++++++++++++ .../2019-09-01/examples/QueryPacksUpdate.json | 17 +++++++++++++++++ 3 files changed, 38 insertions(+) diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/QueryPacks.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/QueryPacks.json index 08c6955e56ff..4134dc2db109 100644 --- a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/QueryPacks.json +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/QueryPacks.json @@ -222,6 +222,12 @@ "schema": { "$ref": "#/definitions/LogAnalyticsQueryPack" } + }, + "201": { + "description": "Created response definition.", + "schema": { + "$ref": "#/definitions/LogAnalyticsQueryPack" + } } }, "x-ms-examples": { diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksCreate.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksCreate.json index e26eef16cc7b..11187b38cc8f 100644 --- a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksCreate.json +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksCreate.json @@ -24,6 +24,21 @@ "provisioningState": "Succeeded" } } + }, + "201": { + "body": { + "id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4919/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack", + "name": "my-querypack", + "type": "microsoft.operationalinsights/querypacks", + "location": "South Central US", + "tags": {}, + "properties": { + "queryPackId": "d1c8fc00-2b68-441e-8f9b-ded8748dc635", + "timeCreated": "2019-08-04T12:37:56.8543652Z", + "timeModified": "2019-08-04T12:37:56.8543652Z", + "provisioningState": "Succeeded" + } + } } } } diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksUpdate.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksUpdate.json index 7971064b45ce..eb7337e84ec9 100644 --- a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksUpdate.json +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksUpdate.json @@ -29,6 +29,23 @@ "provisioningState": "Succeeded" } } + }, + "201": { + "body": { + "id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4919/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack", + "name": "my-querypack", + "type": "microsoft.operationalinsights/querypacks", + "location": "South Central US", + "tags": { + "Tag1": "Value1" + }, + "properties": { + "queryPackId": "aac8fc00-2b68-441e-8f9b-ded8748dc635", + "timeCreated": "2019-06-04T12:37:56.8543652Z", + "timeModified": "2019-08-04T12:37:56.8543652Z", + "provisioningState": "Succeeded" + } + } } } } From 63fc19bef55b5154081df6dde4ab84cc75fb069d Mon Sep 17 00:00:00 2001 From: dabenhamMic Date: Tue, 5 Jul 2022 12:01:04 +0300 Subject: [PATCH 2/5] update return contract for QP: QueryPacks_CreateOrUpdate --- .../stable/2019-09-01/QueryPacks.json | 6 ++++ .../examples/QueryPackUpdateNoName.json | 32 +++++++++++++++++++ .../2019-09-01/examples/QueryPacksCreate.json | 15 --------- .../examples/QueryPacksCreateNoName.json | 28 ++++++++++++++++ .../2019-09-01/examples/QueryPacksUpdate.json | 17 ---------- 5 files changed, 66 insertions(+), 32 deletions(-) create mode 100644 specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackUpdateNoName.json create mode 100644 specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksCreateNoName.json diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/QueryPacks.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/QueryPacks.json index 4134dc2db109..b5cd0a7e676b 100644 --- a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/QueryPacks.json +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/QueryPacks.json @@ -234,8 +234,14 @@ "QueryPackCreate": { "$ref": "./examples/QueryPacksCreate.json" }, + "QueryPackCreateNoName": { + "$ref": "./examples/QueryPacksCreateNoName.json" + }, "QueryPackUpdate": { "$ref": "./examples/QueryPacksUpdate.json" + }, + "QueryPackUpdateNoName": { + "$ref": "./examples/QueryPackUpdateNoName.json" } } }, diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackUpdateNoName.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackUpdateNoName.json new file mode 100644 index 000000000000..ed172e7286cf --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackUpdateNoName.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2019-09-01", + "subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4919", + "resourceGroupName": "my-resource-group", + "LogAnalyticsQueryPackPayload": { + "location": "South Central US", + "tags": { + "Tag1": "Value1" + }, + "properties": {} + } + }, + "responses": { + "201": { + "body": { + "id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4919/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks", + "type": "microsoft.operationalinsights/querypacks", + "location": "South Central US", + "tags": { + "Tag1": "Value1" + }, + "properties": { + "queryPackId": "aac8fc00-2b68-441e-8f9b-ded8748dc635", + "timeCreated": "2019-06-04T12:37:56.8543652Z", + "timeModified": "2019-08-04T12:37:56.8543652Z", + "provisioningState": "Succeeded" + } + } + } + } +} diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksCreate.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksCreate.json index 11187b38cc8f..e26eef16cc7b 100644 --- a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksCreate.json +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksCreate.json @@ -24,21 +24,6 @@ "provisioningState": "Succeeded" } } - }, - "201": { - "body": { - "id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4919/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack", - "name": "my-querypack", - "type": "microsoft.operationalinsights/querypacks", - "location": "South Central US", - "tags": {}, - "properties": { - "queryPackId": "d1c8fc00-2b68-441e-8f9b-ded8748dc635", - "timeCreated": "2019-08-04T12:37:56.8543652Z", - "timeModified": "2019-08-04T12:37:56.8543652Z", - "provisioningState": "Succeeded" - } - } } } } diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksCreateNoName.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksCreateNoName.json new file mode 100644 index 000000000000..da94f7fdd628 --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksCreateNoName.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2019-09-01", + "subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4919", + "resourceGroupName": "my-resource-group", + "LogAnalyticsQueryPackPayload": { + "location": "South Central US", + "properties": {} + } + }, + "responses": { + "201": { + "body": { + "id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4919/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack", + "name": "my-querypack", + "type": "microsoft.operationalinsights/querypacks", + "location": "South Central US", + "tags": {}, + "properties": { + "queryPackId": "d1c8fc00-2b68-441e-8f9b-ded8748dc635", + "timeCreated": "2019-08-04T12:37:56.8543652Z", + "timeModified": "2019-08-04T12:37:56.8543652Z", + "provisioningState": "Succeeded" + } + } + } + } +} diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksUpdate.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksUpdate.json index eb7337e84ec9..7971064b45ce 100644 --- a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksUpdate.json +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksUpdate.json @@ -29,23 +29,6 @@ "provisioningState": "Succeeded" } } - }, - "201": { - "body": { - "id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4919/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack", - "name": "my-querypack", - "type": "microsoft.operationalinsights/querypacks", - "location": "South Central US", - "tags": { - "Tag1": "Value1" - }, - "properties": { - "queryPackId": "aac8fc00-2b68-441e-8f9b-ded8748dc635", - "timeCreated": "2019-06-04T12:37:56.8543652Z", - "timeModified": "2019-08-04T12:37:56.8543652Z", - "provisioningState": "Succeeded" - } - } } } } From 2384920054f5eb8d6dbb34a5a7a055f54be8102b Mon Sep 17 00:00:00 2001 From: dabenhamMic Date: Thu, 7 Jul 2022 14:10:20 +0300 Subject: [PATCH 3/5] added queryPackName as empty string to examples --- .../stable/2019-09-01/examples/QueryPackUpdateNoName.json | 1 + .../stable/2019-09-01/examples/QueryPacksCreateNoName.json | 1 + 2 files changed, 2 insertions(+) diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackUpdateNoName.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackUpdateNoName.json index ed172e7286cf..149bd0614456 100644 --- a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackUpdateNoName.json +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackUpdateNoName.json @@ -3,6 +3,7 @@ "api-version": "2019-09-01", "subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4919", "resourceGroupName": "my-resource-group", + "queryPackName": "", "LogAnalyticsQueryPackPayload": { "location": "South Central US", "tags": { diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksCreateNoName.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksCreateNoName.json index da94f7fdd628..bd2df4228bb5 100644 --- a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksCreateNoName.json +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksCreateNoName.json @@ -3,6 +3,7 @@ "api-version": "2019-09-01", "subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4919", "resourceGroupName": "my-resource-group", + "queryPackName": "", "LogAnalyticsQueryPackPayload": { "location": "South Central US", "properties": {} From ff3805275fef303d538c5dcef88d4e0bb0640245 Mon Sep 17 00:00:00 2001 From: dabenhamMic Date: Thu, 7 Jul 2022 14:13:18 +0300 Subject: [PATCH 4/5] removed redundent name from 201 response example --- .../stable/2019-09-01/examples/QueryPacksCreateNoName.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksCreateNoName.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksCreateNoName.json index bd2df4228bb5..9e407e69ecbb 100644 --- a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksCreateNoName.json +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksCreateNoName.json @@ -12,8 +12,7 @@ "responses": { "201": { "body": { - "id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4919/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack", - "name": "my-querypack", + "id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4919/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks", "type": "microsoft.operationalinsights/querypacks", "location": "South Central US", "tags": {}, From a186844942178b28703968abce6cd9b39b1e877a Mon Sep 17 00:00:00 2001 From: dabenhamMic Date: Wed, 20 Jul 2022 11:06:52 +0300 Subject: [PATCH 5/5] update QP swagger --- .../stable/2019-09-01/QueryPacks.json | 58 +++++++++++++++---- 1 file changed, 46 insertions(+), 12 deletions(-) diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/QueryPacks.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/QueryPacks.json index b5cd0a7e676b..0212d6921627 100644 --- a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/QueryPacks.json +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/QueryPacks.json @@ -107,6 +107,52 @@ "x-ms-pageable": { "nextLinkName": "nextLink" } + }, + "put": { + "description": "Creates a Log Analytics QueryPack. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation.", + "operationId": "QueryPacks_CreateOrUpdateWithoutName", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "name": "LogAnalyticsQueryPackPayload", + "description": "Properties that need to be specified to create or update a Log Analytics QueryPack.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/LogAnalyticsQueryPack" + } + } + ], + "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + }, + "201": { + "description": "Created response definition.", + "schema": { + "$ref": "#/definitions/LogAnalyticsQueryPack" + } + } + }, + "x-ms-examples": { + "QueryPackCreateNoName": { + "$ref": "./examples/QueryPacksCreateNoName.json" + }, + "QueryPackUpdateNoName": { + "$ref": "./examples/QueryPackUpdateNoName.json" + } + } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/queryPacks/{queryPackName}": { @@ -222,26 +268,14 @@ "schema": { "$ref": "#/definitions/LogAnalyticsQueryPack" } - }, - "201": { - "description": "Created response definition.", - "schema": { - "$ref": "#/definitions/LogAnalyticsQueryPack" - } } }, "x-ms-examples": { "QueryPackCreate": { "$ref": "./examples/QueryPacksCreate.json" }, - "QueryPackCreateNoName": { - "$ref": "./examples/QueryPacksCreateNoName.json" - }, "QueryPackUpdate": { "$ref": "./examples/QueryPacksUpdate.json" - }, - "QueryPackUpdateNoName": { - "$ref": "./examples/QueryPackUpdateNoName.json" } } },