View a markdown version of this page

RPC 请求 - Amazon Route 53

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

RPC 请求

根据 RFC 2616 的定义,亚马逊 Route 53 RPC 请求是 HTTPS 请求。本节介绍了 Route 53 RPC 请求的结构。

对于 RPC 操作,您可以向 Route 53 发送 HTTPS 请求并等待响应。对 Route 53 的 RPC 请求包含请求标头,有时还包含查询字符串或请求正文。响应包含 HTTP 状态码、响应标题,有时候包含响应主体。

关于请求时间戳

您必须在 HTTP Date 标头或标头中提供时间戳(某些 HTTP 客户端库不允许您设置标Date头)。 AWS x-amz-datex-amz-date 标头呈现时,系统在验证请求身份时会忽略任何 Date 标头。

时间戳必须在收到请求的 AWS 系统时间的 5 分钟以内。如果不在,请求失败,出现RequestExpired错误代码。这有助于防止其他人重新提交请求。

例如,必须以 ISO 8601 格式指定日期。2016-03-03T19:20:25.177Z欲了解更多信息,请参阅维基百科文章 ISO 8601

请求正文

许多 Route 53 API 操作都要求您在请求正文中包含 JSON。JSON 符合域注册或 Route 53 解析器的 Route 53 架构。

例请求示例

以下示例请求使用简单的 JSON 语句来确定域名example.com是否可用。

请求中的 JSON 元素必须按列出的顺序出现。

POST / HTTP/1.1 host:route53domains.us-east-1.amazonaws.com x-amz-date:date and time of the request authorization:AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/date of the request in yyyymmdd format/us-east-1/route53domains/aws4_request, SignedHeaders=content-length;content-type;host;user-agent;x-amz-date;x-amz-target, Signature=computed signature x-amz-target:Route53Domains_v20140515.CheckDomainAvailability user-agent:information about the source of the request content-type:application/x-amz-json- 1.1 content-length:length connections:Keep-Alive { "DomainName":"example.com" }