UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 26.1 kB
{"openapi":"3.0.0","info":{"description":"Azure Monitor client to create/update/delete Scheduled Query Rules","title":"Microsoft Insights","version":"2018-04-16","x-apisguru-categories":["cloud"],"x-logo":{"url":"https://assets.onestore.ms/cdnfiles/onestorerolling-1606-01000/shell/v3/images/logo/microsoft.png"},"x-origin":[{"format":"swagger","url":"https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-04-16/scheduledQueryRule_API.json","version":"2.0"}],"x-providerName":"azure.com","x-serviceName":"monitor-scheduledQueryRule_API","x-tags":["Azure","Microsoft"]},"security":[{"azure_auth":["user_impersonation"]}],"paths":{"/subscriptions/{subscriptionId}/providers/microsoft.insights/scheduledQueryRules":{"get":{"description":"List the Log Search rules within a subscription group.","operationId":"ScheduledQueryRules_ListBySubscription","parameters":[{"$ref":"#/components/parameters/ApiVersionParameter"},{"$ref":"#/components/parameters/FilterParameter"},{"$ref":"#/components/parameters/SubscriptionIdParameter"}],"responses":{"200":{"description":"Successful request for a list of alert rules","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogSearchRuleResourceCollection"},"examples":{"List rules":{"$ref":"#/components/examples/List_rules"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["scheduledQueryRules"],"x-ms-odata":"#/components/schemas/LogSearchRuleResource","x-ms-pageable":{}}},"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/scheduledQueryRules":{"get":{"description":"List the Log Search rules within a resource group.","operationId":"ScheduledQueryRules_ListByResourceGroup","parameters":[{"$ref":"#/components/parameters/ResourceGroupNameParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"},{"$ref":"#/components/parameters/FilterParameter"},{"$ref":"#/components/parameters/SubscriptionIdParameter"}],"responses":{"200":{"description":"Successful request for a list of alert rules","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogSearchRuleResourceCollection"},"examples":{"List rules":{"$ref":"#/components/examples/List_rules"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["scheduledQueryRules"],"x-ms-odata":"#/components/schemas/LogSearchRuleResource","x-ms-pageable":{}}},"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/scheduledQueryRules/{ruleName}":{"delete":{"description":"Deletes a Log Search rule","operationId":"ScheduledQueryRules_Delete","parameters":[{"$ref":"#/components/parameters/ResourceGroupNameParameter"},{"$ref":"#/components/parameters/RuleNameParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"},{"$ref":"#/components/parameters/SubscriptionIdParameter"}],"responses":{"200":{"description":"Successful request to delete a Log Search rule"},"204":{"description":"No Content. Resource not found"},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["scheduledQueryRules"]},"get":{"description":"Gets an Log Search rule","operationId":"ScheduledQueryRules_Get","parameters":[{"$ref":"#/components/parameters/ResourceGroupNameParameter"},{"$ref":"#/components/parameters/RuleNameParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"},{"$ref":"#/components/parameters/SubscriptionIdParameter"}],"responses":{"200":{"description":"Successful request to get a Log Search rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogSearchRuleResource"},"examples":{"Get rule":{"$ref":"#/components/examples/Get_rule"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["scheduledQueryRules"]},"patch":{"description":"Update log search Rule.","operationId":"ScheduledQueryRules_Update","parameters":[{"$ref":"#/components/parameters/SubscriptionIdParameter"},{"$ref":"#/components/parameters/ResourceGroupNameParameter"},{"$ref":"#/components/parameters/RuleNameParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogSearchRuleResourcePatch"}}},"description":"The parameters of the rule to update.","required":true},"responses":{"200":{"description":"Successful request to update an Log Search rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogSearchRuleResource"},"examples":{"Patch Log Search Rule":{"$ref":"#/components/examples/Patch_Log_Search_Rule"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["scheduledQueryRules"]},"put":{"description":"Creates or updates an log search rule.","operationId":"ScheduledQueryRules_CreateOrUpdate","parameters":[{"$ref":"#/components/parameters/SubscriptionIdParameter"},{"$ref":"#/components/parameters/ResourceGroupNameParameter"},{"$ref":"#/components/parameters/RuleNameParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogSearchRuleResource"}}},"description":"The parameters of the rule to create or update.","required":true},"responses":{"200":{"description":"Successful request to update an Log Search rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogSearchRuleResource"},"examples":{"Create or Update rule - AlertingAction":{"$ref":"#/components/examples/Create_or_Update_rule_-_AlertingAction"},"Create or Update rule - AlertingAction with Cross-Resource":{"$ref":"#/components/examples/Create_or_Update_rule_-_AlertingAction_with_Cross-Resource"},"Create or Update rule - LogToMetricAction":{"$ref":"#/components/examples/Create_or_Update_rule_-_LogToMetricAction"}}}}},"201":{"description":"Created alert rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogSearchRuleResource"},"examples":{"Create or Update rule - AlertingAction":{"$ref":"#/components/examples/Create_or_Update_rule_-_AlertingAction"},"Create or Update rule - AlertingAction with Cross-Resource":{"$ref":"#/components/examples/Create_or_Update_rule_-_AlertingAction_with_Cross-Resource"},"Create or Update rule - LogToMetricAction":{"$ref":"#/components/examples/Create_or_Update_rule_-_LogToMetricAction"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["scheduledQueryRules"]}}},"servers":[{"url":"https://management.azure.com"}],"components":{"examples":{"List_rules":{"value":{"value":[{"id":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/scheduledQueryRules/logalertfoo","location":"West US","name":"logalertfoo","properties":{"action":{"aznsAction":{"actionGroup":[],"customWebhookPayload":"{}","emailSubject":"Email Header"},"odata.type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction","severity":"1","trigger":{"metricTrigger":{"metricColumn":"user_Id","metricTriggerType":"Total","threshold":2,"thresholdOperator":"LessThan"},"threshold":2,"thresholdOperator":"GreaterThan"}},"description":"log alert description","enabled":"false","lastUpdatedTime":"2017-06-23T21:23:52.0221265Z","provisioningState":"Succeeded","schedule":{"frequencyInMinutes":15,"timeWindowInMinutes":15},"source":{"dataSourceId":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/components/sampleAI","query":"requests","queryType":"ResultCount"}},"tags":{},"type":"Microsoft.Insights/scheduledQueryRules"},{"id":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/scheduledQueryRules/logalertfoo","location":"West US","name":"logalertfoo","properties":{"action":{"aznsAction":{"actionGroup":[],"customWebhookPayload":"{}","emailSubject":"Email Header"},"odata.type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction","severity":"1","trigger":{"threshold":3,"thresholdOperator":"GreaterThan"}},"description":"log alert description","enabled":"true","lastUpdatedTime":"2017-06-23T21:23:52.0221265Z","provisioningState":"Succeeded","schedule":{"frequencyInMinutes":10,"timeWindowInMinutes":30},"source":{"dataSourceId":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/components/sampleAI","query":"requests","queryType":"ResultCount"}},"tags":{},"type":"Microsoft.Insights/scheduledQueryRules"}]}},"Get_rule":{"value":{"id":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/scheduledQueryRules/logalertfoo","location":"West US","name":"logalertfoo","properties":{"action":{"aznsAction":{"actionGroup":[],"customWebhookPayload":"{}","emailSubject":"Email Header"},"odata.type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction","severity":"1","trigger":{"threshold":3,"thresholdOperator":"GreaterThan"}},"description":"log alert description","enabled":"true","lastUpdatedTime":"2017-06-23T21:23:52.0221265Z","provisioningState":"Succeeded","schedule":{"frequencyInMinutes":15,"timeWindowInMinutes":15},"source":{"dataSourceId":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/components/sampleAI","query":"requests","queryType":"ResultCount"}},"tags":{},"type":"Microsoft.Insights/scheduledQueryRules"}},"Patch_Log_Search_Rule":{"value":{"id":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/scheduledQueryRules/logalertfoo","location":"West US","name":"logalertfoo","properties":{"action":{"aznsAction":{"actionGroup":[],"customWebhookPayload":"{}","emailSubject":"Email Header"},"odata.type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction","severity":"1","trigger":{"metricTrigger":{"metricColumn":"ColumnName","metricTriggerType":"Consecutive","threshold":5,"thresholdOperator":"GreaterThan"},"threshold":3,"thresholdOperator":"GreaterThan"}},"description":"log alert description","enabled":"true","lastUpdatedTime":"2017-06-23T21:23:52.0221265Z","provisioningState":"Succeeded","schedule":{"frequencyInMinutes":15,"timeWindowInMinutes":15},"source":{"dataSourceId":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/components/sampleAI","query":"requests","queryType":"ResultCount"}},"tags":{},"type":"Microsoft.Insights/scheduledQueryRules"}},"Create_or_Update_rule_-_AlertingAction":{"value":{"id":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/scheduledQueryRules/logalertfoo","location":"eastus","name":"logalertfoo","properties":{"action":{"aznsAction":{"actionGroup":[],"customWebhookPayload":"{}","emailSubject":"Email Header"},"odata.type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction","severity":"1","trigger":{"threshold":3,"thresholdOperator":"GreaterThan"}},"description":"log alert description","enabled":"true","lastUpdatedTime":"2017-06-23T21:23:52.0221265Z","provisioningState":"Succeeded","schedule":{"frequencyInMinutes":15,"timeWindowInMinutes":15},"source":{"dataSourceId":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.OperationalInsights/workspaces/sampleWorkspace","query":"Heartbeat","queryType":"ResultCount"}},"tags":{},"type":"Microsoft.Insights/scheduledQueryRules"}},"Create_or_Update_rule_-_AlertingAction_with_Cross-Resource":{"value":{"id":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/scheduledQueryRules/SampleCrossResourceAlert","location":"eastus","name":"SampleCrossResourceAlert","properties":{"action":{"aznsAction":{"actionGroup":["/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/actiongroups/test-ag"],"emailSubject":"Cross Resource Mail!!"},"odata.type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction","severity":"3","trigger":{"threshold":5000,"thresholdOperator":"GreaterThan"}},"description":"Sample Cross Resource alert","enabled":"true","lastUpdatedTime":"2018-09-04T06:27:58.3892575Z","provisioningState":"Succeeded","schedule":{"frequencyInMinutes":60,"timeWindowInMinutes":60},"source":{"authorizedResources":["/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.OperationalInsights/workspaces/sampleWorkspace","/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/components/sampleAI"],"dataSourceId":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/components/sampleAI","query":"union requests, workspace(\"sampleWorkspace\").Update","queryType":"ResultCount"}},"tags":{},"type":"Microsoft.Insights/scheduledQueryRules"}},"Create_or_Update_rule_-_LogToMetricAction":{"value":{"id":"/subscriptions/af52d502-a447-4bc6-8cb7-4780fbb00490/resourceGroups/alertsweu/providers/microsoft.insights/scheduledqueryrules/logtometricfoo","location":"westeurope","name":"logtometricfoo","properties":{"action":{"criteria":[{"dimensions":[],"metricName":"Average_% Idle Time"}],"odata.type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.LogToMetricAction"},"description":"log to metric description","enabled":"true","lastUpdatedTime":"2018-09-04T06:27:58.3892575Z","provisioningState":"Succeeded","source":{"dataSourceId":"/subscriptions/af52d502-a447-4bc6-8cb7-4780fbb00490/resourceGroups/alertsweu/providers/Microsoft.OperationalInsights/workspaces/alertsweu"}},"tags":{},"type":"microsoft.insights/scheduledqueryrules"}}},"parameters":{"ApiVersionParameter":{"description":"Client Api Version.","in":"query","name":"api-version","required":true,"schema":{"type":"string"},"examples":{"List rules":{"value":"2018-03-01"},"Delete rule":{"value":"2018-04-16"},"Get rule":{"value":"2018-04-16"},"Patch Log Search Rule":{"value":"2018-04-16"},"Create or Update rule - AlertingAction":{"value":"2018-04-16"},"Create or Update rule - AlertingAction with Cross-Resource":{"value":"2018-04-16"},"Create or Update rule - LogToMetricAction":{"value":"2018-04-16"}}},"FilterParameter":{"description":"The filter to apply on the operation. For more information please see https://msdn.microsoft.com/en-us/library/azure/dn931934.aspx","in":"query","name":"$filter","required":false,"x-ms-parameter-location":"method","schema":{"type":"string"}},"ResourceGroupNameParameter":{"description":"The name of the resource group.","in":"path","name":"resourceGroupName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"List rules":{"value":"gigtest"},"Delete rule":{"value":"Rac46PostSwapRG"},"Get rule":{"value":"Rac46PostSwapRG"},"Patch Log Search Rule":{"value":"my-resource-group"},"Create or Update rule - AlertingAction":{"value":"Rac46PostSwapRG"},"Create or Update rule - AlertingAction with Cross-Resource":{"value":"Rac46PostSwapRG"},"Create or Update rule - LogToMetricAction":{"value":"alertsweu"}}},"RuleNameParameter":{"description":"The name of the rule.","in":"path","name":"ruleName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"Delete rule":{"value":"logalertfoo"},"Get rule":{"value":"logalertfoo"},"Patch Log Search Rule":{"value":"logalertfoo"},"Create or Update rule - AlertingAction":{"value":"logalertfoo"},"Create or Update rule - AlertingAction with Cross-Resource":{"value":"SampleCrossResourceAlert"},"Create or Update rule - LogToMetricAction":{"value":"logtometricfoo"}}},"SubscriptionIdParameter":{"description":"The Azure subscription Id.","in":"path","name":"subscriptionId","required":true,"schema":{"type":"string"},"examples":{"List rules":{"value":"14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"},"Delete rule":{"value":"b67f7fec-69fc-4974-9099-a26bd6ffeda3"},"Get rule":{"value":"b67f7fec-69fc-4974-9099-a26bd6ffeda3"},"Patch Log Search Rule":{"value":"subid"},"Create or Update rule - AlertingAction":{"value":"b67f7fec-69fc-4974-9099-a26bd6ffeda3"},"Create or Update rule - AlertingAction with Cross-Resource":{"value":"b67f7fec-69fc-4974-9099-a26bd6ffeda3"},"Create or Update rule - LogToMetricAction":{"value":"af52d502-a447-4bc6-8cb7-4780fbb00490"}}}},"securitySchemes":{"azure_auth":{"description":"Azure Active Directory OAuth2 Flow","type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://login.microsoftonline.com/common/oauth2/authorize","scopes":{"user_impersonation":"impersonate your user account"}}}}},"schemas":{"Action":{"description":"Action descriptor.","discriminator":{"propertyName":"odata.type"},"properties":{"odata.type":{"description":"Specifies the action. Supported values - AlertingAction, LogToMetricAction","type":"string"}},"required":["odata.type"],"type":"object"},"AlertSeverity":{"description":"Severity Level of Alert","enum":["0","1","2","3","4"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"AlertSeverity"}},"AlertingAction":{"allOf":[{"$ref":"#/components/schemas/Action"}],"description":"Specify action need to be taken when rule type is Alert","properties":{"aznsAction":{"$ref":"#/components/schemas/AzNsActionGroup"},"severity":{"$ref":"#/components/schemas/AlertSeverity"},"throttlingInMin":{"description":"time (in minutes) for which Alerts should be throttled or suppressed.","format":"int32","type":"integer"},"trigger":{"$ref":"#/components/schemas/TriggerCondition"}},"required":["trigger","severity"],"type":"object","x-ms-discriminator-value":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction"},"AzNsActionGroup":{"description":"Azure action group","properties":{"actionGroup":{"description":"Azure Action Group reference.","items":{"type":"string"},"type":"array"},"customWebhookPayload":{"description":"Custom payload to be sent for all webhook URI in Azure action group","type":"string"},"emailSubject":{"description":"Custom subject override for all email ids in Azure action group","type":"string"}},"type":"object"},"ConditionalOperator":{"description":"Result Condition Evaluation criteria. Supported Values - 'GreaterThan' or 'LessThan' or 'Equal'.","enum":["GreaterThan","LessThan","Equal"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"ConditionalOperator"}},"Criteria":{"description":"Specifies the criteria for converting log to metric.","properties":{"dimensions":{"description":"List of Dimensions for creating metric","items":{"$ref":"#/components/schemas/Dimension"},"type":"array"},"metricName":{"description":"Name of the metric","type":"string"}},"required":["metricName"],"type":"object"},"Dimension":{"description":"Specifies the criteria for converting log to metric.","properties":{"name":{"description":"Name of the dimension","type":"string"},"operator":{"description":"Operator for dimension values","enum":["Include"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"operator"}},"values":{"description":"List of dimension values","items":{"type":"string"},"type":"array"}},"required":["name","operator","values"],"type":"object"},"ErrorResponse":{"description":"Describes the format of Error response.","properties":{"code":{"description":"Error code","type":"string"},"message":{"description":"Error message indicating why the operation failed.","type":"string"}},"type":"object"},"LogMetricTrigger":{"description":"A log metrics trigger descriptor.","properties":{"metricColumn":{"description":"Evaluation of metric on a particular column","type":"string"},"metricTriggerType":{"$ref":"#/components/schemas/MetricTriggerType"},"threshold":{"description":"The threshold of the metric trigger.","format":"double","type":"number"},"thresholdOperator":{"$ref":"#/components/schemas/ConditionalOperator"}},"type":"object"},"LogSearchRule":{"description":"Log Search Rule Definition","properties":{"action":{"$ref":"#/components/schemas/Action"},"description":{"description":"The description of the Log Search rule.","type":"string"},"enabled":{"description":"The flag which indicates whether the Log Search rule is enabled. Value should be true or false","enum":["true","false"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"enabled"}},"lastUpdatedTime":{"description":"Last time the rule was updated in IS08601 format.","format":"date-time","readOnly":true,"type":"string"},"provisioningState":{"description":"Provisioning state of the scheduled query rule","enum":["Succeeded","Deploying","Canceled","Failed"],"readOnly":true,"type":"string","x-ms-enum":{"modelAsString":true,"name":"provisioningState"}},"schedule":{"$ref":"#/components/schemas/Schedule"},"source":{"$ref":"#/components/schemas/Source"}},"required":["source","action"]},"LogSearchRulePatch":{"description":"Log Search Rule Definition for Patching","properties":{"enabled":{"description":"The flag which indicates whether the Log Search rule is enabled. Value should be true or false","enum":["true","false"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"enabled"}}}},"LogSearchRuleResource":{"allOf":[{"$ref":"#/components/schemas/Resource"}],"description":"The Log Search Rule resource.","properties":{"properties":{"$ref":"#/components/schemas/LogSearchRule"}},"required":["properties"],"type":"object"},"LogSearchRuleResourceCollection":{"description":"Represents a collection of Log Search rule resources.","properties":{"value":{"description":"The values for the Log Search Rule resources.","items":{"$ref":"#/components/schemas/LogSearchRuleResource"},"type":"array"}}},"LogSearchRuleResourcePatch":{"description":"The log search rule resource for patch operations.","properties":{"properties":{"$ref":"#/components/schemas/LogSearchRulePatch"},"tags":{"additionalProperties":{"type":"string"},"description":"Resource tags"}}},"LogToMetricAction":{"allOf":[{"$ref":"#/components/schemas/Action"}],"description":"Specify action need to be taken when rule type is converting log to metric","properties":{"criteria":{"description":"Criteria of Metric","items":{"$ref":"#/components/schemas/Criteria"},"type":"array"}},"required":["criteria"],"type":"object","x-ms-discriminator-value":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.LogToMetricAction"},"MetricTriggerType":{"description":"Metric Trigger Evaluation Type","enum":["Consecutive","Total"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"metricTriggerType"}},"QueryType":{"description":"Set value to 'ResultAccount'","enum":["ResultCount"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"QueryType"}},"Resource":{"description":"An azure resource object","properties":{"id":{"description":"Azure resource Id","readOnly":true,"type":"string"},"location":{"description":"Resource location","type":"string","x-ms-mutability":["create","read"]},"name":{"description":"Azure resource name","readOnly":true,"type":"string"},"tags":{"additionalProperties":{"type":"string"},"description":"Resource tags"},"type":{"description":"Azure resource type","readOnly":true,"type":"string"}},"required":["location"],"x-ms-azure-resource":true},"Schedule":{"description":"Defines how often to run the search and the time interval.","properties":{"frequencyInMinutes":{"description":"frequency (in minutes) at which rule condition should be evaluated.","format":"int32","type":"integer"},"timeWindowInMinutes":{"description":"Time window for which data needs to be fetched for query (should be greater than or equal to frequencyInMinutes).","format":"int32","type":"integer"}},"required":["frequencyInMinutes","timeWindowInMinutes"],"type":"object"},"Source":{"description":"Specifies the log search query.","properties":{"authorizedResources":{"description":"List of Resource referred into query","items":{"type":"string"},"type":"array"},"dataSourceId":{"description":"The resource uri over which log search query is to be run.","type":"string"},"query":{"description":"Log search query. Required for action type - AlertingAction","type":"string"},"queryType":{"$ref":"#/components/schemas/QueryType"}},"required":["dataSourceId"],"type":"object"},"TriggerCondition":{"description":"The condition that results in the Log Search rule.","properties":{"metricTrigger":{"$ref":"#/components/schemas/LogMetricTrigger"},"threshold":{"description":"Result or count threshold based on which rule should be triggered.","format":"double","type":"number"},"thresholdOperator":{"$ref":"#/components/schemas/ConditionalOperator"}},"required":["thresholdOperator","threshold"],"type":"object"}}}}