-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add triggeredAnalyticsRuleRuns API (#21977)
* Add triggeredAnalyticsRuleRuns API * fix examples path * run prettier * fix lint * fix prettier * Update readme.md * draft * draft * fixing comments * fixing nit and param name * adding requires * fixing idention * Update TriggeredAnalyticsRuleRuns.json adding location header * Update TriggeredAnalyticsRuleRuns.json closing headers * Update TriggeredAnalyticsRuleRuns.json fixing warnings * Update TriggeredAnalyticsRuleRuns.json fixing lint warnings pt 2 * Update TriggeredAnalyticsRuleRuns.json fixing flatten position --------- Co-authored-by: Rotemdvir1 <rotemdvir@microsoft.com> Co-authored-by: Rotemdvir1 <95570648+Rotemdvir1@users.noreply.github.com>
- Loading branch information
1 parent
2ffbb69
commit e45c95c
Showing
5 changed files
with
454 additions
and
0 deletions.
There are no files selected for viewing
353 changes: 353 additions & 0 deletions
353
...ger/Microsoft.SecurityInsights/preview/2023-02-01-preview/TriggeredAnalyticsRuleRuns.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,353 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "Security Insights", | ||
"description": "API spec for Microsoft.SecurityInsights (Azure Security Insights) resource provider", | ||
"version": "2023-02-01-preview" | ||
}, | ||
"paths": { | ||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/triggeredAnalyticsRuleRuns/{ruleRunId}": { | ||
"get": { | ||
"tags": [ | ||
"triggered analytics rule run" | ||
], | ||
"description": "Gets the triggered analytics rule run.", | ||
"operationId": "triggeredAnalyticsRuleRun_Get", | ||
"produces": [ | ||
"application/json" | ||
], | ||
"parameters": [ | ||
{ | ||
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" | ||
}, | ||
{ | ||
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" | ||
}, | ||
{ | ||
"$ref": "../../../common/2.0/types.json#/parameters/WorkspaceName" | ||
}, | ||
{ | ||
"description": "the triggered rule id", | ||
"in": "path", | ||
"name": "ruleRunId", | ||
"required": true, | ||
"type": "string" | ||
}, | ||
{ | ||
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"schema": { | ||
"$ref": "#/definitions/TriggeredAnalyticsRuleRun" | ||
} | ||
}, | ||
"default": { | ||
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "../../../common/2.0/types.json#/definitions/CloudError" | ||
} | ||
} | ||
}, | ||
"x-ms-examples": { | ||
"triggeredAnalyticsRuleRun_Get": { | ||
"$ref": "./examples/triggeredAnalyticsRuleRuns/triggeredAnalyticsRuleRun_Get.json" | ||
} | ||
} | ||
} | ||
}, | ||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/triggeredAnalyticsRuleRuns": { | ||
"get": { | ||
"tags": [ | ||
"triggered analytics rule runs" | ||
], | ||
"description": "Gets the triggered analytics rule runs.", | ||
"operationId": "getTriggeredAnalyticsRuleRuns_List", | ||
"produces": [ | ||
"application/json" | ||
], | ||
"parameters": [ | ||
{ | ||
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" | ||
}, | ||
{ | ||
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" | ||
}, | ||
{ | ||
"$ref": "../../../common/2.0/types.json#/parameters/WorkspaceName" | ||
}, | ||
{ | ||
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"schema": { | ||
"$ref": "#/definitions/TriggeredAnalyticsRuleRuns" | ||
} | ||
}, | ||
"default": { | ||
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "../../../common/2.0/types.json#/definitions/CloudError" | ||
} | ||
} | ||
}, | ||
"x-ms-pageable": { | ||
"nextLinkName": "nextLink" | ||
}, | ||
"x-ms-examples": { | ||
"triggeredAnalyticsRuleRuns_Get": { | ||
"$ref": "./examples/triggeredAnalyticsRuleRuns/triggeredAnalyticsRuleRuns_Get.json" | ||
} | ||
} | ||
} | ||
}, | ||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/alertRules/{ruleId}/triggerRuleRun": { | ||
"post": { | ||
"tags": [ | ||
"trigger analytics rule run" | ||
], | ||
"description": "triggers analytics rule run", | ||
"operationId": "alertRule_TriggerRuleRun", | ||
"produces": [ | ||
"application/json" | ||
], | ||
"parameters": [ | ||
{ | ||
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" | ||
}, | ||
{ | ||
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" | ||
}, | ||
{ | ||
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" | ||
}, | ||
{ | ||
"$ref": "../../../common/2.0/types.json#/parameters/WorkspaceName" | ||
}, | ||
{ | ||
"$ref": "#/parameters/RuleId" | ||
}, | ||
{ | ||
"$ref": "#/parameters/AnalyticsRuleRunTriggerParameter" | ||
} | ||
], | ||
"responses": { | ||
"202": { | ||
"description": "The analytics rule run was successfully triggered.", | ||
"headers": { | ||
"Location": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"default": { | ||
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "../../../common/2.0/types.json#/definitions/CloudError" | ||
} | ||
} | ||
}, | ||
"x-ms-examples": { | ||
"triggerRuleRun_Post": { | ||
"$ref": "./examples/triggeredAnalyticsRuleRuns/triggerRuleRun_Post.json" | ||
} | ||
}, | ||
"x-ms-long-running-operation": true, | ||
"x-ms-long-running-operation-options": { | ||
"final-state-via": "location" | ||
} | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"ProvisioningState": { | ||
"enum": [ | ||
"Accepted", | ||
"InProgress", | ||
"Succeeded", | ||
"Failed", | ||
"Canceled" | ||
], | ||
"description": "The triggered analytics rule run provisioning state", | ||
"type": "string", | ||
"example": "Accepted", | ||
"x-ms-enum": { | ||
"name": "ProvisioningState", | ||
"modelAsString": true, | ||
"values": [ | ||
{ | ||
"value": "Accepted" | ||
}, | ||
{ | ||
"value": "InProgress" | ||
}, | ||
{ | ||
"value": "Succeeded" | ||
}, | ||
{ | ||
"value": "Failed" | ||
}, | ||
{ | ||
"value": "Canceled" | ||
} | ||
] | ||
} | ||
}, | ||
"TriggeredAnalyticsRuleRun": { | ||
"required": [ | ||
"properties" | ||
], | ||
"description": "The triggered analytics rule run", | ||
"type": "object", | ||
"allOf": [ | ||
{ | ||
"$ref": "../../../common/2.0/types.json#/definitions/ResourceWithEtag" | ||
} | ||
], | ||
"properties": { | ||
"properties": { | ||
"$ref": "#/definitions/TriggeredAnalyticsRuleRunProperties", | ||
"x-ms-client-flatten": true | ||
} | ||
} | ||
}, | ||
"TriggeredAnalyticsRuleRunProperties": { | ||
"required": [ | ||
"executionTimeUtc", | ||
"provisioningState", | ||
"ruleId", | ||
"triggeredAnalyticsRuleRunId" | ||
], | ||
"description": "The triggered analytics rule run Properties", | ||
"type": "object", | ||
"properties": { | ||
"executionTimeUtc": { | ||
"format": "date-time", | ||
"type": "string" | ||
}, | ||
"ruleId": { | ||
"type": "string" | ||
}, | ||
"triggeredAnalyticsRuleRunId": { | ||
"type": "string" | ||
}, | ||
"provisioningState": { | ||
"$ref": "#/definitions/ProvisioningState" | ||
}, | ||
"ruleRunAdditionalData": { | ||
"type": "object", | ||
"additionalProperties": {} | ||
} | ||
} | ||
}, | ||
"TriggeredAnalyticsRuleRuns": { | ||
"required": [ | ||
"value" | ||
], | ||
"description": "The triggered analytics rule run array", | ||
"type": "object", | ||
"properties": { | ||
"value": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/TriggeredAnalyticsRuleRun" | ||
} | ||
}, | ||
"nextLink": { | ||
"type": "string", | ||
"readOnly": true | ||
} | ||
} | ||
}, | ||
"AnalyticsRuleRunTriggerProperties": { | ||
"required": [ | ||
"executionTimeUtc" | ||
], | ||
"description": "The Analytics Rule Run Trigger properties", | ||
"type": "object", | ||
"properties": { | ||
"executionTimeUtc": { | ||
"format": "date-time", | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"AnalyticsRuleRunTrigger": { | ||
"required": [ | ||
"properties" | ||
], | ||
"description": "Analytics Rule Run Trigger request", | ||
"properties": { | ||
"properties": { | ||
"$ref": "#/definitions/AnalyticsRuleRunTriggerProperties", | ||
"description": "The analytics Rule Run Trigger request", | ||
"x-ms-client-flatten": true | ||
} | ||
}, | ||
"type": "object" | ||
} | ||
}, | ||
"parameters": { | ||
"RuleId": { | ||
"description": "Alert rule ID", | ||
"in": "path", | ||
"name": "ruleId", | ||
"required": true, | ||
"type": "string", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"AnalyticsRuleRunTriggerParameter": { | ||
"description": "The Analytics Rule Run Trigger parameter", | ||
"in": "body", | ||
"name": "analyticsRuleRunTriggerParameter", | ||
"required": true, | ||
"schema": { | ||
"$ref": "#/definitions/AnalyticsRuleRunTrigger" | ||
}, | ||
"x-ms-parameter-location": "method" | ||
} | ||
}, | ||
"securityDefinitions": { | ||
"azure_auth": { | ||
"type": "oauth2", | ||
"flow": "implicit", | ||
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", | ||
"scopes": { | ||
"user_impersonation": "impersonate your user account" | ||
}, | ||
"description": "Azure Active Directory OAuth2 Flow" | ||
} | ||
}, | ||
"security": [ | ||
{ | ||
"azure_auth": [ | ||
"user_impersonation" | ||
] | ||
} | ||
], | ||
"tags": [ | ||
{ | ||
"name": "AnalyticsOnDemandArm", | ||
"description": "Controller that handles requests for triggeredAnalyticsRuleRuns ARM API." | ||
}, | ||
{ | ||
"name": "AnalyticsOnDemandArm", | ||
"description": "Triggered Analytics Rule Runs" | ||
} | ||
], | ||
"host": "management.azure.com", | ||
"schemes": [ | ||
"https" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"consumes": [ | ||
"application/json" | ||
] | ||
} |
23 changes: 23 additions & 0 deletions
23
...s/preview/2023-02-01-preview/examples/triggeredAnalyticsRuleRuns/triggerRuleRun_Post.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2023-02-01-preview", | ||
"subscriptionId": "d0cfe6b2-9ac0-4464-9919-dccaee2e48c0", | ||
"resourceGroupName": "myRg", | ||
"workspaceName": "myWorkspace", | ||
"ruleId": "65360bb0-8986-4ade-a89d-af3cf44d28aa", | ||
"analyticsRuleRunTriggerParameter": { | ||
"properties": { | ||
"executionTimeUtc": "2022-12-22T15:37:03.074Z" | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"202": { | ||
"headers": { | ||
"Code": "202", | ||
"Message": "Accepted", | ||
"Location": "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalIinsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/triggeredAnalyticsRuleRuns/5abbc58b-9655-4f9b-80ac-5a576753e4ec?api-version=2023-02-01-preview" | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.