部署容器应用(新)
最近更新时间: 2026-10-11 00:12:05
1. 接口描述
接口请求域名: tsf.api3.fincloud.tencent.com。
部署容器应用-更新
默认接口请求频率限制:20次/秒。
接口更新时间:2026-03-05 18:41:20。
接口只验签名不鉴权。
2. 输入参数
以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见公共请求参数。
| 参数名称 | 必选 | 允许NULL | 类型 | 描述 |
|---|---|---|---|---|
| Action | 是 | 否 | String | 公共参数,本接口取值:DeployContainerApplication |
| Version | 是 | 否 | String | 公共参数,本接口取值:2018-03-26 |
| Region | 是 | 否 | String | 公共参数,地域信息可通过DescribeRegions接口查看产品支持的地域列表 |
| GroupId | 否 | 是 | String | 部署组ID,分组唯一标识 示例值: |
| VolumeMountInfoList | 否 | 是 | Array of VolumeMountInfo | 业务容器的挂载信息 示例值:查看 |
| GroupName | 否 | 是 | String | 部署组名称 示例值: |
| SecretName | 否 | 是 | String | 容器访问凭证名称 示例值: |
| TagName | 否 | 是 | String | 业务容器的镜像版本号 示例值: |
| ServiceGovernanceConfig | 否 | 是 | ContainerGroupServiceGovernanceConfig | 服务治理配置 示例值:查看 |
| VolumeInfoList | 否 | 是 | Array of VolumeInfo | 容器卷信息 示例值:查看 |
| ServiceSettingList | 否 | 是 | Array of ServiceSetting | Service访问配置列表 示例值:查看 |
| AgentMemRequest | 否 | 是 | String | agent容器的 mem Request 示例值: |
| VolumeClean | 否 | 是 | Bool | 是否清除数据卷信息 示例值: |
| Partition | 否 | 是 | Int64 | 滚动更新分区序号 示例值: |
| AdditionalContainerList | 否 | 是 | Array of ContainerInfo | 附属容器列表 示例值:查看 |
| AgentCpuLimit | 否 | 是 | String | agent容器的 cpu Limit 示例值: |
| StaticIpEnabled | 否 | 是 | Bool | 是否启用静态IP 示例值: |
| PrivilegeContainerEnable | 否 | 是 | Bool | 业务主容器是否为特权容器 示例值: |
| LifeCycleHookList | 否 | 是 | Array of LifeCycleHook | 业务主容器生命周期钩子列表 示例值:查看 |
| RepoType | 否 | 是 | String | 仓库类型 示例值: |
| JvmOpts | 否 | 是 | String | 业务容器的 jvm 参数 示例值: |
| UpdateIvl | 否 | 是 | Int64 | 更新间隔,单位秒 示例值: |
| ConfigTemplateVersion | 否 | 是 | Int64 | 配置模版Version 示例值: |
| EnvClean | 否 | 是 | Bool | 是否清除Env信息 示例值: |
| PodManagementPolicyType | 否 | 是 | String | 启动策略[OrderedReady/Parallel] 示例值: |
| Envs | 否 | 是 | Array of Env | 业务容器的环境变量参数 示例值:查看 |
| TcrRepoInfo | 否 | 是 | TcrRepoInfo | TCR仓库信息 示例值:查看 |
| CpuRequest | 否 | 是 | String | 业务容器的 cpu request 示例值: |
| DeployDesc | 否 | 是 | String | 本次部署的描述信息 示例值: |
| AgentCpuRequest | 否 | 是 | String | agent容器的 cpu Request 示例值: |
| NamespaceId | 否 | 是 | String | 命名空间Id 示例值: |
| AgentProfileList | 否 | 是 | Array of AgentProfile | javaagent信息: SERVICE_AGENT/OT_AGENT 示例值:查看 |
| Server | 否 | 是 | String | 业务容器的 镜像Server ccr.ccs.mycloud.com 示例值: |
| ContainerKind | 否 | 是 | String | 容器类型 示例值: |
| ServiceSpecEncode | 否 | 是 | String | 服务治理配置 示例值: |
| DeployAgent | 否 | 是 | Bool | 是否部署agent容器 示例值: |
| K8sNamespaceName | 否 | 是 | String | k8s命名空间名称 示例值: |
| ObservabilityConfig | 否 | 是 | ContainerGroupObservabilityConfig | 可观测配置 示例值:查看 |
| ClusterId | 否 | 是 | String | 集群ID 示例值: |
| CpuLimit | 否 | 是 | String | 业务容器的 cpu limit 示例值: |
| IstioMemRequest | 否 | 是 | String | istio容器的 mem Request 示例值: |
| ConfigTemplateId | 否 | 是 | String | 配置模版ID 示例值: |
| InitContainerEnable | 否 | 是 | Bool | 是否为初始化容器 业务主容器不能为初始化容 示例值: |
| ApplicationId | 是 | 是 | String | 应用ID 示例值: |
| Tags | 否 | 是 | Array of Tag | 标签列表 示例值:查看 |
| MemRequest | 否 | 是 | String | 业务容器的 mem request 示例值: |
| SchedulingStrategy | 否 | 是 | SchedulingStrategy | 调度策略 示例值:查看 |
| IstioCpuRequest | 否 | 是 | String | istio容器的 cpu Request 示例值: |
| WarmupSetting | 否 | 是 | WarmupSetting | 预热参数配置 示例值:查看 |
| MemLimit | 否 | 是 | String | 业务容器的 mem limit 示例值: |
| InstanceNum | 否 | 是 | Int64 | 实例数量 示例值: |
| RestartPolicy | 否 | 是 | String | 重启策略 示例值: |
| IstioCpuLimit | 否 | 是 | String | istio容器的 cpu Limit 示例值: |
| RunCommand | 否 | 是 | String | 业务主容器运行命令(转base64) 示例值: |
| RunArg | 否 | 是 | String | 业务主容器运行参数(转base64) 示例值: |
| MaxSurge | 否 | 是 | String | 对应更新策略和策略配置参数 示例值: |
| MaxUnavailable | 否 | 是 | String | 对应更新策略和策略配置参数 示例值: |
| Alias | 否 | 是 | String | 备注 示例值: |
| RepoName | 否 | 是 | String | 业务容器的镜像名 示例值: |
| GatewayConfig | 否 | 是 | GatewayConfig | Envoy网关服务配置 应用为Envoy网关时有效 示例值:查看 |
| IstioMemLimit | 否 | 是 | String | istio容器的 mem Limit 示例值: |
| AgentMemLimit | 否 | 是 | String | agent容器的 mem Limit 示例值: |
| UpdateType | 否 | 是 | Int64 | 发布策略(0表示快速更新,1表示滚动更新。默认值为0) 示例值: |
| HealthCheckSettings | 否 | 是 | HealthCheckSettings | 健康检查 示例值:查看 |
| ServiceClean | 否 | 是 | Bool | 是否清除Service信息 示例值: |
3. 输出参数
| 参数名称 | 类型 | 描述 |
|---|---|---|
| Result | DeployContainerApplicationResp | 部署容器应用是否成功。 true:成功。 false:失败。 示例值:查看 |
| RequestId | String | 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 |
4. 错误码
以下仅列出了接口业务逻辑相关的错误码,其他错误码详见公共错误码。
| 错误码 | 描述 |
|---|---|
| InvalidParameterValue.ContainergroupUpdateivlInvalid | 更新间隔不能为空或者数值非法。 |
| InvalidParameterValue.ContainergroupProtocolInvalid | 协议值非法,限定:TCP/UDP。 |
| InternalError.ContainergroupKuberneteConnectError | 连接TKE服务失败。 |
| InternalError.ContainergroupKuberneteApiInvokeError | 访问TKE服务失败。 |
| InvalidParameterValue.ImagerepoReponameInvalid | 镜像仓库名不合法,示例:tsf-repo/nginx。 |
| InvalidParameter.ParamError | 参数错误。 |
| ResourceNotFound.ClusterNotExist | 无法获取命名空间所属集群。 |
| InvalidParameter.KubernetesParamError | 参数错误。 |
| InvalidParameter.BadRequest | [%s]模块接口[%s]请求不正确(400 BAD REQUEST)。。 |
| UnauthorizedOperation.NoPrivilege | 用户无权限访问该接口。。 |
| FailedOperation.ClusterQueryFailed | 查询集群失败。 |
| FailedOperation.TsfPrivilegeError | TSF权限模块异常,请联系系统管理员。。 |
| InternalError.ContainergroupSqlFailed | 容器应用SQL错误。 |
| InternalError.UnhandledException | [%s]模块未处理异常。。 |
| InvalidParameterValue.ContainergroupAccesstypeNull | 服务访问方式不能为空。 |
| InvalidParameterValue.ContainergroupCpulimitOver | 集群 CPU 资源不足。 |
| InvalidParameterValue.ContainergroupGroupidNull | 部署组ID不能为空。 |
| InvalidParameterValue.ContainergroupInvalidCpuInfo | CPU limit 和 request 不能同时为空。 |
| InvalidParameterValue.ContainergroupInvalidMemInfo | 内存 limit 和 request 不能同时为空。 |
| InvalidParameterValue.ContainergroupMemlimitOver | 集群内存资源不足。 |
| InvalidParameterValue.ContainergroupNodePortInvalid | 主机端口值非法。 |
| InvalidParameterValue.ContainergroupPortsRepeat | 服务端口不允许重复映射。 |
| InvalidParameterValue.ContainergroupProtocolPortsNull | 协议端口不能为空。 |
| InvalidParameterValue.ContainergroupReponameInvalid | 镜像仓库名与应用名不匹配。 |
| InvalidParameterValue.ContainergroupResourceAgentValueInvalid | agent 容器资源值非法 , %s。 |
| InvalidParameterValue.ContainergroupTargetportNull | 容器端口不能为空。 |
| InvalidParameterValue.ContainergroupTargetPortsRepeat | 容器端口不允许重复映射。 |
| InvalidParameterValue.ContainergroupUpdatetypeInvalid | updateType参数不合法,值必须为0、1。 |
| InvalidParameterValue.ImagerepoRepoNameNull | 镜像仓库名不能为空。 |
| InvalidParameterValue.ImagerepoTagnameNull | imageTags不能为空。 |
| InvalidParameterValue.WrongDontStartValue | 仅有停止状态下的部署组才可以不启动。 |
| ResourceNotFound.ContainergroupGroupNotFound | 无法找到该部署组。 |
| ResourceNotFound.MicroserviceOffline | 目标微服务已离线[%s]。。 |
| InvalidParameterValue.ContainergroupYamlUserContainerNotFound | 找不到业务容器。 |
| InvalidParameterValue.ContainergroupPortNull | 服务端口不能为空。 |
| InvalidParameterValue.ContainergroupProtocolNull | 协议不能为空。 |
| InvalidParameterValue.ContainergroupProtocolMixError | 公网访问方式下,协议需要一致。 |
| MissingParameter.SystemParameterRequired | 未指定%s。。 |
| FailedOperation.TokenQueryFailed | TOKEN查询失败。 |
| InvalidParameterValue.ContainergroupEnvValueNotSet | 容器 Env 的 Value 和 ValueFrom 至少要有一个。 |
| FailedOperation.UnhandledException | 模块未处理异常。 |
| FailedOperation.ContainergroupKuberneteApiInvokeError | 调用 kube-api-server 失败。 |
| FailedOperation.ContainergroupKubernetesApiInvokeError | 调用 kube-api-server 失败。 |
| FailedOperation.ContainergroupKubernetesConnectError | 调用 kube-api-server 失败。 |
5. 示例
示例1 部署容器应用
输入示例
POST / HTTP/1.1
Host: tsf.api3.fincloud.tencent.com
Content-Type: application/json
X-TC-Action: DeployContainerGroup
<Common Parameters>
{
"ApplicationId": "application-aew84ra",
"ObservabilityConfig": {
"BusinessLogConfigIdList": [
"log-aew84ra"
],
"BusinessLogDeliveryConfigIdList": [
"log-aew84ra"
]
},
"ClusterId": "cluster-aew84ra",
"GroupId": "group-aew84ra",
"Envs": [
{
"Name": "key",
"Value": "val",
"ValueFrom": {
"FieldRef": {
"FieldPath": "path"
},
"ResourceFieldRef": {
"Resource": "ref"
},
"ConfigMapKeyRef": {
"Name": "name",
"Key": "key"
},
"SecretKeyRef": {
"Name": "test",
"Key": "test"
}
}
}
],
"VolumeMountInfoList": [
{
"VolumeMountName": "mount-name",
"VolumeMountPath": "path",
"VolumeMountSubPath": "sub-path",
"ReadOrWrite": "1"
}
],
"LifeCycleHookList": [
{
"HookType": "PostStart",
"ExecMode": "execCommand",
"ExecCommandContent": "sleep 30",
"HttpGetOption": {
"Host": "host.com",
"Path": "path",
"Port": "port",
"Scheme": "HTTP"
}
}
],
"AdditionalContainerList": [
{
"Name": "add",
"ContainerId": "c-id",
"Status": "test",
"Reason": "test",
"Image": "test",
"IsBusinessMainContainer": true,
"Server": "test",
"RepoName": "test",
"RepoType": "test",
"TcrRepoInfo": {
"Region": "test",
"RegistryId": "test",
"RegistryName": "test",
"Namespace": "test",
"RepoName": "test"
},
"SecretName": "test",
"TagName": "test",
"HealthCheckSettings": {
"LivenessProbe": {
"ActionType": "test",
"InitialDelaySeconds": 1,
"TimeoutSeconds": 1,
"PeriodSeconds": 1,
"SuccessThreshold": 1,
"FailureThreshold": 1,
"Scheme": "test",
"Port": 1,
"Path": "test",
"Command": [
"test"
],
"Type": "test"
},
"ReadinessProbe": {
"ActionType": "test",
"InitialDelaySeconds": 1,
"TimeoutSeconds": 1,
"PeriodSeconds": 1,
"SuccessThreshold": 1,
"FailureThreshold": 1,
"Scheme": "test",
"Port": 1,
"Path": "test",
"Command": [
"test"
],
"Type": "test"
}
},
"CpuRequest": "test",
"CpuLimit": "test",
"MemRequest": "test",
"MemLimit": "test",
"Envs": [
{
"Name": "test",
"Value": "test",
"ValueFrom": {
"FieldRef": {
"FieldPath": "test"
},
"ResourceFieldRef": {
"Resource": "test"
},
"ConfigMapKeyRef": {
"Name": "test",
"Key": "test"
}
}
}
],
"UserEnvs": [
{
"Name": "test",
"Value": "test",
"ValueFrom": {
"FieldRef": {
"FieldPath": "test"
},
"ResourceFieldRef": {
"Resource": "test"
}
}
}
],
"JvmOpts": "test",
"VolumeMountInfoList": [
{
"VolumeMountName": "test",
"VolumeMountPath": "test",
"VolumeMountSubPath": "test",
"ReadOrWrite": "test"
}
],
"InitContainerEnable": true,
"LifeCycleHookList": [
{
"HookType": "test",
"ExecMode": "test",
"ExecCommandContent": "test",
"HttpGetOption": {
"Host": "test",
"Path": "test",
"Port": "test",
"Scheme": "test"
}
}
],
"PrivilegeContainerEnable": true,
"RunCommand": "test",
"RunArg": "test",
"GatewayConfig": {
"Name": "test",
"Port": 0,
"Protocol": "test",
"KeyPath": "test",
"CertPath": "test"
},
"ContainerName": "test"
}
],
"VolumeInfoList": [
{
"VolumeType": "test",
"VolumeName": "test",
"VolumeConfig": "test",
"ConfigMapOptions": [
{
"Key": "test",
"Path": "test",
"Mode": "test"
}
],
"EmptyDirOption": {
"EnableMemory": true,
"StorageCapacity": 0,
"StorageUnit": "test",
"SizeLimit": "test"
}
}
],
"ServiceSettingList": [
{
"AccessType": 0,
"ProtocolPorts": [
{
"Protocol": "test",
"Port": 0,
"TargetPort": 0,
"NodePort": 0,
"Name": "test"
}
],
"SubnetId": "test",
"DisableService": true,
"HeadlessService": true,
"AllowDeleteService": true,
"OpenSessionAffinity": true,
"SessionAffinityTimeoutSeconds": 0,
"ServiceName": "test",
"ExternalTrafficStrategy": "test",
"ExternalTrafficPolicy": "test",
"LoadBalancerProvisioner": "test",
"LoadBalancingType": "test",
"ClusterIp": "test",
"DisableServiceInt": 1,
"OpenSessionAffinityInt": 1,
"HeadlessServiceInt": 1,
"Name": "test",
"VpcId": "test",
"LoadBalancingIp": "test",
"LoadBalancerId": "test"
}
],
"Alias": "test",
"GroupName": "test",
"Tags": [
{
"TagKey": "test",
"TagValue": "test"
}
],
"ContainerKind": "test",
"Server": "test",
"RepoName": "test",
"RepoType": "test",
"TcrRepoInfo": {
"Region": "test",
"RegistryId": "test",
"RegistryName": "test",
"Namespace": "test",
"RepoName": "test"
},
"SecretName": "test",
"TagName": "test",
"HealthCheckSettings": {
"LivenessProbe": {
"ActionType": "test",
"InitialDelaySeconds": 1,
"TimeoutSeconds": 1,
"PeriodSeconds": 1,
"SuccessThreshold": 1,
"FailureThreshold": 1,
"Scheme": "test",
"Port": 1,
"Path": "test",
"Command": [
"test"
],
"Type": "test"
}
},
"CpuRequest": "test",
"CpuLimit": "test",
"MemRequest": "test",
"MemLimit": "test",
"JvmOpts": "test",
"InitContainerEnable": true,
"PrivilegeContainerEnable": true,
"RunCommand": "test",
"RunArg": "test",
"GatewayConfig": {
"Name": "test",
"Port": 0,
"Protocol": "test",
"KeyPath": "test",
"CertPath": "test"
},
"InstanceNum": 0,
"SchedulingStrategy": {
"Type": "test",
"NodeScheduleStrategyType": "test",
"NodeScheduleOptions": [
{
"LabelName": "test",
"Operator": "test",
"LabelValue": "test"
}
],
"StrongAffinityList": [
{
"LabelName": "test",
"Operator": "test",
"LabelValue": "test"
}
],
"WeakAffinityList": [
{
"LabelName": "test",
"Operator": "test",
"LabelValue": "test"
}
],
"WeakAffinityWeight": 0,
"AvailableZoneScatterScheduleType": "test",
"AvailableZoneScatterScheduleRules": [
{
"ScatterDimension": "test",
"MaxUnbalanceQuantity": 0,
"IsForceSchedule": true
}
],
"PodScheduleStrategyType": "test",
"CustomPodSchedule": {
"ForceSchedule": {
"AffinityList": [
{
"Scope": "test",
"Weight": "test"
}
],
"AntiAffinityList": [
{
"Scope": "test",
"Weight": "test"
}
]
},
"TrySchedule": {
"AffinityList": [
{
"Scope": "test",
"Weight": "test"
}
]
}
},
"TolerateScheduleType": "test",
"CustomTolerateSchedules": [
{
"Key": "test",
"Operator": "test",
"Value": "test",
"Effect": "test",
"TolerationSeconds": 0
}
]
},
"RestartPolicy": "test",
"ServiceSpecEncode": "test",
"IstioMemRequest": "test",
"IstioCpuRequest": "test",
"IstioMemLimit": "test",
"IstioCpuLimit": "test",
"ServiceGovernanceConfig": {
"EnableGovernance": true,
"ServiceConfigList": [
{
"Name": "test",
"Ports": [
{
"TargetPort": 1,
"Protocol": "test"
}
],
"HealthCheck": {
"Path": "test"
}
}
],
"ExclusiveInstances": [
{
"CenterType": "test",
"InstanceId": "test",
"InstanceType": "test",
"InstanceName": "test",
"RegionId": "test",
"InstanceNamespaceId": "test"
}
],
"GovernanceType": "test"
},
"AgentMemRequest": "test",
"AgentCpuRequest": "test",
"AgentMemLimit": "test",
"AgentCpuLimit": "test",
"UpdateType": 0,
"UpdateIvl": 0,
"MaxSurge": "test",
"MaxUnavailable": "test",
"WarmupSetting": {
"Enabled": true,
"WarmupTime": 1,
"Curvature": 1,
"EnabledProtection": true
},
"ConfigTemplateId": "test",
"ConfigTemplateVersion": 0,
"VolumeClean": true,
"NamespaceId": "test",
"DeployAgent": true,
"AgentProfileList": [
{
"AgentType": "test",
"AgentVersion": "test"
}
]
}
输出示例
{
"Response": {
"Result": {
"GroupId": "group-aew84ra",
"TaskId": "task-2.0-dfea31"
},
"RequestId": "request-id"
}
}