你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Entity Queries - List
获取所有实体查询。
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueries?api-version=2024-01-01-preview
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entityQueries?kind={kind}&api-version=2024-01-01-preview
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
resource
|
path | True |
string |
资源组的名称。 此名称不区分大小写。 |
subscription
|
path | True |
string |
目标订阅的 ID。 |
workspace
|
path | True |
string |
工作区的名称。 Regex pattern: |
api-version
|
query | True |
string |
要用于此操作的 API 版本。 |
kind
|
query |
string |
要提取的实体查询类型 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
Entity |
确定 |
Other Status Codes |
Cloud |
描述操作失败原因的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 流
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
名称 | 说明 |
---|---|
user_impersonation | 模拟用户帐户 |
示例
Get all entity queries.
Sample Request
GET https://management.azure.com/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/entityQueries?kind=Expansion&api-version=2024-01-01-preview
Sample Response
{
"value": [
{
"id": "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/entityQueries/37ca3555-c135-4a73-a65e-9c1d00323f5d",
"name": "37ca3555-c135-4a73-a65e-9c1d00323f5d",
"type": "Microsoft.SecurityInsights/entityQueries",
"etag": null,
"kind": "Expansion",
"properties": {
"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>')",
"inputFields": [
"address"
],
"outputEntityTypes": [
"Account"
],
"dataSources": [
"AzureActivity"
],
"inputEntityType": "IP",
"displayName": "Least active accounts on Azure from this IP"
}
},
{
"id": "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/entityQueries/97a1d515-abf2-4231-9a35-985f9de0bb91",
"name": "97a1d515-abf2-4231-9a35-985f9de0bb91",
"type": "Microsoft.SecurityInsights/entityQueries",
"etag": null,
"kind": "Expansion",
"properties": {
"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>')",
"inputFields": [
"address"
],
"outputEntityTypes": [
"Account"
],
"dataSources": [
"AzureActivity"
],
"inputEntityType": "IP",
"displayName": "Most active accounts on Azure from this IP"
}
}
]
}
定义
名称 | 说明 |
---|---|
Activity |
表示活动实体查询。 |
Cloud |
错误响应结构。 |
Cloud |
错误详细信息。 |
created |
创建资源的标识类型。 |
Entity |
实体查询的类型 |
Entity |
所有实体查询的列表。 |
Entity |
查询的源实体的类型 |
Expansion |
表示扩展实体查询。 |
Query |
活动查询定义 |
system |
与资源的创建和上次修改相关的元数据。 |
ActivityEntityQuery
表示活动实体查询。
名称 | 类型 | 说明 |
---|---|---|
etag |
string |
Azure 资源的 Etag |
id |
string |
资源的完全限定的资源 ID。 例如 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
kind |
string:
Activity |
实体查询类型 |
name |
string |
资源的名称 |
properties.content |
string |
要显示在 时间线 中的实体查询内容 |
properties.createdTimeUtc |
string |
活动创建时间 |
properties.description |
string |
实体查询说明 |
properties.enabled |
boolean |
确定是启用还是禁用此活动。 |
properties.entitiesFilter |
object |
查询仅应用于与所有筛选器匹配的实体 |
properties.inputEntityType |
Entity |
查询的源实体的类型 |
properties.lastModifiedTimeUtc |
string |
上次更新活动的时间 |
properties.queryDefinitions |
Query |
活动查询定义 |
properties.requiredInputFieldsSets |
string[] |
运行查询所需的源实体字段列表 |
properties.templateName |
string |
创建此活动的模板 ID |
properties.title |
string |
实体查询标题 |
systemData |
system |
包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。 |
type |
string |
资源类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts” |
CloudError
错误响应结构。
名称 | 类型 | 说明 |
---|---|---|
error |
Cloud |
错误数据 |
CloudErrorBody
错误详细信息。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
错误的标识符。 代码是固定的,旨在以编程方式使用。 |
message |
string |
描述错误的消息,该消息适用于在用户界面中显示。 |
createdByType
创建资源的标识类型。
名称 | 类型 | 说明 |
---|---|---|
Application |
string |
|
Key |
string |
|
ManagedIdentity |
string |
|
User |
string |
EntityQueryKind
实体查询的类型
名称 | 类型 | 说明 |
---|---|---|
Activity |
string |
|
Expansion |
string |
|
Insight |
string |
EntityQueryList
所有实体查询的列表。
名称 | 类型 | 说明 |
---|---|---|
nextLink |
string |
用于提取下一组实体查询的 URL。 |
value |
EntityQuery[]:
|
实体查询数组。 |
EntityType
查询的源实体的类型
名称 | 类型 | 说明 |
---|---|---|
Account |
string |
实体表示系统中的帐户。 |
AzureResource |
string |
实体表示系统中的 azure 资源。 |
CloudApplication |
string |
实体表示系统中的云应用程序。 |
DNS |
string |
实体表示系统中的 dns。 |
File |
string |
实体表示系统中的文件。 |
FileHash |
string |
实体表示系统中的文件哈希。 |
Host |
string |
实体表示系统中的主机。 |
HuntingBookmark |
string |
实体表示系统中的 HuntingBookmark。 |
IP |
string |
实体表示系统中的 IP。 |
IoTDevice |
string |
实体表示系统中的 IoT 设备。 |
MailCluster |
string |
实体表示系统中的邮件群集。 |
MailMessage |
string |
实体表示系统中的邮件。 |
Mailbox |
string |
实体表示系统中的邮箱。 |
Malware |
string |
实体表示系统中的恶意软件。 |
Nic |
string |
实体表示系统中的网络接口。 |
Process |
string |
实体表示系统中的进程。 |
RegistryKey |
string |
实体表示系统中的注册表项。 |
RegistryValue |
string |
实体表示系统中的注册表值。 |
SecurityAlert |
string |
实体表示系统中的安全警报。 |
SecurityGroup |
string |
实体表示系统中的安全组。 |
SubmissionMail |
string |
实体表示系统中的提交邮件。 |
URL |
string |
实体表示系统中的 URL。 |
ExpansionEntityQuery
表示扩展实体查询。
名称 | 类型 | 说明 |
---|---|---|
etag |
string |
Azure 资源的 Etag |
id |
string |
资源的完全限定的资源 ID。 例如 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
kind |
string:
Expansion |
实体查询类型 |
name |
string |
资源的名称 |
properties.dataSources |
string[] |
运行查询所需的数据源列表 |
properties.displayName |
string |
查询显示名称 |
properties.inputEntityType |
Entity |
查询的源实体的类型 |
properties.inputFields |
string[] |
运行查询所需的源实体字段列表 |
properties.outputEntityTypes |
Entity |
要从结果构造的所需输出类型的列表 |
properties.queryTemplate |
string |
要分析和设置格式的模板查询字符串 |
systemData |
system |
包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。 |
type |
string |
资源类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts” |
QueryDefinitions
活动查询定义
名称 | 类型 | 说明 |
---|---|---|
query |
string |
在给定实体上运行的活动查询 |
systemData
与资源的创建和上次修改相关的元数据。
名称 | 类型 | 说明 |
---|---|---|
createdAt |
string |
资源的创建时间戳 (UTC) 。 |
createdBy |
string |
创建资源的标识。 |
createdByType |
created |
创建资源的标识类型。 |
lastModifiedAt |
string |
资源上次修改的时间戳 (UTC) |
lastModifiedBy |
string |
上次修改资源的标识。 |
lastModifiedByType |
created |
上次修改资源的标识类型。 |