Interface Subnet.Builder

All Superinterfaces:
Buildable, CopyableBuilder<Subnet.Builder,Subnet>, SdkBuilder<Subnet.Builder,Subnet>, SdkPojo
Enclosing class:
Subnet

@Mutable @NotThreadSafe public static interface Subnet.Builder extends SdkPojo, CopyableBuilder<Subnet.Builder,Subnet>
  • Method Details

    • availabilityZoneId

      Subnet.Builder availabilityZoneId(String availabilityZoneId)

      The AZ ID of the subnet.

      Parameters:
      availabilityZoneId - The AZ ID of the subnet.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • enableLniAtDeviceIndex

      Subnet.Builder enableLniAtDeviceIndex(Integer enableLniAtDeviceIndex)

      Indicates the device position for local network interfaces in this subnet. For example, 1 indicates local network interfaces in this subnet are the secondary network interface (eth1).

      Parameters:
      enableLniAtDeviceIndex - Indicates the device position for local network interfaces in this subnet. For example, 1 indicates local network interfaces in this subnet are the secondary network interface (eth1).
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • mapCustomerOwnedIpOnLaunch

      Subnet.Builder mapCustomerOwnedIpOnLaunch(Boolean mapCustomerOwnedIpOnLaunch)

      Indicates whether a network interface created in this subnet (including a network interface created by RunInstances) receives a customer-owned IPv4 address.

      Parameters:
      mapCustomerOwnedIpOnLaunch - Indicates whether a network interface created in this subnet (including a network interface created by RunInstances) receives a customer-owned IPv4 address.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • customerOwnedIpv4Pool

      Subnet.Builder customerOwnedIpv4Pool(String customerOwnedIpv4Pool)

      The customer-owned IPv4 address pool associated with the subnet.

      Parameters:
      customerOwnedIpv4Pool - The customer-owned IPv4 address pool associated with the subnet.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • ownerId

      Subnet.Builder ownerId(String ownerId)

      The ID of the Amazon Web Services account that owns the subnet.

      Parameters:
      ownerId - The ID of the Amazon Web Services account that owns the subnet.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • assignIpv6AddressOnCreation

      Subnet.Builder assignIpv6AddressOnCreation(Boolean assignIpv6AddressOnCreation)

      Indicates whether a network interface created in this subnet (including a network interface created by RunInstances) receives an IPv6 address.

      Parameters:
      assignIpv6AddressOnCreation - Indicates whether a network interface created in this subnet (including a network interface created by RunInstances) receives an IPv6 address.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • ipv6CidrBlockAssociationSet

      Subnet.Builder ipv6CidrBlockAssociationSet(Collection<SubnetIpv6CidrBlockAssociation> ipv6CidrBlockAssociationSet)

      Information about the IPv6 CIDR blocks associated with the subnet.

      Parameters:
      ipv6CidrBlockAssociationSet - Information about the IPv6 CIDR blocks associated with the subnet.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • ipv6CidrBlockAssociationSet

      Subnet.Builder ipv6CidrBlockAssociationSet(SubnetIpv6CidrBlockAssociation... ipv6CidrBlockAssociationSet)

      Information about the IPv6 CIDR blocks associated with the subnet.

      Parameters:
      ipv6CidrBlockAssociationSet - Information about the IPv6 CIDR blocks associated with the subnet.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • ipv6CidrBlockAssociationSet

      Subnet.Builder ipv6CidrBlockAssociationSet(Consumer<SubnetIpv6CidrBlockAssociation.Builder>... ipv6CidrBlockAssociationSet)

      Information about the IPv6 CIDR blocks associated with the subnet.

      This is a convenience method that creates an instance of the SubnetIpv6CidrBlockAssociation.Builder avoiding the need to create one manually via SubnetIpv6CidrBlockAssociation.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to ipv6CidrBlockAssociationSet(List<SubnetIpv6CidrBlockAssociation>).

      Parameters:
      ipv6CidrBlockAssociationSet - a consumer that will call methods on SubnetIpv6CidrBlockAssociation.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • tags

      Any tags assigned to the subnet.

      Parameters:
      tags - Any tags assigned to the subnet.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • tags

      Subnet.Builder tags(Tag... tags)

      Any tags assigned to the subnet.

      Parameters:
      tags - Any tags assigned to the subnet.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • tags

      Any tags assigned to the subnet.

      This is a convenience method that creates an instance of the Tag.Builder avoiding the need to create one manually via Tag.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to tags(List<Tag>).

      Parameters:
      tags - a consumer that will call methods on Tag.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • subnetArn

      Subnet.Builder subnetArn(String subnetArn)

      The Amazon Resource Name (ARN) of the subnet.

      Parameters:
      subnetArn - The Amazon Resource Name (ARN) of the subnet.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • outpostArn

      Subnet.Builder outpostArn(String outpostArn)

      The Amazon Resource Name (ARN) of the Outpost.

      Parameters:
      outpostArn - The Amazon Resource Name (ARN) of the Outpost.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • enableDns64

      Subnet.Builder enableDns64(Boolean enableDns64)

      Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.

      Parameters:
      enableDns64 - Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • ipv6Native

      Subnet.Builder ipv6Native(Boolean ipv6Native)

      Indicates whether this is an IPv6 only subnet.

      Parameters:
      ipv6Native - Indicates whether this is an IPv6 only subnet.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • privateDnsNameOptionsOnLaunch

      Subnet.Builder privateDnsNameOptionsOnLaunch(PrivateDnsNameOptionsOnLaunch privateDnsNameOptionsOnLaunch)

      The type of hostnames to assign to instances in the subnet at launch. An instance hostname is based on the IPv4 address or ID of the instance.

      Parameters:
      privateDnsNameOptionsOnLaunch - The type of hostnames to assign to instances in the subnet at launch. An instance hostname is based on the IPv4 address or ID of the instance.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • privateDnsNameOptionsOnLaunch

      default Subnet.Builder privateDnsNameOptionsOnLaunch(Consumer<PrivateDnsNameOptionsOnLaunch.Builder> privateDnsNameOptionsOnLaunch)

      The type of hostnames to assign to instances in the subnet at launch. An instance hostname is based on the IPv4 address or ID of the instance.

      This is a convenience method that creates an instance of the PrivateDnsNameOptionsOnLaunch.Builder avoiding the need to create one manually via PrivateDnsNameOptionsOnLaunch.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to privateDnsNameOptionsOnLaunch(PrivateDnsNameOptionsOnLaunch).

      Parameters:
      privateDnsNameOptionsOnLaunch - a consumer that will call methods on PrivateDnsNameOptionsOnLaunch.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • blockPublicAccessStates

      Subnet.Builder blockPublicAccessStates(BlockPublicAccessStates blockPublicAccessStates)

      The state of VPC Block Public Access (BPA).

      Parameters:
      blockPublicAccessStates - The state of VPC Block Public Access (BPA).
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • blockPublicAccessStates

      default Subnet.Builder blockPublicAccessStates(Consumer<BlockPublicAccessStates.Builder> blockPublicAccessStates)

      The state of VPC Block Public Access (BPA).

      This is a convenience method that creates an instance of the BlockPublicAccessStates.Builder avoiding the need to create one manually via BlockPublicAccessStates.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to blockPublicAccessStates(BlockPublicAccessStates).

      Parameters:
      blockPublicAccessStates - a consumer that will call methods on BlockPublicAccessStates.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • type

      Subnet.Builder type(String type)

      Indicates if this is a subnet used with Amazon Elastic VMware Service (EVS). Possible values are Elastic VMware Service or no value. For more information about Amazon EVS, see Amazon Elastic VMware Service API Reference .

      Parameters:
      type - Indicates if this is a subnet used with Amazon Elastic VMware Service (EVS). Possible values are Elastic VMware Service or no value. For more information about Amazon EVS, see Amazon Elastic VMware Service API Reference .
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • networkFirewallConnectivityType

      Subnet.Builder networkFirewallConnectivityType(String networkFirewallConnectivityType)

      The internet connectivity treatment that the Automated Internet Firewall applies to the subnet. The response includes this value only if the subnet is in a VPC that has a firewall. Possible values:

      • az-unsupported: The firewall doesn't support the subnet's Availability Zone, so it doesn't inspect traffic for the subnet.

      • bidirectional: Provides bidirectional internet connectivity to every network interface that has a public IP association. Any network interface without a public IP cannot communicate with the internet unless a NAT device is explicitly inserted in the path. All inbound and outbound traffic is inspected against your firewall rules.

      • exclude: The firewall doesn't inspect traffic for the subnet. The subnet bypasses the firewall, and its traffic passes directly through the internet gateway.

      • flexible: Sets the connectivity for each network interface in the subnet based on whether it is associated with a public IP address. A network interface with a public IP address gets bidirectional internet connectivity. A network interface without a public IP address gets outbound-only connectivity. All traffic is inspected against your firewall rules.

      • outbound-only: Provides egress-only connectivity for all network interfaces in the subnet. All outbound traffic and inbound responses are inspected against your firewall rules. Unsolicited inbound connections are dropped. For IPv4 traffic, the firewall performs NAT.

      Parameters:
      networkFirewallConnectivityType - The internet connectivity treatment that the Automated Internet Firewall applies to the subnet. The response includes this value only if the subnet is in a VPC that has a firewall. Possible values:

      • az-unsupported: The firewall doesn't support the subnet's Availability Zone, so it doesn't inspect traffic for the subnet.

      • bidirectional: Provides bidirectional internet connectivity to every network interface that has a public IP association. Any network interface without a public IP cannot communicate with the internet unless a NAT device is explicitly inserted in the path. All inbound and outbound traffic is inspected against your firewall rules.

      • exclude: The firewall doesn't inspect traffic for the subnet. The subnet bypasses the firewall, and its traffic passes directly through the internet gateway.

      • flexible: Sets the connectivity for each network interface in the subnet based on whether it is associated with a public IP address. A network interface with a public IP address gets bidirectional internet connectivity. A network interface without a public IP address gets outbound-only connectivity. All traffic is inspected against your firewall rules.

      • outbound-only: Provides egress-only connectivity for all network interfaces in the subnet. All outbound traffic and inbound responses are inspected against your firewall rules. Unsolicited inbound connections are dropped. For IPv4 traffic, the firewall performs NAT.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • networkFirewallConnectivityType

      Subnet.Builder networkFirewallConnectivityType(NetworkFirewallConnectivityType networkFirewallConnectivityType)

      The internet connectivity treatment that the Automated Internet Firewall applies to the subnet. The response includes this value only if the subnet is in a VPC that has a firewall. Possible values:

      • az-unsupported: The firewall doesn't support the subnet's Availability Zone, so it doesn't inspect traffic for the subnet.

      • bidirectional: Provides bidirectional internet connectivity to every network interface that has a public IP association. Any network interface without a public IP cannot communicate with the internet unless a NAT device is explicitly inserted in the path. All inbound and outbound traffic is inspected against your firewall rules.

      • exclude: The firewall doesn't inspect traffic for the subnet. The subnet bypasses the firewall, and its traffic passes directly through the internet gateway.

      • flexible: Sets the connectivity for each network interface in the subnet based on whether it is associated with a public IP address. A network interface with a public IP address gets bidirectional internet connectivity. A network interface without a public IP address gets outbound-only connectivity. All traffic is inspected against your firewall rules.

      • outbound-only: Provides egress-only connectivity for all network interfaces in the subnet. All outbound traffic and inbound responses are inspected against your firewall rules. Unsolicited inbound connections are dropped. For IPv4 traffic, the firewall performs NAT.

      Parameters:
      networkFirewallConnectivityType - The internet connectivity treatment that the Automated Internet Firewall applies to the subnet. The response includes this value only if the subnet is in a VPC that has a firewall. Possible values:

      • az-unsupported: The firewall doesn't support the subnet's Availability Zone, so it doesn't inspect traffic for the subnet.

      • bidirectional: Provides bidirectional internet connectivity to every network interface that has a public IP association. Any network interface without a public IP cannot communicate with the internet unless a NAT device is explicitly inserted in the path. All inbound and outbound traffic is inspected against your firewall rules.

      • exclude: The firewall doesn't inspect traffic for the subnet. The subnet bypasses the firewall, and its traffic passes directly through the internet gateway.

      • flexible: Sets the connectivity for each network interface in the subnet based on whether it is associated with a public IP address. A network interface with a public IP address gets bidirectional internet connectivity. A network interface without a public IP address gets outbound-only connectivity. All traffic is inspected against your firewall rules.

      • outbound-only: Provides egress-only connectivity for all network interfaces in the subnet. All outbound traffic and inbound responses are inspected against your firewall rules. Unsolicited inbound connections are dropped. For IPv4 traffic, the firewall performs NAT.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • subnetId

      Subnet.Builder subnetId(String subnetId)

      The ID of the subnet.

      Parameters:
      subnetId - The ID of the subnet.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • state

      Subnet.Builder state(String state)

      The current state of the subnet.

      • failed: The underlying infrastructure to support the subnet failed to provision as expected.

      • failed-insufficient-capacity: The underlying infrastructure to support the subnet failed to provision due to a shortage of EC2 instance capacity.

      Parameters:
      state - The current state of the subnet.

      • failed: The underlying infrastructure to support the subnet failed to provision as expected.

      • failed-insufficient-capacity: The underlying infrastructure to support the subnet failed to provision due to a shortage of EC2 instance capacity.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • state

      The current state of the subnet.

      • failed: The underlying infrastructure to support the subnet failed to provision as expected.

      • failed-insufficient-capacity: The underlying infrastructure to support the subnet failed to provision due to a shortage of EC2 instance capacity.

      Parameters:
      state - The current state of the subnet.

      • failed: The underlying infrastructure to support the subnet failed to provision as expected.

      • failed-insufficient-capacity: The underlying infrastructure to support the subnet failed to provision due to a shortage of EC2 instance capacity.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • vpcId

      Subnet.Builder vpcId(String vpcId)

      The ID of the VPC the subnet is in.

      Parameters:
      vpcId - The ID of the VPC the subnet is in.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • cidrBlock

      Subnet.Builder cidrBlock(String cidrBlock)

      The IPv4 CIDR block assigned to the subnet.

      Parameters:
      cidrBlock - The IPv4 CIDR block assigned to the subnet.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • availableIpAddressCount

      Subnet.Builder availableIpAddressCount(Integer availableIpAddressCount)

      The number of unused private IPv4 addresses in the subnet. The IPv4 addresses for any stopped instances are considered unavailable.

      Parameters:
      availableIpAddressCount - The number of unused private IPv4 addresses in the subnet. The IPv4 addresses for any stopped instances are considered unavailable.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • availabilityZone

      Subnet.Builder availabilityZone(String availabilityZone)

      The Availability Zone of the subnet.

      Parameters:
      availabilityZone - The Availability Zone of the subnet.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • defaultForAz

      Subnet.Builder defaultForAz(Boolean defaultForAz)

      Indicates whether this is the default subnet for the Availability Zone.

      Parameters:
      defaultForAz - Indicates whether this is the default subnet for the Availability Zone.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • mapPublicIpOnLaunch

      Subnet.Builder mapPublicIpOnLaunch(Boolean mapPublicIpOnLaunch)

      Indicates whether instances launched in this subnet receive a public IPv4 address.

      Amazon Web Services charges for all public IPv4 addresses, including public IPv4 addresses associated with running instances and Elastic IP addresses. For more information, see the Public IPv4 Address tab on the Amazon VPC pricing page.

      Parameters:
      mapPublicIpOnLaunch - Indicates whether instances launched in this subnet receive a public IPv4 address.

      Amazon Web Services charges for all public IPv4 addresses, including public IPv4 addresses associated with running instances and Elastic IP addresses. For more information, see the Public IPv4 Address tab on the Amazon VPC pricing page.

      Returns:
      Returns a reference to this object so that method calls can be chained together.