All Products
Search
Document Center

Cloud Firewall:AddAddressBook

Last Updated:Jul 07, 2026

Creates an address book, including IPv4 address books, ECS tag-based address books, IPv6 address books, domain name address books, and ACK address books.

Operation description

This operation creates an address book, including IPv4 address books, ECS tag-based address books, IPv6 address books, domain name address books, and ACK address books.

Rate limit

The single-user QPS limit for this operation is 10 calls per second. If the limit is exceeded, the API call is throttled, which may affect your business. Call this operation at an appropriate frequency.

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

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

yundun-cloudfirewall:AddAddressBook

create

*AddressBook

acs:yundun-cloudfirewall::{#accountId}:addressbook/*

None None

Request parameters

Parameter

Type

Required

Description

Example

SourceIp deprecated

string

No

The source IP address of the request.

192.0.XX.XX

Lang

string

No

The language type of the address book description.

Valid values:

  • en :

    English.

  • zh :

    Chinese (default)

zh

AddressList

string

No

The addresses in the address book. Separate multiple addresses with commas (,). Use a space to separate an address from its description within a single address element.

Note

This parameter is required when GroupType is set to ip, port, or domain.

  • When GroupType is set to ip, enter IP addresses in the address list. Example: 192.0.XX.XX/32 Development CIDR block,10.0.0.X/24,192.0.XX.XX/24 Test CIDR block.

  • When GroupType is set to port, enter ports or port ranges in the address list. Example: 80 HTTP port,100/200,3306 Database port.

  • When GroupType is set to domain, enter domain names in the address list. Example: example.com Test domain name,aliyundoc.com,www.aliyun.com Alibaba Cloud official website.

192.0.XX.XX/32 ,192.0.XX.XX/24

Description

string

Yes

The description of the address book.

sz-001

GroupName

string

Yes

The name of the address book.

sz-001

GroupType

string

Yes

The type of the address book.

Valid values:

  • port :

    port address book.

  • ackLabel :

    ACK pod label address book.

  • ipv6 :

    IPv6 address book.

  • ip :

    IPv4 address book.

  • domain :

    domain name.

  • ackNamespace :

    ACK namespace address book.

  • tag :

    ECS tag-based public IP address book.

  • tagPrivate :

    ECS label-based private endpoint address book.

  • assetIpv6 :

    IPv6 public assets address book.

  • asset :

    IPv4 public assets address book.

ip

AutoAddTagEcs

string

No

Indicates whether to automatically add the public IP addresses of Elastic Compute Service (ECS) instances that match the specified tags to the address book.

Valid values:

  • 0 :

    Do not automatically add (default).

  • 1 :

    Automatically add.

1

TagRelation

string

No

The logical relationship among multiple ECS tags to match.

Valid values:

  • or :

    OR. The public IP addresses of Elastic Compute Service (ECS) instances that match any of the specified labels are added to the address book.

  • and :

    AND (default). The public IP addresses of Elastic Compute Service (ECS) instances are added to the address book only when the instances match all specified labels.

and

TagList

array<object>

No

The ECS tag list.

object

No

The ECS tag.

TagValue

string

No

The value of the ECS tag.

1

TagKey

string

No

The key of the ECS tag.

TXY

AckClusterConnectorId

string

No

The ACK cluster connector ID. You can obtain the value from the following operation:

ac-7c1bad6c3cc84c33baab1

AckNamespaces

array

No

The list of ACK cluster pod namespaces.

Note

A maximum of 10 namespaces are supported.

string

No

The ACK cluster pod namespace. You can obtain the value from the following operation:

Note

This parameter is required when GroupType is set to ackNamespace.

kube-system

AckLabels

array<object>

No

The list of ACK cluster pod labels.

Note

A maximum of 10 labels are supported.

object

No

The ACK cluster pod label. You can obtain the value from the following operation:

Note

This parameter is required when GroupType is set to ackLabel.

Key

string

No

The key of the ACK cluster pod label.

app

Value

string

No

The value of the ACK cluster pod label.

storage-operator

AssetMemberUids

array

No

The list of member accounts for the asset address book.

integer

No

The list of member accounts.

13580xxxxxx6271

AssetRegionResourceTypes

array<object>

No

The list of regions and resource types for the asset address book.

array<object>

No

The list of regions and resource types.

AssetRegionId

string

No

The region ID of the asset.

Valid values:

  • all :

    all regions.

all

ResourceType

object

No

The asset type.

Ipv4

object

No

The IPv4 asset type.

SlbEIP

boolean

No

The asset type: SlbEIP.

Valid values:

  • true :

    Enabled.

  • false :

    Disabled.

true

NatPublicIP

boolean

No

The asset type: NatPublicIP.

Valid values:

  • true :

    Enabled.

  • false :

    Disabled.

false

BastionHostIngressIP

boolean

No

The asset type: BastionHostIngressIP.

Valid values:

  • true :

    Enabled.

  • false :

    Disabled.

false

EniEIP

boolean

No

The asset type: EniEIP.

Valid values:

  • true :

    Enabled.

  • false :

    Disabled.

false

NlbEIP

boolean

No

The asset type: NlbEIP.

Valid values:

  • true :

    Enabled.

  • false :

    Disabled.

false

ApiGatewayEIP

boolean

No

The asset type: ApigEIP.

Valid values:

  • true :

    Enabled.

  • false :

    Disabled.

false

EcsPublicIP

boolean

No

The asset type: EcsPublicIP.

Valid values:

  • true :

    Enabled.

  • false :

    Disabled.

false

BastionHostIP

boolean

No

The asset type: BastionHostIP.

Valid values:

  • true :

    Enabled.

  • false :

    Disabled.

false

BastionHostEgressIP

boolean

No

The asset type: BastionHostEgressIP.

Valid values:

  • true :

    Enabled.

  • false :

    Disabled.

false

AlbEIP

boolean

No

The asset type: AlbEIP.

Valid values:

  • true :

    Enabled.

  • false :

    Disabled.

false

GaEIP

boolean

No

The asset type: GaEIP.

Valid values:

  • true :

    Enabled.

  • false :

    Disabled.

false

AiGatewayEIP

boolean

No

The asset type: AIGatewayEIP.

Valid values:

  • true :

    Enabled.

  • false :

    Disabled.

false

EIP

boolean

No

The asset type: EIP.

Valid values:

  • true :

    Enabled.

  • false :

    Disabled.

false

NatEIP

boolean

No

The asset type: NatEIP.

Valid values:

  • true :

    Enabled.

  • false :

    Disabled.

false

SlbPublicIP

boolean

No

The asset type: SlbPublicIP.

Valid values:

  • true :

    Enabled.

  • false :

    Disabled.

false

EcsEIP

boolean

No

The asset type: EcsEIP.

Valid values:

  • true :

    Enabled.

  • false :

    Disabled.

false

HAVIP

boolean

No

The asset type: HAVIP.

Valid values:

  • true :

    Enabled.

  • false :

    Disabled.

false

Ipv6

object

No

The IPv6 asset type.

SlbIPv6

boolean

No

The asset type: SlbIPv6.

Valid values:

  • true :

    Enabled.

  • false :

    Disabled.

false

NlbIPv6

boolean

No

The asset type: NlbIPv6.

Valid values:

  • true :

    Enabled.

  • false :

    Disabled.

false

EniEIPv6

boolean

No

The asset type: EniEIPv6.

Valid values:

  • true :

    Enabled.

  • false :

    Disabled.

false

AlbIPv6

boolean

No

The asset type: AlbIPv6.

Valid values:

  • true :

    Enabled.

  • false :

    Disabled.

false

GaEIPv6

boolean

No

The asset type: GaEIPv6.

Valid values:

  • true :

    Enabled.

  • false :

    Disabled.

false

AiGatewayEIPv6

boolean

No

The asset type: AIGatewayEIPv6.

Valid values:

  • true :

    Enabled.

  • false :

    Disabled.

false

EcsIPv6

boolean

No

The asset type: EcsIPv6.

Valid values:

  • true :

    Enabled.

  • false :

    Disabled.

false

ApiGatewayEIPv6

boolean

No

The asset type: ApigEIPv6.

Valid values:

  • true :

    Enabled.

  • false :

    Disabled.

false

When you call this operation, you must include common request parameters in addition to the operation-specific request parameters described in this topic. For more information about common request parameters, see Common parameters. For the request format, see the request examples in the Examples section of this topic.

Response elements

Element

Type

Description

Example

object

GroupUuid

string

The unique ID of the address book returned after the address book is created.

f04ac7ce-628b-4cb7-be61-310222b7****

RequestId

string

The request ID.

CBF1E9B7-D6A0-4E9E-AD3E-2B47E6C2****

Examples

Success response

JSON format

{
  "GroupUuid": "f04ac7ce-628b-4cb7-be61-310222b7****",
  "RequestId": "CBF1E9B7-D6A0-4E9E-AD3E-2B47E6C2****"
}

Error codes

HTTP status code

Error code

Error message

Description

400 ErrorParametersGroupType The group type is invalid. The group type is invalid.
400 ErrorParametersUid The aliUid parameter is invalid. The aliUid parameter is invalid.
400 ErrorParametersGroupAddress The IP address of the address group is invalid. The IP address of the address group is invalid.
400 ErrorDBSelect An error occurred while querying database. An error occurred while querying database.
400 ErrorAddressCountExceed The maximum number of addresses is exceeded. The maximum number of address is exceeded.
400 ErrorAddressGroupExist The address group already exists. The address group already exists.
400 ErrorParamDomain The parameter Domain is invalid. The parameter Domain is invalid.
400 ErrorUUIDNew The UUID is invalid. The UUID is invalid.
400 ErrorAddressGroupCountExceed The maximum number of address group is exceeded. The maximum number of address group is exceeded.
400 ErrorDBInsert An error occurred while performing an insert operation in the database. An error occurred while performing an insert operation in the database.
400 ErrorRecordLog An error occurred while updating the operation log. An error occurred while updating the operation log.
400 ErrorDBUpdate internal error: sql updat. An error occurred while updating the database.
400 ErrorParametersTagKey The tag key is invalid. The TagKey parameter is invalid.
400 ErrorParametersTagList The tag list is invalid. The tag list is invalid.
400 ErrorTagCountExceed The maximum number of tag is exceeded. The maximum number of tag is exceeded.
400 ErrorParametersTagRelation The tag relation is invalid. The TagRelation parameter is invalid.
400 ErrorParametersGroupPort The group port is invalid. The group port is invalid.
400 ErrorPortCountExceed The maixmum number of port in the group is exceeded. The maixmum number of port in the group is exceeded.
400 InternalError The request processing has failed due to some unknown error. Request processing failed due to some unknown error.
400 ErrorAckClusterConnectorBusy The ACK cluster connector is operating. The ACK cluster connector is operating.
400 ErrorParameters Parameters error. Parameter error.
400 ErrorParametersMemberUidMismatch The memberUid mismatch the aliUid. The memberUid mismatch the aliUid.
404 ErrorAckClusterConnectorNotFound The specified resource ACK cluster connector is not found. The specified resource ACK cluster connector is not found.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.