Modifies the configuration of a prefix list.
Operation description
-
ModifyVpcPrefixList is an asynchronous operation. After a request is sent, the system returns a request ID. However, the configuration of the prefix list instance is not immediately modified because the modification node is still running in the background. You can invoke ListPrefixLists to query the status of the prefix list instance.
If the prefix list instance is in the Modifying state, the configuration of the prefix list instance is being modified.
If the prefix list instance is in the Created state, the configuration of the prefix list instance is modified.
After the configuration of the prefix list instance is modified, you can invoke GetVpcPrefixListAssociations to query the associations of the prefix list to check whether the associated resources use the modified Classless Inter-Domain Routing (CIDR) blocks. If the Status parameter of the prefix list association is Created, the associated resources use the modified CIDR blocks.
-
ModifyVpcPrefixList does not support concurrent modifications to the same prefix list.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:ModifyVpcPrefixList |
update |
*PrefixList
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| PrefixListId |
string |
Yes |
The instance ID of the prefix list that you want to modify. |
pl-0b7hwu67**** |
| PrefixListName |
string |
No |
The new name of the prefix list. The name must be 1 to 128 characters in length and cannot start with |
newname |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters. Note
If you do not specify this parameter, the system automatically uses the RequestId of the API request as the ClientToken. The RequestId may differ for each API request. |
123e4567-e89b-12d3-a456-426655440000 |
| DryRun |
boolean |
No |
Specifies whether to perform a dry run. Valid values:
|
false |
| AddPrefixListEntry |
array<object> |
No |
The list of Classless Inter-Domain Routing (CIDR) blocks to be added to the prefix list instance. |
|
|
object |
No |
The Classless Inter-Domain Routing (CIDR) block to be added to the prefix list instance. |
||
| Cidr |
string |
No |
The Classless Inter-Domain Routing (CIDR) block to be added to the prefix list instance. Note
If the CIDR block already exists in the prefix list, only the value of AddPrefixListEntry.N.Description is modified, which means only the description of the CIDR block is modified. |
172.16.0.0/12 |
| Description |
string |
No |
The description of the Classless Inter-Domain Routing (CIDR) block to be added to the prefix list instance. The description must be 1 to 128 characters in length and cannot start with |
newcidr |
| RemovePrefixListEntry |
array<object> |
No |
The list of Classless Inter-Domain Routing (CIDR) blocks to be deleted from the prefix list instance. |
|
|
object |
No |
The list of Classless Inter-Domain Routing (CIDR) blocks to be deleted from the prefix list instance. |
||
| Cidr |
string |
No |
The Classless Inter-Domain Routing (CIDR) block to be deleted from the prefix list instance. |
192.168.0.0/16 |
| Description |
string |
No |
The description of the Classless Inter-Domain Routing (CIDR) block to be deleted from the prefix list. |
cidr |
| RegionId |
string |
Yes |
The region ID of the prefix list that you want to modify. |
cn-hangzhou |
| PrefixListDescription |
string |
No |
The new description of the prefix list. The description must be 1 to 256 characters in length and cannot start with |
newdescription |
| MaxEntries |
integer |
No |
The new maximum number of Classless Inter-Domain Routing (CIDR) block entries in the prefix list instance. |
20 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| PrefixListId |
string |
The instance ID of the prefix list. |
pl-0b7hwu67**** |
| RequestId |
string |
The request ID. |
54B48E3D-DF70-471B-AA93-08E683A1B45 |
Examples
Success response
JSON format
{
"PrefixListId": "pl-0b7hwu67****",
"RequestId": "54B48E3D-DF70-471B-AA93-08E683A1B45"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | ResourceNotFound.PrefixList | The specified resource of prefixList is not found. | The prefix list does not exist. |
| 400 | OperationFailed.CidrCountExceedMaxCount | The operation is failed because of cidrCountExceedMaxCount. | The number of CIDR blocks specified exceeds the maximum allowed value of cidrMaxCount. |
| 400 | OperationDenied.RemoveCountExceedExistCount | The operation is not allowed because of remove-count exceed exist-count. | The number of CIDR blocks to delete exceeds the number owned by the prefix list. |
| 400 | DuplicatedParam.CidrBlock | The param of cidrBlock is duplicated. | The error message returned because a duplicate CIDR block is specified. |
| 400 | IllegalParam.CidrBlock | The param of cidrBlock is illegal. | The error message returned because the value of the cidrBlock parameter is invalid. |
| 400 | IllegalParam.CidrName | The param of cidrName is illegal. | The specified cidrName is invalid. |
| 400 | OperationDenied.SystemPrefixList | This is not allowed to operate system prefixList. | |
| 400 | OperationFailed.OperateShareResource | This is not allowed to operate shared prefixList. | You cannot operate on a shared prefix list. |
| 400 | IncorrectStatus.PrefixList | The status of prefixList is incorrect. | The prefix list is in an unstable state. |
| 400 | QuotaExceeded.PrefixListCidrCount | The quota of prefixList entry maxEntry count is exceeded. | The number of allowed routes exceeds the upper limit. |
| 400 | QuotaExceeded | Route entry quota exceeded in associated route table. | The maximum number of routes supported by the prefix list exceeds the maximum number of routes supported by the associated route table. |
| 400 | OperationDenied.QuotaExceededWithNetworkAcl | If the prefix list increases MaxEntries, the quota for the maximum number of entries for the associated network ACL instance %s is exceeded. | If the prefix list increases the maximum number of entries, the quota for the maximum number of entries for the associated network ACL instance is exceeded. |
| 400 | ServiceUnavailable | The request has failed due to a temporary failure of the server. | The request failed due to a temporary server error. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.