更新时间:2026-01-08 GMT+08:00

新建cce集成防护配置

功能介绍

新建cce集成防护配置

URI

POST /v5/{project_id}/container/kubernetes/clusters/protection-enable

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

项目ID

表2 Query参数

参数

是否必选

参数类型

描述

enterprise_project_id

String

企业项目ID,查询所有企业项目时填写:all_granted_eps

请求参数

表3 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户Token。

通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)

region

String

Region ID

表4 请求Body参数

参数

是否必选

参数类型

描述

cluster_type

String

cce集群类型:

existing 存量集群

adding 新增集群

cluster_id

String

集群id

cluster_name

String

集群名称

charging_mode

String

付费模式:

on_demand 按需

free_security_check 免费安全体检

cce_protection_type

String

cce防护类型:

cluster_level 集群级别防护

node_level 节点级别防护

prefer_packet_cycle

Boolean

只支持按需配额;值为false

响应参数

状态码:200

请求已成功

请求示例

开启集群名称为cluster_name_test,集群id为6a321faa6e6c4a18b5bf19dd9543test,计费模式为按需,集群状态为添加中,集群防护类型为集群级别的集群防护

POST https://{endpoint}/v5{project_id}/container/kubernetes/clusters/protection-enable?enterprise_project_id=0

{
  "cluster_type" : "adding",
  "cluster_id" : "6a321faa6e6c4a18b5bf19dd9543test",
  "cluster_name" : "cluster_name_test",
  "charging_mode" : "on_demand",
  "cce_protection_type" : "cluster_level"
}

响应示例

状态码

状态码

描述

200

请求已成功

错误码

请参见错误码