All Products
Search
Document Center

Web Application Firewall:AddAddress

Last Updated:Mar 12, 2026

Adds one or more IP addresses or CIDR blocks to an address book in a Web Application Firewall (WAF) instance. Address books can be referenced in protection rules for centralized IP address management.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The ID of the WAF instance.

Note

Call DescribeInstance to obtain the WAF instance ID.

waf_cdnsdf3****

RuleId

integer

Yes

The ID of the address book.

12345678

AddressList

array

Yes

The addresses to add to the address book.

string

No

An address entry. You can specify an IP address or a CIDR block in IPv4 or IPv6 format.

XX.XX.XX.XX

ResourceManagerResourceGroupId

string

No

The ID of the Alibaba Cloud resource group.

rg-acfm***q

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

2EFCFE18-78F8-5079-B312-07***48B

Examples

Success response

JSON format

{
  "RequestId": "2EFCFE18-78F8-5079-B312-07***48B"
}

Error codes

HTTP status code

Error code

Error message

Description

400 Defense.Control.DefenseAddressInvalid The address in the address book is illegal. The address in the address book is illegal.
400 Defense.Control.DefenseAddressOversize The number of addresses in the address book exceeds the limit. The number of addresses in the address book exceeds the limit.
400 Defense.Control.DefenseAddressOperationTooFrequent Address book operations are too frequent. Address book operations are too frequent. Please try again later.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.