diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/QueryPackQueries.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/QueryPackQueries.json new file mode 100644 index 000000000000..e731707a896c --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/QueryPackQueries.json @@ -0,0 +1,615 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Log Analytics Query Packs", + "description": "Azure Log Analytics API reference for management of saved Queries within Query Packs.", + "version": "2019-09-01" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/queryPacks/{queryPackName}/queries": { + "get": { + "description": "Gets a list of Queries defined within a Log Analytics QueryPack.", + "operationId": "Queries_List", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/QueryPackNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/MaxItemCountParameter" + }, + { + "$ref": "#/parameters/IncludeBodyParameter" + }, + { + "$ref": "#/parameters/ContinuationTokenParameter" + } + ], + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "responses": { + "200": { + "description": "A list containing 0 or more queries contained within the Log Analytics QueryPack.", + "schema": { + "$ref": "#/definitions/LogAnalyticsQueryPackQueryListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "QueryList": { + "$ref": "./examples/QueryPackQueriesList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/queryPacks/{queryPackName}/queries/search": { + "post": { + "description": "Search a list of Queries defined within a Log Analytics QueryPack according to given search properties.", + "operationId": "Queries_Search", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/QueryPackNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/MaxItemCountParameter" + }, + { + "$ref": "#/parameters/IncludeBodyParameter" + }, + { + "$ref": "#/parameters/ContinuationTokenParameter" + }, + { + "name": "QuerySearchProperties", + "description": "Properties by which to search queries in the given Log Analytics QueryPack.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/LogAnalyticsQueryPackQuerySearchProperties" + } + } + ], + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "responses": { + "200": { + "description": "A list containing 0 or more queries contained within the Log Analytics QueryPack.", + "schema": { + "$ref": "#/definitions/LogAnalyticsQueryPackQueryListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "QuerySearch": { + "$ref": "./examples/QueryPackQueriesSearch.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/queryPacks/{queryPackName}/queries/{id}": { + "get": { + "description": "Gets a specific Log Analytics Query defined within a Log Analytics QueryPack.", + "operationId": "Queries_Get", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/QueryPackNameParameter" + }, + { + "$ref": "#/parameters/QueryIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "A single query contained within the Log Analytics QueryPack.", + "schema": { + "$ref": "#/definitions/LogAnalyticsQueryPackQuery" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "QueryGet": { + "$ref": "./examples/QueryPackQueriesGet.json" + } + } + }, + "put": { + "description": "Adds or Updates a specific Query within a Log Analytics QueryPack.", + "operationId": "Queries_Put", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/QueryPackNameParameter" + }, + { + "$ref": "#/parameters/QueryIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "QueryPayload", + "description": "Properties that need to be specified to create a new query and add it to a Log Analytics QueryPack.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/LogAnalyticsQueryPackQuery" + } + } + ], + "responses": { + "200": { + "description": "The new or updated query contained within the Log Analytics QueryPack.", + "schema": { + "$ref": "#/definitions/LogAnalyticsQueryPackQuery" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "QueryPut": { + "$ref": "./examples/QueryPackQueriesPut.json" + } + } + }, + "patch": { + "description": "Adds or Updates a specific Query within a Log Analytics QueryPack.", + "operationId": "Queries_Update", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/QueryPackNameParameter" + }, + { + "$ref": "#/parameters/QueryIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "QueryPayload", + "description": "Properties that need to be specified to create a new query and add it to a Log Analytics QueryPack.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/LogAnalyticsQueryPackQuery" + } + } + ], + "responses": { + "200": { + "description": "The new or updated query contained within the Log Analytics QueryPack.", + "schema": { + "$ref": "#/definitions/LogAnalyticsQueryPackQuery" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "QueryPatch": { + "$ref": "./examples/QueryPackQueriesUpdate.json" + } + } + }, + "delete": { + "description": "Deletes a specific Query defined within an Log Analytics QueryPack.", + "operationId": "Queries_Delete", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/QueryPackNameParameter" + }, + { + "$ref": "#/parameters/QueryIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The query has been successfully removed from the Log Analytics QueryPack" + }, + "204": { + "description": "The specified query or associated QueryPack does not exist." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "QueryDelete": { + "$ref": "./examples/QueryPackQueriesDelete.json" + } + } + } + } + }, + "definitions": { + "AzureResourceProperties": { + "type": "object", + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "Azure resource Id" + }, + "name": { + "type": "string", + "readOnly": true, + "description": "Azure resource name" + }, + "type": { + "type": "string", + "readOnly": true, + "description": "Azure resource type" + }, + "systemData": { + "$ref": "#/definitions/SystemData", + "readOnly": true, + "description": "Read only system data" + } + }, + "description": "An Azure resource QueryPack-Query object" + }, + "LogAnalyticsQueryPackQuery": { + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "Properties that define an Log Analytics QueryPack-Query resource.", + "$ref": "#/definitions/LogAnalyticsQueryPackQueryProperties" + } + }, + "allOf": [ + { + "$ref": "#/definitions/AzureResourceProperties" + } + ], + "description": "A Log Analytics QueryPack-Query definition.", + "x-ms-azure-resource": true + }, + "LogAnalyticsQueryPackQueryProperties": { + "type": "object", + "description": "Properties that define an Log Analytics QueryPack-Query resource.", + "x-ms-azure-resource": true, + "properties": { + "id": { + "type": "string", + "description": "The unique ID of your application. This field cannot be changed.", + "readOnly": true + }, + "displayName": { + "type": "string", + "readOnly": false, + "description": "Unique display name for your query within the Query Pack." + }, + "timeCreated": { + "type": "string", + "readOnly": true, + "description": "Creation Date for the Log Analytics Query, in ISO 8601 format.", + "format": "date-time" + }, + "timeModified": { + "type": "string", + "readOnly": true, + "description": "Last modified date of the Log Analytics Query, in ISO 8601 format.", + "format": "date-time" + }, + "author": { + "type": "string", + "readOnly": true, + "description": "Object Id of user creating the query." + }, + "description": { + "type": "string", + "readOnly": false, + "description": "Description of the query." + }, + "body": { + "type": "string", + "readOnly": false, + "description": "Body of the query." + }, + "related": { + "description": "The related metadata items for the function.", + "type": "object", + "properties": { + "categories": { + "description": "The related categories for the function.", + "type": "array", + "items": { + "type": "string" + } + }, + "resourceTypes": { + "description": "The related resource types for the function.", + "type": "array", + "items": { + "type": "string" + } + }, + "solutions": { + "description": "The related Log Analytics solutions for the function.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "tags": { + "description": "Tags associated with the query.", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "properties": { + "type": "object", + "description": "Additional properties that can be set for the query." + } + }, + "required": [ + "body", + "displayName" + ] + }, + "LogAnalyticsQueryPackQuerySearchProperties": { + "type": "object", + "description": "Properties that define an Log Analytics QueryPack-Query search properties.", + "properties": { + "related": { + "type": "object", + "description": "The related metadata items for the function.", + "properties": { + "categories": { + "description": "The related categories for the function.", + "type": "array", + "items": { + "type": "string" + } + }, + "resourceTypes": { + "description": "The related resource types for the function.", + "type": "array", + "items": { + "type": "string" + } + }, + "solutions": { + "description": "The related Log Analytics solutions for the function.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "tags": { + "description": "Tags associated with the query.", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "LogAnalyticsQueryPackQueryListResult": { + "type": "object", + "description": "Describes the list of Log Analytics QueryPack-Query resources.", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "description": "List of Log Analytics QueryPack Query definitions.", + "items": { + "$ref": "#/definitions/LogAnalyticsQueryPackQuery" + } + }, + "nextLink": { + "type": "string", + "description": "The URI to get the next set of Log Analytics QueryPack definitions if too many QueryPack-Queries where returned in the result set." + } + } + }, + "SystemData": { + "description": "Read only system data", + "type": "object", + "properties": { + "createdBy": { + "type": "string", + "description": "An identifier for the identity that created the resource" + }, + "createdByType": { + "$ref": "#/definitions/IdentityType", + "description": "The type of identity that created the resource" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource creation (UTC)" + }, + "lastModifiedBy": { + "type": "string", + "description": "An identifier for the identity that last modified the resource" + }, + "lastModifiedByType": { + "$ref": "#/definitions/IdentityType", + "description": "The type of identity that last modified the resource" + }, + "lastModifiedAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource last modification (UTC)" + } + } + }, + "IdentityType": { + "description": "The type of identity that creates/modifies resources", + "type": "string", + "enum": [ + "user", + "application", + "managedIdentity", + "key" + ], + "x-ms-enum": { + "name": "IdentityType", + "modelAsString": true + } + } + }, + "parameters": { + "QueryPackNameParameter": { + "name": "queryPackName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Log Analytics QueryPack resource.", + "x-ms-parameter-location": "method" + }, + "QueryIdParameter": { + "name": "id", + "in": "path", + "required": true, + "type": "string", + "description": "The id of a specific query defined in the Log Analytics QueryPack", + "x-ms-parameter-location": "method" + }, + "IncludeBodyParameter": { + "name": "includeBody", + "in": "query", + "required": false, + "type": "boolean", + "description": "Flag indicating whether or not to return the body of each applicable query. If false, only return the query information.", + "x-ms-parameter-location": "method" + }, + "MaxItemCountParameter": { + "name": "$top", + "in": "query", + "required": false, + "type": "integer", + "format": "int64", + "description": "Maximum items returned in page.", + "x-ms-parameter-location": "method" + }, + "ContinuationTokenParameter": { + "name": "$skipToken", + "in": "query", + "required": false, + "type": "string", + "description": "Base64 encoded token used to fetch the next page of items. Default is null.", + "x-ms-parameter-location": "method" + } + } +} 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 new file mode 100644 index 000000000000..08c6955e56ff --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/QueryPacks.json @@ -0,0 +1,416 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Log Analytics Query Packs", + "description": "Azure Log Analytics API reference for Query Packs management.", + "version": "2019-09-01" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/queryPacks": { + "get": { + "description": "Gets a list of all Log Analytics QueryPacks within a subscription.", + "operationId": "QueryPacks_List", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + }, + "200": { + "description": "A list containing 0 or more Log Analytics QueryPack definitions.", + "schema": { + "$ref": "#/definitions/LogAnalyticsQueryPackListResult" + } + } + }, + "x-ms-examples": { + "QueryPacksList": { + "$ref": "./examples/QueryPacksList.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/queryPacks": { + "get": { + "description": "Gets a list of Log Analytics QueryPacks within a resource group.", + "operationId": "QueryPacks_ListByResourceGroup", + "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" + } + ], + "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + }, + "200": { + "description": "A list containing 0 or more Log Analytics QueryPack definitions.", + "schema": { + "$ref": "#/definitions/LogAnalyticsQueryPackListResult" + } + } + }, + "x-ms-examples": { + "QueryPackListByResourceGroup": { + "$ref": "./examples/QueryPacksListByResourceGroup.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/queryPacks/{queryPackName}": { + "delete": { + "description": "Deletes a Log Analytics QueryPack.", + "operationId": "QueryPacks_Delete", + "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" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + } + ], + "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + }, + "200": { + "description": "Successful request when deleting a Log Analytics QueryPack." + }, + "204": { + "description": "The specified QueryPack does not exist." + } + }, + "x-ms-examples": { + "QueryPacksDelete": { + "$ref": "./examples/QueryPacksDelete.json" + } + } + }, + "get": { + "description": "Returns a Log Analytics QueryPack.", + "operationId": "QueryPacks_Get", + "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" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + } + ], + "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + }, + "200": { + "description": "An Log Analytics QueryPack definition.", + "schema": { + "$ref": "#/definitions/LogAnalyticsQueryPack" + } + } + }, + "x-ms-examples": { + "QueryPackGet": { + "$ref": "./examples/QueryPacksGet.json" + } + } + }, + "put": { + "description": "Creates (or updates) a Log Analytics QueryPack. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation.", + "operationId": "QueryPacks_CreateOrUpdate", + "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" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "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" + } + }, + "200": { + "description": "Successful request when creating or updating a Log Analytics QueryPack. The updated QueryPack is returned.", + "schema": { + "$ref": "#/definitions/LogAnalyticsQueryPack" + } + } + }, + "x-ms-examples": { + "QueryPackCreate": { + "$ref": "./examples/QueryPacksCreate.json" + }, + "QueryPackUpdate": { + "$ref": "./examples/QueryPacksUpdate.json" + } + } + }, + "patch": { + "description": "Updates an existing QueryPack's tags. To update other fields use the CreateOrUpdate method.", + "operationId": "QueryPacks_UpdateTags", + "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" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "name": "QueryPackTags", + "description": "Updated tag information to set into the QueryPack instance.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/TagsResource" + } + } + ], + "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + }, + "200": { + "description": "Updating the Log Analytics QueryPack's tags was successful. QueryPack tags are updated and returned with the rest of the QueryPack's object properties.", + "schema": { + "$ref": "#/definitions/LogAnalyticsQueryPack" + } + } + }, + "x-ms-examples": { + "QueryPackUpdateTagsOnly": { + "$ref": "./examples/QueryPacksUpdateTagsOnly.json" + } + } + } + } + }, + "definitions": { + "QueryPacksResource": { + "type": "object", + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "Azure resource Id" + }, + "name": { + "type": "string", + "description": "Azure resource name", + "readOnly": true + }, + "type": { + "type": "string", + "readOnly": true, + "description": "Azure resource type" + }, + "location": { + "type": "string", + "description": "Resource location", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" + } + }, + "required": [ + "location" + ], + "x-ms-azure-resource": true, + "description": "An azure resource object" + }, + "TagsResource": { + "type": "object", + "properties": { + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" + } + }, + "description": "A container holding only the Tags for a resource, allowing the user to update the tags on a QueryPack instance." + }, + "LogAnalyticsQueryPack": { + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "Properties that define a Log Analytics QueryPack resource.", + "$ref": "#/definitions/LogAnalyticsQueryPackProperties" + } + }, + "allOf": [ + { + "$ref": "#/definitions/QueryPacksResource" + } + ], + "required": [ + "properties" + ], + "description": "An Log Analytics QueryPack definition." + }, + "LogAnalyticsQueryPackProperties": { + "type": "object", + "description": "Properties that define a Log Analytics QueryPack resource.", + "properties": { + "queryPackId": { + "type": "string", + "description": "The unique ID of your application. This field cannot be changed.", + "readOnly": true + }, + "timeCreated": { + "type": "string", + "readOnly": true, + "description": "Creation Date for the Log Analytics QueryPack, in ISO 8601 format.", + "format": "date-time" + }, + "timeModified": { + "type": "string", + "readOnly": true, + "description": "Last modified date of the Log Analytics QueryPack, in ISO 8601 format.", + "format": "date-time" + }, + "provisioningState": { + "type": "string", + "description": "Current state of this QueryPack: whether or not is has been provisioned within the resource group it is defined. Users cannot change this value but are able to read from it. Values will include Succeeded, Deploying, Canceled, and Failed.", + "readOnly": true + } + } + }, + "LogAnalyticsQueryPackListResult": { + "type": "object", + "description": "Describes the list of Log Analytics QueryPack resources.", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "description": "List of Log Analytics QueryPack definitions.", + "items": { + "$ref": "#/definitions/LogAnalyticsQueryPack" + } + }, + "nextLink": { + "type": "string", + "description": "The URI to get the next set of Log Analytics QueryPack definitions if too many QueryPacks where returned in the result set." + } + } + } + }, + "parameters": { + "ResourceNameParameter": { + "name": "queryPackName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Log Analytics QueryPack resource.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesDelete.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesDelete.json new file mode 100644 index 000000000000..3441de942579 --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesDelete.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "api-version": "2019-09-01", + "subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4918", + "resourceGroupName": "my-resource-group", + "queryPackName": "my-querypack", + "id": "a449f8af-8e64-4b3a-9b16-5a7165ff98c4" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesGet.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesGet.json new file mode 100644 index 000000000000..b55d0bd15362 --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesGet.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2019-09-01", + "subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4918", + "resourceGroupName": "my-resource-group", + "queryPackName": "my-querypack", + "id": "a449f8af-8e64-4b3a-9b16-5a7165ff98c4" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack/queries/a449f8af-8e64-4b3a-9b16-5a7165ff98c4", + "name": "a449f8af-8e64-4b3a-9b16-5a7165ff98c4", + "type": "microsoft.operationalinsights/queryPacks/queries", + "systemData": { + "createdBy": "string", + "createdByType": "application", + "createdAt": "2020-02-03T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "application", + "lastModifiedAt": "2020-02-04T02:03:01.1974346Z" + }, + "properties": { + "displayName": "Exceptions - New in the last 24 hours", + "id": "a449f8af-8e64-4b3a-9b16-5a7165ff98c4", + "body": "let newExceptionsTimeRange = 1d;\nlet timeRangeToCheckBefore = 7d;\nexceptions\n| where timestamp < ago(timeRangeToCheckBefore)\n| summarize count() by problemId\n| join kind= rightanti (\nexceptions\n| where timestamp >= ago(newExceptionsTimeRange)\n| extend stack = tostring(details[0].rawStack)\n| summarize count(), dcount(user_AuthenticatedId), min(timestamp), max(timestamp), any(stack) by problemId \n) on problemId \n| order by count_ desc\n", + "timeModified": "2018-02-14T13:13:19.3381394Z", + "timeCreated": "2018-02-12T11:44:39.2980634Z", + "description": "Thie query fetcges the recent exceptions from the last 24 hours" + } + } + } + } +} diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesList.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesList.json new file mode 100644 index 000000000000..7a316fa836ec --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesList.json @@ -0,0 +1,106 @@ +{ + "parameters": { + "api-version": "2019-09-01", + "subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4918", + "resourceGroupName": "my-resource-group", + "queryPackName": "my-querypack", + "includeBody": true + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack/queries/4337bb16-d6fe-4ff7-97cf-59df25941476", + "name": "4337bb16-d6fe-4ff7-97cf-59df25941476", + "type": "microsoft.operationalinsights/queryPacks/queries", + "systemData": { + "createdBy": "string", + "createdByType": "application", + "createdAt": "2020-02-03T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "application", + "lastModifiedAt": "2020-02-04T02:03:01.1974346Z" + }, + "properties": { + "id": "4337bb16-d6fe-4ff7-97cf-59df25941476", + "timeCreated": "2019-08-15T10:29:56.1030254Z", + "author": "1809f206-263a-46f7-942d-4572c156b7e7", + "timeModified": "2019-08-15T10:29:56.1030254Z", + "displayName": "Heartbeat_1", + "description": "Thie query takes 10 entries of heartbeat", + "body": "heartbeat | take 10" + } + }, + { + "id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack/queries/bf015bf7-be70-49c2-8d52-4cce85c42ef1", + "name": "bf015bf7-be70-49c2-8d52-4cce85c42ef1", + "type": "microsoft.operationalinsights/queryPacks/queries", + "systemData": { + "createdBy": "string", + "createdByType": "application", + "createdAt": "2020-02-03T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "application", + "lastModifiedAt": "2020-02-04T02:03:01.1974346Z" + }, + "properties": { + "id": "bf015bf7-be70-49c2-8d52-4cce85c42ef1", + "timeCreated": "2019-08-15T10:30:26.7943629Z", + "author": "1809f206-263a-46f7-942d-4572c156b7e7", + "timeModified": "2019-08-15T10:30:26.7943629Z", + "displayName": "Heartbeat_2", + "description": "Thie query takes 10 entries of heartbeat", + "body": "heartbeat | take 10" + } + }, + { + "id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack/queries/8d91c6ca-9c56-49c6-b3ae-112a68871acd", + "name": "8d91c6ca-9c56-49c6-b3ae-112a68871acd", + "type": "microsoft.operationalinsights/queryPacks/queries", + "systemData": { + "createdBy": "string", + "createdByType": "application", + "createdAt": "2020-02-03T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "application", + "lastModifiedAt": "2020-02-04T02:03:01.1974346Z" + }, + "properties": { + "id": "8d91c6ca-9c56-49c6-b3ae-112a68871acd", + "timeCreated": "2019-08-15T10:30:29.4505584Z", + "author": "1809f206-263a-46f7-942d-4572c156b7e7", + "timeModified": "2019-08-15T10:30:29.4505584Z", + "displayName": "Heartbeat_3", + "description": "Thie query takes 10 entries of heartbeat", + "body": "heartbeat | take 10" + } + }, + { + "id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack/queries/a5a9010e-e4b7-45ad-8b14-09d7e6082819", + "name": "a5a9010e-e4b7-45ad-8b14-09d7e6082819", + "type": "microsoft.operationalinsights/queryPacks/queries", + "systemData": { + "createdBy": "string", + "createdByType": "application", + "createdAt": "2020-02-03T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "application", + "lastModifiedAt": "2020-02-04T02:03:01.1974346Z" + }, + "properties": { + "id": "a5a9010e-e4b7-45ad-8b14-09d7e6082819", + "timeCreated": "2019-08-15T10:30:32.5742324Z", + "author": "1809f206-263a-46f7-942d-4572c156b7e7", + "timeModified": "2019-08-15T10:30:32.5742324Z", + "displayName": "Heartbeat_4", + "description": "Thie query takes 10 entries of heartbeat", + "body": "heartbeat | take 10" + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesPut.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesPut.json new file mode 100644 index 000000000000..169a8c746c45 --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesPut.json @@ -0,0 +1,68 @@ +{ + "parameters": { + "api-version": "2019-09-01", + "subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4918", + "resourceGroupName": "my-resource-group", + "queryPackName": "my-querypack", + "id": "a449f8af-8e64-4b3a-9b16-5a7165ff98c4", + "QueryPayload": { + "properties": { + "displayName": "Exceptions - New in the last 24 hours", + "description": "my description", + "body": "let newExceptionsTimeRange = 1d;\nlet timeRangeToCheckBefore = 7d;\nexceptions\n| where timestamp < ago(timeRangeToCheckBefore)\n| summarize count() by problemId\n| join kind= rightanti (\nexceptions\n| where timestamp >= ago(newExceptionsTimeRange)\n| extend stack = tostring(details[0].rawStack)\n| summarize count(), dcount(user_AuthenticatedId), min(timestamp), max(timestamp), any(stack) by problemId \n) on problemId \n| order by count_ desc\n", + "related": { + "categories": [ + "analytics" + ] + }, + "tags": { + "my-label": [ + "label1" + ], + "my-other-label": [ + "label2" + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack/queries/a449f8af-8e64-4b3a-9b16-5a7165ff98c4", + "name": "a449f8af-8e64-4b3a-9b16-5a7165ff98c4", + "type": "microsoft.operationalinsights/queryPacks/queries", + "systemData": { + "createdBy": "string", + "createdByType": "application", + "createdAt": "2020-02-03T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "application", + "lastModifiedAt": "2020-02-04T02:03:01.1974346Z" + }, + "properties": { + "id": "a449f8af-8e64-4b3a-9b16-5a7165ff98c4", + "timeCreated": "2019-08-15T10:30:32.5742324Z", + "author": "1809f206-263a-46f7-942d-4572c156b7e7", + "timeModified": "2019-08-15T10:30:32.5742324Z", + "displayName": "Exceptions - New in the last 24 hours", + "description": "my description", + "body": "let newExceptionsTimeRange = 1d;\nlet timeRangeToCheckBefore = 7d;\nexceptions\n| where timestamp < ago(timeRangeToCheckBefore)\n| summarize count() by problemId\n| join kind= rightanti (\nexceptions\n| where timestamp >= ago(newExceptionsTimeRange)\n| extend stack = tostring(details[0].rawStack)\n| summarize count(), dcount(user_AuthenticatedId), min(timestamp), max(timestamp), any(stack) by problemId \n) on problemId \n| order by count_ desc\n", + "related": { + "categories": [ + "analytics" + ] + }, + "tags": { + "my-label": [ + "label1" + ], + "my-other-label": [ + "label2" + ] + } + } + } + } + } +} diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesSearch.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesSearch.json new file mode 100644 index 000000000000..ca62e1069653 --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesSearch.json @@ -0,0 +1,138 @@ +{ + "parameters": { + "api-version": "2019-09-01", + "subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4918", + "resourceGroupName": "my-resource-group", + "queryPackName": "my-querypack", + "includeBody": true, + "$top": 3, + "QuerySearchProperties": { + "related": { + "categories": [ + "other", + "analytics" + ] + }, + "tags": { + "my-label": [ + "label1" + ] + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack/queries/4337bb16-d6fe-4ff7-97cf-59df25941476", + "name": "4337bb16-d6fe-4ff7-97cf-59df25941476", + "type": "microsoft.operationalinsights/queryPacks/queries", + "systemData": { + "createdBy": "string", + "createdByType": "application", + "createdAt": "2020-02-03T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "application", + "lastModifiedAt": "2020-02-04T02:03:01.1974346Z" + }, + "properties": { + "id": "4337bb16-d6fe-4ff7-97cf-59df25941476", + "timeCreated": "2019-08-15T10:29:56.1030254Z", + "author": "1809f206-263a-46f7-942d-4572c156b7e7", + "timeModified": "2019-08-15T10:29:56.1030254Z", + "displayName": "Heartbeat_1", + "description": "Thie query takes 10 entries of heartbeat 0", + "body": "Heartbeat | take 1", + "related": { + "categories": [ + "other" + ] + }, + "tags": { + "my-label": [ + "label1" + ], + "my-other-label": [ + "label2" + ] + } + } + }, + { + "id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack/queries/bf015bf7-be70-49c2-8d52-4cce85c42ef1", + "name": "bf015bf7-be70-49c2-8d52-4cce85c42ef1", + "type": "microsoft.operationalinsights/queryPacks/queries", + "systemData": { + "createdBy": "string", + "createdByType": "application", + "createdAt": "2020-02-03T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "application", + "lastModifiedAt": "2020-02-04T02:03:01.1974346Z" + }, + "properties": { + "id": "bf015bf7-be70-49c2-8d52-4cce85c42ef1", + "timeCreated": "2019-08-15T10:30:26.7943629Z", + "author": "1809f206-263a-46f7-942d-4572c156b7e7", + "timeModified": "2019-08-15T10:30:26.7943629Z", + "displayName": "Heartbeat_2", + "description": "Thie query takes 10 entries of heartbeat 1", + "body": "Heartbeat | take 1", + "related": { + "categories": [ + "analytics" + ] + }, + "tags": { + "my-label": [ + "label1" + ], + "my-other-label": [ + "label2" + ] + } + } + }, + { + "id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack/queries/8d91c6ca-9c56-49c6-b3ae-112a68871acd", + "name": "8d91c6ca-9c56-49c6-b3ae-112a68871acd", + "type": "microsoft.operationalinsights/queryPacks/queries", + "systemData": { + "createdBy": "string", + "createdByType": "application", + "createdAt": "2020-02-03T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "application", + "lastModifiedAt": "2020-02-04T02:03:01.1974346Z" + }, + "properties": { + "id": "8d91c6ca-9c56-49c6-b3ae-112a68871acd", + "timeCreated": "2019-08-15T10:30:29.4505584Z", + "author": "1809f206-263a-46f7-942d-4572c156b7e7", + "timeModified": "2019-08-15T10:30:29.4505584Z", + "displayName": "Heartbeat_3", + "description": "Thie query takes 10 entries of heartbeat 2", + "body": "Heartbeat | take 1", + "related": { + "categories": [ + "other", + "analytics" + ] + }, + "tags": { + "my-label": [ + "label1" + ], + "my-other-label": [ + "label2" + ] + } + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesUpdate.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesUpdate.json new file mode 100644 index 000000000000..169a8c746c45 --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesUpdate.json @@ -0,0 +1,68 @@ +{ + "parameters": { + "api-version": "2019-09-01", + "subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4918", + "resourceGroupName": "my-resource-group", + "queryPackName": "my-querypack", + "id": "a449f8af-8e64-4b3a-9b16-5a7165ff98c4", + "QueryPayload": { + "properties": { + "displayName": "Exceptions - New in the last 24 hours", + "description": "my description", + "body": "let newExceptionsTimeRange = 1d;\nlet timeRangeToCheckBefore = 7d;\nexceptions\n| where timestamp < ago(timeRangeToCheckBefore)\n| summarize count() by problemId\n| join kind= rightanti (\nexceptions\n| where timestamp >= ago(newExceptionsTimeRange)\n| extend stack = tostring(details[0].rawStack)\n| summarize count(), dcount(user_AuthenticatedId), min(timestamp), max(timestamp), any(stack) by problemId \n) on problemId \n| order by count_ desc\n", + "related": { + "categories": [ + "analytics" + ] + }, + "tags": { + "my-label": [ + "label1" + ], + "my-other-label": [ + "label2" + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack/queries/a449f8af-8e64-4b3a-9b16-5a7165ff98c4", + "name": "a449f8af-8e64-4b3a-9b16-5a7165ff98c4", + "type": "microsoft.operationalinsights/queryPacks/queries", + "systemData": { + "createdBy": "string", + "createdByType": "application", + "createdAt": "2020-02-03T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "application", + "lastModifiedAt": "2020-02-04T02:03:01.1974346Z" + }, + "properties": { + "id": "a449f8af-8e64-4b3a-9b16-5a7165ff98c4", + "timeCreated": "2019-08-15T10:30:32.5742324Z", + "author": "1809f206-263a-46f7-942d-4572c156b7e7", + "timeModified": "2019-08-15T10:30:32.5742324Z", + "displayName": "Exceptions - New in the last 24 hours", + "description": "my description", + "body": "let newExceptionsTimeRange = 1d;\nlet timeRangeToCheckBefore = 7d;\nexceptions\n| where timestamp < ago(timeRangeToCheckBefore)\n| summarize count() by problemId\n| join kind= rightanti (\nexceptions\n| where timestamp >= ago(newExceptionsTimeRange)\n| extend stack = tostring(details[0].rawStack)\n| summarize count(), dcount(user_AuthenticatedId), min(timestamp), max(timestamp), any(stack) by problemId \n) on problemId \n| order by count_ desc\n", + "related": { + "categories": [ + "analytics" + ] + }, + "tags": { + "my-label": [ + "label1" + ], + "my-other-label": [ + "label2" + ] + } + } + } + } + } +} 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 new file mode 100644 index 000000000000..e26eef16cc7b --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksCreate.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2019-09-01", + "subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4919", + "resourceGroupName": "my-resource-group", + "queryPackName": "my-querypack", + "LogAnalyticsQueryPackPayload": { + "location": "South Central US", + "properties": {} + } + }, + "responses": { + "200": { + "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/QueryPacksDelete.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksDelete.json new file mode 100644 index 000000000000..20309621a2af --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksDelete.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2019-09-01", + "subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4919", + "resourceGroupName": "my-resource-group", + "queryPackName": "my-querypack" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksGet.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksGet.json new file mode 100644 index 000000000000..e8fb279fe8fd --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksGet.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2019-09-01", + "subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4919", + "resourceGroupName": "my-resource-group", + "queryPackName": "my-querypack" + }, + "responses": { + "200": { + "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": "southcentralus", + "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/QueryPacksList.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksList.json new file mode 100644 index 000000000000..9f97cfd8bf05 --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksList.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2019-09-01", + "subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4919" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "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-ded8748dc6aa", + "timeCreated": "2019-08-04T12:37:56.8543652Z", + "timeModified": "2019-08-04T12:37:56.8543652Z", + "provisioningState": "Succeeded" + } + }, + { + "id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4919/resourceGroups/my-other-resource-group/providers/microsoft.operationalinsights/queryPacks/my-other-querypack", + "name": "my-other-querypack", + "type": "microsoft.operationalinsights/querypacks", + "location": "South Central US", + "tags": {}, + "properties": { + "queryPackId": "aac8fc00-2b68-441e-8f9b-ded8748dc635", + "timeCreated": "2019-06-04T12:37:56.8543652Z", + "timeModified": "2019-08-04T12:37:56.8543652Z", + "provisioningState": "Succeeded" + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksListByResourceGroup.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksListByResourceGroup.json new file mode 100644 index 000000000000..ed477776e909 --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksListByResourceGroup.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2019-09-01", + "subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4919", + "resourceGroupName": "my-resource-group" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "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-ded8748dc6aa", + "timeCreated": "2019-08-04T12:37:56.8543652Z", + "timeModified": "2019-08-04T12:37:56.8543652Z", + "provisioningState": "Succeeded" + } + }, + { + "id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4919/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-other-querypack", + "name": "my-other-querypack", + "type": "microsoft.operationalinsights/querypacks", + "location": "South Central US", + "tags": {}, + "properties": { + "queryPackId": "aac8fc00-2b68-441e-8f9b-ded8748dc635", + "timeCreated": "2019-06-04T12:37:56.8543652Z", + "timeModified": "2019-08-04T12:37:56.8543652Z", + "provisioningState": "Succeeded" + } + } + ], + "nextLink": null + } + } + } +} 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 new file mode 100644 index 000000000000..7971064b45ce --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksUpdate.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2019-09-01", + "subscriptionId": "86dc51d3-92ed-4d7e-947a-775ea79b4919", + "resourceGroupName": "my-resource-group", + "queryPackName": "my-querypack", + "LogAnalyticsQueryPackPayload": { + "location": "South Central US", + "tags": { + "Tag1": "Value1" + }, + "properties": {} + } + }, + "responses": { + "200": { + "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" + } + } + } + } +} diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksUpdateTagsOnly.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksUpdateTagsOnly.json new file mode 100644 index 000000000000..f3c1474cb46c --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksUpdateTagsOnly.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2019-09-01", + "subscriptionId": "subid", + "resourceGroupName": "my-resource-group", + "queryPackName": "my-querypack", + "QueryPackTags": { + "tags": { + "Tag1": "Value1", + "Tag2": "Value2" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack", + "name": "my-querypack", + "type": "microsoft.operationalinsights/querypacks", + "location": "South Central US", + "tags": { + "Tag1": "Value1", + "Tag2": "Value2" + }, + "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/readme.md b/specification/operationalinsights/resource-manager/readme.md index f82d3db1e3e3..db521eddc4bd 100644 --- a/specification/operationalinsights/resource-manager/readme.md +++ b/specification/operationalinsights/resource-manager/readme.md @@ -34,7 +34,7 @@ title: LogAnalyticsManagementClient ``` yaml description: Operational Insights Client openapi-type: arm -tag: package-2021-12-01-preview +tag: package-2022-02 ``` @@ -224,11 +224,41 @@ input-file: - Microsoft.OperationalInsights/stable/2020-08-01/Schema.json - Microsoft.OperationalInsights/stable/2020-08-01/SharedKeys.json - Microsoft.OperationalInsights/stable/2020-08-01/WorkspacePurge.json +- Microsoft.OperationalInsights/stable/2021-06-01/Clusters.json - Microsoft.OperationalInsights/stable/2020-10-01/Operations.json - Microsoft.OperationalInsights/stable/2020-08-01/Tables.json -- Microsoft.OperationalInsights/stable/2021-06-01/Clusters.json - Microsoft.OperationalInsights/stable/2021-06-01/Workspaces.json ``` + +### Tag: package-2022-02 + +These settings apply only when `--tag=package-2022-02` is specified on the command line. + +``` yaml $(tag) == 'package-2022-02' +input-file: +- Microsoft.OperationalInsights/stable/2019-09-01/QueryPacks.json +- Microsoft.OperationalInsights/stable/2019-09-01/QueryPackQueries.json +- Microsoft.OperationalInsights/stable/2020-08-01/DataExports.json +- Microsoft.OperationalInsights/stable/2020-08-01/DataSources.json +- Microsoft.OperationalInsights/stable/2020-08-01/IntelligencePacks.json +- Microsoft.OperationalInsights/stable/2020-08-01/LinkedServices.json +- Microsoft.OperationalInsights/stable/2020-08-01/LinkedStorageAccounts.json +- Microsoft.OperationalInsights/stable/2020-08-01/ManagementGroups.json +- Microsoft.OperationalInsights/stable/2020-08-01/OperationStatuses.json +- Microsoft.OperationalInsights/stable/2020-08-01/SharedKeys.json +- Microsoft.OperationalInsights/stable/2020-08-01/Usages.json +- Microsoft.OperationalInsights/stable/2020-08-01/StorageInsightConfigs.json +- Microsoft.OperationalInsights/stable/2020-08-01/SavedSearches.json +- Microsoft.OperationalInsights/stable/2020-08-01/AvailableServiceTiers.json +- Microsoft.OperationalInsights/stable/2020-08-01/Gateways.json +- Microsoft.OperationalInsights/stable/2020-08-01/Schema.json +- Microsoft.OperationalInsights/stable/2020-08-01/SharedKeys.json +- Microsoft.OperationalInsights/stable/2020-08-01/WorkspacePurge.json +- Microsoft.OperationalInsights/stable/2021-06-01/Clusters.json +- Microsoft.OperationalInsights/preview/2021-12-01-preview/Operations.json +- Microsoft.OperationalInsights/preview/2021-12-01-preview/Workspaces.json +- Microsoft.OperationalInsights/preview/2021-12-01-preview/Tables.json +``` --- # Code Generation diff --git a/specification/operationalinsights/resource-manager/readme.python.md b/specification/operationalinsights/resource-manager/readme.python.md index 543e26f34c52..3eb360a05037 100644 --- a/specification/operationalinsights/resource-manager/readme.python.md +++ b/specification/operationalinsights/resource-manager/readme.python.md @@ -20,4 +20,8 @@ output-folder: $(python-sdks-folder)/loganalytics/azure-mgmt-loganalytics/azure/ ``` yaml $(python) && $(python-mode) == 'create' && $(track2) basic-setup-py: true output-folder: $(python-sdks-folder)/loganalytics/azure-mgmt-loganalytics -``` \ No newline at end of file +``` +``` yaml $(python) && $(track2) +modelerfour: + lenient-model-deduplication: true +```