All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::VPC::PrefixList

Last Updated:Jan 09, 2024

ALIYUN::VPC::PrefixList is used to create a prefix list.

Syntax

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

Properties

Property

Type

Required

Editable

Description

Constraint

MaxEntries

Integer

No

Yes

The maximum number of CIDR blocks in the prefix list.

Default value: 50.

PrefixListDescription

String

No

Yes

The description of the prefix list.

The description must be 1 to 256 characters in length. It cannot start with http:// or https://.

IpVersion

String

No

No

The IP version.

Valid values:

  • IPv4 (default)

  • IPv6

PrefixListName

String

No

Yes

The name of the prefix list.

The name must be 1 to 128 characters in length. It cannot start with http:// or https://.

Entries

List

No

Yes

The CIDR blocks in the prefix list.

For more information, see Entries properties.

Tags

List

No

Yes

The tags.

You can add up to 20 tags. For more information, see Tags properties.

ResourceGroupId

String

No

Yes

The ID of the resource group to which the prefix list belongs.

None.

Entries syntax

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

Entries properties

Property

Type

Required

Editable

Description

Constraint

Description

String

No

Yes

The description of the CIDR block in the prefix list.

The description must be 1 to 256 characters in length. It cannot start with http:// or https://.

Cidr

String

Yes

Yes

The CIDR block in the prefix list.

None.

Tags syntax

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

Tags properties

Property

Type

Required

Editable

Description

Constraint

Key

String

Yes

No

The tag key.

The tag key cannot be an empty string. The tag key can be up to 64 characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter and cannot start with aliyun or acs:. It cannot contain http:// or https://.

Value

String

No

No

The tag value.

The tag value can be an empty string.

The tag value can be up to 128 characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter and cannot start with aliyun or acs:. It cannot contain http:// or https://.

Return values

Fn::GetAtt

  • MaxEntries: the maximum number of CIDR blocks in the prefix list.

  • PrefixListDescription: the description of the prefix list.

  • IpVersion: the IP version.

  • PrefixListId: the ID of the prefix list.

  • PrefixListName: the name of the prefix list.

  • CreateTime: the time when the prefix list was created.

  • ShareType: the share type of the prefix list.

  • Tags: the tags.

  • ResourceGroupId: the ID of the resource group to which the prefix list belongs.

  • OwnerId: the ID of the Alibaba Cloud account to which the prefix list belongs.  

  • Entries: the CIDR blocks in the prefix list.

Examples

  • YAML format

    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 format

    {
      "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"
            ]
          }
        }
      }
    }