Skip to content

Commit b6d64aa

Browse files
authored
[EntityQueries] - Adding EntityQueryKind to EntityQueries and changing Properties to Expansion properties (#11776)
* update swagger - aading LogicAppResourceId to Action put and response * update swagger - changing to logicAppResourceId style * adding LogicAppResourceId to Actions Request & Response * adding LogicAppResourceId to Actions Request & Response * adding Action property base * editing examples and adding reauired to logicAppResourceId * from LogicAppResourceId to logicAppResourceId * running prettier * running prettier * removing required for LogicAppRexourceId * changing logicApp propery doc * changing logicApp propery description * adding kind to entity queries and changing entityQueriesProperties to ExpansionEntityQueriesProperties * changin return for entityQueryById
1 parent 27c1c3c commit b6d64aa

File tree

3 files changed

+55
-7
lines changed

3 files changed

+55
-7
lines changed

specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2019-01-01-preview/SecurityInsights.json

Lines changed: 49 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2736,7 +2736,7 @@
27362736
"get": {
27372737
"x-ms-examples": {
27382738
"Get an entity query.": {
2739-
"$ref": "./examples/entityQueries/GetEntityQueryById.json"
2739+
"$ref": "./examples/entityQueries/GetExpansionEntityQueryById.json"
27402740
}
27412741
},
27422742
"tags": [
@@ -6383,21 +6383,63 @@
63836383
"value"
63846384
]
63856385
},
6386+
"EntityQueryKind": {
6387+
"description": "Describes an Entity query resource with kind.",
6388+
"properties": {
6389+
"kind": {
6390+
"description": "The kind of the entity query",
6391+
"enum": [
6392+
"Expansion"
6393+
],
6394+
"type": "string",
6395+
"x-ms-enum": {
6396+
"modelAsString": true,
6397+
"name": "EntityQueryKind",
6398+
"values": [
6399+
{
6400+
"value": "Expansion"
6401+
}
6402+
]
6403+
}
6404+
}
6405+
},
6406+
"required": [
6407+
"kind"
6408+
],
6409+
"type": "object"
6410+
},
63866411
"EntityQuery": {
63876412
"allOf": [
63886413
{
6389-
"$ref": "#/definitions/Resource"
6414+
"$ref": "#/definitions/ResourceWithEtag"
6415+
},
6416+
{
6417+
"$ref": "#/definitions/EntityQueryKind"
63906418
}
63916419
],
63926420
"description": "Specific entity query.",
6421+
"discriminator": "kind",
6422+
"type": "object",
6423+
"required": [
6424+
"kind"
6425+
]
6426+
},
6427+
"ExpansionEntityQuery": {
6428+
"description": "Represents Expansion entity query.",
6429+
"allOf": [
6430+
{
6431+
"$ref": "#/definitions/EntityQuery"
6432+
}
6433+
],
63936434
"properties": {
63946435
"properties": {
6395-
"$ref": "#/definitions/EntityQueryProperties",
6396-
"description": "Entity query properties",
6436+
"$ref": "#/definitions/ExpansionEntityQueriesProperties",
6437+
"description": "Expansion entity query properties",
63976438
"x-ms-client-flatten": true
63986439
}
63996440
},
6400-
"type": "object"
6441+
"type": "object",
6442+
"x-ms-discriminator-value": "Expansion"
64016443
},
64026444
"EntityTimelineKind": {
64036445
"description": "The entity query kind",
@@ -6446,8 +6488,8 @@
64466488
"value"
64476489
]
64486490
},
6449-
"EntityQueryProperties": {
6450-
"description": "Describes entity query properties",
6491+
"ExpansionEntityQueriesProperties": {
6492+
"description": "Describes expansion entity query properties",
64516493
"properties": {
64526494
"dataSources": {
64536495
"description": "List of the data sources that are required to run the query",

specification/securityinsights/resource-manager/Microsoft.SecurityInsights/preview/2019-01-01-preview/examples/entityQueries/GetEntityQueries.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
"id": "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/entityQueries/37ca3555-c135-4a73-a65e-9c1d00323f5d",
1515
"name": "37ca3555-c135-4a73-a65e-9c1d00323f5d",
1616
"type": "Microsoft.SecurityInsights/entityQueries",
17+
"etag": null,
18+
"kind": "Expansion",
1719
"properties": {
1820
"queryTemplate": "let AccountActivity_byIP = (v_IP_Address:string){\r\n AzureActivity\r\n | where Caller != '' and CallerIpAddress == v_IP_Address\r\n | summarize Account_Aux_StartTime = min(TimeGenerated), Account_Aux_EndTime = max(TimeGenerated), Count = count() by Caller, TenantId\r\n | top 10 by Count asc nulls last \r\n | extend UPN = iff(Caller contains '@', Caller, ''), Account_AadUserId = iff(Caller !contains '@', Caller,'')\r\n | extend Account_Name = split(UPN,'@')[0] , Account_UPNSuffix = split(UPN,'@')[1]\r\n | project Account_Name, Account_UPNSuffix, Account_AadUserId, Account_AadTenantId=TenantId, Account_Aux_StartTime , Account_Aux_EndTime};\r\n AccountActivity_byIP('<address>')",
1921
"inputFields": [
@@ -33,6 +35,8 @@
3335
"id": "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/entityQueries/97a1d515-abf2-4231-9a35-985f9de0bb91",
3436
"name": "97a1d515-abf2-4231-9a35-985f9de0bb91",
3537
"type": "Microsoft.SecurityInsights/entityQueries",
38+
"etag": null,
39+
"kind": "Expansion",
3640
"properties": {
3741
"queryTemplate": "let AccountActivity_byIP = (v_IP_Address:string){\r\n AzureActivity\r\n | where Caller != '' and CallerIpAddress == v_IP_Address\r\n | summarize Account_Aux_StartTime = min(TimeGenerated), Account_Aux_EndTime = max(TimeGenerated), Count = count() by Caller, TenantId\r\n | top 10 by Count desc nulls last \r\n | extend UPN = iff(Caller contains '@', Caller, ''), Account_AadUserId = iff(Caller !contains '@', Caller,'')\r\n | extend Account_Name = split(UPN,'@')[0] , Account_UPNSuffix = split(UPN,'@')[1]\r\n | project Account_Name, Account_UPNSuffix, Account_AadUserId, Account_AadTenantId=TenantId, Account_Aux_StartTime , Account_Aux_EndTime};\r\n AccountActivity_byIP('<address>')",
3842
"inputFields": [
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
"id": "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/entityQueries/07da3cc8-c8ad-4710-a44e-334cdcb7882b",
1414
"name": "07da3cc8-c8ad-4710-a44e-334cdcb7882b",
1515
"type": "Microsoft.SecurityInsights/entityQueries",
16+
"etag": null,
17+
"kind": "Expansion",
1618
"properties": {
1719
"queryTemplate": "let GetParentProcessesOnHost = (v_Host_HostName:string){\r\n SecurityEvent \r\n | where EventID == 4688 \r\n | where isnotempty(ParentProcessName)\r\n | where NewProcessName !contains ':\\\\Windows\\\\System32\\\\conhost.exe' and ParentProcessName !contains ':\\\\Windows\\\\System32\\\\conhost.exe'\r\n and NewProcessName !contains ':\\\\Windows\\\\Microsoft.NET\\\\Framework64\\\\v2.0.50727\\\\csc.exe' and ParentProcessName !contains ':\\\\Windows\\\\Microsoft.NET\\\\Framework64\\\\v2.0.50727\\\\csc.exe'\r\n and NewProcessName !contains ':\\\\Windows\\\\Microsoft.NET\\\\Framework64\\\\v2.0.50727\\\\cvtres.exe' and ParentProcessName !contains ':\\\\Windows\\\\Microsoft.NET\\\\Framework64\\\\v2.0.50727\\\\cvtres.exe'\r\n and NewProcessName!contains ':\\\\Program Files\\\\Microsoft Monitoring Agent\\\\Agent\\\\MonitoringHost.exe' and ParentProcessName !contains ':\\\\Program Files\\\\Microsoft Monitoring Agent\\\\Agent\\\\MonitoringHost.exe'\r\n and ParentProcessName !contains ':\\\\Windows\\\\CCM\\\\CcmExec.exe'\r\n | where(ParentProcessName !contains ':\\\\Windows\\\\System32\\\\svchost.exe' and (NewProcessName !contains ':\\\\Windows\\\\System32\\\\wbem\\\\WmiPrvSE.exe' or NewProcessName !contains ':\\\\Windows\\\\SysWOW64\\\\wbem\\\\WmiPrvSE.exe'))\r\n | where(ParentProcessName !contains ':\\\\Windows\\\\System32\\\\services.exe' and NewProcessName !contains ':\\\\Windows\\\\servicing\\\\TrustedInstaller.exe')\r\n | where toupper(Computer) contains v_Host_HostName or toupper(WorkstationName) contains v_Host_HostName\r\n | summarize min(TimeGenerated), max(TimeGenerated) by Account, Computer, ParentProcessName, NewProcessName, CommandLine, ProcessId\r\n | project min_TimeGenerated, max_TimeGenerated, Account, Computer, ParentProcessName, NewProcessName, CommandLine, ProcessId\r\n | project-rename Process_Host_UnstructuredName=Computer, Process_Account_UnstructuredName=Account, Process_CommandLine=CommandLine, Process_ProcessId=ProcessId, Process_ImageFile_FullPath=NewProcessName, Process_ParentProcess_ImageFile_FullPath=ParentProcessName\r\n | top 10 by min_TimeGenerated asc};\r\n GetParentProcessesOnHost(toupper('<hostName>'))",
1820
"inputFields": [

0 commit comments

Comments
 (0)