Updated on 2026-07-01 GMT+08:00

WAF

Function Description

This plugin has been built into SecMaster. It can call Web Application Firewall (WAF) APIs to manage WAF resources, such as protected domain names, policies, IP address groups, blacklists, and whitelists.

Each built-in plugin has a corresponding built-in operation connection.

Viewing Details and Operation Connections of the WAF Plugin

  1. Log in to the SecMaster console.
  2. Click in the upper left corner of the management console and select a region or project.
  3. In the navigation pane on the left, choose Workspaces > Management. In the workspace list, click the name of the target workspace.

    Figure 1 Workspace management page

  4. In the navigation pane on the left, choose Security Orchestration > Plugins.

    Figure 2 Plugins page

  5. On the Plugins page, select the WAF plugin under the Huawei Cloud catalog. The Details tab is displayed by default. The Details tab displays the login credential information of the operation connection associated with the plugin.
  6. Click the Operation Connections tab for the WAF plugin. On the displayed page, you can view information about the operation connections associated with the plugin.
  7. For details about how to edit or delete an operation connection, see Editing an Operation Connection and Deleting an Operation Connection. For details about how to add an operation connection for a plugin, see Creating an Operation Connection. A plugin can have multiple operation connections.

Plugin Execution Function createIpGroup

Parameters of the createIpGroup Function

Function: Creates an IP address group.

Table 1 Input parameters of the createIpGroup function

Parameter

Parameter Type

Parameter Description

Mandatory

name

String

IP address group name.

Yes

ips

String

IP address list. Use commas (,) to separate multiple IP addresses.

Yes

description

String

IP address group description.

No

enterprise_project_id

String

Enterprise project ID. You can obtain it by calling the ListEnterpriseProject API of Enterprise Project Management Service (EPS).

No

agency_type

String

Unified adaptation parameter for multi-account management. Use the default value.

No

Table 2 Output parameters of the createIpGroup function

Parameter

Parameter Type

Parameter Description

headers

Object

API response headers, including basic information about the request and response, such as the request time, response service, and request ID.

code

Int

Status code, which indicates whether the request is successful.

Response code description:

  • If the value of code is 200, the request is successful.
  • If the value of code is 401, the account or password is incorrect.
  • If the value of code is 403, the permission is insufficient.
  • If the value of code is 404, the requested resource does not exist.

body

Object

Content returned by the API.

Output Example of the createIpGroup Function

{
  "headers": {
    "Transfer-Encoding": "chunked",
    "Server": "api-gateway",
    "X-Request-Id": "f7e759ff25266227a1d31f5068a5b3ed",
    "X-Content-Type-Options": "nosniff",
    "Connection": "keep-alive",
    "X-Download-Options": "noopen",
    "Pragma": "no-cache",
    "Date": "Mon, 25 May 2026 09:10:00 GMT",
    "X-Frame-Options": "SAMEORIGIN",
    "Strict-Transport-Security": "max-age=31536000; includeSubdomains;",
    "Cache-Control": "no-cache, no-store, max-age=0, must-revalidate",
    "X-XSS-Protection": "1; mode=block;",
    "Content-Type": "application/json; charset=UTF-8"
  },
  "code": 200,
  "body": {
    "id": "ipg-12345678",
    "name": "test-ip-group",
    "ips": "192.xxx.1.1,xx2.168.1.2",
    "description": "Test IP address group",
    "size": 2
  }
}

Plugin Execution Function deleteIpGroup

Parameters of the deleteIpGroup Function

Function: Deletes an IP address group.

Table 3 Input parameters of the deleteIpGroup function

Parameter

Parameter Type

Parameter Description

Mandatory

id

String

IP address group ID. You can obtain it by calling the ListIpGroup API.

Yes

enterprise_project_id

String

Enterprise project ID.

No

agency_type

String

Unified adaptation parameter for multi-account management. Use the default value.

No

Table 4 Output parameters of the deleteIpGroup function

Parameter

Parameter Type

Parameter Description

headers

Object

API response headers, including basic information about the request and response, such as the request time, response service, and request ID.

code

Int

Status code, which indicates whether the request is successful.

Response code description:

  • If the value of code is 200, the request is successful.
  • If the value of code is 401, the account or password is incorrect.
  • If the value of code is 403, the permission is insufficient.
  • If the value of code is 404, the requested resource does not exist.

body

Object

Content returned by the API.

Output Example of the deleteIpGroup Function

{
  "headers": {
    "Transfer-Encoding": "chunked",
    "Server": "api-gateway",
    "X-Request-Id": "f7e759ff25266227a1d31f5068a5b3ed",
    "X-Content-Type-Options": "nosniff",
    "Connection": "keep-alive",
    "X-Download-Options": "noopen",
    "Pragma": "no-cache",
    "Date": "Mon, 25 May 2026 09:10:00 GMT",
    "X-Frame-Options": "SAMEORIGIN",
    "Strict-Transport-Security": "max-age=31536000; includeSubdomains;",
    "Cache-Control": "no-cache, no-store, max-age=0, must-revalidate",
    "X-XSS-Protection": "1; mode=block;",
    "Content-Type": "application/json; charset=UTF-8"
  },
  "code": 200,
  "body": {}
}

Plugin Execution Function updateIpGroup

Parameters of the updateIpGroup Function

Function: Updates an IP address group. You can add or remove IP addresses.

Table 5 Input parameters of the updateIpGroup function

Parameter

Parameter Type

Parameter Description

Mandatory

ipGroupId

String

IP address group ID.

Yes

name

String

IP address group name.

No

ips

String

IP address list.

No

description

String

IP address group description.

No

enterpriseProjectId

String

Enterprise project ID.

No

action

String

This parameter is mandatory when an IP address group is modified.

Value range:

  • add
  • delete
  • update

No

agency_type

String

Unified adaptation parameter for multi-account management. Use the default value.

No

Table 6 Output parameters of the updateIpGroup function

Parameter

Parameter Type

Parameter Description

headers

Object

API response headers, including basic information about the request and response, such as the request time, response service, and request ID.

code

Int

Status code, which indicates whether the request is successful.

Response code description:

  • If the value of code is 200, the request is successful.
  • If the value of code is 401, the account or password is incorrect.
  • If the value of code is 403, the permission is insufficient.
  • If the value of code is 404, the requested resource does not exist.

body

Object

Content returned by the API.

Output Example of the updateIpGroup Function

{
  "headers": {
    "Transfer-Encoding": "chunked",
    "Server": "api-gateway",
    "X-Request-Id": "f7e759ff25266227a1d31f5068a5b3ed",
    "X-Content-Type-Options": "nosniff",
    "Connection": "keep-alive",
    "X-Download-Options": "noopen",
    "Pragma": "no-cache",
    "Date": "Mon, 25 May 2026 09:10:00 GMT",
    "X-Frame-Options": "SAMEORIGIN",
    "Strict-Transport-Security": "max-age=31536000; includeSubdomains;",
    "Cache-Control": "no-cache, no-store, max-age=0, must-revalidate",
    "X-XSS-Protection": "1; mode=block;",
    "Content-Type": "application/json; charset=UTF-8"
  },
  "code": 200,
  "body": {
    "id": "ipg-12345678",
    "name": "updated-ip-group",
    "ips": "192.xxx.1.1,192.xxx.1.2,192.xxx.1.3",
    "description": "Updated IP address group",
    "size": 3
  }
}

Plugin Execution Function listIpGroup

Parameters of the listIpGroup Function

Function: Queries the IP address group list.

Table 7 Input parameters of the listIpGroup function

Parameter

Parameter Type

Parameter Description

Mandatory

name

String

IP address group name.

No

page

Integer

Page number of the pagination query. If this parameter is not specified, the query starts from the first page by default.

No

pagesize

Integer

Page size of the pagination query. If this parameter is not specified, 10 records are displayed on each page by default. The maximum value is 100.

No

enterpriseProjectId

String

Enterprise project ID.

No

ip

String

Specific IP address or IP address range for the query.

No

Table 8 Output parameters of the listIpGroup function

Parameter

Parameter Type

Parameter Description

headers

Object

API response headers, including basic information about the request and response, such as the request time, response service, and request ID.

code

Int

Status code, which indicates whether the request is successful.

Response code description:

  • If the value of code is 200, the request is successful.
  • If the value of code is 401, the account or password is incorrect.
  • If the value of code is 403, the permission is insufficient.
  • If the value of code is 404, the requested resource does not exist.

body

Object

Content returned by the API.

Output Example of the listIpGroup Function

{
  "headers": {
    "Transfer-Encoding": "chunked",
    "Server": "api-gateway",
    "X-Request-Id": "f7e759ff25266227a1d31f5068a5b3ed",
    "X-Content-Type-Options": "nosniff",
    "Connection": "keep-alive",
    "X-Download-Options": "noopen",
    "Pragma": "no-cache",
    "Date": "Mon, 25 May 2026 09:10:00 GMT",
    "X-Frame-Options": "SAMEORIGIN",
    "Strict-Transport-Security": "max-age=31536000; includeSubdomains;",
    "Cache-Control": "no-cache, no-store, max-age=0, must-revalidate",
    "X-XSS-Protection": "1; mode=block;",
    "Content-Type": "application/json; charset=UTF-8"
  },
  "code": 200,
  "body": {
    "total": 10,
    "items": [
      {
        "id": "ipg-12345678",
        "name": "test-ip-group",
        "ips": "192.xxx.1.1,192.xxx.1.2",
        "description": "Test IP address group",
        "size": 2
      }
    ]
  }
}

Plugin Execution Function createPolicy

Parameters of the createPolicy Function

Function: Creates a protection policy.

Table 9 Input parameters of the createPolicy function

Parameter

Parameter Type

Parameter Description

Mandatory

name

String

Policy name. The policy name can contain only digits, letters, and underscores (_) and cannot exceed 64 characters.

No

enterpriseProjectId

String

Enterprise project ID.

No

agency_type

String

Unified adaptation parameter for multi-account management. Use the default value.

No

Table 10 Output parameters of the createPolicy function

Parameter

Parameter Type

Parameter Description

headers

Object

API response headers, including basic information about the request and response, such as the request time, response service, and request ID.

code

Int

Status code, which indicates whether the request is successful.

Response code description:

  • If the value of code is 200, the request is successful.
  • If the value of code is 401, the account or password is incorrect.
  • If the value of code is 403, the permission is insufficient.
  • If the value of code is 404, the requested resource does not exist.

