全部產品
Search
文件中心

Security Center:ModifyWebLockStart

更新時間:Jun 16, 2026

為指定伺服器建立網頁防篡改保護並開啟防護。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

yundun-sas:ModifyWebLockStart

update

*WebLockBind

acs:yundun-sas:{#regionId}:{#accountId}:weblockbind/{#Uuid}

請求參數

名稱

類型

必填

描述

樣本值

Mode

string

指定防護類型。取值:

  • whitelist:白名單模式,對添加的防護目錄和檔案類型進行保護。

  • blacklist:黑名單模式,對添加的防護目錄下所有未排除的子目錄、檔案類型和指定檔案進行保護。

whitelist

LocalBackupDir

string

設定本機備份路徑,用於對防護目錄進行安全備份。
Linux 伺服器和 Windows 伺服器防護目錄位址的格式可能會有區別,請您確保輸入正確的格式。您可以參考以下目錄格式:

  • Linux 伺服器:/usr/local/aegis/bak

  • Windows 伺服器:C:\Program Files (x86)\Alibaba\Aegis\bak。

/usr/local/backup

ExclusiveFile

string

指定無需開啟網頁防篡改防護的檔案(即排除檔案)。

說明

防護模式 Mode 設定為 blacklist 時,您需要設定該參數。

/home/admin/tomcat/localhost.log

Dir

string

指定防護目錄,存在多個時用半形逗號(,)分隔。

/home/admin/tomcat

InclusiveFileType

string

指定需要網頁防篡改防護的檔案類型。存在多個檔案類型時,使用半形分號(;)隔開。取值:

  • php

  • jsp

  • asp

  • aspx

  • js

  • cgi

  • html

  • htm

  • xml

  • shtml

  • shtm

  • jpg

  • gif

  • png

說明

防護模式 Mode 設定為 whitelist 時,您需要設定該參數。

php

Uuid

string

指定需要防護的伺服器 UUID。

80d2f7d6-31a9-4d7f-8ff4-7ecc42f89ca****

ExclusiveFileType

string

指定無需網頁防篡改防護的檔案類型(即排除檔案的類型)。存在多個檔案類型時,使用半形分號(;)隔開。取值:

  • php

  • jsp

  • asp

  • aspx

  • js

  • cgi

  • html

  • htm

  • xml

  • shtml

  • shtm

  • jpg

  • gif

  • png

說明

防護模式 Mode 設定為 blacklist 時,您需要設定該參數。

jpg

ExclusiveDir

string

指定無需網頁防篡改防護的目錄位址(即排除目錄)。

說明

防護模式 Mode 設定為 blacklist 時,您需要設定該參數。

/home/admin/java

DefenceMode

string

防護模式。取值:

  • block:攔截

  • audit:告警。

block

返回參數

名稱

類型

描述

樣本值

object

RequestId

string

本次呼叫請求的 ID,是由阿里雲為該請求產生的唯一識別碼,可用於排查和定位問題。

D9354C1A-D709-4873-9AAE-41513327B247

樣本

正常返回樣本

JSON格式

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

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

400 IllegalParam Illegal param
400 DuplicatedDirectory Duplicated directory
400 NeedBuy This service shoule be purchased first.
400 DefenceEmptyConfig At least one protection directory is needed.
400 DefenceAuthLimit The number of machines has reached the upper limit.
400 BindDataExist The binding data already exists.
400 MissingDir Dir is mandatory for this action.
500 InternalError The request processing has failed due to some unknown error.
500 ServerError ServerError
403 NoPermission caller has no permission

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情