Creating a CCE Integrated Protection Configuration
Function
This API is used to create a CCE integrated protection configuration.
URI
POST /v5/{project_id}/container/kubernetes/clusters/protection-enable
Parameter | Mandatory | Type | Description |
---|---|---|---|
project_id | Yes | String | Project ID |
Parameter | Mandatory | Type | Description |
---|---|---|---|
enterprise_project_id | No | String | Enterprise project ID. To query all enterprise projects, set this parameter to all_granted_eps. |
Request Parameters
Parameter | Mandatory | Type | Description |
---|---|---|---|
X-Auth-Token | Yes | String | User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is a token. |
region | Yes | String | Region ID |
Parameter | Mandatory | Type | Description |
---|---|---|---|
cluster_type | No | String | CCE cluster type. The value can be: existing adding |
cluster_id | No | String | Cluster ID |
cluster_name | Yes | String | Cluster name |
charging_mode | No | String | Billing mode: on_demand free_security_check |
cce_protection_type | No | String | CCE protection type. Its value can be: cluster_level: cluster-level protection node_level: node-level protection |
prefer_packet_cycle | No | Boolean | Only purchase quota in pay-per-use mode is supported. The value is false. |
Response Parameters
None
Example Requests
Enable cluster-level protection for the cluster whose name is cluster_name_test, ID is 6a321faa6e6c4a18b5bf19dd9543test, billing mode is pay-per-use, and status is adding.
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"}
Example Responses
None
Status Codes
Status Code | Description |
---|---|
200 | Request succeeded. |
Error Codes
See Error Codes.
- URI