Modifying a WTP Configuration
Function
This API is used to modify a WTP configuration.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.
URI
PUT /v5/{project_id}/webtamper/protection-configs
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition Project ID, which is used to specify the project that an asset belongs to. After the project ID is configured, you can query assets in the project using the project ID. For details about how to obtain it, see Obtaining a Project ID. Constraints N/A Range The value contains 1 to 256 characters. Default Value N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
enterprise_project_id |
No |
String |
Definition Enterprise project ID, which is used to filter assets in different enterprise projects. For details, see Obtaining an Enterprise Project ID. To query assets in all enterprise projects, set this parameter to all_granted_eps. Constraints You need to set this parameter only after the enterprise project function is enabled. Range The value can contain 1 to 256 characters. Default Value 0: default enterprise project. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Definition User token, which contains user identity and permissions. The token can be used for identity authentication when an API is called. For details about how to obtain the token, see Obtaining a User Token. Constraints N/A Range The value can contain 1 to 32,768 characters. Default Value N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
type |
Yes |
String |
Definition Web tamper protection type. Constraints N/A Range Default Value N/A |
|
protection_config_id |
Yes |
String |
Definition Protection configuration ID. Constraints N/A Range The value can contain 1 to 64 characters. Default Value N/A |
|
protect_mode |
No |
String |
Definition Protection mode. Constraints N/A Range Default Value alarm |
|
monitor_process |
No |
Boolean |
Definition Whether to monitor processes to check for tampering. Constraints N/A Range Default Value true |
|
privileged_process_list |
No |
Array of strings |
Definition List of privileged process paths. Constraints This parameter is valid only when monitor_process is set to true. (If no process monitoring is performed, privileged processes cannot be checked.) Range 0 to 10 items Default Value N/A |
|
privileged_child |
No |
Boolean |
Definition Whether the subprocess of a privileged process still has privileges. Constraints This parameter is valid only when monitor_process is set to true. (If no process monitoring is performed, privileged processes cannot be checked.) Range
Default Value false |
|
container_wtp_info |
No |
container_wtp_info object |
Definition Container WTP configuration. Constraints This parameter is valid only when type is set to container_wtp. Range N/A Default Value N/A |
|
protect_directory_info_list |
No |
Array of ProtectDirectoryInfo objects |
Definition Protected directory information. Constraints N/A Range 1 to 50 items Default Value N/A |
|
exclude_file_types |
No |
Array of strings |
Definition List of excluded file types. Constraints N/A Range 0 to 10 items Default Value N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
cluster_label_list |
No |
Array of ClusterLabelInfo objects |
Definition Cluster tag list Constraints This parameter is valid only when protect_type is set to cluster. Range 0 to 10 items Default Value N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
key |
No |
String |
Definition Key name of the cluster resource tag. Constraints N/A Range The value can contain 1 to 64 characters. Default Value N/A |
|
value |
No |
String |
Definition Value of a cluster resource tag. Constraints N/A Range The value can contain 0 to 128 characters. Default Value N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
protect_directory |
Yes |
String |
Definition Protected directory. Constraints N/A Range The value can contain 1 to 256 characters. Default Value N/A |
|
exclude_child_directory_list |
No |
Array of strings |
Definition List of subdirectories to be excluded. Constraints N/A Range 0 to 10 items Default Value N/A |
|
exclude_file_list |
No |
Array of strings |
Definition List of subfiles to be excluded. Constraints N/A Range 0 to 10 items Default Value N/A |
|
backup_directory |
No |
String |
Definition Backup directory. Constraints N/A Range The value can contain 1 to 256 characters. Default Value N/A |
Response Parameters
Status code: 200
Request succeeded.
None
Example Requests
Modifying protection settings.
PUT https://{endpoint}/v5/{project_id}/webtamper/protection-configs?enterprise_project_id=all_granted_eps
{
"type" : "container_wtp",
"protection_config_id" : "aaa",
"protect_mode" : "alarm",
"monitor_process" : true,
"privileged_child" : false,
"privileged_process_list" : [ "/bin/bash" ],
"container_wtp_info" : {
"cluster_label_list" : [ {
"key" : "",
"value" : ""
} ]
},
"protect_directory_info_list" : [ {
"protect_directory" : "/root/www",
"exclude_child_directory_list" : [ "/root/www/log" ],
"exclude_file_list" : [ "/root/www/image/logo.png" ],
"backup_directory" : "/var/temp/wtp_backup"
} ],
"exclude_file_types" : [ "log" ]
}
Example Responses
None
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Request succeeded. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot