Class CfnVPCCidrBlock

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:39.132Z") @Stability(Stable) public class CfnVPCCidrBlock extends CfnResource implements IInspectable
A CloudFormation AWS::EC2::VPCCidrBlock.

Associates a CIDR block with your VPC. You can only associate a single IPv6 CIDR block with your VPC. The IPv6 CIDR block size is fixed at /56.

For more information about associating CIDR blocks with your VPC and applicable restrictions, see VPC and Subnet Sizing in the Amazon VPC User Guide .

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.*;
 CfnVPCCidrBlock cfnVPCCidrBlock = CfnVPCCidrBlock.Builder.create(this, "MyCfnVPCCidrBlock")
         .vpcId("vpcId")
         // the properties below are optional
         .amazonProvidedIpv6CidrBlock(false)
         .cidrBlock("cidrBlock")
         .ipv4IpamPoolId("ipv4IpamPoolId")
         .ipv4NetmaskLength(123)
         .ipv6CidrBlock("ipv6CidrBlock")
         .ipv6IpamPoolId("ipv6IpamPoolId")
         .ipv6NetmaskLength(123)
         .ipv6Pool("ipv6Pool")
         .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

    • CfnVPCCidrBlock

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

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

      @Stability(Stable) public CfnVPCCidrBlock(@NotNull Construct scope, @NotNull String id, @NotNull CfnVPCCidrBlockProps props)
      Create a new AWS::EC2::VPCCidrBlock.

      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.
    • getCfnProperties

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

      @Stability(Stable) @NotNull public String getVpcId()
      The ID of the VPC.
    • setVpcId

      @Stability(Stable) public void setVpcId(@NotNull String value)
      The ID of the VPC.
    • getAmazonProvidedIpv6CidrBlock

      @Stability(Stable) @Nullable public Object getAmazonProvidedIpv6CidrBlock()
      Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC.

      You cannot specify the range of IPv6 addresses, or the size of the CIDR block.

    • setAmazonProvidedIpv6CidrBlock

      @Stability(Stable) public void setAmazonProvidedIpv6CidrBlock(@Nullable Boolean value)
      Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC.

      You cannot specify the range of IPv6 addresses, or the size of the CIDR block.

    • setAmazonProvidedIpv6CidrBlock

      @Stability(Stable) public void setAmazonProvidedIpv6CidrBlock(@Nullable IResolvable value)
      Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC.

      You cannot specify the range of IPv6 addresses, or the size of the CIDR block.

    • getCidrBlock

      @Stability(Stable) @Nullable public String getCidrBlock()
      An IPv4 CIDR block to associate with the VPC.
    • setCidrBlock

      @Stability(Stable) public void setCidrBlock(@Nullable String value)
      An IPv4 CIDR block to associate with the VPC.
    • getIpv4IpamPoolId

      @Stability(Stable) @Nullable public String getIpv4IpamPoolId()
      Associate a CIDR allocated from an IPv4 IPAM pool to a VPC.

      For more information about Amazon VPC IP Address Manager (IPAM), see What is IPAM? in the Amazon VPC IPAM User Guide .

    • setIpv4IpamPoolId

      @Stability(Stable) public void setIpv4IpamPoolId(@Nullable String value)
      Associate a CIDR allocated from an IPv4 IPAM pool to a VPC.

      For more information about Amazon VPC IP Address Manager (IPAM), see What is IPAM? in the Amazon VPC IPAM User Guide .

    • getIpv4NetmaskLength

      @Stability(Stable) @Nullable public Number getIpv4NetmaskLength()
      The netmask length of the IPv4 CIDR you would like to associate from an Amazon VPC IP Address Manager (IPAM) pool.

      For more information about IPAM, see What is IPAM? in the Amazon VPC IPAM User Guide .

    • setIpv4NetmaskLength

      @Stability(Stable) public void setIpv4NetmaskLength(@Nullable Number value)
      The netmask length of the IPv4 CIDR you would like to associate from an Amazon VPC IP Address Manager (IPAM) pool.

      For more information about IPAM, see What is IPAM? in the Amazon VPC IPAM User Guide .

    • getIpv6CidrBlock

      @Stability(Stable) @Nullable public String getIpv6CidrBlock()
      An IPv6 CIDR block from the IPv6 address pool. You must also specify Ipv6Pool in the request.

      To let Amazon choose the IPv6 CIDR block for you, omit this parameter.

    • setIpv6CidrBlock

      @Stability(Stable) public void setIpv6CidrBlock(@Nullable String value)
      An IPv6 CIDR block from the IPv6 address pool. You must also specify Ipv6Pool in the request.

      To let Amazon choose the IPv6 CIDR block for you, omit this parameter.

    • getIpv6IpamPoolId

      @Stability(Stable) @Nullable public String getIpv6IpamPoolId()
      Associates a CIDR allocated from an IPv6 IPAM pool to a VPC.

      For more information about Amazon VPC IP Address Manager (IPAM), see What is IPAM? in the Amazon VPC IPAM User Guide .

    • setIpv6IpamPoolId

      @Stability(Stable) public void setIpv6IpamPoolId(@Nullable String value)
      Associates a CIDR allocated from an IPv6 IPAM pool to a VPC.

      For more information about Amazon VPC IP Address Manager (IPAM), see What is IPAM? in the Amazon VPC IPAM User Guide .

    • getIpv6NetmaskLength

      @Stability(Stable) @Nullable public Number getIpv6NetmaskLength()
      The netmask length of the IPv6 CIDR you would like to associate from an Amazon VPC IP Address Manager (IPAM) pool.

      For more information about IPAM, see What is IPAM? in the Amazon VPC IPAM User Guide .

    • setIpv6NetmaskLength

      @Stability(Stable) public void setIpv6NetmaskLength(@Nullable Number value)
      The netmask length of the IPv6 CIDR you would like to associate from an Amazon VPC IP Address Manager (IPAM) pool.

      For more information about IPAM, see What is IPAM? in the Amazon VPC IPAM User Guide .

    • getIpv6Pool

      @Stability(Stable) @Nullable public String getIpv6Pool()
      The ID of an IPv6 address pool from which to allocate the IPv6 CIDR block.
    • setIpv6Pool

      @Stability(Stable) public void setIpv6Pool(@Nullable String value)
      The ID of an IPv6 address pool from which to allocate the IPv6 CIDR block.