View a markdown version of this page

HTTP 目标:API 网关和 API 目的地 - Amazon EventBridge
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)。

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

HTTP 目标:API 网关和 API 目的地

要调用 HTTP 终端节点,请将 API Gateway execute-API ARN(例如)设置TargetArn为 API Gateway execute- EventBridge API ARNarn:aws:execute-api:us-east-1:111122223333:a1b2c3d4e5/prod/POST/orders,或者使用其连接凭据将任何其他 HTTPS 终端节点设置为 API 目标 ARN,然后添加。HttpParameters请求正文是转换后的事件。

参数

参数它设定了什么
PathParameterValues端点中路径变量的值,按顺序排列
HeaderParameters要添加的 HTTP 标头
QueryStringParameters要添加的查询字符串参数
InvocationTimeoutSeconds EventBridge 等待响应的时间,1 到 30 秒,默认为 30

交付角色

对于 API 网关终端节点,该角色需要execute-api:Invoke使用该方法的 ARN。对于 API 目标,角色需要events:InvokeApiDestination在 API 目标上。

批处理和有效载荷

一个 HTTP 请求将批处理作为 JSON 数组进行传输MaxBatchSize,除非是 1。超出 2xx 范围的响应是传送失败。请参阅批量向目标交付。