StopTemplateMCP - 停止 TemplateMCP 服务

更新时间:
复制 MD 格式

停止 TemplateMCP 服务。

接口说明

停止 MCP 服务后,会删除对应的 MCP 资源,MCP 地址不可访问

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

当前API暂无授权信息透出。

请求语法

PATCH /2025-09-10/templates/{templateName}/mcp/stop HTTP/1.1

路径参数

名称

类型

必填

描述

示例值

templateName

string

模板名称

demo-template

请求参数

名称

类型

必填

描述

示例值

当前API无需请求参数

返回参数

名称

类型

描述

示例值

TemplateResult

沙箱模板详情

示例

正常返回示例

JSON格式

{
  "code": "SUCCESS",
  "requestId": "F8A0F5F3-0C3E-4C82-9D4F-5E4B6A7C8D9E",
  "data": {
    "templateId": "996ffd5e-003f-4700-9f24-9e2a1c19019b.schema",
    "templateName": "browser-1767874121726",
    "templateVersion": "预留",
    "cpu": 4,
    "memory": 4096,
    "templateArn": "acs:agentrun:cn-hangzhou:12345678:templates/efb6de2f-1814-42a2-b7f3-474a0e0b3a48",
    "createdAt": "2026-01-15T17:12:59.375168+08:00",
    "lastUpdatedAt": "2026-01-15T17:12:59.375168+08:00",
    "status": "READY",
    "statusReason": "SDK Error",
    "executionRoleArn": "acs:agentrun:cn-hangzhou:12345678:templates/efb6de2f-1814-42a2-b7f3-474a0e0b3a48",
    "templateType": "Browser",
    "containerConfiguration": {
      "image": "registry.cn-hangzhou.aliyuncs.com/my-namespace/agent-runtime:latest",
      "imageRegistryType": "ACR",
      "acrInstanceId": "cri-xxxxx",
      "command": [
        "/usr/local/bin/entrypoint.sh"
      ],
      "registryConfig": {
        "authConfig": {
          "userName": "admin",
          "password": "abc***"
        },
        "certConfig": {
          "insecure": false,
          "rootCaCertBase64": "cm9vdF9jYV9jZXJ0X2Jhc2U2NA=="
        },
        "networkConfig": {
          "vpcId": "vpc-xxxxxxxxxxxxx",
          "vSwitchId": "vsw-xxxxxxxxxxxxx",
          "securityGroupId": "sg-xxxxxxxxxxxxx"
        }
      },
      "port": 5000
    },
    "networkConfiguration": {
      "networkMode": "PRIVATE",
      "vpcId": "vpc-1234567890abcdef0",
      "securityGroupId": "sg-1234567890abcdef0",
      "vswitchIds": [
        "vsw-sg-1234567890abcdef0"
      ]
    },
    "credentialConfiguration": {
      "credentialName": "deepagent-key"
    },
    "logConfiguration": {
      "project": "agent-runtime-logs",
      "logstore": "agent-runtime-logs"
    },
    "sandboxIdleTimeoutInSeconds": "1800",
    "sandboxTTLInSeconds": "已弃用",
    "resourceName": "agentrun-f2570dd4-c8a2-452c-8bd5-4ef74b0a69b5",
    "mcpOptions": {
      "transport": "streamable-http",
      "enabledTools": [
        "execute_code"
      ]
    },
    "mcpState": {
      "status": "CREATING",
      "statusReason": "SDK Error",
      "accessEndpoint": "/mcp"
    },
    "diskSize": 10240,
    "description": "template描述",
    "allowAnonymousManage": true,
    "nasConfig": {
      "groupId": 100,
      "mountPoints": [
        {
          "enableTLS": true,
          "mountDir": "/home/test",
          "serverAddr": "***-uni85.cn-hangzhou.nas.com:/"
        }
      ],
      "userId": 100
    },
    "enableAgent": true,
    "workspaceId": "",
    "scalingStatus": {
      "minInstances": 1,
      "targetInstances": 2,
      "currentInstances": 2,
      "scheduledPolicies": [
        {
          "name": "scale-up-morning",
          "startTime": "2024-01-01T08:00:00",
          "endTime": "2024-01-01T08:00:00",
          "scheduleExpression": "cron(0 8 * * ? *)",
          "timeZone": "Asia/Shanghai",
          "target": 20
        }
      ],
      "currentError": "error"
    },
    "environmentVariables": {
      "key": "{'FCTEST_IDE_ENV': 'IDE'}"
    },
    "templateConfiguration": {
      "key": "{\"example\":\"test\"}"
    },
    "ossConfiguration": [
      {
        "bucketName": "a-test-oss",
        "prefix": "/",
        "mountPoint": "/mnt/oss1",
        "permission": "READ_WRITE",
        "region": "ch-hangzhou",
        "endpoint": ""
      }
    ],
    "enablePreStop": true,
    "preStopTimeoutInSeconds": 0
  }
}

错误码

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情