Interface CfnInstance.NetworkInterfaceProperty

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CfnInstance.NetworkInterfaceProperty.Jsii$Proxy
Enclosing class:
CfnInstance

@Stability(Stable) public static interface CfnInstance.NetworkInterfaceProperty extends software.amazon.jsii.JsiiSerializable
Specifies a network interface that is to be attached to an instance.

You can create a network interface when launching an instance. For an example, see the AWS::EC2::Instance examples .

Alternatively, you can attach an existing network interface when launching an instance. For an example, see the AWS::EC2:NetworkInterface examples .

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.*;
 NetworkInterfaceProperty networkInterfaceProperty = NetworkInterfaceProperty.builder()
         .deviceIndex("deviceIndex")
         // the properties below are optional
         .associateCarrierIpAddress(false)
         .associatePublicIpAddress(false)
         .deleteOnTermination(false)
         .description("description")
         .groupSet(List.of("groupSet"))
         .ipv6AddressCount(123)
         .ipv6Addresses(List.of(InstanceIpv6AddressProperty.builder()
                 .ipv6Address("ipv6Address")
                 .build()))
         .networkInterfaceId("networkInterfaceId")
         .privateIpAddress("privateIpAddress")
         .privateIpAddresses(List.of(PrivateIpAddressSpecificationProperty.builder()
                 .primary(false)
                 .privateIpAddress("privateIpAddress")
                 .build()))
         .secondaryPrivateIpAddressCount(123)
         .subnetId("subnetId")
         .build();
 

See Also: