ALIYUN::ECS::PrefixList类型用于创建前缀列表。
语法
{
  "Type": "ALIYUN::ECS::PrefixList",
  "Properties": {
    "MaxEntries": Integer,
    "Description": String,
    "PrefixListName": String,
    "Entries": List,
    "AddressFamily": String
  }
}属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| MaxEntries | Integer | 是 | 否 | 前缀列表支持的最大条目容量。 | 取值范围:1~200。 | 
| Description | String | 否 | 是 | 前缀列表的描述信息。 | 长度为2~256个字符,不能以 | 
| PrefixListName | String | 是 | 是 | 前缀列表的名称。 | 长度为2~128个字符,必须以大小写字母或中文开头,不能以 | 
| Entries | List | 否 | 是 | 前缀列表的条目信息。 | 最多支持设置200个条目。 更多信息,请参见Entries属性。 | 
| AddressFamily | String | 是 | 否 | 前缀列表的地址群。 | 取值: 
 | 
Entries语法
"Entries": [
  {
    "Description": String,
    "Cidr": String
  }
]Entries属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| Description | String | 否 | 否 | 前缀列表条目的描述信息。 | 长度为2~32个字符,可以是英文或中文字符,不能以 | 
| Cidr | String | 是 | 否 | 前缀列表条目的CIDR地址块信息。 | CIDR地址块需满足如下条件: 
 默认值:空。 说明  前缀列表的条目数量不能大于最大条目容量(MaxEntries)。 | 
返回值
Fn::GetAtt
PrefixListId:前缀列表的ID。
示例
JSON格式
{
  "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"
        ]
      }
    }
  }
}