body

Object

Content returned by the API.

Output Example of the createPolicy Function

{
  "headers": {
    "Transfer-Encoding": "chunked",
    "Server": "api-gateway",
    "X-Request-Id": "f7e759ff25266227a1d31f5068a5b3ed",
    "X-Content-Type-Options": "nosniff",
    "Connection": "keep-alive",
    "X-Download-Options": "noopen",
    "Pragma": "no-cache",
    "Date": "Mon, 25 May 2026 09:10:00 GMT",
    "X-Frame-Options": "SAMEORIGIN",
    "Strict-Transport-Security": "max-age=31536000; includeSubdomains;",
    "Cache-Control": "no-cache, no-store, max-age=0, must-revalidate",
    "X-XSS-Protection": "1; mode=block;",
    "Content-Type": "application/json; charset=UTF-8"
  },
  "code": 200,
  "body": {
    "id": "policy-12345678",
    "name": "test-policy",
    "level": 1
  }
}

Plugin Execution Function deletePolicy

Parameters of the deletePolicy Function

Function: Deletes a protection policy.

Table 11 Input parameters of the deletePolicy function

Parameter

Parameter Type

Parameter Description

Mandatory

policy_id

String

Protection policy ID. You can call the ListPolicy API to obtain the policy ID.

Yes

enterprise_project_id

String

Enterprise project ID.

No

agency_type

String

Unified adaptation parameter for multi-account management. Use the default value.

No

Table 12 Output parameters of the deletePolicy function

Parameter

Parameter Type

Parameter Description

headers

Object

API response headers, including basic information about the request and response, such as the request time, response service, and request ID.

code

Int

Status code, which indicates whether the request is successful.

Response code description:

  • If the value of code is 200, the request is successful.
  • If the value of code is 401, the account or password is incorrect.
  • If the value of code is 403, the permission is insufficient.
  • If the value of code is 404, the requested resource does not exist.

body

Object

Content returned by the API.

Output Example of the deletePolicy Function

{
  "headers": {
    "Transfer-Encoding": "chunked",
    "Server": "api-gateway",
    "X-Request-Id": "f7e759ff25266227a1d31f5068a5b3ed",
    "X-Content-Type-Options": "nosniff",
    "Connection": "keep-alive",
    "X-Download-Options": "noopen",
    "Pragma": "no-cache",
    "Date": "Mon, 25 May 2026 09:10:00 GMT",
    "X-Frame-Options": "SAMEORIGIN",
    "Strict-Transport-Security": "max-age=31536000; includeSubdomains;",
    "Cache-Control": "no-cache, no-store, max-age=0, must-revalidate",
    "X-XSS-Protection": "1; mode=block;",
    "Content-Type": "application/json; charset=UTF-8"
  },
  "code": 200,
  "body": {}
}

Plugin Execution Function showPolicy

Parameters of the showPolicy Function

Function: Queries details about a protection policy.

Table 13 Input parameters of the showPolicy function

Parameter

Parameter Type

Parameter Description

Mandatory

policyID

String

Protection policy ID.

Yes

enterpriseProjectId

String

Enterprise project ID.

No

Table 14 Output parameters of the showPolicy function

Parameter

Parameter Type

Parameter Description

headers

Object

API response headers, including basic information about the request and response, such as the request time, response service, and request ID.

code

Int

Status code, which indicates whether the request is successful.

Response code description:

  • If the value of code is 200, the request is successful.
  • If the value of code is 401, the account or password is incorrect.
  • If the value of code is 403, the permission is insufficient.
  • If the value of code is 404, the requested resource does not exist.

body

Object

Content returned by the API.

Output Example of the showPolicy Function

{
  "headers": {
    "Transfer-Encoding": "chunked",
    "Server": "api-gateway",
    "X-Request-Id": "f7e759ff25266227a1d31f5068a5b3ed",
    "X-Content-Type-Options": "nosniff",
    "Connection": "keep-alive",
    "X-Download-Options": "noopen",
    "Pragma": "no-cache",
    "Date": "Mon, 25 May 2026 09:10:00 GMT",
    "X-Frame-Options": "SAMEORIGIN",
    "Strict-Transport-Security": "max-age=31536000; includeSubdomains;",
    "Cache-Control": "no-cache, no-store, max-age=0, must-revalidate",
    "X-XSS-Protection": "1; mode=block;",
    "Content-Type": "application/json; charset=UTF-8"
  },
  "code": 200,
  "body": {
    "id": "policy-12345678",
    "name": "test-policy",
    "level": 1,
    "full_compliance": true
  }
}

Plugin Execution Function queryPolicyList

Parameters of the queryPolicyList Function

Function: Queries details about a protection policy.

Table 15 Input parameters of the queryPolicyList function

Parameter

Parameter Type

Parameter Description

Mandatory

enterpriseProjectId

String

Enterprise project ID.

No

page

Integer

Start page number for the pagination query.

No

pagesize

Integer

Number of data records on each page for the pagination query.

No

name

String

Policy name.

No

agency_type

String

Unified adaptation parameter for multi-account management. Use the default value.

No

Table 16 Output parameters of the queryPolicyList function

Parameter

Parameter Type

Parameter Description

headers

Object

API response headers, including basic information about the request and response, such as the request time, response service, and request ID.

