Azure 欺诈通知 - 获取欺诈事件

适用于:合作伙伴中心 API

本文介绍如何以编程方式获取受欺诈活动影响的 Azure 资源列表。 若要详细了解合作伙伴的 Azure 欺诈检测,请参阅 Azure 欺诈检测和通知

自 2023 年 5 月起,试点合作伙伴可以将此 API 与 新事件模型配合使用。 使用新模型,可以获取新类型的警报(例如,异常计算使用情况、加密挖掘、Azure 机器学习使用情况和服务运行状况咨询通知)。

先决条件

REST 请求

请求语法

方法 请求 URI
GET {baseURL}/v1/fraudEvents>

请求标头

请求正文

请求示例

GET https://api.partnercenter.microsoft.com/v1/fraudEvents?EventStatus={EventStatus}&SubscriptionId={SubscriptionId} HTTP/1.1
Authorization: Bearer <token>
Host: api.partnercenter.microsoft.com
Content-Type: application/json

URI 参数

创建请求时,可以使用以下可选查询参数。

名称 类型​​ 必需 说明
EventStatus string 欺诈警报状态(处于活动状态解决或正在调查)。
SubscriptionId string 具有 Crypro 挖掘活动的 Azure 订阅 ID

REST 响应

如果成功,该方法在响应正文中返回欺诈事件的集合。

响应的成功和错误代码

每个响应都有一个 HTTP 状态代码,指示成功或失败和其他调试信息。 使用网络跟踪工具读取此代码、错误类型和其他参数。 有关完整列表,请参阅错误代码

响应示例

HTTP/1.1 200 OK
Content-Length: 313
Content-Type: application/json
MS-CorrelationId: 4cb80cbe-566b-4d8b-8b8f-af1454b73089
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": "348e932d-ef58-4347-8351-be51e4ec148c",
        "partnerFriendlyName": "test partner",
        "customerTenantId": "a248da34-6840-4c67-82d7-7f55ccd50d03",
        "customerFriendlyName": "test customer",
        "subscriptionId": "2a7064fb-1e33-4007-974e-352cb3f2c805",
        "subscriptionType": "modern",
        "entityId": "2edeb5b1-766f-4209-9271-3ddf27755afa",
        "entityName": "sampleentity",
        "entityUrl": "\\sample\\entity\\url",
        "hitCount": "10",
        "catalogOfferId": "ms-azr-17g",
        "eventStatus": "Active",
        "serviceName": "sampleservice",
        "resourceName": "sampleresource",
        "resourceGroupName": "sampleresourcegroup",
        "firstOccurrence": "2021-12-08T00:25:45.69",
        "lastOccurrence": "2021-12-08T00:25:45.69",
        "resolvedReason": "None",
        "resolvedOn": "9999-12-31T23:59:59.9970000",
        "resolvedBy": ""
        "firstObserved" : "9999-12-31T23:59:59.9970000",
        "lastObserved" : "9999-12-31T23:59:59.9970000"
    }
]

具有 X-NewEventsModel 标头的 REST 请求

请求语法

方法 请求 URI
GET [{baseURL}]/v1/fraudEvents>

请求标头

请求正文

请求示例

GET https://api.partnercenter.microsoft.com/v1/fraudEvents?EventStatus={EventStatus}&SubscriptionId={SubscriptionId}&EventType={EventType}&PageSize={PageSize}&PageNumber={PageNumber} HTTP/1.1
Authorization: Bearer <token>
Host: api.partnercenter.microsoft.com
Content-Type: application/json
X-NewEventsModel: true

URI 参数

创建请求时,可以使用以下可选查询参数。

名称 类型​​ 必需 说明
EventStatus string 欺诈警报状态。 它处于活动状态解决或正在调查。
SubscriptionId string 查询具有欺诈活动的 Azure 订阅 ID。
EventType string 欺诈警报类型与欺诈事件相关联。 可用于 X-NewEventsModel 标头。 值为 ServiceHealthSecurityAdvisoryUsageAnomalyDetectionMultiRegionVirtualMachineScaleSetDeploymentAnomalyNetwork连接ionsToCryptoMiningPoolsVirtualMachineDeploymentAnomaly、MultiRegionMachineLearningUsageAnomaly
PageSize int 分页的页面大小属性是每页的记录数。 它适用于 X-NewEventsModel 标头和非零正 PageNumber。
PageNumber int 分页的页码属性。 可用于 X-NewEventsModel 标头和非零正 PageSize。

具有 X-NewEventsModel 标头的 REST 响应

如果成功,该方法在响应正文中返回欺诈事件的集合。

响应的成功和错误代码

