api-gateway-troubleshooting
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAPI Gateway Troubleshooting
API Gateway 故障排查
Use this skill to find out why requests to a deployed Google Cloud API Gateway
fail and how to fix them. Work only from three sources of evidence:
- Public Google Cloud documentation, linked from this skill.
- The user's own project, read with the user's own credentials.
- Files and output that the user provides, such as an OpenAPI document, an error response, or a pasted log entry.
使用此 skill 查明发往已部署 Google Cloud API Gateway 的请求为何失败,以及如何修复。只能依据以下三类证据:
- 此 skill 链接的公开 Google Cloud 文档。
- 使用用户自己的凭据读取用户自己的项目。
- 用户提供的文件和输出,例如 OpenAPI 文档、错误响应或粘贴的日志条目。
Scope
范围
This skill covers only Google Cloud API Gateway. If the question is about
Apigee, Cloud Endpoints, or GKE Gateway API, reply that this skill covers only
Google Cloud API Gateway, and don't run its steps or commands.
此 skill 仅涵盖 Google Cloud API Gateway。如果问题涉及 Apigee、Cloud Endpoints 或 GKE Gateway API,请回复说明此 skill 仅涵盖 Google Cloud API Gateway,并且不要运行其中的步骤或命令。
Usage Attribution
使用说明
MUST READ: Before executing any , REST API, or MCP command, you
MUST read and follow the instructions in
Usage Attribution.
gcloud必须阅读:执行任何 、REST API 或 MCP 命令之前,必须阅读并遵循 Usage Attribution 中的说明。
gcloudGround rules
基本规则
| Rule | Why |
|---|---|
Stay read-only until the user approves a change. While you diagnose, run only | Gateways serve production traffic, and the quota metrics and limits of the most recently created API config apply to every gateway of the API. |
Before any change, show the exact command, what it changes, and how to undo it, then wait for an explicit yes. Changes include IAM grants, | The user owns the project and the change. |
Never fix a | Grant the gateway's service account the invoker role on the one backend instead, which keeps least privilege. |
Keep every log read bounded: filter on the gateway, set | Unbounded reads are slow and pull in caller data that the diagnosis doesn't need. |
| Redact API keys, bearer tokens, and JWTs before you show log entries, commands, or files. | Request logs and pasted output can contain credentials. |
| Base every limit, default, and error meaning on a linked public doc or on output from the user's project. If neither explains the problem, say so and escalate. | Guessing about undocumented behavior leads to wrong fixes. |
Use the user's existing | Credentials don't belong in a chat transcript. |
| For Preview features (streaming, MCP, model routing), check the release notes before answering. | Preview behavior changes between releases. |
| 规则 | 原因 |
|---|---|
在用户批准更改前保持只读。诊断期间,仅运行 | Gateway 承载生产流量,并且最新创建的 API config 所对应的配额指标和限制会应用于该 API 的每个 gateway。 |
进行任何更改前,先展示准确的命令、该命令会更改什么以及如何撤销,然后等待用户明确同意。更改包括 IAM 授权、 | 项目及其更改由用户所有。 |
绝不要通过将后端公开( | 应在单个后端上向 gateway 的 service account 授予 invoker role,从而保持最小权限。 |
限制每次日志读取的范围:按 gateway 过滤,设置 | 无界读取速度缓慢,还会拉取诊断并不需要的调用方数据。 |
| 在展示日志条目、命令或文件之前,务必遮盖 API key、bearer token 和 JWT。 | 请求日志和粘贴的输出可能包含凭据。 |
| 每项限制、默认值和错误含义都必须基于链接的公开文档或用户项目的输出。如果两者都无法解释问题,请如实说明并升级处理。 | 猜测未记录的行为会导致错误的修复方案。 |
使用用户现有的 | 凭据不应出现在聊天记录中。 |
| 对于 Preview 功能(流式传输、MCP、model routing),回答前先检查 release notes。 | Preview 行为会随版本发生变化。 |
Prerequisites
前提条件
- Google Cloud CLI. Use a recent (the commands here were checked with version 591.0.0); see Install the gcloud CLI. Don't install or update software without the user's approval. If
gcloudisn't available or the user says not to run commands, work in evidence mode: give the user the read-only commands to run, and diagnose from the output, response bodies, and log entries they paste.gcloud - Authentication. Use the user's existing session; this skill doesn't need application-default credentials.
gcloud auth login - Project. Ask which project hosts the gateway and pass
on every command. Don't run
--project={project_id}, because it changes the user's environment. This skill troubleshoots existing gateways and never creates projects.gcloud config set - Billing. The project needs an active billing account even when usage stays in the free tier; see API Gateway pricing.
- APIs. API Gateway requires ,
apigateway.googleapis.com, andservicemanagement.googleapis.com. A gateway can keep responding while one of them is missing, and its logs then stay empty, so check withservicecontrol.googleapis.com. Enabling a missing API is a change that needs approval.gcloud services list --enabled --project={project_id} - IAM roles for diagnosis (read-only): ,
roles/apigateway.viewer,roles/logging.viewer, androles/serviceusage.serviceUsageViewer(to check the gateway's service account). For Cloud Run backends, addroles/iam.serviceAccountViewer; to trace a custom domain through its load balancer, addroles/run.viewer; to check an API key's project,roles/compute.vieweris also needed there.roles/serviceusage.serviceUsageViewer - IAM roles for fixes (only after approval): ;
roles/apigateway.adminon the gateway's service account, because creating or updating an API config or a gateway requiresroles/iam.serviceAccountUser;iam.serviceAccounts.actAsto change a Cloud Run service's IAM policy or ingress;roles/run.adminto enable an API or a managed service, plusroles/serviceusage.serviceUsageAdminon the API's managed service to enable it in another project; androles/servicemanagement.serviceConsumerto re-enable a disabled service account.roles/iam.serviceAccountAdmin - Region. Gateways are regional. Use the region that
reports. When a fix needs a new gateway, create it in the original gateway's region, or in
gateways listif the user has no preference; see API Gateway deployment model and Cloud locations.us-central1
- Google Cloud CLI。 使用较新的 (本文中的命令已使用 591.0.0 版本验证);请参阅 安装 gcloud CLI。未经用户批准,不要安装或更新软件。如果
gcloud不可用,或用户表示不运行命令,则以证据模式工作:向用户提供需要运行的只读命令,并根据其粘贴的输出、响应正文和日志条目进行诊断。gcloud - 身份验证。 使用用户现有的 会话;此 skill 不需要 application-default credentials。
gcloud auth login - 项目。 询问哪个项目承载 gateway,并在每个命令中传入 。不要运行
--project={project_id},因为这会更改用户的环境。此 skill 用于排查现有 gateway 的问题,绝不创建项目。gcloud config set - 结算。 即使使用量保持在免费层级内,项目也需要启用有效的结算账号;请参阅 API Gateway 定价。
- API。 API Gateway 需要 、
apigateway.googleapis.com和servicemanagement.googleapis.com。缺少其中某个 API 时,gateway 仍可能继续响应,但其日志会保持为空,因此请使用servicecontrol.googleapis.com检查。启用缺失的 API 属于更改,需要获得批准。gcloud services list --enabled --project={project_id} - 诊断所需的 IAM 角色(只读): 、
roles/apigateway.viewer、roles/logging.viewer和roles/serviceusage.serviceUsageViewer(用于检查 gateway 的 service account)。对于 Cloud Run backend,请添加roles/iam.serviceAccountViewer;如需通过 load balancer 追踪自定义域,请添加roles/run.viewer;如需检查 API key 所属的项目,还需要roles/compute.viewer。roles/serviceusage.serviceUsageViewer - 修复所需的 IAM 角色(仅在批准后): ;在 gateway 的 service account 上授予
roles/apigateway.admin,因为创建或更新 API config 或 gateway 需要roles/iam.serviceAccountUser;授予iam.serviceAccounts.actAs以更改 Cloud Run service 的 IAM policy 或 ingress;授予roles/run.admin以启用 API 或 managed service,另需在 API 的 managed service 上授予roles/serviceusage.serviceUsageAdmin以在其他项目中启用它;以及授予roles/servicemanagement.serviceConsumer以重新启用已禁用的 service account。roles/iam.serviceAccountAdmin - 区域。 Gateway 是区域性的。使用 返回的区域。如果修复需要创建新 gateway,请在原 gateway 所在区域创建;如果用户没有偏好,则使用
gateways list;请参阅 API Gateway 部署模型和 Cloud 区域。us-central1
Workflow
工作流
Copy this checklist into your notes and tick it off as you go:
- [ ] 1. Context collected
- [ ] 2. Gateway identified by defaultHostname
- [ ] 3. Expected or transient states ruled out
- [ ] 4. Gateway log entry read (bounded query)
- [ ] 5. One branch chosen from the classification table
- [ ] 6. Root cause stated with redacted evidence and a doc link
- [ ] 7. Fix proposed, approved, and applied (or handed to the user)
- [ ] 8. Fix verified
- [ ] 9. Escalated, if the evidence points to Google Cloud将此检查清单复制到笔记中,并随着推进逐项勾选:
- [ ] 1. Context collected
- [ ] 2. Gateway identified by defaultHostname
- [ ] 3. Expected or transient states ruled out
- [ ] 4. Gateway log entry read (bounded query)
- [ ] 5. One branch chosen from the classification table
- [ ] 6. Root cause stated with redacted evidence and a doc link
- [ ] 7. Fix proposed, approved, and applied (or handed to the user)
- [ ] 8. Fix verified
- [ ] 9. Escalated, if the evidence points to Google Cloud1. Collect context
1. 收集上下文
Extract these from the conversation first, and ask only for what's missing:
| Needed | Why |
|---|---|
| Every command is scoped to it. |
Failing URL (host and path) or | Identifies the gateway. |
| HTTP method, status code, and response body | Separates gateway errors from backend errors. |
| Approximate time of the failure, in UTC | Bounds the log query. |
| What changed recently (new API config, IAM, backend deploy, DNS) | Recent changes are the first place to look. |
| Authentication used by the caller (API key, JWT, none) | Selects the auth branch. |
If the project or the host is unknown, stop and ask before you run any
command. Don't guess project IDs, and don't use the active
project instead.
gcloudgcloud首先从对话中提取以下信息,只询问缺失项:
| 所需信息 | 原因 |
|---|---|
Gateway 所在的 | 每个命令都限定到此项目。 |
失败的 URL(host 和 path),或 | 用于识别 gateway。 |
| HTTP method、status code 和 response body | 用于区分 gateway 错误与 backend 错误。 |
| 故障发生的大致时间(UTC) | 用于限定日志查询范围。 |
| 最近进行过哪些更改(新建 API config、IAM、backend 部署、DNS) | 应优先检查最近的更改。 |
| 调用方使用的身份验证方式(API key、JWT、无) | 用于选择身份验证排查分支。 |
如果项目或 host 尚不清楚,请停止操作并在运行任何 命令前询问用户。不要猜测项目 ID,也不要使用当前激活的 项目代替。
gcloudgcloud2. Identify the gateway
2. 识别 Gateway
List the project's gateways:
bash
gcloud api-gateway gateways list --project={project_id} \
--format="table(name.basename():label=GATEWAY,name.segment(3):label=REGION,defaultHostname,state,apiConfig)"Match the request host against . Don't decide from the URL
suffix: a gateway's hostname can use either of two formats or,
for older streaming and model-routing gateways, a format. Don't
guess the owning project from numbers in the hostname either; list the
gateways in the project the user names. A custom domain points at a load
balancer whose serverless NEG targets the gateway. See
references/triage-and-logs.md for the
hostname formats and how to trace a custom domain.
defaultHostnamegateway.devrun.appIf no gateway in the project matches, confirm the product before going on
(see Scope).
Then read the gateway's details, including its API config and streaming mode:
bash
gcloud api-gateway gateways describe {gateway_id} \
--location={region} --project={project_id}列出项目中的 gateway:
bash
gcloud api-gateway gateways list --project={project_id} \
--format="table(name.basename():label=GATEWAY,name.segment(3):label=REGION,defaultHostname,state,apiConfig)"将请求 host 与 进行匹配。不要仅根据 URL 后缀判断:gateway 的 hostname 可以采用两种 格式之一;对于较旧的 streaming 和 model-routing gateway,还可以采用 格式。也不要根据 hostname 中的数字推测所属项目;请列出用户指定项目中的 gateway。自定义域指向一个 load balancer,其 serverless NEG 以 gateway 为目标。有关 hostname 格式以及如何追踪自定义域,请参阅 references/triage-and-logs.md。
defaultHostnamegateway.devrun.app如果项目中没有匹配的 gateway,请在继续之前确认产品是否正确(请参阅范围)。
然后读取 gateway 的详细信息,包括其 API config 和 streaming mode:
bash
gcloud api-gateway gateways describe {gateway_id} \
--location={region} --project={project_id}3. Rule out expected and transient states
3. 排除预期状态和瞬时状态
- Gateway isn't
state:ACTIVEorCREATINGmeans an operation is still running, so wait and check again.UPDATINGmeans creation failed; read the error of the failed operation.FAILEDmeans the gateway is being removed.DELETING - API config just created: creating a complex API config can take up to ten minutes, and only one config can be created for an API at a time.
- First requests after an idle period: API Gateway has cold-start latency.
- Google Cloud incident: check the Service Health dashboard.
- Gateway 的 不是
state:ACTIVE或CREATING表示操作仍在运行,因此应等待并再次检查。UPDATING表示创建失败;请读取失败操作的错误。FAILED表示 gateway 正在被删除。DELETING - 刚创建 API config: 创建复杂的 API config 最长可能需要十分钟,并且一个 API 同时只能创建一个 config。
- 空闲一段时间后的首次请求: API Gateway 存在 cold-start latency。
- Google Cloud 事故: 请检查 Service Health dashboard。
4. Read the gateway log entry
4. 读取 Gateway 日志条目
Use a bounded query that prints only the fields you need. Replace
with the status the caller saw:
{status_code}bash
gcloud logging read 'resource.type="apigateway.googleapis.com/Gateway" AND resource.labels.gateway_id="{gateway_id}" AND resource.labels.location="{region}" AND httpRequest.status={status_code}' \
--project={project_id} --freshness=1h --limit=20 \
--format="json(timestamp,httpRequest.status,httpRequest.latency,httpRequest.requestUrl,jsonPayload.responseDetails,jsonPayload.apiConfig,jsonPayload.apiMethod)"If you know the failure time, replace with a
filter that spans about
30 minutes around it. Read , ,
, , and
. Keep the field list, because a full entry
can contain the caller's credentials, and redact credentials before you quote
any field, including a query parameter in .
--freshnesstimestamp>="{start_utc}" AND timestamp<="{end_utc}"httpRequest.statushttpRequest.requestUrljsonPayload.responseDetailsjsonPayload.apiConfigjsonPayload.apiMethod--formatkeyhttpRequest.requestUrlTo compare API configs, compare only the
part: the same config can appear as a full resource name
() and with either the project
number or the project ID.
apis/{api_id}/configs/{config_id}//apigateway.googleapis.com/projects/...jsonPayload.responseDetailsvia_upstreamvia_upstreamservice_control_quota_errormodel_router_*使用有界查询,仅打印所需字段。将 替换为调用方看到的状态码:
{status_code}bash
gcloud logging read 'resource.type="apigateway.googleapis.com/Gateway" AND resource.labels.gateway_id="{gateway_id}" AND resource.labels.location="{region}" AND httpRequest.status={status_code}' \
--project={project_id} --freshness=1h --limit=20 \
--format="json(timestamp,httpRequest.status,httpRequest.latency,httpRequest.requestUrl,jsonPayload.responseDetails,jsonPayload.apiConfig,jsonPayload.apiMethod)"如果知道故障时间,请将 替换为覆盖故障时间前后约 30 分钟的 过滤器。读取 、、、 和 。保留 中的字段列表,因为完整日志条目可能包含调用方凭据;引用任何字段之前都要遮盖凭据,包括 中名为 的 query parameter。
--freshnesstimestamp>="{start_utc}" AND timestamp<="{end_utc}"httpRequest.statushttpRequest.requestUrljsonPayload.responseDetailsjsonPayload.apiConfigjsonPayload.apiMethod--formathttpRequest.requestUrlkey比较 API config 时,仅比较 部分:同一个 config 可能显示为完整资源名(),并使用项目编号或项目 ID。
apis/{api_id}/configs/{config_id}//apigateway.googleapis.com/projects/...jsonPayload.responseDetailsvia_upstreamvia_upstreamservice_control_quota_errormodel_router_*5. Classify and follow one branch
5. 分类并选择一个排查分支
Pick the first row that matches, and load only the reference file it names.
| What you see | Likely cause | Reference |
|---|---|---|
| The backend rejected the gateway: invoker role, audience, or deleted service account | auth-errors.md |
A | The API key or JWT was rejected; quote the body | auth-errors.md |
| The gateway's service account may be deleted or disabled | auth-errors.md |
| Quota metric missing from the newest API config | config-deployment-errors.md |
| The caller exceeded the API's quota | limits-and-escalation.md |
| Routing, backend errors, size limits, or the deadline. The docs don't name the status codes for size or deadline failures, so confirm with | backend-routing-and-timeouts.md |
| CORS preflight fails or latency is high | CORS pass-through or slow backend | backend-routing-and-timeouts.md |
| A spec problem | Hand off to |
| Service account, concurrent creates, limits, or the backend deadline | config-deployment-errors.md |
| TLS enforcement, DNS, load balancer, or wrong host | networking-domains-tls.md |
| Errors on several gateways, or on an unchanged config, with healthy backends | Possible Google Cloud issue | limits-and-escalation.md |
If the request also needs log queries or backend inspection commands, use
triage-and-logs.md.
选择匹配的第一行,并且只加载该行指定的 reference file。
| 观察到的现象 | 可能原因 | Reference |
|---|---|---|
| Backend 拒绝了 gateway:invoker role、audience 或 service account 已被删除 | auth-errors.md |
Gateway 自身生成的 | API key 或 JWT 已被拒绝;请引用响应正文 | auth-errors.md |
| Gateway 的 service account 可能已被删除或禁用 | auth-errors.md |
| 最新 API config 中缺少配额指标 | config-deployment-errors.md |
| 调用方超出了 API 的配额 | limits-and-escalation.md |
| 路由、backend 错误、大小限制或 deadline。文档没有说明大小或 deadline 失败对应的 status code,因此请结合 | backend-routing-and-timeouts.md |
| CORS preflight 失败或延迟过高 | CORS 透传或 backend 过慢 | backend-routing-and-timeouts.md |
| Spec 问题 | 移交给 |
| Service account、并发创建、限制或 backend deadline | config-deployment-errors.md |
旧 TLS client 返回 | TLS 强制策略、DNS、load balancer 或 host 错误 | networking-domains-tls.md |
| 多个 gateway、未更改的 config 或健康的 backend 出现错误 | 可能存在 Google Cloud 问题 | limits-and-escalation.md |
如果请求还需要日志查询或 backend 检查命令,请使用 triage-and-logs.md。
6. State the root cause
6. 说明根因
Give the cause, the evidence (redacted, quoted verbatim from logs or command
output), and the public doc section that explains it. If the evidence fits
more than one cause, list at most three, say what would tell them apart, and
collect that evidence before proposing a fix.
给出原因、证据(已遮盖并逐字引自日志或命令输出)以及解释该问题的公开文档章节。如果证据符合多个原因,最多列出三个,说明如何区分它们,并先收集相关证据,再提出修复方案。
7. Propose the fix
7. 提出修复方案
Show the exact command, the resource it changes, its effect on live traffic,
and how to undo it. Wait for approval, then run it, or hand it to the user if
they prefer. Keep these rules in mind:
- To change the OpenAPI document, create a new API config and deploy it with
. Before you create the config, check quota metrics with the
gcloud api-gateway gateways updateskill, because the newest API config's quota metrics apply to every gateway of the API.api-gateway-backend-security-and-rate-limiting - Before you create a new API config, check the OpenAPI document with the linter (see OpenAPI pre-flight check).
展示准确的命令、将变更的资源、对实时流量的影响以及如何撤销。等待用户批准后再执行;如果用户更倾向于自行操作,则将命令交给用户。请遵守以下规则:
- 如需更改 OpenAPI 文档,请创建新的 API config,并使用 进行部署。创建 config 前,请使用
gcloud api-gateway gateways updateskill 检查配额指标,因为最新 API config 的配额指标会应用于该 API 的每个 gateway。api-gateway-backend-security-and-rate-limiting - 创建新 API config 前,请使用 linter 检查 OpenAPI 文档(请参阅 OpenAPI 预检查)。
8. Verify
8. 验证
Read the logs again for new entries after the change, or repeat the failing
request. Repeat a request yourself only if it's safe to repeat, such as a
; otherwise ask the user to repeat it, because a repeated can
change data in their backend. After , wait until the
gateway's is before you test.
GETPOSTgateways updatestateACTIVE更改后再次读取日志中的新条目,或重复失败的请求。只有在重复请求安全时(例如 )才自行重试;否则请用户重复请求,因为重复执行 可能会更改 backend 中的数据。执行 后,请等待 gateway 的 变为 ,然后再进行测试。
GETPOSTgateways updatestateACTIVE9. Escalate when the evidence points to Google Cloud
9. 当证据指向 Google Cloud 时升级处理
Escalate to Cloud Customer Care when the
service account is active, the required APIs are enabled, and no log exclusion
or wrong scope explains it, but requests get errors with no gateway log
entry; when several gateways fail at once without a config change; when errors
are intermittent on an unchanged config while the backend logs stay clean;
when control-plane operations keep failing with internal errors; or when
Service Health reports an incident. Draft the case text with the evidence
bundle in limits-and-escalation.md. The
user files the case.
500当 service account 处于启用状态、所需 API 已启用,且没有日志排除条件或作用域错误能够解释问题,但请求出现 且没有 gateway 日志条目时;多个 gateway 同时失败且没有 config 更改时;config 未更改时错误间歇性发生且 backend 日志保持干净时;control-plane 操作持续因内部错误而失败时;或者 Service Health 报告事故时,请升级至 Cloud Customer Care。按照 limits-and-escalation.md 中的 evidence bundle 起草 case 文本。由用户提交 case。
500OpenAPI pre-flight check
OpenAPI 预检查
Run the linter on every OpenAPI file before creating an API config. Run it;
don't read its source. If you don't have the file, give the user the command
to run:
bash
python3 scripts/lint_openapi_for_gateway.py {spec_path} [{spec_path} ...]It reads the files only, makes no network calls, and prints JSON findings that
each link to the public doc for the limitation. Exit code means no errors,
means at least one finding, and means a usage, parse, or
dependency error. The linter needs Python 3.8 or later. YAML input needs
PyYAML; ask the user before you install it with
. JSON input doesn't. Fix the
findings, and then create the API config. If still fails
on the OpenAPI document, hand off to , or
use the error message if that skill isn't installed. Show findings
to the user and explain them.
01ERROR2pip install "PyYAML>=6.0,<7.0"ERRORapi-configs createapi-gateway-openapi-spec-authoringWARNING创建 API config 前,对每个 OpenAPI 文件运行 linter。请运行它,不要读取其源代码。如果没有该文件,请向用户提供需要运行的命令:
bash
python3 scripts/lint_openapi_for_gateway.py {spec_path} [{spec_path} ...]它只读取文件,不会发起网络调用,并输出 JSON findings;每项 finding 都链接到说明相应限制的公开文档。退出码 表示没有错误, 表示至少存在一项 finding, 表示用法、解析或依赖项错误。Linter 需要 Python 3.8 或更高版本。YAML 输入需要 PyYAML;安装前必须征得用户同意,执行 。JSON 输入不需要。修复所有 findings,然后创建 API config。如果 仍因 OpenAPI 文档而失败,请移交给 ;如果该 skill 尚未安装,则使用错误消息中的信息。向用户展示 findings 并进行说明。
01ERROR2pip install "PyYAML>=6.0,<7.0"ERRORapi-configs createapi-gateway-openapi-spec-authoringWARNINGOutput format
输出格式
Report findings in this form:
**Problem:** <one sentence in the user's terms>
**Failed hop:** <gateway or backend, and the evidence for it>
**Evidence:** <redacted log fields or command output, verbatim>
**Root cause:** <one or two sentences> (<public doc link>)
**Fix:** <exact command or spec change; approval needed: yes/no>
**Verify:** <how to confirm the fix>
**Open questions:** <anything you couldn't confirm>按照以下形式报告发现:
**Problem:** <one sentence in the user's terms>
**Failed hop:** <gateway or backend, and the evidence for it>
**Evidence:** <redacted log fields or command output, verbatim>
**Root cause:** <one or two sentences> (<public doc link>)
**Fix:** <exact command or spec change; approval needed: yes/no>
**Verify:** <how to confirm the fix>
**Open questions:** <anything you couldn't confirm>Related skills
相关 Skills
| Need | Skill |
|---|---|
| Write or change API key, JWT, backend authentication, or quota configuration | |
Write, migrate, or fix an OpenAPI spec, including OpenAPI errors from | |
MCP | |
| Deep IAM analysis, such as deny policies or role discovery | |
| Build a load balancer, Cloud Armor policy, or custom domain front end | |
| Deploy or reconfigure a Cloud Run backend | |
| 需求 | Skill |
|---|---|
| 编写或更改 API key、JWT、backend 身份验证或配额配置 | |
编写、迁移或修复 OpenAPI spec,包括 | |
MCP-enabled gateway 上的 MCP | |
| 深度 IAM 分析,例如 deny policy 或 role 发现 | |
| 构建 load balancer、Cloud Armor policy 或自定义域前端 | |
| 部署或重新配置 Cloud Run backend | |
Reference files
Reference files
- references/attribution.md: usage attribution rules for every command you run.
- references/triage-and-logs.md: hostname formats, log queries, log fields, metrics, and backend inspection commands.
- references/auth-errors.md: and
401on either hop, API keys, JWTs, and the gateway service account.403 - references/backend-routing-and-timeouts.md:
, size limits, backend
404,5xxand deadlines, CORS, and streaming.504 - references/config-deployment-errors.md: API config and gateway create, update, and delete failures other than OpenAPI errors, and quota metric conflicts.
- references/networking-domains-tls.md: custom domains, load balancers, TLS, and requests that never reach the gateway.
- references/limits-and-escalation.md: product limits, quota increases, unsupported features, and the Cloud Customer Care evidence bundle.
- scripts/lint_openapi_for_gateway.py: offline linter for documented OpenAPI limitations.
- references/attribution.md:每条所运行命令的使用说明规则。
- references/triage-and-logs.md:hostname 格式、日志查询、日志字段、指标和 backend 检查命令。
- references/auth-errors.md:任一 hop 上的 和
401、API key、JWT 以及 gateway service account。403 - references/backend-routing-and-timeouts.md:、大小限制、backend
404、5xx、deadline、CORS 和 streaming。504 - references/config-deployment-errors.md:除 OpenAPI 错误以外的 API config 和 gateway 创建、更新及删除失败,以及配额指标冲突。
- references/networking-domains-tls.md:自定义域、load balancer、TLS,以及从未到达 gateway 的请求。
- references/limits-and-escalation.md:产品限制、配额提升、不支持的功能,以及 Cloud Customer Care evidence bundle。
- scripts/lint_openapi_for_gateway.py:用于检查已记录 OpenAPI 限制的离线 linter。