code

Int

Status code, which indicates whether the request is successful.

Response code description:

  • If the value of code is 200, the request is successful.
  • If the value of code is 401, the account or password is incorrect.
  • If the value of code is 403, the permission is insufficient.
  • If the value of code is 404, the requested resource does not exist.

body

Object

Content returned by the API.

Output Example of the queryPolicyList Function

{
  "headers": {
    "Transfer-Encoding": "chunked",
    "Server": "api-gateway",
    "X-Request-Id": "f7e759ff25266227a1d31f5068a5b3ed",
    "X-Content-Type-Options": "nosniff",
    "Connection": "keep-alive",
    "X-Download-Options": "noopen",
    "Pragma": "no-cache",
    "Date": "Mon, 25 May 2026 09:10:00 GMT",
    "X-Frame-Options": "SAMEORIGIN",
    "Strict-Transport-Security": "max-age=31536000; includeSubdomains;",
    "Cache-Control": "no-cache, no-store, max-age=0, must-revalidate",
    "X-XSS-Protection": "1; mode=block;",
    "Content-Type": "application/json; charset=UTF-8"
  },
  "code": 200,
  "body": {
    "total": 10,
    "items": [
      {
        "id": "policy-12345678",
        "name": "test-policy",
        "level": 1
      }
    ]
  }
}

Plugin Execution Function createPunishmentRule

Parameters of the createPunishmentRule Function

Function: creates a known attack source rule to block IP addresses of a specific type.

Table 17 Input parameters of the createPunishmentRule function

Parameter

Parameter Type

Parameter Description

Mandatory

policyId

string

Policy ID.

Yes

category

string

Category.

Yes

blockTime

string

Block duration (min).

Yes

description

string

Description.

Yes

enterpriseProjectId

string

Enterprise project ID.

No

agency_type

string

Unified adaptation parameter for multi-account management. Use the default value.

No

Table 18 Output parameters of the createPunishmentRule function

Parameter

Parameter Type

Parameter Description

headers

Object

API response headers, including basic information about the request and response, such as the request time, response service, and request ID.

code

Int

Status code, which indicates whether the request is successful.

Response code description:

  • If the value of code is 200, the request is successful.
  • If the value of code is 401, the account or password is incorrect.
  • If the value of code is 403, the permission is insufficient.
  • If the value of code is 404, the requested resource does not exist.

body

Object

Content returned by the API.

Output Example of the createPunishmentRule Function

{
  "headers": {
    "Transfer-Encoding": "chunked",
    "Server": "api-gateway",
    "X-Request-Id": "f7e759ff25266227a1d31f5068a5b3ed",
    "X-Content-Type-Options": "nosniff",
    "Connection": "keep-alive",
    "X-Download-Options": "noopen",
    "Pragma": "no-cache",
    "Date": "Mon, 25 May 2026 09:10:00 GMT",
    "X-Frame-Options": "SAMEORIGIN",
    "Strict-Transport-Security": "max-age=31536000; includeSubdomains;",
    "Cache-Control": "no-cache, no-store, max-age=0, must-revalidate",
    "X-XSS-Protection": "1; mode=block;",
    "Content-Type": "application/json; charset=UTF-8"
  },
  "code": 200,
  "body": {
    "id": "punishment-12345678",
    "name": "Known attack source rule",
    "punishment_time": 300,
    "punishment_action": "block"
  }
}

Plugin Execution Function listPunishmentRule

Parameters of the listPunishmentRule Function

Function: Queries the known attack source rule list.

Table 19 Input parameters of the listPunishmentRule function

Parameter

Parameter Type

Parameter Description

Mandatory

policyId

string

Policy ID.

Yes

enterpriseProjectId

string

Enterprise project ID.

No

offset

string

Offset.

No

limit

string

Number of records on each page.

No

Table 20 Output parameters of the listPunishmentRule function

Parameter

Parameter Type

Parameter Description

headers

Object

API response headers, including basic information about the request and response, such as the request time, response service, and request ID.

code

Int

Status code, which indicates whether the request is successful.

Response code description:

  • If the value of code is 200, the request is successful.
  • If the value of code is 401, the account or password is incorrect.
  • If the value of code is 403, the permission is insufficient.
  • If the value of code is 404, the requested resource does not exist.

body

Object

Content returned by the API.

Output Example of the listPunishmentRule Function

{
  "headers": {
    "Transfer-Encoding": "chunked",
    "Server": "api-gateway",
    "X-Request-Id": "f7e759ff25266227a1d31f5068a5b3ed",
    "X-Content-Type-Options": "nosniff",
    "Connection": "keep-alive",
    "X-Download-Options": "noopen",
    "Pragma": "no-cache",
    "Date": "Mon, 25 May 2026 09:10:00 GMT",
    "X-Frame-Options": "SAMEORIGIN",
    "Strict-Transport-Security": "max-age=31536000; includeSubdomains;",
    "Cache-Control": "no-cache, no-store, max-age=0, must-revalidate",
    "X-XSS-Protection": "1; mode=block;",
    "Content-Type": "application/json; charset=UTF-8"
  },
  "code": 200,
  "body": {
    "total": 10,
    "items": [
      {
        "id": "punishment-12345678",
       "name": "Known attack source rule",
        "punishment_time": 300,
        "punishment_action": "block"
      }
    ]
  }
}

