> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# api_rate_limit_alert

> 预览版 PlayFab 事件，在 API 调用方接近或达到速率限制时引发，包含 API、调用方实体和限制越界的属性。

> \[!NOTE]
> 此事件为预览版。其有效负载、行为和可用性可能会发生变化。

当 API 调用方接近或达到速率限制时，可能会触发此事件。目前在达到限制的 80% 时会引发警告，但此阈值与事件的其他详细信息一样，可能会发生变化。警报会在跟踪周期内使用量首次越过警告阈值 (`Warning`) 或限制本身 (`HardLimit`) 时引发，而不是在此后的每次调用时都引发。若要判断调用是否正在被限制，请使用 HTTP 429 响应。可以在 Game Manager 的**数据资源管理器**中查询此事件。有关速率限制的详细信息，请参阅 [PlayFab 中的限制](/zh-CN/services/playfab/live-service-management/service-gateway/throttling/what-is-throttling)。

## 属性

| 名称 | 类型 | 描述 |
| :- | :- | :- |
| API | String | 被调用的 PlayFab API。例如 `client/gettime`。 |
| CallerEntityType | String | 发起调用的实体类型。例如 `title_player_account` 或 `title`。 |
| CallerEntityId | String | 发起调用的实体的 ID。可能会被省略或屏蔽。 |
| Crossings | object\[] | 调用所接近或达到的速率限制。在每个条目中，接近限制时 `CrossingType` 为 `Warning`，达到限制时为 `HardLimit`，`LimitKind`、`TrackingPeriod` 和 `Limit` 描述该限制。针对目标实体的限制条目还包括 `TargetEntityType` 和 `TargetEntityId`，该 ID 可能会被省略或屏蔽。 |

## 常用属性

所有 V2 PlayStream 事件都格式化为 JSON 对象，并且大多数共享以下常用属性：

| 名称 | 类型 | 描述 |
| :- | :- | :- |
| SchemaVersion | String | PlayStream 事件格式版本，遵循语义化版本控制方案。 |
| FullName | [Object](/zh-CN/services/playfab/api-references/events/data-types/fullnameobject) | 事件名称和事件命名空间的组合，用于完整指定事件类型。 |
| Id | String | PlayFab 为此事件分配的唯一标识符。 |
| Timestamp | DateTime | 与此事件关联的时间 (UTC)。 |
| Entity | [Object](/zh-CN/services/playfab/api-references/events/data-types/entityobject) | 此事件适用的实体的详细信息，包括实体 ID 和实体类型。 |
| Originator | [Object](/zh-CN/services/playfab/api-references/events/data-types/originatorobject) | 描述发起此事件的源和源类型的对象。 |
| PayloadContentType | String | 指定事件有效负载的内容。默认值为 "JSON"。 |
| Origin Info | Object | 可选字段，包含有关源自 PlayFab 外部的事件的信息。 |


## Related topics

- [title_client_rate_limited_alert](/zh-CN/services/playfab/api-references/events/Title/title-client-rate-limited-alert.md)
- [title_high_error_rate_alert](/zh-CN/services/playfab/api-references/events/Title/title-high-error-rate-alert.md)
- [PlayFab 的 PlayStream 事件模型参考](/zh-CN/services/playfab/api-references/events/index.md)
- [AlertLevel](/zh-CN/services/playfab/api-references/events/data-types/alertlevel.md)
- [AlertStates](/zh-CN/services/playfab/api-references/events/data-types/alertstates.md)
