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 No 詐騙警示狀態、作用中、已解決或調查
SubscriptionId string No 具有 Crypro-mining 活動的 Azure 訂用帳戶標識碼

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 No 詐騙警示狀態。 這是作用中解決或調查
SubscriptionId string No 查詢具有詐騙活動的 Azure 訂用帳戶標識碼。
EventType string No 詐騙警示類型與詐騙事件相關聯。 適用於 X-NewEventsModel 標頭。 值為 ServiceHealthSecurityAdvisoryUsageAnomalyDetection、MultiRegionVirtualMachineScaleSetDeploymentAnomalyNetwork 連線 ionsToCryptoMiningPoolsVirtualMachineDeploymentAnomalyMultiRegionMachineLearningUsageAnomaly
PageSize int No 分頁的頁面大小屬性是每頁的記錄數目。 X-NewEventsModel 標頭和非零正 PageNumber 提供。
PageNumber int No 分頁的頁碼屬性。 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"
        }
]",

    }
]
屬性 類型​ 描述
eventTime Datetime 偵測到警示的時間
eventId string 警示的唯一標識碼
partnerTenantId string 與警示相關聯的合作夥伴租用戶標識碼
partnerFriendlyName string 夥伴租使用者的易記名稱
customerTenantId string 與警示相關聯的客戶租用戶標識碼
customerFriendlyName string 客戶租使用者的易記名稱
subscriptionId string 客戶租用戶的訂用帳戶標識碼
subscriptionType string 客戶租用戶的訂用帳戶類型
entityId string 警示的唯一標識碼
entityName string 遭入侵之實體的名稱
entityUrl string 資源的實體URL
hitCount string 第一個Observed 與 lastObserved 之間偵測到的連線數目
catalogOfferId string 訂用帳戶的新式供應專案類別標識碼
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 警示的類型。 它是 ServiceHealthSecurityAdvisoryUsageAnomalyDetection、MultiRegionVirtualMachineScaleSetDeploymentAnomalyNetwork 連線 ionsToCryptoMiningPoolsVirtualMachineDeploymentAnomalyMultiRegionMachineLearningUsageAnomaly
severity string 警示的嚴重性。 值:低、中、高
confidenceLevel string 警示的信賴等級、值 - 低、中、高
displayName string 視警示類型而定,警示的使用者易記顯示名稱。
description string 警示的描述
國家/地區 string 合作夥伴租用戶的國家/地區代碼
valueAddedResellerTenantId string 與合作夥伴租用戶和客戶租使用者相關聯的增值轉銷商的租用戶標識碼
valueAddedResellerFriendlyName string 增值轉銷商的易記名稱
subscriptionName string 客戶租用戶的訂用帳戶名稱
affectedResources json Array 受影響的資源清單。 不同警示類型的受影響資源可能是空的。 如果是,合作夥伴必須檢查訂用帳戶層級的使用量和使用量。
additionalDetails Json 物件 識別和管理安全性警示所需的其他詳細索引鍵/值組字典。
isTest string 警示是測試警示。 這是真的 的。
activityLogs string 警示的活動記錄。