本文顯示如何使用 REST API 在 Microsoft Sentinel 中以地理位置資料擴充實體。
重要
這項功能目前為「預覽」狀態。 Azure 預覽補充條款 包含適用於 Azure 功能 (搶鮮版 (Beta)、預覽版,或尚未發行的版本) 的其他法律條款。
通用 URI 參數
以下是地理位置 API 的常見 URI 參數:
| 名稱 | 位於 | 必要 | 類型 | 描述 |
|---|---|---|---|---|
| {subscriptionId} | path | 是 | GUID | Azure 訂用帳戶識別碼 |
| {resourceGroupName} | path | 是 | 字串 | 訂用帳戶內的資源群組名稱 |
| {api-version} | 查詢 | 是 | 字串 | 用來提出此要求的通訊協定版本。 自 2021 年 4 月 30 日起,地理位置 API 版本為 2019-01-01-preview。 |
| {ipAddress} | 查詢 | 是 | 字串 | 需要地理位置資訊的 IP 位址 (IPv4 或 IPv6 格式)。 |
使用地理位置資訊來擴充 IP 位址
此命令會擷取所指定 IP 位址的地理位置資料。
要求 URI
| 方法 | 要求 URI |
|---|---|
| GET | https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityInsights/enrichment/ip/geodata/?ipaddress={ipAddress}&api-version={api-version} |
回應
| 狀態碼 | 描述 |
|---|---|
| 200 | Success |
| 400 | 未提供 IP 位址,或 IP 位址的格式無效 |
| 404 | 找不到此 IP 位址的地理位置資料 |
| 429 | 要求太多,請在指定的時間範圍內再試一次 |
回應中傳回的欄位
| 欄位名稱 | 描述 |
|---|---|
| ASN | 與此 IP 位址相關聯的自發系統號碼 |
| carrier | 此 IP 位址的電訊廠商名稱 |
| city | 此 IP 位址所在的城市 |
| cityCf | 信賴度數值評等,表示 'city' 欄位中的值在 0-100 小數位數上正確 |
| continent | 此 IP 位址所在的大陸 |
| country | 此IP位址所在的國家/地區 |
| countryCf | 信賴度數值評等,表示 'country' 欄位中的值在 0-100 小數位數上正確 |
| ipAddr | IP 位址的小數點十進位或冒號區隔字串表示 |
| ipRoutingType | 此 IP 位址的連線類型描述 |
| 緯度 | 此 IP 位址的緯度 |
| 經度 | 此 IP 位址的經度 |
| organization | 此 IP 位址的組織名稱 |
| organizationType | 此 IP 位址的組織類型 |
| region | 此 IP 位址所在的地理區域 |
| state | 此 IP 位址所在的州/省 |
| stateCf | 信賴度數值評等,表示 'state' 欄位中的值在 0-100 小數位數上正確 |
| stateCode | 此 IP 位址所在州/省的縮寫名稱 |
API 的節流限制
此 API 限制為每小時每個使用者 100 次呼叫。
範例回應
"body":
{
"asn": "12345",
"carrier": "Microsoft",
"city": "Redmond",
"cityCf": 90,
"continent": "north america",
"country": "united states",
"countryCf": 99
"ipAddr": "1.2.3.4",
"ipRoutingType": "fixed",
"latitude": "40.2436",
"longitude": "-100.8891",
"organization": "Microsoft",
"organizationType": "tech",
"region": "western usa",
"state": "washington",
"stateCf": null
"stateCode": "wa"
}
後續步驟
若要深入了解 Microsoft Sentinel,請參閱下列文章: