在 Azure API 管理中预配自承载网关Provision a self-hosted gateway in Azure API Management

在 Azure API 管理实例中预配网关资源是部署自承载网关的先决条件。Provisioning a gateway resource in your Azure API Management instance is a prerequisite for deploying a self-hosted gateway. 本文详细介绍如何通过相关步骤在 API 管理中预配网关资源。This article walks through the steps to provision a gateway resource in API Management.

先决条件Prerequisites

完成以下快速入门:创建一个 Azure API 管理实例Complete the following quickstart: Create an Azure API Management instance

转到你的 API 管理实例Go to your API Management instance

  1. 登录到 Azure 门户Sign in to the Azure portal.

  2. 选择“所有服务”。Select All services.

  3. 在搜索框中输入 apiIn the search box, enter api.

  4. 在搜索结果中,选择“API 管理服务”。In the search results, select API Management services.

  5. 选择自己的 API 管理服务实例。Select your API Management service instance.

提示

若要将 API 管理添加到 Azure 门户中的收藏夹,请选择星形。To add API Management to your favorites in the Azure portal, select the star.

API 管理图标The API Management icon ((API 管理图标)现在显示在门户的左侧菜单中。) now appears in the left menu in the portal.

预配自托管网关Provision a self-hosted gateway

  1. 选择“部署和基础结构”下的“网关” 。Select the Gateways from under Deployment and infrastructure.
  2. 单击“+ 添加”。Click + Add.
  3. 输入网关的“名称”和“区域”。 Enter the Name and Region of the gateway.

提示

“区域”指定将要与此网关资源关联的网关节点的预期位置。Region specifies intended location of the gateway nodes that will be associated with this gateway resource. 它在语义上等效于一个与任何 Azure 资源关联的类似属性,但我们可以为其分配任意字符串值。It's semantically equivalent to a similar property associated with any Azure resource, but can be assigned an arbitrary string value.

  1. (可选)输入网关资源的“说明”。Optionally, enter a Description of the gateway resource.
  2. (可选)在“API”下选择“+”,将一个或多个 API 与此网关资源相关联。Optionally, select + under APIs to associate one or more APIs with this gateway resource.

重要

默认情况下,现有 API 中的任何一个都不会与新网关资源相关联。By default, none of the existing APIs will be associated with the new gateway resource. 因此,尝试通过新网关调用它们会导致“404 Resource Not Found”响应。Therefore, attempts to invoke them via the new gateway will result in 404 Resource Not Found responses.

  1. 单击“添加” 。Click Add.

现在已在 API 管理实例中预配网关资源,Now the gateway resource has been provisioned in your API Management instance. 可以部署网关了。You can proceed to deploy the gateway.

后续步骤Next steps