Plugin Execution Function createWhiteblackipRule

Parameters of the createWhiteblackipRule Function

Function: Creates a blacklist or whitelist rule.

Table 21 Input parameters of the createWhiteblackipRule function

Parameter

Parameter Type

Parameter Description

Mandatory

policy_id

String

Protection policy ID. You can call the ListPolicy API to obtain the policy ID.

Yes

name

String

Rule name. The value can contain 1 to 256 characters.

Yes

addr

String

IP address or IP address ranges, for example, 42.123.120.66 or 42.123.120.0/16. Either addr** or **ip_group_id must be specified. If both are specified, addr takes precedence.

No

white

Integer

Protective action. The options are 0, 1, and 2. 0: The service blocks attacks. 1: The service allows requests. 2: The service only logs requests.

Yes

description

String

Description of the blacklist or whitelist rule.

Yes

ipGroupId

String

IP address group ID. You can query the ID on the Objects > Address Groups page on the console. Either addr** or **ip_group_id must be specified. If both are specified, addr takes precedence.

No

enterpriseProjectId

String

Enterprise project ID.

No

punishmentId

String

Known attack source rule ID.

No

agency_type

String

Unified adaptation parameter for multi-account management. Use the default value.

No

Table 22 Output parameters of the createWhiteblackipRule function

Parameter

Parameter Type

Parameter Description

headers

Object

API response headers, including basic information about the request and response, such as the request time, response service, and request ID.

code

Int

Status code, which indicates whether the request is successful.

Response code description:

  • If the value of code is 200, the request is successful.
  • If the value of code is 401, the account or password is incorrect.
  • If the value of code is 403, the permission is insufficient.
  • If the value of code is 404, the requested resource does not exist.

body

Object

Content returned by the API.

Output Example of the createWhiteblackipRule Function

{
  "headers": {
    "Transfer-Encoding": "chunked",
    "Server": "api-gateway",
    "X-Request-Id": "f7e759ff25266227a1d31f5068a5b3ed",
    "X-Content-Type-Options": "nosniff",
    "Connection": "keep-alive",
    "X-Download-Options": "noopen",
    "Pragma": "no-cache",
    "Date": "Mon, 25 May 2026 09:10:00 GMT",
    "X-Frame-Options": "SAMEORIGIN",
    "Strict-Transport-Security": "max-age=31536000; includeSubdomains;",
    "Cache-Control": "no-cache, no-store, max-age=0, must-revalidate",
    "X-XSS-Protection": "1; mode=block;",
    "Content-Type": "application/json; charset=UTF-8"
  },
  "code": 200,
  "body": {
    "id": "rule-12345678",
    "name": "test-rule",
    "policy_id": "policy-12345678",
    "addr": "192.168.1.1",
    "white": 1,
    "description": "Test the blacklist or whitelist rule.",
    "status": 1
  }
}

Plugin Execution Function deleteWhiteblackipRule

Parameters of the deleteWhiteblackipRule Function

Function: Deletes a blacklist or whitelist rule.

Table 23 Input parameters of the deleteWhiteblackipRule function

Parameter

Parameter Type

Parameter Description

Mandatory

policy_id

String

Protection policy ID.

Yes

rule_id

String

Blacklist or whitelist rule ID.

Yes

enterprise_project_id

String

Enterprise project ID.

No

agency_type

String

Unified adaptation parameter for multi-account management. Use the default value.

No

Table 24 Output parameters of the deleteWhiteblackipRule function

Parameter

Parameter Type

Parameter Description

headers

Object

API response headers, including basic information about the request and response, such as the request time, response service, and request ID.

code

Int

Status code, which indicates whether the request is successful.

Response code description:

  • If the value of code is 200, the request is successful.
  • If the value of code is 401, the account or password is incorrect.
  • If the value of code is 403, the permission is insufficient.
  • If the value of code is 404, the requested resource does not exist.

body

Object

Content returned by the API.

Output Example of the deleteWhiteblackipRule Function

{
  "headers": {
    "Transfer-Encoding": "chunked",
    "Server": "api-gateway",
    "X-Request-Id": "f7e759ff25266227a1d31f5068a5b3ed",
    "X-Content-Type-Options": "nosniff",
    "Connection": "keep-alive",
    "X-Download-Options": "noopen",
    "Pragma": "no-cache",
    "Date": "Mon, 25 May 2026 09:10:00 GMT",
    "X-Frame-Options": "SAMEORIGIN",
    "Strict-Transport-Security": "max-age=31536000; includeSubdomains;",
    "Cache-Control": "no-cache, no-store, max-age=0, must-revalidate",
    "X-XSS-Protection": "1; mode=block;",
    "Content-Type": "application/json; charset=UTF-8"
  },
  "code": 200,
  "body": {}
}

Plugin Execution Function updateWhiteblackipRule

Parameters of the updateWhiteblackipRule Function

Function: Updates a blacklist or whitelist rule.

Table 25 Input parameters of the updateWhiteblackipRule function

Parameter

Parameter Type

Parameter Description

Mandatory

policyId

String

Protection policy ID.

Yes

ruleId

String

Blacklist or whitelist rule ID.

Yes

name

String

Rule name.

Yes

addr

String

IP address or IP address range.

Yes

white

