新建cce集成防护配置
功能介绍
新建cce集成防护配置
URI
POST /v5/{project_id}/container/kubernetes/clusters/protection-enable
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
project_id |
是 |
String |
项目ID |
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
enterprise_project_id |
否 |
String |
企业项目ID,查询所有企业项目时填写:all_granted_eps |
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
X-Auth-Token |
是 |
String |
用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值) |
|
region |
是 |
String |
Region ID |
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
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 |
请求已成功 |
错误码
请参见错误码。