UpdateAgentRuntime - 更新智能体运行时

更新时间:
复制 MD 格式

更新智能体运行时

接口说明

更新指定智能体运行时的配置信息,包括资源分配、网络配置、环境变量等。更新操作会触发运行时重启。

调试

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

调试

授权信息

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

请求语法

PUT /2025-09-10/agents/runtimes/{agentRuntimeId} HTTP/1.1

路径参数

名称

类型

必填

描述

示例值

agentRuntimeId

string

代理运行时 ID

12345678-1234-1234-1234-123456789abc

请求参数

名称

类型

必填

描述

示例值

body UpdateAgentRuntimeInput

更新代理运行时输入参数

返回参数

名称

类型

描述

示例值

AgentRuntimeResult

返回更新结构体的结果

示例

正常返回示例

JSON格式

{
  "code": "SUCCESS",
  "requestId": "F8A0F5F3-0C3E-4C82-9D4F-5E4B6A7C8D9E",
  "data": {
    "agentRuntimeId": "ar-1234567890abcdef",
    "agentRuntimeName": "my-agent-runtime",
    "agentRuntimeArn": "acs:agentrun:cn-hangzhou:1760720386195983:runtimes/7a1b6d39-9f8f-4ce2-b9c9-6db1b0b9e169",
    "createdAt": "2025-01-10T10:30:00Z",
    "status": "READY",
    "statusReason": "Runtime is ready for use",
    "lastUpdatedAt": "2025-01-10T11:45:00Z",
    "description": "AI agent runtime for customer service automation",
    "executionRoleArn": "acs:ram::1760720386195983:role/AgentRunExecutionRole",
    "credentialName": "my-credential",
    "externalAgentEndpointUrl": "https://external-agent.example.com/api",
    "agentRuntimeVersion": "1",
    "artifactType": "Code",
    "codeConfiguration": {
      "zipFile": "UEsDBAoAAAAAANF",
      "ossBucketName": "my-agent-code-bucket",
      "ossObjectName": "agent-code-v1.0.zip",
      "checksum": "1234567890123456789",
      "language": "python3.12",
      "command": [
        ""
      ]
    },
    "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"
      ]
    },
    "protocolConfiguration": {
      "type": "HTTP",
      "protocolSettings": [
        {
          "type": "",
          "name": "",
          "config": "",
          "path": "",
          "pathPrefix": "",
          "headers": "",
          "method": "",
          "inputBodyJsonSchema": "",
          "outputBodyJsonSchema": "",
          "requestContentType": "",
          "responseContentType": "",
          "A2AAgentCard": "",
          "a2aAgentCard": "",
          "a2aAgentCardUrl": ""
        }
      ]
    },
    "cpu": 2,
    "memory": 2048,
    "diskSize": 0,
    "port": 8080,
    "sessionConcurrencyLimitPerInstance": 100,
    "logConfiguration": {
      "project": "agent-runtime-logs",
      "logstore": "agent-runtime-logs"
    },
    "healthCheckConfiguration": {
      "httpGetUrl": "/ready",
      "initialDelaySeconds": 30,
      "periodSeconds": 30,
      "timeoutSeconds": 3,
      "failureThreshold": 3,
      "successThreshold": 1
    },
    "sessionIdleTimeoutSeconds": 3600,
    "enableSessionIsolation": false,
    "disableOndemand": false,
    "disableSessionAffinity": false,
    "sessionAffinityType": "GENERATED_COOKIE",
    "headerFieldName": "x-agentrun-session-id",
    "resourceGroupId": "",
    "workspaceId": "ws-1234567890abcdef",
    "nasConfig": {
      "groupId": 100,
      "mountPoints": [
        {
          "enableTLS": true,
          "mountDir": "/home/test",
          "serverAddr": "***-uni85.cn-hangzhou.nas.com:/"
        }
      ],
      "userId": 100
    },
    "ossMountConfig": {
      "mountPoints": [
        {
          "bucketName": "my-bucket",
          "bucketPath": "/my-dir",
          "endpoint": "http://oss-cn-shanghai.aliyuncs.com",
          "mountDir": "/mnt/dir",
          "readOnly": true
        }
      ]
    },
    "environmentVariables": {
      "key": ""
    },
    "systemTags": [
      ""
    ],
    "edition": ""
  }
}

错误码

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

变更历史

更多信息,参考变更详情