Interface CfnSubnetProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CfnSubnetProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:39.045Z") @Stability(Stable) public interface CfnSubnetProps extends software.amazon.jsii.JsiiSerializable
Properties for defining a CfnSubnet.

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.*;
 Object privateDnsNameOptionsOnLaunch;
 CfnSubnetProps cfnSubnetProps = CfnSubnetProps.builder()
         .vpcId("vpcId")
         // the properties below are optional
         .assignIpv6AddressOnCreation(false)
         .availabilityZone("availabilityZone")
         .availabilityZoneId("availabilityZoneId")
         .cidrBlock("cidrBlock")
         .enableDns64(false)
         .ipv6CidrBlock("ipv6CidrBlock")
         .ipv6Native(false)
         .mapPublicIpOnLaunch(false)
         .outpostArn("outpostArn")
         .privateDnsNameOptionsOnLaunch(privateDnsNameOptionsOnLaunch)
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 
  • Method Details

    • getVpcId

      @Stability(Stable) @NotNull String getVpcId()
      The ID of the VPC the subnet is in.

      If you update this property, you must also update the CidrBlock property.

    • getAssignIpv6AddressOnCreation

      @Stability(Stable) @Nullable default Object getAssignIpv6AddressOnCreation()
      Indicates whether a network interface created in this subnet receives an IPv6 address. The default value is false .

      If you specify AssignIpv6AddressOnCreation , you must also specify Ipv6CidrBlock .

    • getAvailabilityZone

      @Stability(Stable) @Nullable default String getAvailabilityZone()
      The Availability Zone of the subnet.

      If you update this property, you must also update the CidrBlock property.

    • getAvailabilityZoneId

      @Stability(Stable) @Nullable default String getAvailabilityZoneId()
      The AZ ID of the subnet.
    • getCidrBlock

      @Stability(Stable) @Nullable default String getCidrBlock()
      The IPv4 CIDR block assigned to the subnet.

      If you update this property, we create a new subnet, and then delete the existing one.

    • getEnableDns64

      @Stability(Stable) @Nullable default Object getEnableDns64()
      Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.

      For more information, see DNS64 and NAT64 in the Amazon Virtual Private Cloud User Guide .

    • getIpv6CidrBlock

      @Stability(Stable) @Nullable default String getIpv6CidrBlock()
      The IPv6 CIDR block.

      If you specify AssignIpv6AddressOnCreation , you must also specify Ipv6CidrBlock .

    • getIpv6Native

      @Stability(Stable) @Nullable default Object getIpv6Native()
      Indicates whether this is an IPv6 only subnet.

      For more information, see Subnet basics in the Amazon Virtual Private Cloud User Guide .

    • getMapPublicIpOnLaunch

      @Stability(Stable) @Nullable default Object getMapPublicIpOnLaunch()
      Indicates whether instances launched in this subnet receive a public IPv4 address.

      The default value is false .

    • getOutpostArn

      @Stability(Stable) @Nullable default String getOutpostArn()
      The Amazon Resource Name (ARN) of the Outpost.
    • getPrivateDnsNameOptionsOnLaunch

      @Stability(Stable) @Nullable default Object getPrivateDnsNameOptionsOnLaunch()
      The hostname type for EC2 instances launched into this subnet and how DNS A and AAAA record queries to the instances should be handled.

      For more information, see Amazon EC2 instance hostname types in the Amazon Elastic Compute Cloud User Guide .

      Available options:

      • EnableResourceNameDnsAAAARecord (true | false)
      • EnableResourceNameDnsARecord (true | false)
      • HostnameType (ip-name | resource-name)
    • getTags

      @Stability(Stable) @Nullable default List<CfnTag> getTags()
      Any tags assigned to the subnet.
    • builder

      @Stability(Stable) static CfnSubnetProps.Builder builder()
      Returns:
      a CfnSubnetProps.Builder of CfnSubnetProps