You can call this operation to create an access control address book. Supported address book types are IP address books, Elastic Compute Service (ECS) tag address books, port address books, and domain address books.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes AddAddressBook

The operation that you want to perform. Set the value to AddAddressBook.

Description String Yes DEMO address book

The description of the address book.

GroupName String Yes demo_address_book

The name of the address book.

GroupType String Yes ip

The type of the address book. Valid values:

  • ip: IP address book
  • domain: domain address book
  • port: port address book
  • tag: ECS tag address book
AddressList String No 1.2.3.4/32, 1.2.3.0/24

The addresses to specify in the address book. Separate multiple addresses with commas (,).

Note If the GroupType parameter is set to ip, port or domain, this parameter is required.
  • If the GroupType parameter is set to ip, this parameter specifies the IP addresses. Example: 1.2.3.4/32, 1.2.3.0/24
  • If the GroupType parameter is set to port, this parameter specifies the ports or the port ranges. Example: 80, 100/200
  • If the GroupType parameter is set to domain, this parameter specifies the domain names. Example: demo1.aliyun.com, demo2.aliyun.com
AutoAddTagEcs String No 1

Specifies whether to automatically add ECS public IP addresses to the address book if they match the specified tags. Valid values:

  • 1: Yes
  • 0: No
Lang String No zh

The language of the request and response. Valid values:

  • en: English
  • zh: Chinese
SourceIp String No 1.2.3.4

The source IP address of the request.

TagList.N.TagKey String No key1

The key of the ECS tag.

TagList.N.TagValue String No value1

The value of the ECS tag.

TagRelation String No and

The logical relation among ECS tags. Valid values:

  • and: Only ECS public IP addresses that match all the specified tags are added to the address book.
  • or: ECS public IP addresses that match any of the specified tags are added to the address book.

Response parameters

Parameter Type Example Description
GroupUuid String f04ac7ce-628b-4cb7-be61-310222b718e8

The unique ID of the address book returned.

RequestId String CBF1E9B7-D6A0-4E9E-AD3E-2B47E6C2837D

The ID of the request.

Examples

Sample requests


http(s)://[Endpoint]/? Action=AddAddressBook
&Description=DEMO address book
&GroupName=demo_address_book
&GroupType=ip
&AddressList=1.2.3.4/32,1.2.3.0/24
&<Common request parameters>

Sample success responses

XML format

<AddAddressBook>
	  <RequestId>B2841452-CB8D-4F7D-B247-38E1CF7334F8</RequestId>
	  <GroupUuid>0580bbd0-24cd-47ae-9e5a-f5a099251e32</GroupUuid>
    </AddAddressBook>

JSON format

{
	"RequestId":"B2841452-CB8D-4F7D-B247-38E1CF7334F8",
	"GroupUuid":"0580bbd0-24cd-47ae-9e5a-f5a099251e32"
}

Error codes

For a list of error codes, visit the API Error Center.