All Products
Search
Document Center

Cloud Firewall:ModifyAddressBook

Last Updated:Sep 02, 2024

Modifies the address book that is specified in an access control policy.

Operation description

You can call the ModifyAddressBook operation to modify the address book that is configured for access control.

Limits

You can call this operation up to 10 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
yundun-cloudfirewall:ModifyAddressBookupdate
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
SourceIpdeprecatedstringNo

The source IP address of the request.

192.0.XX.XX
LangstringNo

The language of the content within the request and response. Valid values:

  • zh: Chinese (default)
  • en: English
zh
AddressListstringNo

The addresses in the address book. Separate multiple addresses with commas (,). If you set GroupType to ip, port, or domain, you must specify this parameter.

  • If you set GroupType to ip, you must specify IP addresses for the address book. Example: 1.2.XX.XX/32,1.2.XX.XX/24.
  • If you set GroupType to port, you must specify port numbers or port ranges for the address book. Example: 80/80,100/200.
  • If you set GroupType to domain, you must specify domain names for the address book. Example: demo1.aliyun.com,demo2.aliyun.com.
192.0.XX.XX/32, 192.0.XX.XX/24
DescriptionstringYes

The description of the address book.

bj-001
GroupNamestringYes

The name of the address book.

bj-001
GroupUuidstringYes

The ID of the address book.

Note To modify the address book, you must provide the ID of the address book. You can call the DescribeAddressBook operation to query the ID.
0657ab9d-fe8b-4174-b2a6-6baf358e****
AutoAddTagEcsstringNo

Specifies whether to automatically add public IP addresses of Elastic Compute Service (ECS) instances to the address book if the instances match the specified tags. Valid values:

  • 1: yes
  • 0: no
1
TagRelationstringNo

The logical relationship among ECS tags. Valid values:

  • and: Only the public IP addresses of ECS instances that match all the specified tags can be added to the address book.
  • or: The public IP addresses of ECS instances that match one of the specified tags can be added to the address book.
and
TagListarray<object>No

The ECS tags that you want to match.

objectNo
TagValuestringNo

The value of ECS tag N that you want to match.

1
TagKeystringNo

The key of ECS tag N that you want to match.

TXY
ModifyModestringNo

Modification mode with the following values:

  • Cover: Use the value of the AddressList parameter to overwrite the original address book.
  • Append: After the original address book, append addresses using the value of the AddressList parameter.
  • Delete: Delete addresses using the value of the AddressList parameter from the address book.
Note When GroupType is ip, ipv6, port, or domain, if this parameter is not configured, the default is to use the Cover method to modify the address book.
Notice When GroupType is tag, this parameter must be empty.
Cover

All Alibaba Cloud API operations must include common request parameters. For more information about common request parameters, see Common parameters.

For more information about sample requests, see the "Examples" section of this topic.

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

CBF1E9B7-D6A0-4E9E-AD3E-2B47E6C2837D

Examples

Sample success responses

JSONformat

{
  "RequestId": "CBF1E9B7-D6A0-4E9E-AD3E-2B47E6C2837D"
}

Error codes

HTTP status codeError codeError messageDescription
400ErrorParametersUidThe aliUid parameter is invalid.The aliUid parameter is invalid.
400ErrorDBSelectAn error occurred while querying database.An error occurred while querying database.
400ErrorAddressCountExceedThe maximum number of addresses is exceeded.The maximum number of address is exceeded.
400ErrorParametersGroupAddressThe IP address of the address group is invalid.The IP address of the address group is invalid.
400ErrorParamDomainThe parameter Domain is invalid.The parameter Domain is invalid.
400ErrorAddressGroupNotExistThe address group does not exist.The address group does not exist.
400ErrorDBInsertAn error occurred while performing an insert operation in the database.An error occurred while performing an insert operation in the database.
400ErrorRecordLogAn error occurred while updating the operation log.An error occurred while updating the operation log.
400ErrorParametersGroupPortThe group port is invalid.The group port is invalid.
401ErrorAuthenticationAn authentication error occurred.An authentication error occurred.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-08-07API Description Update. The Error code has changed. The request parameters of the API has changedView Change Details