Skip to content

Commit

Permalink
[OperationalInsights] Added 201 return status to QueryPacks_CreateOrU…
Browse files Browse the repository at this point in the history
…pdate (#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
  • Loading branch information
dabenhamMic authored Sep 8, 2022
1 parent cc2f5bd commit 208c91d
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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}": {
Expand Down
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
}

0 comments on commit 208c91d

Please sign in to comment.