Modifies the name, description, and entries of a specific prefix list.

Description

  • The specified CIDR block must be in the standard form. For example, 10.0.0.0/8 is the correct form of a CIDR block, and 10.0.0.1/8 is the incorrect form. For more information, see the What is CIDR? section in Network FAQ.
  • When you add or delete an entry, you cannot specify duplicate CIDR blocks. Examples:
    • For IPv4 CIDR blocks, you cannot specify the 10.0.0.0/8 CIDR block in two entries. You cannot specify the 10.0.0.1/32 CIDR block in one entry and the 10.0.0.1 CIDR block in another entry. These two CIDR blocks are the same.
    • For IPv6 CIDR blocks, you cannot specify the 2001:fd01:0:0:0:0:0:0/32 CIDR block in one entry and the 2001:fd01::/32 CIDR block in another entry. These two CIDR blocks are the same.
  • The CIDR block in an entry to be added cannot the same as that in an entry to be deleted. For example, when you add an entry in which the 10.0.0.0/8 CIDR block is specified, the entry to be deleted cannot have the 10.0.0.0/8 CIDR block specified.
  • If you want to modify the description of an entry, you must specify the CIDR block (AddEntry.N.Cidr) and new description (AddEntry.N.Description) in the entry.

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 ModifyPrefixList

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

RegionId String Yes cn-chengdu

The region ID.

PrefixListId String Yes pl-x1j1k5ykzqlixdcy****

The ID of the prefix list.

RemoveEntry.N.Cidr String Yes 192.168.1.0/24

Details about the CIDR block of entry N to be deleted in the prefix list. Valid values of N: 0 to 100.

Take note of the following items when you delete the entries:

  • You cannot specify duplicate CIDR blocks.
  • The CIDR blocks cannot be the same as the AddEntry.N.Cidr values.
AddEntry.N.Cidr String Yes 192.168.2.0/24

Details about CIDR blocks of entry N to be added in the prefix list. Valid values of N: 0 to 100.

Take note of the following items when you add the entries:

  • The number of entries in the prefix list cannot be greater than the maximum number of entries allowed for the prefix list. You can call the DescribePrefixListAttributes operation to query the maximum number of entries in a specific prefix list.
  • You cannot specify duplicate CIDR blocks.
  • The CIDR blocks cannot be the same as the RemoveEntry.N.Cidr values.
AddEntry.N.Description String No Description Sample 01

The description of entry N in the prefix list. The description must be 2 to 256 characters in length and cannot start with http:// or https://. Valid values of N: 0 to 100.

PrefixListName String No PrefixListNameSample

The name of the prefix list. The name must be 2 to 128 characters in length and can contain letters, digits, colons (:), periods (.), underscores (_), and hyphens (-). It must start with a letter and cannot start with http://, https://, com.aliyun, or com.alibabacloud.

Description String No This is description.

The description of the prefix list. The description must be 2 to 256 characters in length and cannot start with http:// or https://.

Response parameters

Parameter Type Example Description
RequestId String 38793DB8-A4B2-4AEC-BFD3-111234E9188D

The ID of the request.

Examples

Sample requests

https://ecs.aliyuncs.com/?Action=ModifyPrefixList
&RegionId=cn-chengdu
&PrefixListId=pl-x1j1k5ykzqlixdcy****
&RemoveEntry.1.Cidr=192.168.1.0/24
&AddEntry.1.Cidr=192.168.2.0/24
&AddEntry.1.Description=Description Sample 01
&<Common request parameters>

Sample success responses

XML format

<ModifyPrefixListResponse>
      <RequestId>38793DB8-A4B2-4AEC-BFD3-111234E9188D</RequestId>
</ModifyPrefixListResponse>

JSON format

{
  "RequestId": "38793DB8-A4B2-4AEC-BFD3-111234E9188D"
}

Error codes

HTTP status Error code Error message Description
400 MissingParameter %s The error message returned because a required parameter is not specified.
404 InvalidPrefixListId.NotFound The specified prefix list was not found. The error message returned because the prefix list does not exist.
400 InvalidParameter.PrefixListName The parameter PrefixListName is not valid. The error message returned because the name of the prefix list is invalid.
400 InvalidParameter.CidrDuplicated %s The error message returned because the specified CIDR block is duplicate.
400 InvalidParameter.CidrMalformed %s The error message returned because the specified CIDR block is invalid.
400 LimitExceed.MaxEntries The number of entries exceeds the MaxEntries of the specified prefix list. The error message returned because the maximum number of entries that can be supported by the specified prefix list has been reached.
400 LimitExceed.Entry The number of entries added or removed exceeds the limit. The error message returned because the maximum number of entries that can be added or deleted at a time has been reached.
404 NotSupported.GrayFunction The prefix list is a gray-scale function, not currently supported. The error message returned because this operation is not supported. The prefix list feature is in invitational preview.

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