Azure 欺诈通知 - 更新欺诈事件状态
适用于:合作伙伴中心 API
调查每个报告的 Azure 资源的欺诈活动并确定行为为欺诈或合法行为后,可以使用此 API 更新欺诈事件状态,原因适当。
注意
此 API 将仅更新事件状态,它不会代表 CSP 合作伙伴解决欺诈活动。
截至 2023 年 5 月,试点合作伙伴可以使用此 API 与 新事件模型一起使用。 使用新模型,可以在将新类型的警报添加到系统时更新,例如异常计算使用情况、加密挖掘、Azure 机器学习使用情况和服务运行状况公告通知。
先决条件
- 合作伙伴中心身份验证中所述的凭据。 此方案支持使用 App+User 凭据进行身份验证。
REST 请求
请求语法
方法 | 请求 URI |
---|---|
POST | {baseURL}/v1/fraudEvents/subscription/{subscriptionId}/status |
请求头
- 如需了解更多信息,请参阅 合作伙伴中心 REST 标头。
请求正文
没有。
请求示例
POST https://api.partnercenter.microsoft.com/v1/fraudEvents/subscription/{subscriptionId}/status} HTTP/1.1
Authorization: Bearer <token>
Host: api.partnercenter.microsoft.com
Content-Type: application/json
{
"EventIds": ["2a7064fb-1e33-4007-974e-352cb3f2c805_2edeb5b1-766f-4209-9271-3ddf27755afa"],
"EventStatus" : "Resolved",
"ResolvedReason": "Fraud"
}
URI 参数
创建请求时,请使用以下可选查询参数。
名字 | 类型 | 必填 | 描述 |
---|---|---|---|
SubscriptionId |
字符串 | 是的 | Azure 订阅 ID,其中包含加密挖掘活动 |
请求正文
财产 | 类型 | 必填 | 描述 |
---|---|---|---|
eventIds |
string[] | 不 | 如果要更新给定订阅 ID 下所有欺诈事件的状态,请将 eventId 保留为空 |
eventStatus |
字符串 | 不 | 欺诈警报状态。 它可以是“活动”、“已解决”或“正在调查”。 |
resolvedReason |
字符串 | 是的 | 解决欺诈事件时,请设置适当的原因代码,接受的原因代码 欺诈 或 忽略 |
REST 响应
如果成功,此方法在响应正文中返回欺诈事件的集合。
响应成功和错误代码
每个响应都有一个 HTTP 状态代码,指示成功或失败以及更多的调试信息。 使用网络跟踪工具读取此代码、错误类型和其他参数。 有关完整列表,请参阅 错误代码。
响应示例
HTTP/1.1 200 OK
Content-Length: 313
Content-Type: application/json
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
MS-RequestId: 566330a7-1e4b-4848-9c23-f135c70fd810
Date: Thu, 21 May 2020 22:29:17 GMT
[
{
"eventTime": "2021-12-08T00:25:45.69",
"eventId": "2a7064fb-1e33-4007-974e-352cb3f2c805_2edeb5b1-766f-4209-9271-3ddf27755afa",
"partnerTenantId": "aaaabbbb-0000-cccc-1111-dddd2222eeee",
"partnerFriendlyName": "test partner",
"customerTenantId": "aaaabbbb-0000-cccc-1111-dddd2222eeee",
"customerFriendlyName": "test customer",
"subscriptionId": "aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e",
"subscriptionType": "modern",
"entityId": "00aa00aa-bb11-cc22-dd33-44ee44ee44ee",
"entityName": "sampleentity",
"entityUrl": "\\sample\\entity\\url",
"hitCount": "10",
"catalogOfferId": "ms-azr-17g",
"eventStatus": "Resolved",
"serviceName": "sampleservice",
"resourceName": "sampleresource",
"resourceGroupName": "sampleresourcegroup",
"firstOccurrence": "2021-12-08T00:25:45.69",
"lastOccurrence": "2021-12-08T00:25:45.69",
"resolvedReason": "Fraud",
"resolvedOn": "2021-12-08T11:25:45.69",
"resolvedBy": "adminagent@test.com"
}
]
具有 X-NewEventsModel 标头的 REST 请求
请求语法
MethodRequest | URI |
---|---|
POST | {baseURL}/v1/fraudEvents/subscription/{subscriptionId}/status |
请求头
- X-NewEventsModel:true
- 有关详细信息,请参阅合作伙伴中心 REST 标头。
请求正文
{
"EventIds": ["string"],
"EventStatus": "Resolved",
"ResolvedReason": "Fraud"
}
请求示例
POST https://api.partnercenter.microsoft.com/v1/fraudEvents/subscription/{subscriptionId}/status} HTTP/1.1
Authorization: Bearer <token>
Host: api.partnercenter.microsoft.com
Content-Type: application/json
X-NewEventsModel: true
{
"EventIds": ["2a7064fb-1e33-4007-974e-352cb3f2c805_2edeb5b1-766f-4209-9271-3ddf27755afa"],
"EventStatus" : "Resolved",
"ResolvedReason": "Fraud"
}
URI 参数
创建请求时,请使用以下可选查询参数。
名字 | 类型 | 必填 | 描述 |
---|---|---|---|
SubscriptionId |
字符串 | 是的 | Azure 订阅 ID,其中包含加密挖掘活动 |
请求正文
财产 | 类型 | 必填 | 描述 |
---|---|---|---|
eventIds |
string[] | 不 | 如果要更新给定订阅 ID 下所有欺诈事件的状态,请将 eventIds 保留为空 |
eventStatus |
字符串 | 是的 | 将其设置为 解决 来解决欺诈事件,或将其设置为 调查 以调查欺诈事件。 |
resolvedReason |
字符串 | 是的 | 解决欺诈事件时,请设置适当的原因代码,接受的原因代码 欺诈 或 忽略 |
REST 响应
如果成功,此方法在响应正文中返回具有扩展属性的欺诈事件集合。
响应成功和错误代码
每个响应都有一个 HTTP 状态代码,指示成功或失败以及更多的调试信息。 使用网络跟踪工具读取此代码、错误类型和其他参数。 有关完整列表,请参阅错误代码表。
响应示例
HTTP/1.1 200 OK
Content-Length: 313
Content-Type: application/json
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
MS-RequestId: 566330a7-1e4b-4848-9c23-f135c70fd810
Date: Thu, 21 May 2020 22:29:17 GMT
[
{
"eventTime": "2021-12-08T00:25:45.69",
"eventId": "2a7064fb-1e33-4007-974e-352cb3f2c805_2edeb5b1-766f-4209-9271-3ddf27755afa",
"partnerTenantId": "aaaabbbb-0000-cccc-1111-dddd2222eeee",
"partnerFriendlyName": "test partner",
"customerTenantId": "aaaabbbb-0000-cccc-1111-dddd2222eeee",
"customerFriendlyName": "test customer",
"subscriptionId": "aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e",
"subscriptionType": "modern",
"entityId": "00aa00aa-bb11-cc22-dd33-44ee44ee44ee",
"entityName": "sampleentity",
"entityUrl": "\\sample\\entity\\url",
"hitCount": "10",
"catalogOfferId": "ms-azr-17g",
"eventStatus": "Resolved",
"serviceName": "sampleservice",
"resourceName": "sampleresource",
"resourceGroupName": "sampleresourcegroup",
"firstOccurrence": "2021-12-08T00:25:45.69",
"lastOccurrence": "2021-12-08T00:25:45.69",
"resolvedReason": "Fraud",
"resolvedOn": "2021-12-08T11:25:45.69",
"resolvedBy": "adminagent@test.com",
"eventType": "NetworkConnectionsToCryptoMiningPools",
"severity": "Medium",
"confidenceLevel": "high",
"displayName": "sample display name",
"description": "sample description.",
"country": "US",
"valueAddedResellerTenantId": "aaaabbbb-0000-cccc-1111-dddd2222eeee",
"valueAddedResellerFriendlyName": "Sample Reseller Name",
"subscriptionName": "sample Subscription Name",
"affectedResources": [
{
"azureResourceId": "\\sample\\resource\\url ",
"type": "sample resource type"
}
],
"additionalDetails": {
"resourceid": "\\sample\\resource\\id ",
"resourcetype": "sample resource type",
"vM_IP": "[\r\n \"13.89.185.189\"\r\n]",
"miningPool_IP": "[\r\n \"104.243.33.118\"\r\n]",
"connectionCount": "31",
"cryptoCurrencyMiningPoolDomainName": "sample pool domain name"
},
"IsTest": "false",
"activityLogs": "[
{
"statusFrom": "Active",
"statusTo": "Investigating",
"updatedBy": "admin@testtestcsp022.onmicrosoft.com",
"dateTime": "2023-07-10T12:34:27.8016635+05:30"
},
{
"statusFrom": "Investigating",
"statusTo": "Resolved",
"updatedBy": "admin@testtestcsp022.onmicrosoft.com",
"dateTime": "2023-07-10T12:38:26.693182+05:30"
}
]"
}
}
]
财产 | 类型 | 描述 |
---|---|---|
eventTime |
datetime | 检测到警报的时间 |
eventId |
字符串 | 警报的唯一标识符 |
partnerTenantId |
字符串 | 与警报关联的合作伙伴的租户 ID |
partnerFriendlyName |
字符串 | 合作伙伴租户的友好名称 |
customerTenantId |
字符串 | 与警报关联的客户的租户 ID |
customerFriendlyName |
字符串 | 客户租户的友好名称 |
subscriptionId |
字符串 | 客户租户的订阅 ID |
subscriptionType |
字符串 | 客户租户的订阅类型 |
entityId |
字符串 | 警报的唯一标识符 |
entityName |
字符串 | 遭到入侵的实体的名称 |
entityUrl |
字符串 | 资源的实体 URL |
hitCount |
字符串 | 在 firstObserved 和 lastObserved 之间检测到的连接数 |
catalogOfferId |
字符串 | 订阅的新式产品/服务类别 ID |
eventStatus |
字符串 | 警报的状态:活动、正在调查或已解决 |
serviceName |
字符串 | 与警报关联的 Azure 服务的名称 |
resourceName |
字符串 | 与警报关联的 Azure 资源的名称 |
resourceGroupName |
字符串 | 与警报关联的 Azure 资源组的名称 |
firstOccurrence |
datetime | 警报的影响开始时间(警报中包含的第一个事件或活动的时间) |
lastOccurrence |
datetime | 警报的影响结束时间(警报中包含的最后一个事件或活动的时间) |
resolvedReason |
字符串 | 合作伙伴提供的解决警报状态的原因 |
resolvedOn |
datetime | 警报解决的时间 |
resolvedBy |
字符串 | 解决警报的用户 |
firstObserved |
datetime | 警报的影响开始时间(警报中包含的第一个事件或活动的时间) |
lastObserved |
datetime | 警报的影响结束时间(警报中包含的最后一个事件或活动的时间) |
eventType |
字符串 | 警报类型:ServiceHealthSecurityAdvisory 、UsageAnomalyDetection 、MultiRegionVirtualMachineScaleSetDeploymentAnomaly 、NetworkConnectionsToCryptoMiningPools 、VirtualMachineDeploymentAnomaly 、MultiRegionMachineLearningUsageAnomaly |
severity |
字符串 | 警报的严重性(值:低、中、高) |
confidenceLevel |
字符串 | 警报的置信度(值:低、中、高) |
displayName |
字符串 | 警报的用户友好显示名称(根据警报类型) |
description |
字符串 | 警报的说明 |
country |
字符串 | 合作伙伴租户的国家/地区代码 |
valueAddedResellerTenantId |
字符串 | 与合作伙伴租户和客户租户关联的增值经销商的租户 ID |
valueAddedResellerFriendlyName |
字符串 | 增值经销商的友好名称 |
subscriptionName |
字符串 | 客户租户的订阅名称 |
affectedResources |
json 数组 | 受影响的资源列表;对于不同的警报类型,受影响的资源可能为空,此时合作伙伴需要在订阅级别检查使用率和消耗情况。 |
additionalDetails |
Json 对象 | 标识和管理安全警报所需的其他详细信息键值对的字典 |
isTest |
字符串 | 如果生成了一个测试警报,它将被设置为“true”,否则为“false” |
activityLogs |
字符串 | 警报活动日志 |