Creates a prefix list.
Operation description
PrefixListNameSample
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The ID of the region in which to create the prefix list. | cn-chengdu |
MaxEntries | integer | Yes | The maximum number of entries that the prefix list can contain. Valid values: 1 to 200. | 10 |
AddressFamily | string | Yes | The IP address family. Valid values:
| IPv4 |
ClientToken | string | No | The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that it is unique among different requests. The | 0c593ea1-3bea-11e9-b96b-88e9fe637760 |
PrefixListName | string | Yes | The name of the prefix list. The name must be 2 to 128 characters in length. It must start with a letter and 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. |
Entry | object [] | No | ||
Description | string | No | The description in entry N. The description must be 2 to 32 characters in length and cannot start with | Description Sample 01 |
Cidr | string | Yes | The CIDR block in entry N. Valid values of N: 0 to 200. Take note of the following items:
For more information about CIDR blocks, see the "What is CIDR block?" section of the Network FAQ topic. This parameter is empty by default. | 192.168.1.0/24 |
Response parameters
Examples
Sample success responses
JSON
format
{
"PrefixListId": "pl-x1j1k5ykzqlixdcy****",
"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.AddressFamily | The parameter AddressFamily should be IPv4 or IPv6. | The specified AddressFamily parameter is invalid. The valid values of this parameter are IPv4 and IPv6. |
400 | InvalidParameter | %s | The specified parameter is invalid. |
400 | InvalidParameter.PrefixListName | The parameter PrefixListName is not valid. | The prefix list name is invalid. |
400 | InvalidDescription.Malformed | The specified Description is wrongly formed. | The resource description is invalid. The description must be 2 to 256 characters in length and cannot start with http:// or https://. |
400 | InvalidClientToken.ValueNotSupported | The ClientToken provided is invalid. | The specified ClientToken parameter is invalid. |
400 | InvalidParameter.CidrMalformed | %s | The specified CIDR block is invalid. |
400 | InvalidParameter.CidrDuplicated | %s | Duplicate CIDR blocks are specified. |
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 | LimitExceed.MaxEntries | The number of entries exceeds the MaxEntries of the specified prefix list. | The number of specified entries exceeds the MaxEntries value. |
404 | LimitExceed.PrefixListPerRegion | The number of prefix lists in the region exceeds the limit. | The maximum number of prefix lists in the current region has been reached. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||
---|---|---|---|---|---|---|---|---|
2023-11-13 | The Error code has changed | see changesets | ||||||
|