暂停指定 Deployment,停止定时触发。
前提
已完成 Endpoint 与鉴权配置,详见API 总览与认证。
接口
POST /deployments/{deployment_id}/pause
路径参数
| 参数 | 必填 | 类型 | 说明 |
|---|---|---|---|
deployment_id | 是 | string | Deployment ID |
请求示例
响应
响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | Deployment ID |
type | string | 固定为 deployment |
name | string | Deployment 名称 |
description | string | Deployment 用途说明 |
agent | object | 关联 Agent 在锁定版本的快照 |
environment_id | string | 关联 Environment ID |
schedule | object | 定时触发配置。暂停后 next_run_at 为 null |
initial_events | array<object> | 触发时发送给 Agent 的初始事件 |
resources | array<object> | 挂载的文件资源 |
vault_ids | array<string> | 关联 Vault ID 列表 |
metadata | object | 业务自定义键值对 |
status | string | 此操作后固定为 paused |
paused_reason | object | 暂停原因 |
archived_at | string | null | 归档时间,未归档时为 null |
created_at | string | 创建时间,ISO 8601 |
updated_at | string | 最近更新时间,ISO 8601 |
request_id | string | 请求唯一标识 |
错误码
| 状态码 | 错误码 | 说明 |
|---|---|---|
| 400 | InvalidParameter | Required parameter missing or invalid. |
| 401 | InvalidApiKey | Invalid API-key provided. |
| 409 | DEPLOYMENT_STATE_CONFLICT | Cannot pause an archived deployment. |