恢复 Deployment

更新时间:
复制 MD 格式

将已暂停的 Deployment 恢复为活跃状态。

前提

已完成 Endpoint 与鉴权配置,详见API 总览与认证。

接口

POST /deployments/{deployment_id}/unpause

路径参数

deployment_id string (必选)

Deployment ID

请求示例

curl -X POST "$AGENTSTUDIO_URL/deployments/depl_xxx/unpause" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY"

响应字段

id string

Deployment ID

type string

固定值 deployment

name string

Deployment 名称

description string

Deployment 描述

agent object

—

environment_id string

—

schedule object

定时触发配置

initial_events array<object>

—

resources array<object>

—

vault_ids array<string>

—

metadata object

—

status string

—

paused_reason string | null

—

archived_at string | null

—

created_at string

—

updated_at string

—

request_id string

本次请求的唯一标识,排查问题时附带

响应

{
  "id": "depl_xxx",
  "type": "deployment",
  "name": "Daily Report Generator",
  "description": "Generates daily sales reports",
  "agent": {
    "id": "agent_xxx",
    "version": 13
  },
  "environment_id": "env_xxx",
  "schedule": {
    "cron": "0 9 * * *"
  },
  "initial_events": [],
  "resources": [],
  "vault_ids": [],
  "metadata": {},
  "status": "active",
  "paused_reason": null,
  "archived_at": null,
  "created_at": "2026-07-20T10:00:00Z",
  "updated_at": "2026-07-28T02:00:00Z",
  "request_id": "req_xxx"
}

错误码

状态码错误码说明
400InvalidParameterRequired parameter missing or invalid.
401InvalidApiKeyInvalid API-key provided.
409DEPLOYMENT_STATE_CONFLICTCannot unpause an archived deployment.