Skip to content

Commit

Permalink
Update SecurityInsights metadata preview API (Azure#15012)
Browse files Browse the repository at this point in the history
* Copy commit from private repo

* Make new API version

* Remove old examples

* Fix exclusion for Metadata list endpoint

* Move back to initial preview version

* Change id to contentId, sourceId

* Fix sourceId in get all example

* Update enums, required fields

* Update enums, required fields
  • Loading branch information
mpo-sec authored Jun 29, 2021
1 parent 2d57dfa commit 08afd3c
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 93 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@
}
},
"metadataContentId": {
"description": "Static ID for the content. Used to identify dependencies and content from solutions or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the resource name",
"description": "Static ID for the content. Used to identify dependencies and content from solutions or community. Hard-coded/static for out of the box content and solutions. Can be optionally set for user created content to define dependencies. If an active content item is made from a template, both will have the same contentId.",
"type": "string"
},
"metadataParentId": {
Expand All @@ -369,66 +369,66 @@
"type": "string",
"description": "The kind of content the metadata is for.",
"enum": [
"dataConnector",
"dataType",
"workbook",
"workbookTemplate",
"playbook",
"playbookTemplate",
"analyticRuleTemplate",
"analyticRule",
"huntingQuery",
"investigationQuery",
"parser",
"watchlist",
"watchlistTemplate",
"solution"
"DataConnector",
"DataType",
"Workbook",
"WorkbookTemplate",
"Playbook",
"PlaybookTemplate",
"AnalyticsRuleTemplate",
"AnalyticsRule",
"HuntingQuery",
"InvestigationQuery",
"Parser",
"Watchlist",
"WatchlistTemplate",
"Solution"
],
"x-ms-enum": {
"modelAsString": true,
"name": "kind",
"values": [
{
"value": "dataConnector"
"value": "DataConnector"
},
{
"value": "dataType"
"value": "DataType"
},
{
"value": "workbook"
"value": "Workbook"
},
{
"value": "workbookTemplate"
"value": "WorkbookTemplate"
},
{
"value": "playbook"
"value": "Playbook"
},
{
"value": "playbookTemplate"
"value": "PlaybookTemplate"
},
{
"value": "analyticRuleTemplate"
"value": "AnalyticsRuleTemplate"
},
{
"value": "analyticRule"
"value": "AnalyticsRule"
},
{
"value": "huntingQuery"
"value": "HuntingQuery"
},
{
"value": "investigationQuery"
"value": "InvestigationQuery"
},
{
"value": "parser"
"value": "Parser"
},
{
"value": "watchlist"
"value": "Watchlist"
},
{
"value": "watchlistTemplate"
"value": "WatchlistTemplate"
},
{
"value": "solution"
"value": "Solution"
}
]
}
Expand All @@ -444,26 +444,26 @@
"description": "Source type of the content",
"type": "string",
"enum": [
"localWorkspace",
"community",
"solution",
"sourceRepository"
"LocalWorkspace",
"Community",
"Solution",
"SourceRepository"
],
"x-ms-enum": {
"modelAsString": true,
"name": "sourceKind",
"values": [
{
"value": "localWorkspace"
"value": "LocalWorkspace"
},
{
"value": "community"
"value": "Community"
},
{
"value": "solution"
"value": "Solution"
},
{
"value": "sourceRepository"
"value": "SourceRepository"
}
]
}
Expand Down Expand Up @@ -507,22 +507,22 @@
"description": "Type of support for content item",
"type": "string",
"enum": [
"microsoft",
"developer",
"community"
"Microsoft",
"Partner",
"Community"
],
"x-ms-enum": {
"modelAsString": true,
"name": "supportTier",
"values": [
{
"value": "microsoft"
"value": "Microsoft"
},
{
"value": "developer"
"value": "Partner"
},
{
"value": "community"
"value": "Community"
}
]
}
Expand Down Expand Up @@ -594,7 +594,6 @@
"metadataProperties": {
"description": "Metadata property bag.",
"required": [
"contentId",
"parentId",
"kind"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
"properties": {
"contentId": "c00ee137-7475-47c8-9cce-ec6f0f1bedd0",
"version": "1.0.0.0",
"kind": "analyticRule",
"kind": "AnalyticsRule",
"parentId": "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName",
"source": {
"kind": "solution",
"kind": "Solution",
"name": "Contoso Solution 1.0",
"sourceId": "b688a130-76f4-4a07-bf57-762222a3cadf"
}
Expand All @@ -33,10 +33,10 @@
"properties": {
"contentId": "f5160682-0e10-4e23-8fcf-df3df49c5522",
"version": "1.0.0.0",
"kind": "analyticRule",
"kind": "AnalyticsRule",
"parentId": "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName2",
"source": {
"kind": "solution",
"kind": "Solution",
"name": "Contoso Solution 1.0",
"sourceId": "b688a130-76f4-4a07-bf57-762222a3cadf"
}
Expand All @@ -49,10 +49,10 @@
"properties": {
"contentId": "f593501d-ec01-4057-8146-a1de35c461ef",
"version": "1.0.0.0",
"kind": "workbook",
"kind": "Workbook",
"parentId": "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.Insights/workbooks/workbookName",
"source": {
"kind": "solution",
"kind": "Solution",
"name": "Contoso Solution 1.0",
"sourceId": "b688a130-76f4-4a07-bf57-762222a3cadf"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"resourceGroupName": "myRg",
"workspaceName": "myWorkspace",
"operationalInsightsResourceProvider": "Microsoft.OperationalInsights",
"ODataFilter": "properties/kind eq 'analyticRule'",
"ODataFilter": "properties/kind eq 'AnalyticsRule'",
"ODataOrderBy": "properties/parentId desc",
"ODataSkip": "2",
"ODataTop": "2"
Expand All @@ -21,10 +21,10 @@
"properties": {
"contentId": "c00ee137-7475-47c8-9cce-ec6f0f1bedd0",
"version": "1.0.0.0",
"kind": "analyticRule",
"kind": "AnalyticsRule",
"parentId": "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName1",
"source": {
"kind": "solution",
"kind": "Solution",
"name": "Contoso Solution 1.0",
"sourceId": "b688a130-76f4-4a07-bf57-762222a3cadf"
}
Expand All @@ -37,10 +37,10 @@
"properties": {
"contentId": "f5160682-0e10-4e23-8fcf-df3df49c5522",
"version": "1.0.0.0",
"kind": "analyticRule",
"kind": "AnalyticsRule",
"parentId": "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName2",
"source": {
"kind": "solution",
"kind": "Solution",
"name": "Contoso Solution 1.0",
"sourceId": "b688a130-76f4-4a07-bf57-762222a3cadf"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
"properties": {
"contentId": "c00ee137-7475-47c8-9cce-ec6f0f1bedd0",
"version": "1.0.0.0",
"kind": "analyticRule",
"kind": "AnalyticsRule",
"parentId": "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName",
"source": {
"kind": "solution",
"kind": "Solution",
"name": "Contoso Solution 1.0",
"sourceId": "b688a130-76f4-4a07-bf57-762222a3cadf"
},
Expand All @@ -31,7 +31,7 @@
"name": "Microsoft",
"email": "[email protected]",
"link": "https://support.microsoft.com/",
"tier": "developer"
"tier": "Partner"
},
"dependencies": {
"operator": "AND",
Expand All @@ -41,26 +41,26 @@
"criteria": [
{
"contentId": "045d06d0-ee72-4794-aba4-cf5646e4c756",
"kind": "dataConnector"
"kind": "DataConnector"
},
{
"contentId": "dbfcb2cc-d782-40ef-8d94-fe7af58a6f2d",
"kind": "dataConnector"
"kind": "DataConnector"
},
{
"contentId": "de4dca9b-eb37-47d6-a56f-b8b06b261593",
"kind": "dataConnector",
"kind": "DataConnector",
"version": "2.0"
}
]
},
{
"kind": "playbook",
"kind": "Playbook",
"contentId": "31ee11cc-9989-4de8-b176-5e0ef5c4dbab",
"version": "1.0"
},
{
"kind": "parser",
"kind": "Parser",
"contentId": "21ba424a-9438-4444-953a-7059539a7a1b"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"type": "Microsoft.SecurityInsights/metadata",
"properties": {
"contentId": "c00ee137-7475-47c8-9cce-ec6f0f1bedd0",
"kind": "analyticRule",
"kind": "AnalyticsRule",
"parentId": "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName",
"author": {
"name": "User Name",
Expand Down
Loading

0 comments on commit 08afd3c

Please sign in to comment.