Hunt Comments - Create Or Update
创建或更新搜寻关系。
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/hunts/{huntId}/comments/{huntCommentId}?api-version=2025-07-01-preview
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
hunt
|
path | True |
string |
搜寻注释 ID (GUID) |
|
hunt
|
path | True |
string |
搜寻 ID (GUID) |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
资源组的名称。 此名称不区分大小写。 |
|
subscription
|
path | True |
string (uuid) |
目标订阅的 ID。 该值必须是 UUID。 |
|
workspace
|
path | True |
string minLength: 1maxLength: 90 pattern: ^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$ |
工作区的名称。 |
|
api-version
|
query | True |
string minLength: 1 |
要用于此操作的 API 版本。 |
请求正文
| 名称 | 必需 | 类型 | 说明 |
|---|---|---|---|
| properties.message | True |
string |
注释的消息 |
| etag |
string |
Azure 资源的 Etag |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
创建或更新搜寻注释 |
|
| 201 Created |
Created |
|
| Other Status Codes |
描述作失败的原因的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 流
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
| 名称 | 说明 |
|---|---|
| user_impersonation | 模拟用户帐户 |
示例
Creates or updates a hunt comment.
示例请求
PUT https://management.azure.com/subscriptions/bd794837-4d29-4647-9105-6339bfdb4e6a/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/hunts/163e7b2a-a2ec-4041-aaba-d878a38f265f/comments/2216d0e1-91e3-4902-89fd-d2df8c535096?api-version=2025-07-01-preview
{
"properties": {
"message": "This is a test comment."
}
}
示例响应
{
"id": "/subscriptions/bd794837-4d29-4647-9105-6339bfdb4e6a/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/avdvirint/providers/Microsoft.SecurityInsights/hunts/163e7b2a-a2ec-4041-aaba-d878a38f265f/comments/2216d0e1-91e3-4902-89fd-d2df8c123456",
"name": "2216d0e1-91e3-4902-89fd-d2df8c123456",
"etag": "\"3102f74d-0000-0c00-0000-629e6e050000\"",
"type": "Microsoft.SecurityInsights/hunts/comments",
"systemData": {
"createdAt": "2021-08-15T16:42:38.8709453Z",
"createdBy": "testuser@microsoft.com",
"createdByType": "User",
"lastModifiedAt": "2021-08-19T16:42:38.8709453Z",
"lastModifiedBy": "testuser@microsoft.com",
"lastModifiedByType": "User"
},
"properties": {
"message": "This is a test comment."
}
}
{
"id": "/subscriptions/bd794837-4d29-4647-9105-6339bfdb4e6a/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/avdvirint/providers/Microsoft.SecurityInsights/hunts/163e7b2a-a2ec-4041-aaba-d878a38f265f/comments/2216d0e1-91e3-4902-89fd-d2df8c123456",
"name": "2216d0e1-91e3-4902-89fd-d2df8c123456",
"etag": "\"3102f74d-0000-0c00-0000-629e6e050000\"",
"type": "Microsoft.SecurityInsights/hunts/comments",
"systemData": {
"createdAt": "2021-08-15T16:42:38.8709453Z",
"createdBy": "testuser@microsoft.com",
"createdByType": "User",
"lastModifiedAt": "2021-08-19T16:42:38.8709453Z",
"lastModifiedBy": "testuser@microsoft.com",
"lastModifiedByType": "User"
},
"properties": {
"message": "This is a test comment."
}
}
定义
| 名称 | 说明 |
|---|---|
|
Cloud |
错误响应结构。 |
|
Cloud |
错误详细信息。 |
|
created |
创建资源的标识的类型。 |
|
Hunt |
表示 Azure 安全见解中的搜寻注释 |
|
system |
与创建和上次修改资源相关的元数据。 |
CloudError
错误响应结构。
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误数据 |
CloudErrorBody
错误详细信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
string |
错误的标识符。 代码是固定的,旨在以编程方式使用。 |
| message |
string |
描述错误的消息,旨在适合在用户界面中显示。 |
createdByType
创建资源的标识的类型。
| 值 | 说明 |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
HuntComment
表示 Azure 安全见解中的搜寻注释
| 名称 | 类型 | 说明 |
|---|---|---|
| etag |
string |
Azure 资源的 Etag |
| id |
string (arm-id) |
资源的完全限定资源 ID。 例如“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}” |
| name |
string |
资源的名称 |
| properties.message |
string |
注释的消息 |
| systemData |
包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。 |
|
| type |
string |
资源类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts” |
systemData
与创建和上次修改资源相关的元数据。
| 名称 | 类型 | 说明 |
|---|---|---|
| createdAt |
string (date-time) |
资源创建时间戳(UTC)。 |
| createdBy |
string |
创建资源的标识。 |
| createdByType |
创建资源的标识的类型。 |
|
| lastModifiedAt |
string (date-time) |
上次修改的资源时间戳(UTC) |
| lastModifiedBy |
string |
上次修改资源的标识。 |
| lastModifiedByType |
上次修改资源的标识的类型。 |