From 689dda5a783d86152e31162e8e03598ff8b2c201 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 15 Mar 2022 06:23:06 +0000 Subject: [PATCH] CodeGen from PR 17923 in Azure/azure-rest-api-specs [OperationalInsights] Add stable version for query packs (#17923) * Add blockchain to latest profile * Add additional types * added QueryPack and QueryPackQueries stable version * update default swagger version to package-2022-02 * fixed issue in x-ms-examples for QueryPacksList * added type: object to some definitions in order to fix build validations * removed Operations_List from QueryPacks resource * rename QueryPacks files to suit the file naming convention * rename files in readme.md * build errors * rename default package * update referenced package in readme to package-2022-02 * update error details with common-type * build error * Update specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/QueryPacks.json Co-authored-by: JianyeXi <59603451+jianyexi@users.noreply.github.com> * Update specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/QueryPackQueries.json Co-authored-by: JianyeXi <59603451+jianyexi@users.noreply.github.com> * Update readme.python.md Co-authored-by: Mark Cowlishaw Co-authored-by: JianyeXi <59603451+jianyexi@users.noreply.github.com> Co-authored-by: Jiefeng Chen <51037443+BigCat20196@users.noreply.github.com> --- .../Microsoft.OperationalInsights.json | 266 ++++++++++++++++++ schemas/common/autogeneratedResources.json | 6 + 2 files changed, 272 insertions(+) create mode 100644 schemas/2019-09-01/Microsoft.OperationalInsights.json diff --git a/schemas/2019-09-01/Microsoft.OperationalInsights.json b/schemas/2019-09-01/Microsoft.OperationalInsights.json new file mode 100644 index 0000000000..70feacc25b --- /dev/null +++ b/schemas/2019-09-01/Microsoft.OperationalInsights.json @@ -0,0 +1,266 @@ +{ + "id": "https://schema.management.azure.com/schemas/2019-09-01/Microsoft.OperationalInsights.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Microsoft.OperationalInsights", + "description": "Microsoft OperationalInsights Resource Types", + "resourceDefinitions": { + "queryPacks": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2019-09-01" + ] + }, + "location": { + "type": "string", + "description": "Resource location" + }, + "name": { + "type": "string", + "description": "The name of the Log Analytics QueryPack resource." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/LogAnalyticsQueryPackProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Properties that define a Log Analytics QueryPack resource." + }, + "resources": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/queryPacks_queries_childResource" + } + ] + } + }, + "tags": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Resource tags" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.OperationalInsights/queryPacks" + ] + } + }, + "required": [ + "apiVersion", + "location", + "name", + "properties", + "type" + ], + "description": "Microsoft.OperationalInsights/queryPacks" + }, + "queryPacks_queries": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2019-09-01" + ] + }, + "name": { + "type": "string", + "description": "The id of a specific query defined in the Log Analytics QueryPack" + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/LogAnalyticsQueryPackQueryProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Properties that define an Log Analytics QueryPack-Query resource." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.OperationalInsights/queryPacks/queries" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.OperationalInsights/queryPacks/queries" + } + }, + "definitions": { + "LogAnalyticsQueryPackProperties": { + "type": "object", + "properties": {}, + "description": "Properties that define a Log Analytics QueryPack resource." + }, + "LogAnalyticsQueryPackQueryProperties": { + "type": "object", + "properties": { + "body": { + "type": "string", + "description": "Body of the query." + }, + "description": { + "type": "string", + "description": "Description of the query." + }, + "displayName": { + "type": "string", + "description": "Unique display name for your query within the Query Pack." + }, + "properties": { + "type": "object", + "properties": {}, + "description": "Additional properties that can be set for the query." + }, + "related": { + "oneOf": [ + { + "$ref": "#/definitions/LogAnalyticsQueryPackQueryPropertiesRelated" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The related metadata items for the function." + }, + "tags": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Tags associated with the query." + } + }, + "required": [ + "body", + "displayName" + ], + "description": "Properties that define an Log Analytics QueryPack-Query resource." + }, + "LogAnalyticsQueryPackQueryPropertiesRelated": { + "type": "object", + "properties": { + "categories": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The related categories for the function." + }, + "resourceTypes": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The related resource types for the function." + }, + "solutions": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The related Log Analytics solutions for the function." + } + }, + "description": "The related metadata items for the function." + }, + "queryPacks_queries_childResource": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2019-09-01" + ] + }, + "name": { + "type": "string", + "description": "The id of a specific query defined in the Log Analytics QueryPack" + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/LogAnalyticsQueryPackQueryProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Properties that define an Log Analytics QueryPack-Query resource." + }, + "type": { + "type": "string", + "enum": [ + "queries" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.OperationalInsights/queryPacks/queries" + } + } +} \ No newline at end of file diff --git a/schemas/common/autogeneratedResources.json b/schemas/common/autogeneratedResources.json index 8684f9b3c1..9f4333503f 100644 --- a/schemas/common/autogeneratedResources.json +++ b/schemas/common/autogeneratedResources.json @@ -10864,6 +10864,12 @@ { "$ref": "https://schema.management.azure.com/schemas/2019-08-01-preview/Microsoft.OperationalInsights.json#/resourceDefinitions/workspaces_linkedStorageAccounts" }, + { + "$ref": "https://schema.management.azure.com/schemas/2019-09-01/Microsoft.OperationalInsights.json#/resourceDefinitions/queryPacks" + }, + { + "$ref": "https://schema.management.azure.com/schemas/2019-09-01/Microsoft.OperationalInsights.json#/resourceDefinitions/queryPacks_queries" + }, { "$ref": "https://schema.management.azure.com/schemas/2019-09-01-preview/Microsoft.OperationalInsights.json#/resourceDefinitions/queryPacks" },