Integer

Protective action. The options are 0, 1, and 2. 0: The service blocks attacks. 1: The service allows requests. 2: The service only logs requests.

Yes

description

String

Description of the blacklist or whitelist rule.

Yes

enterpriseProjectId

String

Enterprise project ID.

No

agency_type

String

Unified adaptation parameter for multi-account management. Use the default value.

No

Table 26 Output parameters of the updateWhiteblackipRule function

Parameter

Parameter Type

Parameter Description

headers

Object

API response headers, including basic information about the request and response, such as the request time, response service, and request ID.

code

Int

Status code, which indicates whether the request is successful.

Response code description:

  • If the value of code is 200, the request is successful.
  • If the value of code is 401, the account or password is incorrect.
  • If the value of code is 403, the permission is insufficient.
  • If the value of code is 404, the requested resource does not exist.

body

Object

Content returned by the API.

Output Example of the updateWhiteblackipRule Function

{
  "headers": {
    "Transfer-Encoding": "chunked",
    "Server": "api-gateway",
    "X-Request-Id": "f7e759ff25266227a1d31f5068a5b3ed",
    "X-Content-Type-Options": "nosniff",
    "Connection": "keep-alive",
    "X-Download-Options": "noopen",
    "Pragma": "no-cache",
    "Date": "Mon, 25 May 2026 09:10:00 GMT",
    "X-Frame-Options": "SAMEORIGIN",
    "Strict-Transport-Security": "max-age=31536000; includeSubdomains;",
    "Cache-Control": "no-cache, no-store, max-age=0, must-revalidate",
    "X-XSS-Protection": "1; mode=block;",
    "Content-Type": "application/json; charset=UTF-8"
  },
  "code": 200,
  "body": {
    "id": "rule-12345678",
    "name": "updated-rule",
    "policy_id": "policy-12345678",
    "addr": "192.168.1.2",
    "white": 0,
    "description": "Updated blacklist or whitelist rule",
    "status": 1
  }
}

Plugin Execution Function listWhiteblackipRule

Parameters of the listWhiteblackipRule Function

Function: Queries the blacklist or whitelist rule list.

Table 27 Input parameters of the listWhiteblackipRule function

Parameter

Parameter Type

Parameter Description

Mandatory

policy_id

String

Protection policy ID.

Yes

page

Integer

Start page number for the pagination query.

No

pagesize

Integer

Number of data records on each page for the pagination query.

No

name

String

Blacklist or whitelist rule name.

No

addr

String

IP address or IP address range in the blacklist or whitelist rule.

No

enterprise_project_id

String

Enterprise project ID.

No

resultVariable

String

Query result filter.

No

Table 28 Output parameters of the listWhiteblackipRule function

Parameter

Parameter Type

Parameter Description

headers

Object

API response headers, including basic information about the request and response, such as the request time, response service, and request ID.

code

Int

Status code, which indicates whether the request is successful.

Response code description:

  • If the value of code is 200, the request is successful.
  • If the value of code is 401, the account or password is incorrect.
  • If the value of code is 403, the permission is insufficient.
  • If the value of code is 404, the requested resource does not exist.

body

Object

Content returned by the API.

Output Example of the listWhiteblackipRule Function

{
  "headers": {
    "Transfer-Encoding": "chunked",
    "Server": "api-gateway",
    "X-Request-Id": "f7e759ff25266227a1d31f5068a5b3ed",
    "X-Content-Type-Options": "nosniff",
    "Connection": "keep-alive",
    "X-Download-Options": "noopen",
    "Pragma": "no-cache",
    "Date": "Mon, 25 May 2026 09:10:00 GMT",
    "X-Frame-Options": "SAMEORIGIN",
    "Strict-Transport-Security": "max-age=31536000; includeSubdomains;",
    "Cache-Control": "no-cache, no-store, max-age=0, must-revalidate",
    "X-XSS-Protection": "1; mode=block;",
    "Content-Type": "application/json; charset=UTF-8"
  },
  "code": 200,
  "body": {
    "total": 10,
    "items": [
      {
        "id": "rule-12345678",
        "name": "test-rule",
        "addr": "192.168.1.1",
        "white": 1,
        "description": "Test blacklist or whitelist rule"
      }
    ]
  }
}

Plugin Execution Function listHost

Parameters of the listHost Function

Function: Queries the list of protected domain names.

Table 29 Input parameters of the listHost function

Parameter

Parameter Type

Parameter Description

Mandatory

enterprise_project_id

String

Enterprise project ID.

No

page

Integer

Start page number for the pagination query.

No

pagesize

Integer

Number of data records on each page for the pagination query.

No

hostname

String

Protected domain name.

No

policyname

String

Policy name.

No

Table 30 Output parameters of the listHost function

Parameter

Parameter Type

Parameter Description

headers

Object

API response headers, including basic information about the request and response, such as the request time, response service, and request ID.

code

Int

Status code, which indicates whether the request is successful.

Response code description:

  • If the value of code is 200, the request is successful.
  • If the value of code is 401, the account or password is incorrect.
  • If the value of code is 403, the permission is insufficient.
  • If the value of code is 404, the requested resource does not exist.

body

Object

Content returned by the API.

Output Example of the listHost Function

