Modifies the name, description, and other attributes of a specified prefix list, and supports adding, modifying, and deleting entries.
Operation description
Operation description
The specified Classless Inter-Domain Routing (CIDR) blocks must be in standard form. For example, 10.0.0.0/8 is a valid CIDR block, whereas 10.0.0.1/8 is a fault form. For more information, see What is CIDR?.
- When you add or delete entries, you cannot specify duplicate CIDR blocks. Examples:
For IPv4 CIDR blocks: You cannot specify two entries that both have the CIDR block 10.0.0.0/8. You cannot specify two entries whose CIDR blocks are 10.0.0.1/32 and 10.0.0.1 respectively because these two CIDR blocks are duplicates.
For IPv6 CIDR blocks: You cannot specify two entries whose CIDR blocks are 2001:fd01:0:0:0:0:0:0/32 and 2001:fd01::/32 respectively because these two CIDR blocks are duplicates.
The CIDR blocks of entries to be added cannot be the same as those of entries to be deleted. For example, when you add an entry whose CIDR block is 10.0.0.0/8, the entries to be deleted cannot contain the CIDR block 10.0.0.0/8.
To modify the description of an entry, specify the CIDR block of the entry (
AddEntry.N.Cidr) and the new description (AddEntry.N.Description).
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:ModifyPrefixList |
update |
*PrefixList
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID. You can call DescribeRegions to query the most recent region list. |
cn-chengdu |
| PrefixListId |
string |
Yes |
The prefix list ID. |
pl-x1j1k5ykzqlixdcy**** |
| PrefixListName |
string |
No |
The name of the prefix list. The name must be 2 to 128 characters in length and must start with a letter or a Chinese character. It cannot start with |
PrefixListNameSample |
| Description |
string |
No |
The description of the prefix list. The description must be 2 to 256 characters in length and cannot start with |
This is description. |
| AddEntry |
array<object> |
No |
The information about entries to add to the prefix list. |
|
|
object |
No |
The information about entries to add to the prefix list. |
||
| Description |
string |
No |
The description of the prefix list entry. The description must be 2 to 32 characters in length and cannot start with |
Description Sample 01 |
| Cidr |
string |
Yes |
The Classless Inter-Domain Routing (CIDR) block of the prefix list entry to add. Valid values of N: 0 to 200. Take note of the following items:
|
192.168.2.0/24 |
| RemoveEntry |
array<object> |
No |
The information about entries to delete from the prefix list. |
|
|
object |
No |
The information about entries to delete from the prefix list. |
||
| Cidr |
string |
Yes |
The Classless Inter-Domain Routing (CIDR) block of the prefix list entry to delete. Valid values of N: 0 to 200. Take note of the following items:
|
192.168.1.0/24 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
38793DB8-A4B2-4AEC-BFD3-111234E9188D |
Examples
Success response
JSON format
{
"RequestId": "38793DB8-A4B2-4AEC-BFD3-111234E9188D"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | MissingParameter | %s | A parameter is not specified. |
| 400 | InvalidParameter.PrefixListName | The parameter PrefixListName is not valid. | The prefix list name is invalid. |
| 400 | InvalidDescription.Malformed | The specified Description is wrongly formed. | |
| 400 | InvalidParameter.CidrDuplicated | %s | Duplicate CIDR blocks are specified. |
| 400 | InvalidParameter.CidrMalformed | %s | The specified CIDR block is invalid. |
| 400 | LimitExceed.MaxEntries | The number of entries exceeds the MaxEntries of the specified prefix list. | The number of specified entries exceeds the MaxEntries value. |
| 400 | LimitExceed.Entry | The number of entries added or removed exceeds the limit. | The number of entries to add or remove at a time exceeds the upper limit. |
| 400 | TaskConflict | The operation is too frequent, please wait a moment and try again. | Operations are too frequent. Wait a moment and try again. |
| 404 | InvalidPrefixListId.NotFound | The specified prefix list was not found. | The prefix list does not exist. |
| 404 | InvalidRegionId.NotFound | The specified RegionId does not exist. | The specified region ID does not exist. |
| 409 | OperationConflict | Request was denied due to conflict with a previos request. | The requested resource conflicts with a previous request. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.