Skip to content

Commit 08afd3c

Browse files
Update SecurityInsights metadata preview API (#15012)
* 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
1 parent 2d57dfa commit 08afd3c

File tree

7 files changed

+90
-93
lines changed

7 files changed

+90
-93
lines changed

specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-03-01-preview/Metadata.json

Lines changed: 43 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@
354354
}
355355
},
356356
"metadataContentId": {
357-
"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",
357+
"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.",
358358
"type": "string"
359359
},
360360
"metadataParentId": {
@@ -369,66 +369,66 @@
369369
"type": "string",
370370
"description": "The kind of content the metadata is for.",
371371
"enum": [
372-
"dataConnector",
373-
"dataType",
374-
"workbook",
375-
"workbookTemplate",
376-
"playbook",
377-
"playbookTemplate",
378-
"analyticRuleTemplate",
379-
"analyticRule",
380-
"huntingQuery",
381-
"investigationQuery",
382-
"parser",
383-
"watchlist",
384-
"watchlistTemplate",
385-
"solution"
372+
"DataConnector",
373+
"DataType",
374+
"Workbook",
375+
"WorkbookTemplate",
376+
"Playbook",
377+
"PlaybookTemplate",
378+
"AnalyticsRuleTemplate",
379+
"AnalyticsRule",
380+
"HuntingQuery",
381+
"InvestigationQuery",
382+
"Parser",
383+
"Watchlist",
384+
"WatchlistTemplate",
385+
"Solution"
386386
],
387387
"x-ms-enum": {
388388
"modelAsString": true,
389389
"name": "kind",
390390
"values": [
391391
{
392-
"value": "dataConnector"
392+
"value": "DataConnector"
393393
},
394394
{
395-
"value": "dataType"
395+
"value": "DataType"
396396
},
397397
{
398-
"value": "workbook"
398+
"value": "Workbook"
399399
},
400400
{
401-
"value": "workbookTemplate"
401+
"value": "WorkbookTemplate"
402402
},
403403
{
404-
"value": "playbook"
404+
"value": "Playbook"
405405
},
406406
{
407-
"value": "playbookTemplate"
407+
"value": "PlaybookTemplate"
408408
},
409409
{
410-
"value": "analyticRuleTemplate"
410+
"value": "AnalyticsRuleTemplate"
411411
},
412412
{
413-
"value": "analyticRule"
413+
"value": "AnalyticsRule"
414414
},
415415
{
416-
"value": "huntingQuery"
416+
"value": "HuntingQuery"
417417
},
418418
{
419-
"value": "investigationQuery"
419+
"value": "InvestigationQuery"
420420
},
421421
{
422-
"value": "parser"
422+
"value": "Parser"
423423
},
424424
{
425-
"value": "watchlist"
425+
"value": "Watchlist"
426426
},
427427
{
428-
"value": "watchlistTemplate"
428+
"value": "WatchlistTemplate"
429429
},
430430
{
431-
"value": "solution"
431+
"value": "Solution"
432432
}
433433
]
434434
}
@@ -444,26 +444,26 @@
444444
"description": "Source type of the content",
445445
"type": "string",
446446
"enum": [
447-
"localWorkspace",
448-
"community",
449-
"solution",
450-
"sourceRepository"
447+
"LocalWorkspace",
448+
"Community",
449+
"Solution",
450+
"SourceRepository"
451451
],
452452
"x-ms-enum": {
453453
"modelAsString": true,
454454
"name": "sourceKind",
455455
"values": [
456456
{
457-
"value": "localWorkspace"
457+
"value": "LocalWorkspace"
458458
},
459459
{
460-
"value": "community"
460+
"value": "Community"
461461
},
462462
{
463-
"value": "solution"
463+
"value": "Solution"
464464
},
465465
{
466-
"value": "sourceRepository"
466+
"value": "SourceRepository"
467467
}
468468
]
469469
}
@@ -507,22 +507,22 @@
507507
"description": "Type of support for content item",
508508
"type": "string",
509509
"enum": [
510-
"microsoft",
511-
"developer",
512-
"community"
510+
"Microsoft",
511+
"Partner",
512+
"Community"
513513
],
514514
"x-ms-enum": {
515515
"modelAsString": true,
516516
"name": "supportTier",
517517
"values": [
518518
{
519-
"value": "microsoft"
519+
"value": "Microsoft"
520520
},
521521
{
522-
"value": "developer"
522+
"value": "Partner"
523523
},
524524
{
525-
"value": "community"
525+
"value": "Community"
526526
}
527527
]
528528
}
@@ -594,7 +594,6 @@
594594
"metadataProperties": {
595595
"description": "Metadata property bag.",
596596
"required": [
597-
"contentId",
598597
"parentId",
599598
"kind"
600599
],

specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-03-01-preview/examples/metadata/GetAllMetadata.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
"properties": {
1818
"contentId": "c00ee137-7475-47c8-9cce-ec6f0f1bedd0",
1919
"version": "1.0.0.0",
20-
"kind": "analyticRule",
20+
"kind": "AnalyticsRule",
2121
"parentId": "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName",
2222
"source": {
23-
"kind": "solution",
23+
"kind": "Solution",
2424
"name": "Contoso Solution 1.0",
2525
"sourceId": "b688a130-76f4-4a07-bf57-762222a3cadf"
2626
}
@@ -33,10 +33,10 @@
3333
"properties": {
3434
"contentId": "f5160682-0e10-4e23-8fcf-df3df49c5522",
3535
"version": "1.0.0.0",
36-
"kind": "analyticRule",
36+
"kind": "AnalyticsRule",
3737
"parentId": "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName2",
3838
"source": {
39-
"kind": "solution",
39+
"kind": "Solution",
4040
"name": "Contoso Solution 1.0",
4141
"sourceId": "b688a130-76f4-4a07-bf57-762222a3cadf"
4242
}
@@ -49,10 +49,10 @@
4949
"properties": {
5050
"contentId": "f593501d-ec01-4057-8146-a1de35c461ef",
5151
"version": "1.0.0.0",
52-
"kind": "workbook",
52+
"kind": "Workbook",
5353
"parentId": "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.Insights/workbooks/workbookName",
5454
"source": {
55-
"kind": "solution",
55+
"kind": "Solution",
5656
"name": "Contoso Solution 1.0",
5757
"sourceId": "b688a130-76f4-4a07-bf57-762222a3cadf"
5858
}

specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-03-01-preview/examples/metadata/GetAllMetadataOData.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"resourceGroupName": "myRg",
66
"workspaceName": "myWorkspace",
77
"operationalInsightsResourceProvider": "Microsoft.OperationalInsights",
8-
"ODataFilter": "properties/kind eq 'analyticRule'",
8+
"ODataFilter": "properties/kind eq 'AnalyticsRule'",
99
"ODataOrderBy": "properties/parentId desc",
1010
"ODataSkip": "2",
1111
"ODataTop": "2"
@@ -21,10 +21,10 @@
2121
"properties": {
2222
"contentId": "c00ee137-7475-47c8-9cce-ec6f0f1bedd0",
2323
"version": "1.0.0.0",
24-
"kind": "analyticRule",
24+
"kind": "AnalyticsRule",
2525
"parentId": "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName1",
2626
"source": {
27-
"kind": "solution",
27+
"kind": "Solution",
2828
"name": "Contoso Solution 1.0",
2929
"sourceId": "b688a130-76f4-4a07-bf57-762222a3cadf"
3030
}
@@ -37,10 +37,10 @@
3737
"properties": {
3838
"contentId": "f5160682-0e10-4e23-8fcf-df3df49c5522",
3939
"version": "1.0.0.0",
40-
"kind": "analyticRule",
40+
"kind": "AnalyticsRule",
4141
"parentId": "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName2",
4242
"source": {
43-
"kind": "solution",
43+
"kind": "Solution",
4444
"name": "Contoso Solution 1.0",
4545
"sourceId": "b688a130-76f4-4a07-bf57-762222a3cadf"
4646
}

specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-03-01-preview/examples/metadata/GetMetadata.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
"properties": {
1717
"contentId": "c00ee137-7475-47c8-9cce-ec6f0f1bedd0",
1818
"version": "1.0.0.0",
19-
"kind": "analyticRule",
19+
"kind": "AnalyticsRule",
2020
"parentId": "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName",
2121
"source": {
22-
"kind": "solution",
22+
"kind": "Solution",
2323
"name": "Contoso Solution 1.0",
2424
"sourceId": "b688a130-76f4-4a07-bf57-762222a3cadf"
2525
},
@@ -31,7 +31,7 @@
3131
"name": "Microsoft",
3232
"email": "support@microsoft.com",
3333
"link": "https://support.microsoft.com/",
34-
"tier": "developer"
34+
"tier": "Partner"
3535
},
3636
"dependencies": {
3737
"operator": "AND",
@@ -41,26 +41,26 @@
4141
"criteria": [
4242
{
4343
"contentId": "045d06d0-ee72-4794-aba4-cf5646e4c756",
44-
"kind": "dataConnector"
44+
"kind": "DataConnector"
4545
},
4646
{
4747
"contentId": "dbfcb2cc-d782-40ef-8d94-fe7af58a6f2d",
48-
"kind": "dataConnector"
48+
"kind": "DataConnector"
4949
},
5050
{
5151
"contentId": "de4dca9b-eb37-47d6-a56f-b8b06b261593",
52-
"kind": "dataConnector",
52+
"kind": "DataConnector",
5353
"version": "2.0"
5454
}
5555
]
5656
},
5757
{
58-
"kind": "playbook",
58+
"kind": "Playbook",
5959
"contentId": "31ee11cc-9989-4de8-b176-5e0ef5c4dbab",
6060
"version": "1.0"
6161
},
6262
{
63-
"kind": "parser",
63+
"kind": "Parser",
6464
"contentId": "21ba424a-9438-4444-953a-7059539a7a1b"
6565
}
6666
]

specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2021-03-01-preview/examples/metadata/PatchMetadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"type": "Microsoft.SecurityInsights/metadata",
2424
"properties": {
2525
"contentId": "c00ee137-7475-47c8-9cce-ec6f0f1bedd0",
26-
"kind": "analyticRule",
26+
"kind": "AnalyticsRule",
2727
"parentId": "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName",
2828
"author": {
2929
"name": "User Name",

0 commit comments

Comments
 (0)