zoukankan      html  css  js  c++  java
  • API Gateway 中部署 REST API

    创建 API 之后,您必须对其进行部署,以便您的用户可以调用它。

    要部署 API,您可以创建 API 部署并将其与阶段关联。每个阶段都是 API 的一个快照,可供客户端应用程序调用。

    每次更新 API 时(包括修改路由、方法、集成、授权方以及任何其他阶段设置之外的内容),您必须将 API 重新部署到现有阶段或者部署到新阶段。

    随着 API 的发展,您可以继续将其作为 API 的不同版本部署到不同阶段。您还可以部署 API 更新作为 金丝雀版本部署,这使得您的 API 客户端可在相同阶段上,通过生产版本访问正式版本,并通过金丝雀版本访问更新的版本。

    为调用已部署 API,客户端对 API 的 URL 提交请求。URL 由 API 的协议(HTTP(S) 或 (WSS))、主机名、阶段名称和(对于 REST API)资源路径确定。主机名和阶段名称确定 API 的基本 URL。

    Deploying a REST API in Amazon API Gateway

    After creating your API, you must deploy it to make it callable by your users.

    To deploy an API, you create an API deployment and associate it with a stage. Each stage is a snapshot of the API and is made available for client apps to call.

     

    Every time you update an API, which includes modification of routes, methods, integrations, authorizers, and anything else other than stage settings, you must redeploy the API to an existing stage or to a new stage.

    As your API evolves, you can continue to deploy it to different stages as different versions of the API. You can also deploy your API updates as a canary release deployment, enabling your API clients to access, on the same stage, the production version through the production release, and the updated version through the canary release.

    To call a deployed API, the client submits a request against an API's URL. The URL is determined by an API's protocol (HTTP(S) or (WSS)), hostname, stage name, and (for REST APIs) resource path. The host name and the stage name determine the API's base URL.

    • Lambda是使用Alias来管理版本;
    •   一个Alias可以映射到两个不同的版本,以便对Lambda做Canary Release。
    • API Gateway时使用Stage来管理版本。
    •   利用Stage,可以配置Gateway转发流量到多个Stage,以便对API做Canary Release。
  • 相关阅读:
    win平台搭建Lnmp环境
    YII2 model where 条件拼接
    yii2框架-yii2局部关闭(开启)csrf的验证
    Yii2 控制器单独向view(layout)传值
    Yii2 数据库基本操作
    PHP 多线程采集
    php 阿拉伯数字转中文
    javascript里的sleep()方法
    PHP数组内容不重复组合排列算法
    git使用经验(一)
  • 原文地址:https://www.cnblogs.com/cloudrivers/p/11636453.html
Copyright © 2011-2022 走看看