{
  "headers": {
    "Transfer-Encoding": "chunked",
    "Server": "api-gateway",
    "X-Request-Id": "f7e759ff25266227a1d31f5068a5b3ed",
    "X-Content-Type-Options": "nosniff",
    "Connection": "keep-alive",
    "X-Download-Options": "noopen",
    "Pragma": "no-cache",
    "Date": "Mon, 25 May 2026 09:10:00 GMT",
    "X-Frame-Options": "SAMEORIGIN",
    "Strict-Transport-Security": "max-age=31536000; includeSubdomains;",
    "Cache-Control": "no-cache, no-store, max-age=0, must-revalidate",
    "X-XSS-Protection": "1; mode=block;",
    "Content-Type": "application/json; charset=UTF-8"
  },
  "code": 200,
  "body": {
    "total": 10,
    "items": [
      {
        "id": "host-12345678",
        "hostname": "www.example.com",
        "policy_id": "policy-12345678",
        "policy_name": "test-policy",
        "protect_status": 1,
        "access_status": 1
      }
    ]
  }
}

Plugin Execution Function listCompositeHosts

Parameters of the listCompositeHosts Function

Function: Queries the list of domain names and returns the formatted domain name protection status.

Table 31 Input parameters of the listCompositeHosts function

Parameter

Parameter Type

Parameter Description

Mandatory

hostname

String

Protected domain name.

No

page

Integer

Start page number for the pagination query.

No

limit

Integer

Number of data records on each page for the pagination query.

No

enterpriseProjectId

String

Enterprise project ID.

No

Table 32 Output parameters of the listCompositeHosts function

Parameter

Parameter Type

Parameter Description

headers

Object

API response headers, including basic information about the request and response, such as the request time, response service, and request ID.

code

Int

Status code, which indicates whether the request is successful.

Response code description:

  • If the value of code is 200, the request is successful.
  • If the value of code is 401, the account or password is incorrect.
  • If the value of code is 403, the permission is insufficient.
  • If the value of code is 404, the requested resource does not exist.

body

Object

Content returned by the API.

Output Example of the listCompositeHosts Function

{
  "headers": {
    "Transfer-Encoding": "chunked",
    "Server": "api-gateway",
    "X-Request-Id": "f7e759ff25266227a1d31f5068a5b3ed",
    "X-Content-Type-Options": "nosniff",
    "Connection": "keep-alive",
    "X-Download-Options": "noopen",
    "Pragma": "no-cache",
    "Date": "Mon, 25 May 2026 09:10:00 GMT",
    "X-Frame-Options": "SAMEORIGIN",
    "Strict-Transport-Security": "max-age=31536000; includeSubdomains;",
    "Cache-Control": "no-cache, no-store, max-age=0, must-revalidate",
    "X-XSS-Protection": "1; mode=block;",
    "Content-Type": "application/json; charset=UTF-8"
  },
  "code": 200,
  "body": {
    "total": 10,
    "items": [
      {
        "id": "host-12345678",
        "hostname": "www.example.com",
        "protect_status": 1
      }
    ]
  }
}

Plugin Execution Function showBundle

Parameters of the showBundle Function

Function: Obtains WAF resource quota information.

Table 33 Input parameters of the showBundle function

Parameter

Parameter Type

Parameter Description

Mandatory

enterpriseProjectId

string

Enterprise project ID.

No

resultVariable

String

Query result filter.

No

Table 34 Output parameters of the showBundle function

Parameter

Parameter Type

Parameter Description

headers

Object

API response headers, including basic information about the request and response, such as the request time, response service, and request ID.

code

Int

Status code, which indicates whether the request is successful.

Response code description:

  • If the value of code is 200, the request is successful.
  • If the value of code is 401, the account or password is incorrect.
  • If the value of code is 403, the permission is insufficient.
  • If the value of code is 404, the requested resource does not exist.

body

Object

Content returned by the API.

Output Example of the showBundle Function

{
  "headers": {
    "Transfer-Encoding": "chunked",
    "Server": "api-gateway",
    "X-Request-Id": "f7e759ff25266227a1d31f5068a5b3ed",
    "X-Content-Type-Options": "nosniff",
    "Connection": "keep-alive",
    "X-Download-Options": "noopen",
    "Pragma": "no-cache",
    "Date": "Mon, 25 May 2026 09:10:00 GMT",
    "X-Frame-Options": "SAMEORIGIN",
    "Strict-Transport-Security": "max-age=31536000; includeSubdomains;",
    "Cache-Control": "no-cache, no-store, max-age=0, must-revalidate",
    "X-XSS-Protection": "1; mode=block;",
    "Content-Type": "application/json; charset=UTF-8"
  },
  "code": 200,
  "body": {
    "bundleId": "bundle-12345678",
    "name": "WAF package,"
    "quota": 100
  }
}

Plugin Execution Function showSourceIp

Parameters of the showSourceIp Function

Function: Obtains the WAF source IP address configuration.

Table 35 Input parameters of the showSourceIp function

Parameter

Parameter Type

Parameter Description

Mandatory

input

String

Input parameter.

No

Table 36 Output parameters of the showSourceIp function

Parameter

Parameter Type

Parameter Description

headers

Object

API response headers, including basic information about the request and response, such as the request time, response service, and request ID.

code

Int

Status code, which indicates whether the request is successful.

