application-integration-troubleshooting
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseApplication Integration Troubleshooting
Application Integration 故障排查
Diagnose and recover Google Cloud Application Integration executions that fail, stall, or appear to do nothing. This skill walks through execution state verification, per-task failure inspection, Cloud Logging and Cloud Monitoring checks, Integration Connectors health probes, suspension resolution, and IAM or quota checks.
诊断并恢复失败、停滞或看似未执行任何操作的 Google Cloud Application Integration 执行。本 skill 将引导你完成执行状态验证、单任务失败检查、Cloud Logging 和 Cloud Monitoring 检查、Integration Connectors 健康探测、暂停解除,以及 IAM 或配额检查。
Tooling and Scope Boundaries
工具与范围边界
- REST is the interface. There is no command group and no Google-managed MCP server for Application Integration. Use
gcloud integrationswithcurl, or the discovery-based Python client (gcloud auth print-access-tokenandgoogleapiclient.discovery.build("integrations", "v1"); install withbuild("connectors", "v1")).pip install "google-api-python-client>=2.100.0,<3" "google-auth>=2.20.0,<3" - Generic commands apply for authentication (
gcloud), enabling APIs (gcloud auth), IAM checks (gcloud services,gcloud projects get-iam-policy), and log queries (gcloud iam service-accounts get-iam-policy).gcloud logging read - Regional scope. Integrations, executions, connections, and execution logs live in a single Google Cloud region (, for example
LOCATION). Querying the wrong region returns empty results.us-central1 - Sibling skills:
- Use for product concepts, enabling APIs, provisioning a region, initial IAM roles, and service limits.
application-integration-basics - Use for creating drafts, editing tasks and triggers, config variables, publishing,
application-integration-authoringand:executepayloads, and CI/CD export/import.:schedule
- Use
- REST 是接口。 没有 命令组,也没有 Google 管理的 Application Integration MCP server。使用
gcloud integrations搭配curl,或使用基于 discovery 的 Python client(gcloud auth print-access-token和googleapiclient.discovery.build("integrations", "v1");通过build("connectors", "v1")安装)。pip install "google-api-python-client>=2.100.0,<3" "google-auth>=2.20.0,<3" - 通用 命令适用于身份验证(
gcloud)、启用 API(gcloud auth)、IAM 检查(gcloud services、gcloud projects get-iam-policy)和日志查询(gcloud iam service-accounts get-iam-policy)。gcloud logging read - 区域范围。 Integration、execution、connection 和 execution log 都位于单个 Google Cloud region(,例如
LOCATION)中。查询错误的 region 会返回空结果。us-central1 - 同级 skill:
- 对产品概念、启用 API、预配 region、初始 IAM role 和 service limit,使用 。
application-integration-basics - 对创建 draft、编辑 task 和 trigger、配置 variable、发布、和
:executepayload 以及 CI/CD export/import,使用:schedule。application-integration-authoring
- 对产品概念、启用 API、预配 region、初始 IAM role 和 service limit,使用
Safety and Confirmation Rules
安全与确认规则
- Read-only checks run freely: ,
executions.list,suspensions.list,connections.getget calls, runtime v2connectionSchemaMetadata/actions.list,entityTypes.list, andgcloud logging readv2.executions:troubleshoot - State-changing actions require explicit user confirmation. Before canceling or replaying an execution, lifting or resolving a suspension, refreshing connector schema metadata, repairing connector eventing, publishing or unpublishing a version, or changing IAM bindings, show the exact command and wait for user approval.
- Never bundle destructive scripts or delete integrations, versions, connections, or auth profiles during troubleshooting unless the user specifically asks.
- 只读检查可直接执行: 、
executions.list、suspensions.list、connections.getget 调用、runtime v2connectionSchemaMetadata/actions.list、entityTypes.list和gcloud logging readv2。executions:troubleshoot - 更改状态的操作需要用户明确确认。 在取消或重放 execution、解除或解决 suspension、刷新 connector schema metadata、修复 connector eventing、发布或取消发布 version,或更改 IAM binding 之前,应展示确切命令并等待用户批准。
- 绝不要捆绑破坏性脚本,也不要在故障排查过程中删除 integration、version、connection 或 auth profile,除非用户明确要求。
Prerequisites and Setup Check
前置条件与设置检查
Before querying APIs, confirm the environment has credentials, active APIs, and the right target region:
bash
undefined查询 API 前,先确认环境具有有效凭据、所需 API 已启用,并且目标 region 正确:
bash
undefinedVerify active identity and project
Verify active identity and project
gcloud config get-value account
gcloud config get-value project
gcloud config get-value account
gcloud config get-value project
Check that required APIs are enabled on PROJECT_ID
Check that required APIs are enabled on PROJECT_ID
gcloud services list --enabled --project="PROJECT_ID"
--filter="config.name:(integrations.googleapis.com OR connectors.googleapis.com OR secretmanager.googleapis.com)"
--filter="config.name:(integrations.googleapis.com OR connectors.googleapis.com OR secretmanager.googleapis.com)"
- If an API is missing, ask the user before running `gcloud services enable integrations.googleapis.com connectors.googleapis.com secretmanager.googleapis.com --project="PROJECT_ID"`.
- Ensure an active billing account is attached to `PROJECT_ID` (required even when usage stays within the monthly free tier; see the [Application Integration pricing page](https://cloud.google.com/application-integration/pricing)).
- For Python discovery clients (install with `pip install "google-api-python-client>=2.100.0,<3" "google-auth>=2.20.0,<3"`) or ADK (`ApplicationIntegrationToolset`), authenticate with `gcloud auth application-default login` and `gcloud auth application-default set-quota-project PROJECT_ID`.gcloud services list --enabled --project="PROJECT_ID"
--filter="config.name:(integrations.googleapis.com OR connectors.googleapis.com OR secretmanager.googleapis.com)"
--filter="config.name:(integrations.googleapis.com OR connectors.googleapis.com OR secretmanager.googleapis.com)"
- 如果缺少某个 API,应先询问用户,再运行 `gcloud services enable integrations.googleapis.com connectors.googleapis.com secretmanager.googleapis.com --project="PROJECT_ID"`。
- 确保 `PROJECT_ID` 已关联有效的 billing account(即使用量保持在每月 free tier 内也必须关联;参见 [Application Integration 定价页面](https://cloud.google.com/application-integration/pricing))。
- 对于 Python discovery client(通过 `pip install "google-api-python-client>=2.100.0,<3" "google-auth>=2.20.0,<3"` 安装)或 ADK(`ApplicationIntegrationToolset`),使用 `gcloud auth application-default login` 进行身份验证,并执行 `gcloud auth application-default set-quota-project PROJECT_ID`。Diagnostic Decision Flow
诊断决策流程
Follow these steps in order whenever a user reports that an integration failed, did nothing, or is stuck.
每当用户报告 integration 失败、未执行任何操作或卡住时,都应按顺序执行以下步骤。
Step 1: Confirm Whether an Execution Ran and Check Its True State
第 1 步:确认 Execution 是否运行并检查其真实状态
Do not rely on an HTTP 200 status from as proof that every task succeeded (note: also exists in the v1 REST API, but its required value is not publicly documented, so do not invent one; test by publishing to a non-production project and calling ). As a diagnostic rule, always check the response payload and execution record because:
:executeintegrations:testTestIntegrationsRequest.clientId:execute- The required verification is the execution record from —inspect
executions.list?filter=execution_id="EXECUTION_ID", each task'sexecutionDetails.state, andtaskExecutionStateinErrorInfo(do not rely on the legacy/deprecatedresponseParametersfield, which is not a supported public signal).executionFailed - If the caller passed on
"doNotPropagateError": true, the API returns HTTP 200 with an:executeand places error details inside event parameters instead of returning an HTTP error.executionId - A duplicate on
requestIdor:executereturns the previous execution's response without running a new execution.:schedule - Task failure policies (and
IGNORE) allow an integration to continue or finish asNONEdown an alternate branch even when an individual task failed.SUCCEEDED
List executions for the integration (use as to search across all integrations in the region; the discovery doc does not specify whether sorts ascending or descending, so add a filter or paginate with if needed):
-INTEGRATION_NAMEorderBy=create_timeCreateTimestamppageTokenbash
curl -sS -H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://integrations.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/integrations/INTEGRATION_NAME/executions?pageSize=10&orderBy=create_time&snapshotMetadataWithoutParams=true"Once you have the , fetch its full and per-task states (use , , and on —never the deprecated [UI-only] or [internal-only] parameters):
EXECUTION_IDExecutionDetailsfiltersnapshotMetadataWithoutParams=truereadMaskexecutions.listtruncateParamsfilterParams.*bash
curl -sS -H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://integrations.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/integrations/INTEGRATION_NAME/executions?filter=execution_id%3D%22EXECUTION_ID%22"To filter by state, use the field ( or ) with unquoted values (for example, , , , or , URL-encoded as or ); use (not , as shown on the REST reference page, or in the API reference's filter description), and use the supported filter keys (, , , , , , )—camelCase variants such as are not supported even though some docs examples show them.
executions.liststate=!=ExecutionDetails.statefilter=state=FAILEDfilter=state!=SUCCEEDEDfilter=state=CANCELLEDfilter=state=FAILED OR state=CANCELLEDfilter=state%3DFAILEDfilter=state%3DFAILED%20OR%20state%3DCANCELLEDstateeventExecutionStateevent_execution_stateexecution_idstateupdate_timeworkflow_nametrigger_idCreateTimestampparameter_typeexecutionId不要把 返回的 HTTP 200 状态当作所有 task 均成功的证据(注意:v1 REST API 中也存在 ,但其必需的 值没有公开文档,因此不要自行编造;可将该版本发布到非生产项目,然后调用 进行测试)。作为诊断规则,始终应检查 response payload 和 execution record,原因如下:
:executeintegrations:testTestIntegrationsRequest.clientId:execute- 必需的验证依据是 返回的 execution record——检查
executions.list?filter=execution_id="EXECUTION_ID"、每个 task 的executionDetails.state,以及taskExecutionState中的responseParameters(不要依赖旧版或已弃用的ErrorInfo字段,因为它不是受支持的公开信号)。executionFailed - 如果调用方在 中传入
:execute,API 会返回 HTTP 200 和"doNotPropagateError": true,并将错误详情放入 event parameter,而不是返回 HTTP error。executionId - 在 或
:execute中使用重复的:schedule,会返回上一次 execution 的 response,而不会启动新的 execution。requestId - Task failure policy(和
IGNORE)允许 integration 沿备用分支继续执行或最终为NONE,即使某个 task 已失败。SUCCEEDED
列出该 integration 的 execution(使用 作为 可搜索该 region 中的所有 integration;discovery doc 未说明 按升序还是降序排序,因此必要时添加 filter,或使用 分页):
-INTEGRATION_NAMEorderBy=create_timeCreateTimestamppageTokenbash
curl -sS -H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://integrations.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/integrations/INTEGRATION_NAME/executions?pageSize=10&orderBy=create_time&snapshotMetadataWithoutParams=true"获取 后,查询完整的 和各 task 状态(在 上使用 、 和 ——切勿使用已弃用的 [仅限 UI]或 [仅限内部]参数):
EXECUTION_IDExecutionDetailsexecutions.listfiltersnapshotMetadataWithoutParams=truereadMasktruncateParamsfilterParams.*bash
curl -sS -H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://integrations.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/integrations/INTEGRATION_NAME/executions?filter=execution_id%3D%22EXECUTION_ID%22"要按状态筛选 ,请使用 字段( 或 )和未加引号的 值(例如 、、 或 ,URL 编码后为 或 );请使用 ,而不是 REST reference page 中所示的 ,也不要使用 API reference 的 filter description 中的 ;支持的 filter key 为(、、、、、、)——即使部分文档示例显示为 camelCase 变体(如 ),也不受支持。
executions.liststate=!=ExecutionDetails.statefilter=state=FAILEDfilter=state!=SUCCEEDEDfilter=state=CANCELLEDfilter=state=FAILED OR state=CANCELLEDfilter=state%3DFAILEDfilter=state%3DFAILED%20OR%20state%3DCANCELLEDstateeventExecutionStateevent_execution_stateexecution_idstateupdate_timeworkflow_nametrigger_idCreateTimestampparameter_typeexecutionIdStep 2: What If No Execution Record Exists?
第 2 步:如果没有 Execution Record 怎么办?
If returns no matching run, check these five causes before assuming the trigger never fired:
executions.list| Cause | Symptom | What to verify |
|---|---|---|
| Wrong region | Empty list in | Check |
| API trigger 403 | Caller got HTTP 403 | API trigger auth denials fail before execution creation; nothing is written to execution logs. Check caller IAM and |
| API trigger payload > 8 MB | Caller got an error | Cumulative API trigger input variables exceed the 8 MB limit, so the integration does not start. |
| Local logging disabled | Integration ran, but logs are empty | Check |
Version not | Trigger never fires | Only an |
如果 没有返回匹配的 run,在假定 trigger 从未触发之前,先检查以下五种原因:
executions.list| 原因 | 症状 | 检查内容 |
|---|---|---|
| Region 错误 | | 检查 |
| API trigger 403 | 调用方收到 HTTP 403 | API trigger 的身份验证拒绝发生在创建 execution 之前;不会向 execution log 写入任何内容。检查调用方 IAM,以及 run-as service account 上的 |
| API trigger payload > 8 MB | 调用方收到错误 | API trigger 输入变量的累计大小超过 8 MB 上限,因此 integration 不会启动。 |
| 本地日志记录已禁用 | Integration 已运行,但日志为空 | 检查 |
Version 不是 | Trigger 从不触发 | 只有 |
Step 3: Branch by Execution State (ExecutionDetails.state
)
ExecutionDetails.state第 3 步:根据 Execution State(ExecutionDetails.state
)分支处理
ExecutionDetails.stateSee Execution States for the full state reference, task-level states (), filter syntax, and cancel/replay rules.
TaskExecutionDetails.taskExecutionState | Console status | Meaning and next step |
|---|---|---|
| Failed | Check |
| Succeeded | If expected work did not happen, inspect |
| Canceled | User canceled the run, a new integration version was published while the run was suspended, a SYNC run hit the 2-minute timeout, or a replayed run hit the 10-minute deadline. |
| Suspended | Waiting on an Approval task (resolvable in the Cloud console UI or via |
| Retry on hold | A task or integration failed with a temporary error and is waiting in the backoff retry queue. |
| In process | Currently running. Check whether an ASYNC run is approaching the 10-minute timeout. |
| On hold | Scheduled or temporarily paused and waiting to be triggered. |
有关完整的 state 参考、task-level state()、filter syntax 和 cancel/replay 规则,请参阅 Execution States。
TaskExecutionDetails.taskExecutionState | 控制台状态 | 含义与后续操作 |
|---|---|---|
| 失败 | 检查 |
| 成功 | 如果预期工作没有发生,检查 |
| 已取消 | 用户取消了 run;在 run 处于 suspended 期间发布了新的 integration version;SYNC run 达到 2 分钟超时;或重放的 run 达到 10 分钟期限。 |
| 已暂停 | 正在等待 Approval task(可在 Cloud console UI 或通过 |
| 重试暂挂 | Task 或 integration 因临时错误失败,正在等待 backoff retry queue。 |
| 处理中 | 当前正在运行。检查 ASYNC run 是否即将达到 10 分钟超时。 |
| 暂挂 | 已调度或暂时暂停,正在等待触发。 |
Step 4: Inspect Logs, AI Root Cause, and Subsystem Health
第 4 步:检查日志、AI Root Cause 和子系统健康状况
- Run AI Troubleshoot (v2 REST API) on a failed execution to get a structured root-cause summary (requires ):
integrations.executions.getbashcurl -sS -H "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://integrations.googleapis.com/v2/projects/PROJECT_ID/locations/LOCATION/integrations/INTEGRATION_NAME/executions/EXECUTION_ID:troubleshoot" - Query Cloud Logging if Cloud Logging was enabled on the version. Note that Cloud Logging is disabled by default and writes nothing if local logging is disabled. See Logging and Monitoring for how to enable it, severity behavior, and exact queries.
bash
gcloud logging read \ 'resource.type="integrations.googleapis.com/IntegrationVersion" AND jsonPayload.executionId="EXECUTION_ID"' \ --project="PROJECT_ID" --limit=20 --format=json - If a Connectors task failed, do not guess whether the connector or IAM is at fault. Inspect the connection resource () and its schema metadata (
connections.getforGET .../connections/CONNECTION_NAME/connectionSchemaMetadataandstate, and runtime v2errorMessageandGET .../v2/.../connections/CONNECTION_NAME/actionsfor listing—v1.../entityTypesandconnectionSchemaMetadata:listActionsrequire a:listEntityTypesand reject unfiltered calls). See Connectors Health for connection states, schema metadata checks, and node throttling (HTTP 429).filterbashcurl -sS -H "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://connectors.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/connections/CONNECTION_NAME?view=FULL" - If an IAM (403), run-as service account, timeout, or quota error occurred, check both the caller's role and the integration's run-as service account. Integrations created on or after October 15, 2026 with any trigger other than an API or Private trigger (for example Schedule, Cloud Scheduler, Cloud Pub/Sub, Salesforce, or Connector Event; Private triggers are exempt like API triggers, so a sub-integration whose only trigger is Private can be published without ) cannot be tested or published unless
runAsServiceAccountis set; wheneverrunAsServiceAccountis set, the user publishing or testing the version needsrunAsServiceAccounton it. See Common Errors for the two-sided 403 checklist, error codes, task limits, and ADKroles/iam.serviceAccountUsererrors.ApplicationIntegrationToolset
- 对失败的 execution 运行 AI Troubleshoot(v2 REST API),以获得结构化 root cause summary(需要 ):
integrations.executions.getbashcurl -sS -H "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://integrations.googleapis.com/v2/projects/PROJECT_ID/locations/LOCATION/integrations/INTEGRATION_NAME/executions/EXECUTION_ID:troubleshoot" - 如果 version 启用了 Cloud Logging,则查询 Cloud Logging。 注意,Cloud Logging 默认禁用,如果本地日志记录已禁用,也不会写入任何内容。有关如何启用、严重级别行为和精确查询,请参阅 Logging and Monitoring。
bash
gcloud logging read \ 'resource.type="integrations.googleapis.com/IntegrationVersion" AND jsonPayload.executionId="EXECUTION_ID"' \ --project="PROJECT_ID" --limit=20 --format=json - 如果 Connectors task 失败,不要猜测是 connector 还是 IAM 的问题。 检查 connection resource()及其 schema metadata(通过
connections.get获取GET .../connections/CONNECTION_NAME/connectionSchemaMetadata和state,并通过 runtime v2errorMessage和GET .../v2/.../connections/CONNECTION_NAME/actions进行列出——v1.../entityTypes和connectionSchemaMetadata:listActions要求提供:listEntityTypes,不接受无 filter 的调用)。有关 connection state、schema metadata check 和 node throttling(HTTP 429),请参阅 Connectors Health。filterbashcurl -sS -H "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://connectors.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/connections/CONNECTION_NAME?view=FULL" - 如果发生 IAM(403)、run-as service account、timeout 或 quota 错误,应同时检查调用方的 role 和 integration 的 run-as service account。 对于在 2026 年 10 月 15 日或之后创建、除 API 或 Private trigger 外还包含其他 trigger 的 integration(例如 Schedule、Cloud Scheduler、Cloud Pub/Sub、Salesforce 或 Connector Event;Private trigger 与 API trigger 一样豁免,因此仅以 Private trigger 为唯一 trigger 的 sub-integration 无需设置 即可发布),如果未设置
runAsServiceAccount,则无法测试或发布;只要设置了runAsServiceAccount,发布或测试该 version 的用户就需要拥有它的runAsServiceAccount。有关双方 403 检查清单、错误代码、task limit 和 ADKroles/iam.serviceAccountUser错误,请参阅 Common Errors。ApplicationIntegrationToolset
Common Diagnostic Scenarios
常见诊断场景
Scenario A: Failed Connectors Task (Connection Health vs Caller IAM)
场景 A:Connectors task 失败(Connection Health 与调用方 IAM)
- Run with
connections.get(command above) and inspectview=FULLandstatus.state.status.status - If is
status.stateorERROR: the connection itself cannot reach or authenticate to the target backend. Fix the connection's credentials in Secret Manager or the Cloud console (AUTHORIZATION_REQUIRED). If the connection uses a service account in another project, verifyhttps://console.cloud.google.com/connectors/connectionshasservice-PROJECT_NUMBER@gcp-sa-connectors.iam.gserviceaccount.comin that project.roles/iam.serviceAccountTokenCreator - If is
status.state: the connection is healthy. Check whether the identity running the task (the integration'sACTIVE, or if unset,runAsServiceAccount) has a required Integration Connectors role (such asservice-PROJECT_NUMBER@gcp-sa-integrations.iam.gserviceaccount.comorroles/connectors.invoker) in the connection's project.roles/connectors.admin - If the task failed with HTTP 429: the connection exceeded its provisioned nodes. Raise min/max nodes on the connection and add a task retry strategy ().
EXPONENTIAL_BACKOFF - Trace the exact connector attempt in Cloud Logging (when connector logging is enabled on the connection):
bash
gcloud logging read \ 'resource.type="connectors.googleapis.com/Connection" AND jsonPayload.integration_connectors_trace_id="EXECUTIONID_TASKID_ATTEMPTNUMBER"' \ --project="PROJECT_ID" --limit=20 --format=json
- 使用 运行
view=FULL(使用上面的命令),并检查connections.get和status.state。status.status - 如果 为
status.state或ERROR: connection 本身无法访问目标 backend 或无法向其完成身份验证。在 Secret Manager 或 Cloud console(AUTHORIZATION_REQUIRED)中修复 connection 的凭据。如果 connection 使用另一个项目中的 service account,请验证https://console.cloud.google.com/connectors/connections在该项目中拥有service-PROJECT_NUMBER@gcp-sa-connectors.iam.gserviceaccount.com。roles/iam.serviceAccountTokenCreator - 如果 为
status.state: connection 处于健康状态。检查运行该 task 的 identity(integration 的ACTIVE;如果未设置,则为runAsServiceAccount)是否在 connection 所在项目中拥有所需的 Integration Connectors role,例如service-PROJECT_NUMBER@gcp-sa-integrations.iam.gserviceaccount.com或roles/connectors.invoker。roles/connectors.admin - 如果 task 因 HTTP 429 失败: connection 超过了其配置的 node 数量。提高 connection 上的 min/max node,并为 task 添加 retry strategy()。
EXPONENTIAL_BACKOFF - 在 Cloud Logging 中追踪确切的 connector attempt(前提是 connection 已启用 connector logging):
bash
gcloud logging read \ 'resource.type="connectors.googleapis.com/Connection" AND jsonPayload.integration_connectors_trace_id="EXECUTIONID_TASKID_ATTEMPTNUMBER"' \ --project="PROJECT_ID" --limit=20 --format=json
Scenario B: Stuck in SUSPENDED
(Approval vs Suspend Task)
SUSPENDED场景 B:卡在 SUSPENDED
状态(Approval 与 Suspend Task)
SUSPENDED- Identify which task paused the execution from and list pending suspensions (read-only; requires
taskExecutionDetails, included inintegrations.suspensions.list) to findroles/integrations.suspensionResolverandSUSPENSION_ID. Note thattaskIdalone cannot read execution records (noroles/integrations.suspensionResolverorintegrations.executions.list, returning HTTP 403 onintegrations.executions.getand v2executions.list); to inspect:troubleshoot(or runtaskExecutionDetails), also grant:troubleshoot(or use the approval email link, which carries the execution and task IDs). See Suspensions for full details.roles/integrations.integrationViewerbash# Read-only: list suspensions on EXECUTION_ID curl -sS -H "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://integrations.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/integrations/INTEGRATION_NAME/executions/EXECUTION_ID/suspensions" - Approval task: can be approved or rejected in the Cloud console UI or via the REST API (with body
POST https://integrations.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/integrations/INTEGRATION_NAME/executions/EXECUTION_ID/suspensions/SUSPENSION_ID:resolveor{"suspension": {"eventExecutionInfoId": "EXECUTION_ID", "integration": "INTEGRATION_NAME", "taskId": "TASK_ID", "state": "LIFTED"}}—the same call the console Approve/Reject buttons make). Always confirm with the user before resolving. Verify the caller holds"REJECTED"(included inintegrations.suspensions.resolve, which is not included inroles/integrations.suspensionResolver) androles/integrations.integrationEditoron the integration'sroles/iam.serviceAccountUser. WithoutrunAsServiceAccount, approving leaves the execution paused until it expires.roles/iam.serviceAccountUser - Suspend task: is the Suspend-task variant and requires
:lift(included inintegrations.suspensions.lift) plusroles/integrations.suspensionResolveron the integration'sroles/iam.serviceAccountUser. After user confirmation, callrunAsServiceAccountwith an optionalPOST .../executions/EXECUTION_ID/suspensions/SUSPENSION_ID:lift.suspensionResult - Watch out for version publish cancellation: publishing a new version of an integration automatically cancels all suspended executions of the previous version.
- 从 中确定是哪个 task 暂停了 execution,并列出 pending suspension(只读;需要
taskExecutionDetails,该权限包含于integrations.suspensions.list),以找到roles/integrations.suspensionResolver和SUSPENSION_ID。注意,仅有taskId无法读取 execution record(没有roles/integrations.suspensionResolver或integrations.executions.list,调用integrations.executions.get和 v2executions.list时会返回 HTTP 403);要检查:troubleshoot(或运行taskExecutionDetails),还应授予:troubleshoot(或使用 approval email link,其中包含 execution 和 task ID)。有关完整详情,请参阅 Suspensions。roles/integrations.integrationViewerbash# Read-only: list suspensions on EXECUTION_ID curl -sS -H "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://integrations.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/integrations/INTEGRATION_NAME/executions/EXECUTION_ID/suspensions" - Approval task: 可在 Cloud console UI 中批准或拒绝,也可通过 REST API(,body 为
POST https://integrations.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/integrations/INTEGRATION_NAME/executions/EXECUTION_ID/suspensions/SUSPENSION_ID:resolve或{"suspension": {"eventExecutionInfoId": "EXECUTION_ID", "integration": "INTEGRATION_NAME", "taskId": "TASK_ID", "state": "LIFTED"}}——与控制台 Approve/Reject 按钮执行的调用相同)完成。解决前始终与用户确认。验证调用方持有"REJECTED"(包含于integrations.suspensions.resolve,但不包含于roles/integrations.suspensionResolver)并且对 integration 的roles/integrations.integrationEditor拥有runAsServiceAccount。如果没有roles/iam.serviceAccountUser,批准后 execution 仍会暂停,直至过期。roles/iam.serviceAccountUser - Suspend task: 是 Suspend task 对应的操作,需要
:lift(包含于integrations.suspensions.lift),并且需要对 integration 的roles/integrations.suspensionResolver拥有runAsServiceAccount。获得用户确认后,调用roles/iam.serviceAccountUser,并按需提供POST .../executions/EXECUTION_ID/suspensions/SUSPENSION_ID:lift。suspensionResult - 注意 version 发布导致的取消: 发布 integration 的新 version 会自动取消上一个 version 的所有 suspended execution。
Scenario C: HTTP 403 PERMISSION_DENIED
on Trigger, Test, or Publish
PERMISSION_DENIED场景 C:Trigger、测试或发布时出现 HTTP 403 PERMISSION_DENIED
PERMISSION_DENIEDApplication Integration enforces two independent permission checks:
- Caller IAM check: the caller needs permission on the integration (to invoke,
roles/integrations.integrationInvokerto edit/test,roles/integrations.integrationEditororroles/integrations.integrationDeployerto publish).roles/integrations.integrationEditor - Run-as service account check: whenever is set on the version, the user (or principal) publishing or testing the version needs
runAsServiceAccountonroles/iam.serviceAccountUserat publish/test time, and at runtime the invoking caller or trigger service account needsrunAsServiceAccountonroles/iam.serviceAccountUser(granted in the project that owns the service account). In addition,runAsServiceAccountneeds roles on downstream Google Cloud resources.runAsServiceAccount
Check both bindings before retrying. For Pub/Sub, Eventarc, and Connector Event triggers, a run-as service account () denial records a failed execution and the event is not redelivered.
roles/iam.serviceAccountUserApplication Integration 会执行两项相互独立的权限检查:
- 调用方 IAM 检查: 调用方需要对 integration 拥有相应权限(用于调用,
roles/integrations.integrationInvoker用于编辑或测试,roles/integrations.integrationEditor或roles/integrations.integrationDeployer用于发布)。roles/integrations.integrationEditor - Run-as service account 检查: 只要 version 设置了 ,发布或测试该 version 的用户(或 principal)在发布或测试时就需要对该
runAsServiceAccount拥有runAsServiceAccount;在运行时,调用 execution 的 principal 或 trigger service account 需要拥有该roles/iam.serviceAccountUser(授予 service account 所在的项目)。此外,roles/iam.serviceAccountUser还需要拥有下游 Google Cloud resource 所需的 role。runAsServiceAccount
重试前请检查两项 binding。对于 Pub/Sub、Eventarc 和 Connector Event trigger,run-as service account()拒绝会记录失败的 execution,并且 event 不会重新投递。
roles/iam.serviceAccountUserRecovery Actions (Require User Confirmation)
恢复操作(需要用户确认)
Always display the exact command and obtain user confirmation before running , , , or . requires and requires (both are held by , , and —not by or , so approvers with only cannot cancel a stuck run). also enforces two preconditions that return : (a) test-case runs cannot be replayed in any mode (), and (b) is refused for executions that ran with database persistence (local logging / ) disabled because it needs execution snapshots—use in that case. When overriding inputs on with and , list every overridden key in ; without , all original inputs are discarded and only are used, and a key in missing from is an error.
:cancel:replay:lift:resolve:cancelintegrations.executions.cancel:replayintegrations.executions.replayroles/integrations.integrationInvokerroles/integrations.integrationEditorroles/integrations.integrationAdminroles/integrations.suspensionResolverroles/integrations.integrationViewerroles/integrations.suspensionResolverSUSPENDED:replayFAILED_PRECONDITION"Test runs cannot be replayed."REPLAY_MODE_POINT_OF_FAILUREdatabasePersistencePolicy: DATABASE_PERSISTENCE_DISABLEDREPLAY_MODE_FROM_BEGINNING:replaymodifiedParametersupdateMaskupdateMaskupdateMaskmodifiedParametersupdateMaskmodifiedParametersbash
undefined在运行 、、 或 前,始终显示确切命令并获得用户确认。 需要 , 需要 (两者均由 、 和 持有——不包括 或 ,因此仅拥有 的 approver 无法取消卡在 状态的 run)。 还会强制执行两项前置条件,若不满足会返回 :(a)test-case run 在任何模式下都不能重放();(b)对于运行期间禁用了 database persistence(local logging / )的 execution,由于重放需要 execution snapshot,因此会拒绝 ——此时应使用 。在 中使用 和 覆盖输入时,必须在 中列出每个被覆盖的 key;如果没有 ,所有原始输入都会被丢弃,仅使用 ;若 中某个 key 未出现在 中,则会报错。
:cancel:replay:lift:resolve:cancelintegrations.executions.cancel:replayintegrations.executions.replayroles/integrations.integrationInvokerroles/integrations.integrationEditorroles/integrations.integrationAdminroles/integrations.suspensionResolverroles/integrations.integrationViewerroles/integrations.suspensionResolverSUSPENDED:replayFAILED_PRECONDITION"Test runs cannot be replayed."databasePersistencePolicy: DATABASE_PERSISTENCE_DISABLEDREPLAY_MODE_POINT_OF_FAILUREREPLAY_MODE_FROM_BEGINNING:replaymodifiedParametersupdateMaskupdateMaskupdateMaskmodifiedParametersupdateMaskmodifiedParametersbash
undefinedCancel an execution in PENDING (console "On hold"), RETRY_ON_HOLD, or SUSPENDED state (requires integrations.executions.cancel)
Cancel an execution in PENDING (console "On hold"), RETRY_ON_HOLD, or SUSPENDED state (requires integrations.executions.cancel)
(Cannot cancel executions in PROCESSING state [console "In process"], completed runs [SUCCEEDED, FAILED, CANCELLED], or Schedule-trigger runs; approvers with only roles/integrations.suspensionResolver cannot cancel a stuck SUSPENDED run)
(Cannot cancel executions in PROCESSING state [console "In process"], completed runs [SUCCEEDED, FAILED, CANCELLED], or Schedule-trigger runs; approvers with only roles/integrations.suspensionResolver cannot cancel a stuck SUSPENDED run)
curl -X POST
-H "Authorization: Bearer $(gcloud auth print-access-token)"
-H "Content-Type: application/json"
-d '{"cancelReason": "Canceling stuck execution after investigation"}'
"https://integrations.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/integrations/INTEGRATION_NAME/executions/EXECUTION_ID:cancel"
-H "Authorization: Bearer $(gcloud auth print-access-token)"
-H "Content-Type: application/json"
-d '{"cancelReason": "Canceling stuck execution after investigation"}'
"https://integrations.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/integrations/INTEGRATION_NAME/executions/EXECUTION_ID:cancel"
curl -X POST
-H "Authorization: Bearer $(gcloud auth print-access-token)"
-H "Content-Type: application/json"
-d '{"cancelReason": "Canceling stuck execution after investigation"}'
"https://integrations.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/integrations/INTEGRATION_NAME/executions/EXECUTION_ID:cancel"
-H "Authorization: Bearer $(gcloud auth print-access-token)"
-H "Content-Type: application/json"
-d '{"cancelReason": "Canceling stuck execution after investigation"}'
"https://integrations.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/integrations/INTEGRATION_NAME/executions/EXECUTION_ID:cancel"
Replay a SUCCEEDED, FAILED, or CANCELLED execution on a published integration (Preview; requires integrations.executions.replay; test-case runs and Schedule-trigger runs cannot be replayed)
Replay a SUCCEEDED, FAILED, or CANCELLED execution on a published integration (Preview; requires integrations.executions.replay; test-case runs and Schedule-trigger runs cannot be replayed)
replayMode: REPLAY_MODE_FROM_BEGINNING or REPLAY_MODE_POINT_OF_FAILURE (failed runs only; refused with FAILED_PRECONDITION if databasePersistencePolicy was DATABASE_PERSISTENCE_DISABLED—use REPLAY_MODE_FROM_BEGINNING in that case)
replayMode: REPLAY_MODE_FROM_BEGINNING or REPLAY_MODE_POINT_OF_FAILURE (failed runs only; refused with FAILED_PRECONDITION if databasePersistencePolicy was DATABASE_PERSISTENCE_DISABLED—use REPLAY_MODE_FROM_BEGINNING in that case)
Optional modifiedParameters/updateMask: list every overridden key in updateMask; without updateMask, all original inputs are discarded and only modifiedParameters are used; a key in updateMask missing from modifiedParameters is an error
Optional modifiedParameters/updateMask: list every overridden key in updateMask; without updateMask, all original inputs are discarded and only modifiedParameters are used; a key in updateMask missing from modifiedParameters is an error
curl -X POST
-H "Authorization: Bearer $(gcloud auth print-access-token)"
-H "Content-Type: application/json"
-d '{"replayReason": "Replay after fixing downstream permission", "replayMode": "REPLAY_MODE_POINT_OF_FAILURE"}'
"https://integrations.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/integrations/INTEGRATION_NAME/executions/EXECUTION_ID:replay"
-H "Authorization: Bearer $(gcloud auth print-access-token)"
-H "Content-Type: application/json"
-d '{"replayReason": "Replay after fixing downstream permission", "replayMode": "REPLAY_MODE_POINT_OF_FAILURE"}'
"https://integrations.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/integrations/INTEGRATION_NAME/executions/EXECUTION_ID:replay"
undefinedcurl -X POST
-H "Authorization: Bearer $(gcloud auth print-access-token)"
-H "Content-Type: application/json"
-d '{"replayReason": "Replay after fixing downstream permission", "replayMode": "REPLAY_MODE_POINT_OF_FAILURE"}'
"https://integrations.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/integrations/INTEGRATION_NAME/executions/EXECUTION_ID:replay"
-H "Authorization: Bearer $(gcloud auth print-access-token)"
-H "Content-Type: application/json"
-d '{"replayReason": "Replay after fixing downstream permission", "replayMode": "REPLAY_MODE_POINT_OF_FAILURE"}'
"https://integrations.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/integrations/INTEGRATION_NAME/executions/EXECUTION_ID:replay"
undefinedReference Files
Reference Files
Load the matching reference file when you need deeper details, exact field names, or edge-case checks:
- Execution States: and
ExecutionDetails.stateenums,TaskExecutionDetails.taskExecutionStatefilter operators, large-log workarounds (> 300 MB), andexecutions.list/:cancelconstraints.:replay - Logging and Monitoring: Local logging vs Cloud Logging interactions, enabling Cloud Logging on a draft version, Logs Explorer queries, and
integrations.googleapis.com/*metric schemas, and alerting setup.connectors.googleapis.com/* - Common Errors: HTTP/gRPC error codes, the two-sided 403 checklist, the October 15, 2026 run-as service account requirement, task-level limits and gotchas, and ADK errors.
ApplicationIntegrationToolset - Connectors Health: ,
ConnectionStatus.state,EventingStatus.stateprobes, runtime v2 readiness calls, node throttling (HTTP 429), and separating connection auth from caller IAM.connectionSchemaMetadata - Suspensions: Suspend vs Approval vs Timer behavior, /
suspensions.list/:liftpayloads, expiration settings, and why approvals stay stuck without:resolve.roles/iam.serviceAccountUser
在需要更深入的信息、准确字段名或边界检查时,加载对应的 reference file:
- Execution States:和
ExecutionDetails.stateenum、TaskExecutionDetails.taskExecutionStatefilter operator、大日志处理方案(> 300 MB),以及executions.list/:cancel约束。:replay - Logging and Monitoring:Local logging 与 Cloud Logging 的交互、在 draft version 上启用 Cloud Logging、Logs Explorer query、和
integrations.googleapis.com/*metric schema,以及 alert 设置。connectors.googleapis.com/* - Common Errors:HTTP/gRPC error code、双方 403 检查清单、2026 年 10 月 15 日的 run-as service account 要求、task-level limit 和注意事项,以及 ADK 错误。
ApplicationIntegrationToolset - Connectors Health:、
ConnectionStatus.state、EventingStatus.stateprobe、runtime v2 readiness call、node throttling(HTTP 429),以及区分 connection auth 与调用方 IAM。connectionSchemaMetadata - Suspensions:Suspend、Approval 和 Timer 行为,/
suspensions.list/:liftpayload、expiration setting,以及 approval 为何会在缺少:resolve时一直卡住。roles/iam.serviceAccountUser