Class CfnNetworkInterface.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnNetworkInterface>
- Enclosing class:
CfnNetworkInterface
CfnNetworkInterface
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
static CfnNetworkInterface.Builder
description
(String description) A description for the network interface.The security group IDs associated with this network interface.interfaceType
(String interfaceType) The type of network interface.ipv4PrefixCount
(Number ipv4PrefixCount) The number of IPv4 prefixes to be automatically assigned to the network interface.ipv4Prefixes
(List<? extends Object> ipv4Prefixes) The IPv4 delegated prefixes that are assigned to the network interface.ipv4Prefixes
(IResolvable ipv4Prefixes) The IPv4 delegated prefixes that are assigned to the network interface.ipv6AddressCount
(Number ipv6AddressCount) The number of IPv6 addresses to assign to a network interface.ipv6Addresses
(List<? extends Object> ipv6Addresses) One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet to associate with the network interface.ipv6Addresses
(IResolvable ipv6Addresses) One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet to associate with the network interface.ipv6PrefixCount
(Number ipv6PrefixCount) The number of IPv6 prefixes to be automatically assigned to the network interface.ipv6Prefixes
(List<? extends Object> ipv6Prefixes) The IPv6 delegated prefixes that are assigned to the network interface.ipv6Prefixes
(IResolvable ipv6Prefixes) The IPv6 delegated prefixes that are assigned to the network interface.privateIpAddress
(String privateIpAddress) Assigns a single private IP address to the network interface, which is used as the primary private IP address.privateIpAddresses
(List<? extends Object> privateIpAddresses) Assigns private IP addresses to the network interface.privateIpAddresses
(IResolvable privateIpAddresses) Assigns private IP addresses to the network interface.secondaryPrivateIpAddressCount
(Number secondaryPrivateIpAddressCount) The number of secondary private IPv4 addresses to assign to a network interface.sourceDestCheck
(Boolean sourceDestCheck) Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives.sourceDestCheck
(IResolvable sourceDestCheck) Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives.The ID of the subnet to associate with the network interface.An arbitrary set of tags (key-value pairs) for this network interface.
-
Method Details
-
create
@Stability(Stable) public static CfnNetworkInterface.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.- Returns:
- a new instance of
CfnNetworkInterface.Builder
.
-
subnetId
The ID of the subnet to associate with the network interface.- Parameters:
subnetId
- The ID of the subnet to associate with the network interface. This parameter is required.- Returns:
this
- See Also:
-
description
A description for the network interface.- Parameters:
description
- A description for the network interface. This parameter is required.- Returns:
this
- See Also:
-
groupSet
The security group IDs associated with this network interface.- Parameters:
groupSet
- The security group IDs associated with this network interface. This parameter is required.- Returns:
this
- See Also:
-
interfaceType
The type of network interface.The default is
interface
. The supported values areefa
andtrunk
.- Parameters:
interfaceType
- The type of network interface. This parameter is required.- Returns:
this
- See Also:
-
ipv4PrefixCount
The number of IPv4 prefixes to be automatically assigned to the network interface.When creating a network interface, you can't specify a count of IPv4 prefixes if you've specified one of the following: specific IPv4 prefixes, specific private IPv4 addresses, or a count of private IPv4 addresses.
- Parameters:
ipv4PrefixCount
- The number of IPv4 prefixes to be automatically assigned to the network interface. This parameter is required.- Returns:
this
- See Also:
-
ipv4Prefixes
The IPv4 delegated prefixes that are assigned to the network interface.When creating a network interface, you can't specify IPv4 prefixes if you've specified one of the following: a count of IPv4 prefixes, specific private IPv4 addresses, or a count of private IPv4 addresses.
- Parameters:
ipv4Prefixes
- The IPv4 delegated prefixes that are assigned to the network interface. This parameter is required.- Returns:
this
- See Also:
-
ipv4Prefixes
@Stability(Stable) public CfnNetworkInterface.Builder ipv4Prefixes(List<? extends Object> ipv4Prefixes) The IPv4 delegated prefixes that are assigned to the network interface.When creating a network interface, you can't specify IPv4 prefixes if you've specified one of the following: a count of IPv4 prefixes, specific private IPv4 addresses, or a count of private IPv4 addresses.
- Parameters:
ipv4Prefixes
- The IPv4 delegated prefixes that are assigned to the network interface. This parameter is required.- Returns:
this
- See Also:
-
ipv6AddressCount
The number of IPv6 addresses to assign to a network interface.Amazon EC2 automatically selects the IPv6 addresses from the subnet range. To specify specific IPv6 addresses, use the
Ipv6Addresses
property and don't specify this property.When creating a network interface, you can't specify a count of IPv6 addresses if you've specified one of the following: specific IPv6 addresses, specific IPv6 prefixes, or a count of IPv6 prefixes.
- Parameters:
ipv6AddressCount
- The number of IPv6 addresses to assign to a network interface. This parameter is required.- Returns:
this
- See Also:
-
ipv6Addresses
One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet to associate with the network interface.If you're specifying a number of IPv6 addresses, use the
Ipv6AddressCount
property and don't specify this property.When creating a network interface, you can't specify IPv6 addresses if you've specified one of the following: a count of IPv6 addresses, specific IPv6 prefixes, or a count of IPv6 prefixes.
- Parameters:
ipv6Addresses
- One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet to associate with the network interface. This parameter is required.- Returns:
this
- See Also:
-
ipv6Addresses
@Stability(Stable) public CfnNetworkInterface.Builder ipv6Addresses(List<? extends Object> ipv6Addresses) One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet to associate with the network interface.If you're specifying a number of IPv6 addresses, use the
Ipv6AddressCount
property and don't specify this property.When creating a network interface, you can't specify IPv6 addresses if you've specified one of the following: a count of IPv6 addresses, specific IPv6 prefixes, or a count of IPv6 prefixes.
- Parameters:
ipv6Addresses
- One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet to associate with the network interface. This parameter is required.- Returns:
this
- See Also:
-
ipv6PrefixCount
The number of IPv6 prefixes to be automatically assigned to the network interface.When creating a network interface, you can't specify a count of IPv6 prefixes if you've specified one of the following: specific IPv6 prefixes, specific IPv6 addresses, or a count of IPv6 addresses.
- Parameters:
ipv6PrefixCount
- The number of IPv6 prefixes to be automatically assigned to the network interface. This parameter is required.- Returns:
this
- See Also:
-
ipv6Prefixes
The IPv6 delegated prefixes that are assigned to the network interface.When creating a network interface, you can't specify IPv6 prefixes if you've specified one of the following: a count of IPv6 prefixes, specific IPv6 addresses, or a count of IPv6 addresses.
- Parameters:
ipv6Prefixes
- The IPv6 delegated prefixes that are assigned to the network interface. This parameter is required.- Returns:
this
- See Also:
-
ipv6Prefixes
@Stability(Stable) public CfnNetworkInterface.Builder ipv6Prefixes(List<? extends Object> ipv6Prefixes) The IPv6 delegated prefixes that are assigned to the network interface.When creating a network interface, you can't specify IPv6 prefixes if you've specified one of the following: a count of IPv6 prefixes, specific IPv6 addresses, or a count of IPv6 addresses.
- Parameters:
ipv6Prefixes
- The IPv6 delegated prefixes that are assigned to the network interface. This parameter is required.- Returns:
this
- See Also:
-
privateIpAddress
Assigns a single private IP address to the network interface, which is used as the primary private IP address.If you want to specify multiple private IP address, use the
PrivateIpAddresses
property.- Parameters:
privateIpAddress
- Assigns a single private IP address to the network interface, which is used as the primary private IP address. This parameter is required.- Returns:
this
- See Also:
-
privateIpAddresses
@Stability(Stable) public CfnNetworkInterface.Builder privateIpAddresses(IResolvable privateIpAddresses) Assigns private IP addresses to the network interface.You can specify a primary private IP address by setting the value of the
Primary
property totrue
in thePrivateIpAddressSpecification
property. If you want EC2 to automatically assign private IP addresses, use theSecondaryPrivateIpAddressCount
property and do not specify this property.When creating a network interface, you can't specify private IPv4 addresses if you've specified one of the following: a count of private IPv4 addresses, specific IPv4 prefixes, or a count of IPv4 prefixes.
- Parameters:
privateIpAddresses
- Assigns private IP addresses to the network interface. This parameter is required.- Returns:
this
- See Also:
-
privateIpAddresses
@Stability(Stable) public CfnNetworkInterface.Builder privateIpAddresses(List<? extends Object> privateIpAddresses) Assigns private IP addresses to the network interface.You can specify a primary private IP address by setting the value of the
Primary
property totrue
in thePrivateIpAddressSpecification
property. If you want EC2 to automatically assign private IP addresses, use theSecondaryPrivateIpAddressCount
property and do not specify this property.When creating a network interface, you can't specify private IPv4 addresses if you've specified one of the following: a count of private IPv4 addresses, specific IPv4 prefixes, or a count of IPv4 prefixes.
- Parameters:
privateIpAddresses
- Assigns private IP addresses to the network interface. This parameter is required.- Returns:
this
- See Also:
-
secondaryPrivateIpAddressCount
@Stability(Stable) public CfnNetworkInterface.Builder secondaryPrivateIpAddressCount(Number secondaryPrivateIpAddressCount) The number of secondary private IPv4 addresses to assign to a network interface.When you specify a number of secondary IPv4 addresses, Amazon EC2 selects these IP addresses within the subnet's IPv4 CIDR range. You can't specify this option and specify more than one private IP address using
privateIpAddresses
.When creating a Network Interface, you can't specify a count of private IPv4 addresses if you've specified one of the following: specific private IPv4 addresses, specific IPv4 prefixes, or a count of IPv4 prefixes.
- Parameters:
secondaryPrivateIpAddressCount
- The number of secondary private IPv4 addresses to assign to a network interface. This parameter is required.- Returns:
this
- See Also:
-
sourceDestCheck
Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives.If the value is
true
, source/destination checks are enabled; otherwise, they are disabled. The default value istrue
. You must disable source/destination checks if the instance runs services such as network address translation, routing, or firewalls.- Parameters:
sourceDestCheck
- Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives. This parameter is required.- Returns:
this
- See Also:
-
sourceDestCheck
Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives.If the value is
true
, source/destination checks are enabled; otherwise, they are disabled. The default value istrue
. You must disable source/destination checks if the instance runs services such as network address translation, routing, or firewalls.- Parameters:
sourceDestCheck
- Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives. This parameter is required.- Returns:
this
- See Also:
-
tags
An arbitrary set of tags (key-value pairs) for this network interface.- Parameters:
tags
- An arbitrary set of tags (key-value pairs) for this network interface. This parameter is required.- Returns:
this
- See Also:
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnNetworkInterface>
- Returns:
- a newly built instance of
CfnNetworkInterface
.
-