Response code description:

  • If the value of code is 200, the request is successful.
  • If the value of code is 401, the account or password is incorrect.
  • If the value of code is 403, the permission is insufficient.
  • If the value of code is 404, the requested resource does not exist.

body

Object

Content returned by the API.

Output Example of the showSourceIp Function

{
  "headers": {
    "Transfer-Encoding": "chunked",
    "Server": "api-gateway",
    "X-Request-Id": "f7e759ff25266227a1d31f5068a5b3ed",
    "X-Content-Type-Options": "nosniff",
    "Connection": "keep-alive",
    "X-Download-Options": "noopen",
    "Pragma": "no-cache",
    "Date": "Mon, 25 May 2026 09:10:00 GMT",
    "X-Frame-Options": "SAMEORIGIN",
    "Strict-Transport-Security": "max-age=31536000; includeSubdomains;",
    "Cache-Control": "no-cache, no-store, max-age=0, must-revalidate",
    "X-XSS-Protection": "1; mode=block;",
    "Content-Type": "application/json; charset=UTF-8"
  },
  "code": 200,
  "body": {
    "source_ips": [
      "192.168.1.1",
      "192.168.1.2"
    ]
  }
}

Plugin Execution Function showSubscriptionInfo

Parameters of the showSubscriptionInfo Function

Function: Obtains WAF subscription information.

Table 37 Input parameters of the showSubscriptionInfo function

Parameter

Parameter Type

Parameter Description

Mandatory

input

String

Input parameter.

No

Table 38 Output parameters of the showSubscriptionInfo function

Parameter

Parameter Type

Parameter Description

headers

Object

API response headers, including basic information about the request and response, such as the request time, response service, and request ID.

code

Int

Status code, which indicates whether the request is successful.

Response code description:

  • If the value of code is 200, the request is successful.
  • If the value of code is 401, the account or password is incorrect.
  • If the value of code is 403, the permission is insufficient.
  • If the value of code is 404, the requested resource does not exist.

body

Object

Content returned by the API.

Output Example of the showSubscriptionInfo Function

{
  "headers": {
    "Transfer-Encoding": "chunked",
    "Server": "api-gateway",
    "X-Request-Id": "f7e759ff25266227a1d31f5068a5b3ed",
    "X-Content-Type-Options": "nosniff",
    "Connection": "keep-alive",
    "X-Download-Options": "noopen",
    "Pragma": "no-cache",
    "Date": "Mon, 25 May 2026 09:10:00 GMT",
    "X-Frame-Options": "SAMEORIGIN",
    "Strict-Transport-Security": "max-age=31536000; includeSubdomains;",
    "Cache-Control": "no-cache, no-store, max-age=0, must-revalidate",
    "X-XSS-Protection": "1; mode=block;",
    "Content-Type": "application/json; charset=UTF-8"
  },
  "code": 200,
  "body": {
    "subscriptionId": "sub-12345678",
    "subscriptionName": "WAF subscription,"
    "status": "ACTIVE",
    "version": "v1.0"
  }
}

Plugin Execution Function operationAddressGroup

Parameters of the operationAddressGroup Function

Function: Manages address groups in batches. You can add or delete IP addresses to or from a WAF address group.

Table 39 Input parameters of the operationAddressGroup function

Parameter

Parameter Type

Parameter Description

Mandatory

ip_list

String

IP address list.

Yes

enterprise_project_id

String

Enterprise project ID.

Yes

policy

String

Policy name.

Yes

operation_type

String

Operation type. SENDING: adding IP addresses. DELETING: deleting IP addresses.

Yes

language

String

Language. The value can be zh-cn or en-us. Uppercase letters and other values are not supported.

zh-cn: simplified Chinese. en-us: English.

No

agency_type

String

Unified adaptation parameter for multi-account management. Use the default value.

No

Table 40 Output parameters of the operationAddressGroup function

Parameter

Parameter Type

Parameter Description

headers

Object

API response headers, including basic information about the request and response, such as the request time, response service, and request ID.

code

Int

Status code, which indicates whether the request is successful.

Response code description:

  • If the value of code is 200, the request is successful.
  • If the value of code is 401, the account or password is incorrect.
  • If the value of code is 403, the permission is insufficient.
  • If the value of code is 404, the requested resource does not exist.

body

Object

Content returned by the API.

Output Example of the operationAddressGroup Function

{
  "headers": {
    "Transfer-Encoding": "chunked",
    "Server": "api-gateway",
    "X-Request-Id": "f7e759ff25266227a1d31f5068a5b3ed",
    "X-Content-Type-Options": "nosniff",
    "Connection": "keep-alive",
    "X-Download-Options": "noopen",
    "Pragma": "no-cache",
    "Date": "Mon, 25 May 2026 09:10:00 GMT",
    "X-Frame-Options": "SAMEORIGIN",
    "Strict-Transport-Security": "max-age=31536000; includeSubdomains;",
    "Cache-Control": "no-cache, no-store, max-age=0, must-revalidate",
    "X-XSS-Protection": "1; mode=block;",
    "Content-Type": "application/json; charset=UTF-8"
  },
  "code": 200,
  "body": {
    "id": "ipg-12345678",
    "name": "updated-ip-group",
    "ips": "192.168.1.1,192.168.1.2,192.168.1.3",
    "size": 3
  }
}