文档

ALIYUN::VPC::PrefixList

更新时间:

ALIYUN::VPC::PrefixList类型用于创建前缀列表。

语法

{
  "Type": "ALIYUN::VPC::PrefixList",
  "Properties": {
    "MaxEntries": Integer,
    "PrefixListDescription": String,
    "IpVersion": String,
    "PrefixListName": String,
    "Entries": List,
    "Tags": List,
    "ResourceGroupId": String 
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

MaxEntries

Integer

前缀列表中CIDR地址块的最大条目数

默认值为50条。

PrefixListDescription

String

前缀列表的描述信息。

描述长度为1~256个字符,不能以http://https://开头。

IpVersion

String

IP版本类型。

取值:

  • IPv4(默认值):IPv4类型。

  • IPv6:IPv6类型。

PrefixListName

String

前缀列表的名称。

名称长度为1~128个字符,不能以http://https://开头。

Entries

List

前缀列表CIDR地址块列表。

更多信息,请参见Entries属性

Tags

List

标签列表。

最多支持输入20个标签。更多信息,请参见Tags属性

ResourceGroupId

String

前缀列表所属的资源组ID。

Entries语法

"Entries": [
  {
    "Description": String,
    "Cidr": String
  }
]

Entries属性

属性名称

类型

必须

允许更新

描述

约束

Description

String

前缀列表CIDR地址块的描述信息。

描述长度为1~256个字符,不能以http://https://开头。

Cidr

String

前缀列表的CIDR地址块。

Tags语法

"Tags": [
  {
    "Key": String,
    "Value": String
  }
]

Tags属性

属性名称

类型

必须

允许更新

描述

约束

Key

String

标签键。

一旦传入该值,则不允许为空字符串。一个标签键最多支持64个字符,必须以字母或中文开头,可包含数字、半角句号(.)、下划线(_)和短划线(-),不能以aliyunacs:开头,不能包含http://或者https://

Value

String

标签值。

一旦传入该值,可以为空字符串。

一个标签值最多支持128个字符,必须以字母或中文开头,可包含数字、半角句号(.)、下划线(_)和短划线(-),不能以aliyunacs:开头,不能包含http://或者https://

返回值

Fn::GetAtt

  • MaxEntries:前缀列表中CIDR地址块的最大条目数。

  • PrefixListDescription:前缀列表的描述信息。

  • IpVersion:IP版本类型。

  • PrefixListId:前缀列表的实例ID。

  • PrefixListName:前缀列表的名称。

  • CreateTime:前缀列表的创建时间。

  • ShareType:前缀列表的共享类型。

  • Tags:标签列表。

  • ResourceGroupId:前缀列表所属的资源组ID。

  • OwnerId:前缀列表所属的阿里云账号(主账号)。 

  • Entries:前缀列表CIDR地址块列表。

示例

  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters: {}
    Resources:
      ExtensionResource:
        Type: ALIYUN::VPC::PrefixList
        Properties:
          MaxEntries: 50
          IpVersion: IPv4
          PrefixListName: TestPrefixListName
          Entries:
            - Description: CIDR
              Cidr: 192.168.0.0/16
    Outputs:
      MaxEntries:
        Description: The maximum number of entries for CIDR address blocks in the prefix list.
        Value:
          Fn::GetAtt:
            - ExtensionResource
            - MaxEntries
      PrefixListDescription:
        Description: The description of the prefix list.
        Value:
          Fn::GetAtt:
            - ExtensionResource
            - PrefixListDescription
      IpVersion:
        Description: The IP version of the prefix list.
        Value:
          Fn::GetAtt:
            - ExtensionResource
            - IpVersion
      PrefixListId:
        Description: The ID of the query Prefix List.
        Value:
          Fn::GetAtt:
            - ExtensionResource
            - PrefixListId
      PrefixListName:
        Description: The name of the prefix list.
        Value:
          Fn::GetAtt:
            - ExtensionResource
            - PrefixListName
      CreateTime:
        Description: The time when the prefix list was created.
        Value:
          Fn::GetAtt:
            - ExtensionResource
            - CreateTime
      ShareType:
        Description: The share type of the prefix list.
        Value:
          Fn::GetAtt:
            - ExtensionResource
            - ShareType
  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
      },
      "Resources": {
        "ExtensionResource": {
          "Type": "ALIYUN::VPC::PrefixList",
          "Properties": {
            "MaxEntries": 50,
            "IpVersion": "IPv4",
            "PrefixListName": "TestPrefixListName",
            "Entries": [
              {
                "Description": "CIDR",
                "Cidr": "192.168.0.0/16"
              }
            ]
          }
        }
      },
      "Outputs": {
        "MaxEntries": {
          "Description": "The maximum number of entries for CIDR address blocks in the prefix list.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionResource",
              "MaxEntries"
            ]
          }
        },
        "PrefixListDescription": {
          "Description": "The description of the prefix list.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionResource",
              "PrefixListDescription"
            ]
          }
        },
        "IpVersion": {
          "Description": "The IP version of the prefix list.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionResource",
              "IpVersion"
            ]
          }
        },
        "PrefixListId": {
          "Description": "The ID of the query Prefix List.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionResource",
              "PrefixListId"
            ]
          }
        },
        "PrefixListName": {
          "Description": "The name of the prefix list.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionResource",
              "PrefixListName"
            ]
          }
        },
        "CreateTime": {
          "Description": "The time when the prefix list was created.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionResource",
              "CreateTime"
            ]
          }
        },
        "ShareType": {
          "Description": "The share type of the prefix list.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionResource",
              "ShareType"
            ]
          }
        }
      }
    }
  • 本页导读 (1)
文档反馈