每个响应都有一个 HTTP 状态代码,指示成功或失败和其他调试信息。 使用网络跟踪工具读取此代码、错误类型和其他参数。 有关完整列表,请参阅错误代码

响应示例

HTTP/1.1 200 OK
Content-Length: 313
Content-Type: application/json
MS-CorrelationId: 4cb80cbe-566b-4d8b-8b8f-af1454b73089
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": "348e932d-ef58-4347-8351-be51e4ec148c",
        "partnerFriendlyName": "test partner",
        "customerTenantId": "a248da34-6840-4c67-82d7-7f55ccd50d03",
        "customerFriendlyName": "test customer",
        "subscriptionId": "2a7064fb-1e33-4007-974e-352cb3f2c805",
        "subscriptionType": "modern",
        "entityId": "2edeb5b1-766f-4209-9271-3ddf27755afa",
        "entityName": "sampleentity",
        "entityUrl": "\\sample\\entity\\url",
        "hitCount": "10",
        "catalogOfferId": "ms-azr-17g",
        "eventStatus": "Active",
        "serviceName": "sampleservice",
        "resourceName": "sampleresource",
        "resourceGroupName": "sampleresourcegroup",
        "firstOccurrence": "2021-12-08T00:25:45.69",
        "lastOccurrence": "2021-12-08T00:25:45.69",
        "resolvedReason": "None",
        "resolvedOn": "9999-12-31T23:59:59.9970000",
        "resolvedBy": ""
        "firstObserved": "9999-12-31T23:59:59.9970000",
        "lastObserved": "9999-12-31T23:59:59.9970000",
        "eventType": "NetworkConnectionsToCryptoMiningPools",
        "severity": "Medium",
        "confidenceLevel": "high",
        "displayName": "sample display name",
        "description": "sample description.",
        "country": "US",
        "valueAddedResellerTenantId": "897e68c5-fdf8-330e-bb54-3b386e0906b0",
        "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"
        }
]",

    }
]
properties 类型​​ 描述
EventTime datetime 检测到警报的时间
eventId string 警报的唯一标识符
partnerTenantId string 与警报关联的合作伙伴的租户 ID
partnerFriendlyName string 合作伙伴租户的友好名称
customerTenantId string 与警报关联的客户的租户 ID
customerFriendlyName string 客户租户的友好名称
subscriptionId string 客户租户的订阅 ID
subscriptionType string 客户租户的订阅类型
entityId string 警报的唯一标识符
entityName string 遭到入侵的实体的名称
entityUrl string 资源的实体 URL
hitCount string 在 firstObserved 和 lastObserved 之间检测到的连接数
catalogOfferId string 订阅的新式产品/服务类别 ID
eventStatus string 警报的状态。 它 处于活动状态正在调查解决
serviceName string 与警报关联的 Azure 服务的名称
resourceName string 与警报关联的 Azure 资源的名称
resourceGroupName string 与警报关联的 Azure 资源组的名称
firstOccurrence datetime 警报的影响开始时间(警报中包含的第一个事件或活动的时间)。
lastOccurrence datetime 警报的影响结束时间(警报中包含的最后一个事件或活动的时间)。
resolvedReason string 合作伙伴提供解决警报状态的原因
resolvedOn datetime 警报解决的时间
resolvedBy string 解决警报的用户
firstObserved datetime 警报的影响开始时间(警报中包含的第一个事件或活动的时间)。
lastObserved datetime 警报的影响结束时间(警报中包含的最后一个事件或活动的时间)。
eventType string 警报的类型。 它是 ServiceHealthSecurityAdvisoryUsageAnomalyDetectionMultiRegionVirtualMachineScaleSetDeploymentAnomalyNetwork连接ionsToCryptoMiningPoolsVirtualMachineDeploymentAnomalyMultiRegionMachineLearningUsageAnomaly
severity string 警报严重性。 值:低、中、高
confidenceLevel string 警报的置信度、值- 低、中、高
displayName string 警报的用户友好显示名称,具体取决于警报类型。
description string 警报的说明
country string 合作伙伴租户的国家/地区代码
valueAddedResellerTenantId string 与合作伙伴租户和客户租户关联的增值经销商的租户 ID
valueAddedResellerFriendlyName string 增值经销商的友好名称
subscriptionName string 客户租户的订阅名称
affectedResources json 数组 受影响的资源列表。 对于不同的警报类型,受影响的资源可能为空。 如果是这样,合作伙伴需要在订阅级别检查使用情况和消耗。
additionalDetails Json 对象 标识和管理安全警报所需的其他详细信息键值对的字典。
isTest string 警报是测试警报。 这是 真的的。
activityLogs string 警报的活动日志。