UpdateAgentRuntime - 更新智能体运行时

更新智能体运行时

调试

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

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用前面加 * 表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
agentrun:UpdateAgentRuntimeupdate
*全部资源
*

请求语法

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

请求参数

名称类型必填描述示例值
agentRuntimeIdstring

代理运行时 ID

12345678-1234-1234-1234-123456789abc
bodyUpdateAgentRuntimeInput

更新代理运行时输入参数

返回参数

名称类型描述示例值
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",
    "agentRuntimeVersion": 1,
    "artifactType": "Code",
    "codeConfiguration": {
      "zipFile": "UEsDBAoAAAAAANF",
      "ossBucketName": "my-agent-code-bucket",
      "ossObjectName": "agent-code-v1.0.zip",
      "checksum": 1234567890123456800,
      "language": "python3.12",
      "command": [
        ""
      ]
    },
    "containerConfiguration": {
      "image": "registry.cn-hangzhou.aliyuncs.com/my-namespace/agent-runtime:latest",
      "command": [
        ""
      ]
    },
    "networkConfiguration": {
      "networkMode": "PRIVATE",
      "vpcId": "vpc-1234567890abcdef0",
      "securityGroupId": "sg-1234567890abcdef0",
      "vswitchIds": [
        ""
      ]
    },
    "protocolConfiguration": {
      "type": "HTTP"
    },
    "cpu": 2,
    "memory": 2048,
    "port": 8080,
    "sessionConcurrencyLimitPerInstance": 100,
    "logConfiguration": {
      "project": "agent-runtime-logs",
      "logstore": "agent-runtime-logs"
    },
    "resourceName": "my-agent-runtime-resource",
    "healthCheckConfiguration": {
      "httpGetUrl": "/ready",
      "initialDelaySeconds": 30,
      "periodSeconds": 30,
      "timeoutSeconds": 3,
      "failureThreshold": 3,
      "successThreshold": 1
    },
    "sessionIdleTimeoutSeconds": 3600,
    "environmentVariables": {
      "key": ""
    },
    "tags": [
      ""
    ]
  }
}

错误码

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