Class CfnPrefixList

java.lang.Object
software.amazon.jsii.JsiiObject
All Implemented Interfaces:
IConstruct, IDependable, IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:38.906Z") @Stability(Stable) public class CfnPrefixList extends CfnResource implements IInspectable
A CloudFormation 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.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.ec2.*;
 CfnPrefixList cfnPrefixList = CfnPrefixList.Builder.create(this, "MyCfnPrefixList")
         .addressFamily("addressFamily")
         .maxEntries(123)
         .prefixListName("prefixListName")
         // the properties below are optional
         .entries(List.of(EntryProperty.builder()
                 .cidr("cidr")
                 // the properties below are optional
                 .description("description")
                 .build()))
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnPrefixList

      protected CfnPrefixList(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnPrefixList

      protected CfnPrefixList(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnPrefixList

      @Stability(Stable) public CfnPrefixList(@NotNull Construct scope, @NotNull String id, @NotNull CfnPrefixListProps props)
      Create a new AWS::EC2::PrefixList.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      props -
      • resource properties.
      This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector -
      • tree inspector to collect and process attributes.
      This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The ARN of the prefix list.

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

    • getAttrOwnerId

      @Stability(Stable) @NotNull public String getAttrOwnerId()
      The ID of the owner of the prefix list.

      For example, 123456789012 .

    • getAttrPrefixListId

      @Stability(Stable) @NotNull public String getAttrPrefixListId()
      The ID of the prefix list.

      For example, pl-0123123123123abcd .

    • getAttrVersion

      @Stability(Stable) @NotNull public Number getAttrVersion()
      The version of the prefix list.

      For example, 1 .

    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      The tags for the prefix list.
    • getAddressFamily

      @Stability(Stable) @NotNull public String getAddressFamily()
      The IP address type.

      Valid Values: IPv4 | IPv6

    • setAddressFamily

      @Stability(Stable) public void setAddressFamily(@NotNull String value)
      The IP address type.

      Valid Values: IPv4 | IPv6

    • getMaxEntries

      @Stability(Stable) @NotNull public Number getMaxEntries()
      The maximum number of entries for the prefix list.
    • setMaxEntries

      @Stability(Stable) public void setMaxEntries(@NotNull Number value)
      The maximum number of entries for the prefix list.
    • getPrefixListName

      @Stability(Stable) @NotNull public String getPrefixListName()
      A name for the prefix list.

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

    • setPrefixListName

      @Stability(Stable) public void setPrefixListName(@NotNull String value)
      A name for the prefix list.

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

    • getEntries

      @Stability(Stable) @Nullable public Object getEntries()
      One or more entries for the prefix list.
    • setEntries

      @Stability(Stable) public void setEntries(@Nullable IResolvable value)
      One or more entries for the prefix list.
    • setEntries

      @Stability(Stable) public void setEntries(@Nullable List<Object> value)
      One or more entries for the prefix list.