> For the complete documentation index, see [llms.txt](https://hcbp.gitbook.io/hua-wei-yun-provider/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hcbp.gitbook.io/hua-wei-yun-provider/zui-jia-shi-jian/apig/index.md).

# 简介

## 什么是API网关（APIG）

API网关（API Gateway）是为企业和开发者提供的高性能、高可用、高安全的云原生网关服务。它能快速将企业服务能力包装成标准API接口，帮助您轻松构建、管理和部署任意规模的API，并支持API上架云商店进行售卖。借助API网关，您可以简单、快速、低成本、低风险地实现内部系统集成和业务能力开放。

API网关提供完整的API生命周期管理功能，支持多种安全认证和防护机制，具备云原生网关能力，可简化架构并降低部署和运维成本。通过API网关，企业可以快速实现业务能力开放，构建API生态，实现业务价值最大化。

## 最佳实践简述

本章节提供了使用Terraform自动化部署和管理华为云API网关（APIG）的最佳实践示例，帮助您了解如何利用Infrastructure as Code（IaC）的方式高效地管理云上的API网关资源。

通过本章节的最佳实践，您可以学习到主要的API网关资源的部署流程，这些最佳实践将帮助您快速上手API网关的自动化部署，并为后续的API管理和运维工作奠定坚实基础。

## 最佳实践列表

本章节包含以下最佳实践：

* [创建Kafka转发插件](/hua-wei-yun-provider/zui-jia-shi-jian/apig/kafka_forward_plugin.md) - 介绍如何使用Terraform自动化创建API网关的Kafka转发插件，实现API请求的异步转发和消息队列集成。
* [创建代理缓存插件](/hua-wei-yun-provider/zui-jia-shi-jian/apig/proxy_cache_plugin.md) - 介绍如何使用Terraform自动化创建API网关的代理缓存插件，实现API响应数据的缓存管理。
* [部署带有自定义认证的API](/hua-wei-yun-provider/zui-jia-shi-jian/apig/function_authorizer.md) - 介绍如何使用Terraform自动化部署带有自定义认证的API以及如何使用FunctionGraph函数实现API的前端认证。

## 参考资料

* [华为云API网关产品文档](https://support.huaweicloud.com/apig/index.html)
* [Terraform官方文档](https://www.terraform.io/docs/index.html)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hcbp.gitbook.io/hua-wei-yun-provider/zui-jia-shi-jian/apig/index.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
