容器集群Pod变更配置

最近更新时间: 2026-09-17 00:05:51

1. 接口描述

接口请求域名: tbdsnew.api3.fincloud.tencent.cn。

容器集群Pod变更配置

默认接口请求频率限制:20次/秒。

接口更新时间:2025-07-17 03:52:22。

接口既验签名又鉴权。

2. 输入参数

以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见公共请求参数

参数名称 必选 允许NULL 类型 描述
Action String 公共参数,本接口取值:ModifyComponentResource
Version String 公共参数,本接口取值:2019-01-03
Region String 公共参数,地域信息可通过DescribeRegions接口查看产品支持的地域列表
InstanceId String 集群Id
示例值: tbds-aqy2cvg6
ServiceGroup Int64 服务编号
通过DescribeServiceComponentInfos接口
ServiceGroup字段获取
示例值: 24
ServiceType Int64 角色编号
建议通过DescribeServiceComponentInfos接口
ComponentList.ServiceType字段获取
示例值: 50
CpuLimit Int64 请求的Cpu大小
示例值: 2
MemLimit Int64 请求的内存大小
示例值: 2
Affinity NodeAffinity 节点调度策略
建议根据DescribeServiceComponentInfos接口返回值ComponentList.ComponentResource.Affinity填充
示例值:查看

3. 输出参数

参数名称 类型 描述
FlowId Int64 流程Id
示例值: 1
RequestId String 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。

4. 错误码

以下仅列出了接口业务逻辑相关的错误码,其他错误码详见公共错误码

错误码 描述
InternalError 内部错误。
InvalidParameter.InvalidClusterId 无效参数,ClusterId。
ResourceUnavailable.NotSupportClusterType 资源不可用。
InvalidParameter.InvalidServiceType 参数错误。
ResourceNotFound.ServiceGroupNotFound 无法找到该服务组件。
ResourceNotFound.InstanceNotFound 无法找到该实例。

5. 示例

示例1 容器集群Pod变更配置

输入示例

POST / HTTP/1.1
Host: tbdsnew.api3.{conf.main_domain}
Content-Type: application/json
X-TC-Action: ModifyComponentResource
<公共请求参数>

{
  "ServiceType": 50,
  "InstanceId": "tbds-aqy2cvg6",
  "ServiceGroup": 24,
  "CpuLimit": 2,
  "MemLimit": 2,
  "Affinity": {
    "RequiredDuringSchedulingIgnoredDuringExecution": {
      "NodeSelectorTerms": [
        {
          "MatchExpressions": [
            {
              "Key": "custom.tbds.tc/type",
              "Operator": "In",
              "Values": [
                "app"
              ]
            }
          ]
        }
      ]
    },
    "PreferredDuringSchedulingIgnoredDuringExecution": [
      {
        "Weight": 1,
        "Preference": {
          "MatchExpressions": [
            {
              "Key": "custom.tbds.tc/type",
              "Operator": "In",
              "Values": [
                "app"
              ]
            }
          ]
        }
      }
    ]
  }
}

输出示例

{
        "Response": {
            "FlowId": 808,
            "RequestId": "b6391ac4-13b4-4840-9539-f3f50df54f41"
        }
    }