From 208c91dc71eec634400fb0c0a7e073e35afd2978 Mon Sep 17 00:00:00 2001 From: dabenhamMic <74346518+dabenhamMic@users.noreply.github.com> Date: Thu, 8 Sep 2022 12:55:22 +0300 Subject: [PATCH] [OperationalInsights] Added 201 return status to QueryPacks_CreateOrUpdate (#19674) * added 201 return status to QueryPacks_CreateOrUpdate * update return contract for QP: QueryPacks_CreateOrUpdate * added queryPackName as empty string to examples * removed redundent name from 201 response example * update QP swagger --- .../stable/2019-09-01/QueryPacks.json | 46 +++++++++++++++++++ .../examples/QueryPackUpdateNoName.json | 33 +++++++++++++ .../examples/QueryPacksCreateNoName.json | 28 +++++++++++ 3 files changed, 107 insertions(+) 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 08c6955e56ff..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}": { 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..149bd0614456 --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackUpdateNoName.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2019-09-01", + "subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4919", + "resourceGroupName": "my-resource-group", + "queryPackName": "", + "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/QueryPacksCreateNoName.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksCreateNoName.json new file mode 100644 index 000000000000..9e407e69ecbb --- /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", + "queryPackName": "", + "LogAnalyticsQueryPackPayload": { + "location": "South Central US", + "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": {}, + "properties": { + "queryPackId": "d1c8fc00-2b68-441e-8f9b-ded8748dc635", + "timeCreated": "2019-08-04T12:37:56.8543652Z", + "timeModified": "2019-08-04T12:37:56.8543652Z", + "provisioningState": "Succeeded" + } + } + } + } +}