Observação
O acesso a essa página exige autorização. Você pode tentar entrar ou alterar diretórios.
O acesso a essa página exige autorização. Você pode tentar alterar os diretórios.
重要
注意: 2026 年 8 月 18 日,根据 世纪互联发布的公告,所有Microsoft Sentinel 功能将在中国 Azure 正式停用。
本文介绍如何通过 REST API 用地理位置数据扩充 Microsoft Sentinel 中的实体。
重要
此功能目前处于预览状态。 Azure 预览版补充条款包含适用于 beta 版、预览版或其他尚未正式发布的 Azure 功能的其他法律条款。
常见 URI 参数
下面是地理位置 API 的常见 URI 参数:
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
| “{subscriptionId}” | 路径 | 是 | GUID | Azure 订阅 ID |
| “{resourceGroupName}” | 路径 | 是 | 字符串 | 订阅中的资源组的名称 |
| “{api-version}” | 查询 | 是 | 字符串 | 用于发出此请求的协议的版本。 从 2021 年 4 月 30 日起,地理位置 API 版本为 2019-01-01-preview。 |
| {ipAddress} | 查询 | 是 | 字符串 | 需要地理位置信息的 IP 地址,采用 IPv4 或 IPv6 格式。 |
使用地理位置信息扩充 IP 地址
此命令检索给定 IP 地址的地理位置数据。
请求 URI
| 方法 | 请求 URI |
|---|---|
| GET | https://management.chinacloudapi.cn/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityInsights/enrichment/ip/geodata/?ipaddress={ipAddress}&api-version={api-version} |
响应
| 状态代码 | 说明 |
|---|---|
| 200 | Success |
| 400 | 未提供 IP 地址或格式无效 |
| 404 | 找不到此 IP 地址的地理位置数据 |
| 429 | 请求过多,请在指定的时间范围内重试 |
响应中返回的字段
| 字段名称 | 说明 |
|---|---|
| ASN | 与此 IP 地址关联的自治系统编号 |
| 运营商 | 此 IP 地址的运营商名称 |
| 城市 | 此 IP 地址所在的城市 |
| cityCf | 表示“城市”字段中的值正确时的置信度数值评级,范围为 0 - 100 |
| 洲 | 此 IP 地址所在的洲 |
| country | 此 IP 地址所在的国家/地区 |
| countryCf | 表示“国家/地区”字段中的值正确时的置信度数值评级,范围为 0 - 100 |
| ipAddr | IP 地址的点分十进制或冒号分隔的字符串表示形式 |
| ipRoutingType | 此 IP 地址的连接类型的说明 |
| latitude | 此 IP 地址的纬度 |
| longitude | 此 IP 地址的经度 |
| 组织 | 此 IP 地址的组织名称 |
| organizationType | 此 IP 地址的组织类型 |
| region | 此 IP 地址所在的地理区域 |
| state | 此 IP 地址所在的州 |
| stateCf | 表示“州”字段中的值正确时的置信度数值评级,范围为 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,请参阅以下文章: