ALIYUN::ECS::PrefixList creates a prefix list.
Syntax
{
"Type": "ALIYUN::ECS::PrefixList",
"Properties": {
"MaxEntries": Integer,
"Description": String,
"PrefixListName": String,
"Entries": List,
"AddressFamily": String
}
}
Properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
MaxEntries |
Integer |
Yes |
No |
Maximum number of entries in the prefix list. |
Valid values: 1 to 200. |
|
Description |
String |
No |
Yes |
Description of the prefix list. |
2–256 characters. Cannot start with |
|
PrefixListName |
String |
Yes |
Yes |
Name of the prefix list. |
2–128 characters. Must start with a letter. Cannot start with |
|
Entries |
List |
No |
Yes |
Entries in the prefix list. |
You can specify up to 200 entries. For more information, see Entries properties. |
|
AddressFamily |
String |
Yes |
No |
IP address family for entries in the prefix list. |
Valid values:
|
Entries syntax
"Entries": [
{
"Description": String,
"Cidr": String
}
]
Entries properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
Description |
String |
No |
No |
Description of the entry. |
2–32 characters. Can contain letters. Cannot start with |
|
Cidr |
String |
Yes |
No |
CIDR block in the entry. |
The CIDR block must meet the following conditions:
Empty by default. Note
The number of entries cannot exceed MaxEntries. |
Return values
Fn::GetAtt
PrefixListId: ID of the prefix list.
Examples
JSON format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"MaxEntries": {
"Type": "Number",
"Description": "The maximum number of entries that the prefix list can contain. Valid values: 1 to 200.",
"MinValue": 1,
"MaxValue": 200,
"Default": 1
},
"PrefixListName": {
"Type": "String",
"Description": "The name of the prefix. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with http://, https://, com.aliyun, or com.alibabacloud. It can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-).",
"Default": "PrefixListNameSample"
},
"Entries": {
"Type": "Json",
"Default": [{
"Cidr": "192.168.1.0/24"
}],
"MaxLength": 200
},
"AddressFamily": {
"Type": "String",
"Description": "The IP address family. Valid values: IPv4 IPv6",
"AllowedValues": [
"Ipv4",
"Ipv6"
],
"Default": "Ipv4"
}
},
"Resources": {
"PrefixList": {
"Type": "ALIYUN::ECS::PrefixList",
"Properties": {
"MaxEntries": {
"Ref": "MaxEntries"
},
"PrefixListName": {
"Ref": "PrefixListName"
},
"Entries": {
"Ref": "Entries"
},
"AddressFamily": {
"Ref": "AddressFamily"
}
}
}
},
"Outputs": {
"PrefixListId": {
"Description": "The ID of the prefix list.",
"Value": {
"Fn::GetAtt": [
"PrefixList",
"PrefixListId"
]
}
}
}
}