Adds a directory to protect for a specific server.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ModifyWebLockCreateConfig

The operation that you want to perform.

Set the value to ModifyWebLockCreateConfig.

SourceIp String No 1.2.3.4

The source IP address of the request.

Lang String No zh

The natural language of the request and response. Valid values:

  • zh: Chinese
  • en: English
Uuid String No inet-12345****

The UUID of the server for which you want to add a directory to protect.

Note You can call the DescribeCloudCenterInstances operation to query the UUIDs of servers.
Dir String No /home/admin/tomcat

The directory that you want to protect.

ExclusiveDir String No /home/admin/test

The directory for which you want to disable web tamper proofing.

Note If you set Mode to blacklist, you must specify this parameter.
ExclusiveFileType String No jpg

The type of file for which you want to disable web tamper proofing. Separate multiple types with semicolons (;). Valid values:

  • php
  • jsp
  • asp
  • aspx
  • js
  • cgi
  • html
  • htm
  • xml
  • shtml
  • shtm
  • jpg
  • gif
  • png
Note If you set Mode to blacklist, you must specify this parameter.
LocalBackupDir String No /usr/local/backup

The local directory that stores the backup files of the directory to protect.

Mode String No whitelist

The protection mode. Valid values:

  • whitelist: In this mode, web tamper proofing is enabled for the specified directories and types of files.
  • blacklist: In this mode, web tamper proofing is enabled for the unspecified subdirectories, types of files, and files in the protected directory.
InclusiveFileType String No jpg

The type of file for which you want to enable web tamper proofing. Separate multiple types with semicolons (;). Valid values:

  • php
  • jsp
  • asp
  • aspx
  • js
  • cgi
  • html
  • htm
  • xml
  • shtml
  • shtm
  • jpg
  • gif
  • png
Note If you set Mode to whitelist, you must specify this parameter.
ExclusiveFile String No /home/admin/apache.log

The file for which you want to disable web tamper proofing.

Note If you set Mode to blacklist, you must specify this parameter.
InclusiveFile String No /home/admin/test.log

The file for which you want to enable web tamper proofing.

Note If you set Mode to whitelist, you must specify this parameter.

Response parameters

Parameter Type Example Description
RequestId String D9354C1A-D709-4873-9AAE-41513327B247

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ModifyWebLockCreateConfig
&<Common request parameters>

Sample success responses

XML format

<ModifyWebLockCreateConfigResponse>
      <RequestId>D9354C1A-D709-4873-9AAE-41513327B247</RequestId>
</ModifyWebLockCreateConfigResponse>

JSON format

{
    "RequestId": "D9354C1A-D709-4873-9AAE-41513327B247"
}

Error codes

For a list of error codes, visit the API Error Center.