ALIYUN::ECS::PrefixList is used to create 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 | The maximum number of entries in the prefix list. | Valid values: 1 to 200. |
Description | String | No | Yes | The description of the prefix list. | The description must be 2 to 256 characters in length. It cannot start with http:// or https:// . By default, this property is empty.
|
PrefixListName | String | Yes | Yes | The name of the prefix list. | The name must be 2 to 128 characters in length. It must start with a letter but cannot
start with http:// , https:// , com.aliyun , or com.alibabacloud . The name can contain letters, digits, colons (:), underscores (_), periods (.),
and hyphens (-).
|
Entries | List | No | Yes | The details of entries in the prefix list. | You can specify up to 200 entries.
For more information, see Entries properties. |
AddressFamily | String | Yes | No | The IP address family of 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 | The description that is contained in the entry. | The description must be 2 to 32 characters in length, and can contain letters. The
description cannot start with http:// or https:// .
|
Cidr | String | Yes | No | The CIDR block that is contained in the entry. |
The CIDR block must meet the following conditions:
By default, this property is empty. Note The total number of entries cannot exceed the value of the MaxEntries property.
|
Response parameters
Fn::GetAtt
PrefixListId: the 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"
]
}
}
}
}