View a markdown version of this page

AWS::EC2::PrefixList - AWS CloudFormation

This is the new CloudFormation Template Reference Guide. Please update your bookmarks and links. For help getting started with CloudFormation, see the AWS CloudFormation User Guide.

AWS::EC2::PrefixList

Specifies a managed prefix list. You can add one or more entries to the prefix list. Each entry consists of a CIDR block and an optional description.

Syntax

To declare this entity in your CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::EC2::PrefixList", "Properties" : { "AddressFamily" : String, "Entries" : [ Entry, ... ], "MaxEntries" : Integer, "PrefixListName" : String, "Tags" : [ Tag, ... ] } }

YAML

Type: AWS::EC2::PrefixList Properties: AddressFamily: String Entries: - Entry MaxEntries: Integer PrefixListName: String Tags: - Tag

Properties

AddressFamily

The IP address type.

Valid Values: IPv4 | IPv6

Required: Yes

Type: String

Allowed values: IPv4 | IPv6

Update requires: No interruption

Entries

The entries for the prefix list.

Required: No

Type: Array of Entry

Update requires: No interruption

MaxEntries

The maximum number of entries for the prefix list. You can't modify the entries and the size of a prefix list at the same time. The maximum number of entries per prefix list defaults to 1,000 and can be increased by opening a support case with AWS Support.

This property is required when you create a prefix list.

Default Maximum: 1000

Required: Conditional

Type: Integer

Minimum: 1

Update requires: No interruption

PrefixListName

A name for the prefix list.

Constraints: Up to 255 characters in length. The name cannot start with com.amazonaws.

Required: Yes

Type: String

Minimum: 1

Maximum: 255

Update requires: No interruption

Tags

The tags for the prefix list.

Required: No

Type: Array of Tag

Update requires: No interruption

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the ID of the prefix list.

For more information about using the Ref function, see Ref.

Fn::GetAtt

The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.

Arn

The ARN of the prefix list. For example, arn:aws:ec2:us-east-1:123456789012:prefix-list/pl-0123123123123abcd.

OwnerId

The ID of the owner of the prefix list. For example, 123456789012.

PrefixListId

The ID of the prefix list. For example, pl-0123123123123abcd.

Version

The version of the prefix list. For example, 1.

Examples

Create a prefix list

The following example creates an IPv4 prefix list with a maximum of 10 entries, and creates 2 entries in the prefix list.

JSON

{ "Resources": { "NewPrefixList": { "Type": "AWS::EC2::PrefixList", "Properties": { "PrefixListName": "vpc-1-servers", "AddressFamily": "IPv4", "MaxEntries": 10, "Entries": [ { "Cidr": "10.0.0.5/32", "Description": "Server 1" }, { "Cidr": "10.0.0.10/32", "Description": "Server 2" } ], "Tags": [ { "Key": "Name", "Value": "VPC-1-Servers" } ] } } } }

YAML

Resources: NewPrefixList: Type: AWS::EC2::PrefixList Properties: PrefixListName: "vpc-1-servers" AddressFamily: "IPv4" MaxEntries: 10 Entries: - Cidr: "10.0.0.5/32" Description: "Server 1" - Cidr: "10.0.0.10/32" Description: "Server 2" Tags: - Key: "Name" Value: "VPC-1-Servers"

Warning Javascript is disabled or is unavailable in your browser.

To use the Amazon Web Services Documentation, Javascript must be enabled. Please refer to your browser's Help pages for instructions.

Did this page help you? - Yes

Thanks for letting us know we're doing a good job!

If you've got a moment, please tell us what we did right so we can do more of it.

Did this page help you? - No

Thanks for letting us know this page needs work. We're sorry we let you down.

If you've got a moment, please tell us how we can make the documentation better.

AltStyle によって変換されたページ (->オリジナル) /