Class CfnNetworkInterface

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-08T21:35:05.889Z") @Stability(Stable) public class CfnNetworkInterface extends CfnResource implements IInspectable, ITaggable
Describes a network interface in an Amazon EC2 instance for AWS CloudFormation .

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.*;
 CfnNetworkInterface cfnNetworkInterface = CfnNetworkInterface.Builder.create(this, "MyCfnNetworkInterface")
         .subnetId("subnetId")
         // the properties below are optional
         .connectionTrackingSpecification(ConnectionTrackingSpecificationProperty.builder()
                 .tcpEstablishedTimeout(123)
                 .udpStreamTimeout(123)
                 .udpTimeout(123)
                 .build())
         .description("description")
         .enablePrimaryIpv6(false)
         .groupSet(List.of("groupSet"))
         .interfaceType("interfaceType")
         .ipv4PrefixCount(123)
         .ipv4Prefixes(List.of(Ipv4PrefixSpecificationProperty.builder()
                 .ipv4Prefix("ipv4Prefix")
                 .build()))
         .ipv6AddressCount(123)
         .ipv6Addresses(List.of(InstanceIpv6AddressProperty.builder()
                 .ipv6Address("ipv6Address")
                 .build()))
         .ipv6PrefixCount(123)
         .ipv6Prefixes(List.of(Ipv6PrefixSpecificationProperty.builder()
                 .ipv6Prefix("ipv6Prefix")
                 .build()))
         .privateIpAddress("privateIpAddress")
         .privateIpAddresses(List.of(PrivateIpAddressSpecificationProperty.builder()
                 .primary(false)
                 .privateIpAddress("privateIpAddress")
                 .build()))
         .secondaryPrivateIpAddressCount(123)
         .sourceDestCheck(false)
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 

See Also:
  • 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

    • CfnNetworkInterface

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

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

      @Stability(Stable) public CfnNetworkInterface(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnNetworkInterfaceProps props)
      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.
      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.
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
      The ID of the network interface.
    • getAttrPrimaryIpv6Address

      @Stability(Stable) @NotNull public String getAttrPrimaryIpv6Address()
      The primary IPv6 address of the network interface.
    • getAttrPrimaryPrivateIpAddress

      @Stability(Stable) @NotNull public String getAttrPrimaryPrivateIpAddress()
      The primary private IP address of the network interface.

      For example, 10.0.0.192 .

    • getAttrSecondaryPrivateIpAddresses

      @Stability(Stable) @NotNull public List<String> getAttrSecondaryPrivateIpAddresses()
      The secondary private IP addresses of the network interface.

      For example, ["10.0.0.161", "10.0.0.162", "10.0.0.163"] .

    • getAttrVpcId

      @Stability(Stable) @NotNull public String getAttrVpcId()
      The ID of the VPC.
    • getCfnProperties

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

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getSubnetId

      @Stability(Stable) @NotNull public String getSubnetId()
      The ID of the subnet to associate with the network interface.
    • setSubnetId

      @Stability(Stable) public void setSubnetId(@NotNull String value)
      The ID of the subnet to associate with the network interface.
    • getConnectionTrackingSpecification

      @Stability(Stable) @Nullable public Object getConnectionTrackingSpecification()
      A connection tracking specification for the network interface.
    • setConnectionTrackingSpecification

      @Stability(Stable) public void setConnectionTrackingSpecification(@Nullable IResolvable value)
      A connection tracking specification for the network interface.
    • setConnectionTrackingSpecification

      @Stability(Stable) public void setConnectionTrackingSpecification(@Nullable CfnNetworkInterface.ConnectionTrackingSpecificationProperty value)
      A connection tracking specification for the network interface.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      A description for the network interface.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      A description for the network interface.
    • getEnablePrimaryIpv6

      @Stability(Stable) @Nullable public Object getEnablePrimaryIpv6()
      If you’re modifying a network interface in a dual-stack or IPv6-only subnet, you have the option to assign a primary IPv6 IP address.
    • setEnablePrimaryIpv6

      @Stability(Stable) public void setEnablePrimaryIpv6(@Nullable Boolean value)
      If you’re modifying a network interface in a dual-stack or IPv6-only subnet, you have the option to assign a primary IPv6 IP address.
    • setEnablePrimaryIpv6

      @Stability(Stable) public void setEnablePrimaryIpv6(@Nullable IResolvable value)
      If you’re modifying a network interface in a dual-stack or IPv6-only subnet, you have the option to assign a primary IPv6 IP address.
    • getGroupSet

      @Stability(Stable) @Nullable public List<String> getGroupSet()
      The IDs of the security groups associated with this network interface.
    • setGroupSet

      @Stability(Stable) public void setGroupSet(@Nullable List<String> value)
      The IDs of the security groups associated with this network interface.
    • getInterfaceType

      @Stability(Stable) @Nullable public String getInterfaceType()
      The type of network interface.
    • setInterfaceType

      @Stability(Stable) public void setInterfaceType(@Nullable String value)
      The type of network interface.
    • getIpv4PrefixCount

      @Stability(Stable) @Nullable public Number getIpv4PrefixCount()
      The number of IPv4 prefixes to be automatically assigned to the network interface.
    • setIpv4PrefixCount

      @Stability(Stable) public void setIpv4PrefixCount(@Nullable Number value)
      The number of IPv4 prefixes to be automatically assigned to the network interface.
    • getIpv4Prefixes

      @Stability(Stable) @Nullable public Object getIpv4Prefixes()
      The IPv4 delegated prefixes that are assigned to the network interface.
    • setIpv4Prefixes

      @Stability(Stable) public void setIpv4Prefixes(@Nullable IResolvable value)
      The IPv4 delegated prefixes that are assigned to the network interface.
    • setIpv4Prefixes

      @Stability(Stable) public void setIpv4Prefixes(@Nullable List<Object> value)
      The IPv4 delegated prefixes that are assigned to the network interface.
    • getIpv6AddressCount

      @Stability(Stable) @Nullable public Number getIpv6AddressCount()
      The number of IPv6 addresses to assign to the network interface.
    • setIpv6AddressCount

      @Stability(Stable) public void setIpv6AddressCount(@Nullable Number value)
      The number of IPv6 addresses to assign to the network interface.
    • getIpv6Addresses

      @Stability(Stable) @Nullable public Object getIpv6Addresses()
      The IPv6 addresses from the IPv6 CIDR block range of your subnet to assign to the network interface.
    • setIpv6Addresses

      @Stability(Stable) public void setIpv6Addresses(@Nullable IResolvable value)
      The IPv6 addresses from the IPv6 CIDR block range of your subnet to assign to the network interface.
    • setIpv6Addresses

      @Stability(Stable) public void setIpv6Addresses(@Nullable List<Object> value)
      The IPv6 addresses from the IPv6 CIDR block range of your subnet to assign to the network interface.
    • getIpv6PrefixCount

      @Stability(Stable) @Nullable public Number getIpv6PrefixCount()
      The number of IPv6 prefixes to be automatically assigned to the network interface.
    • setIpv6PrefixCount

      @Stability(Stable) public void setIpv6PrefixCount(@Nullable Number value)
      The number of IPv6 prefixes to be automatically assigned to the network interface.
    • getIpv6Prefixes

      @Stability(Stable) @Nullable public Object getIpv6Prefixes()
      The IPv6 delegated prefixes that are assigned to the network interface.
    • setIpv6Prefixes

      @Stability(Stable) public void setIpv6Prefixes(@Nullable IResolvable value)
      The IPv6 delegated prefixes that are assigned to the network interface.
    • setIpv6Prefixes

      @Stability(Stable) public void setIpv6Prefixes(@Nullable List<Object> value)
      The IPv6 delegated prefixes that are assigned to the network interface.
    • getPrivateIpAddress

      @Stability(Stable) @Nullable public String getPrivateIpAddress()
      The private IPv4 address to assign to the network interface as the primary private IP address.
    • setPrivateIpAddress

      @Stability(Stable) public void setPrivateIpAddress(@Nullable String value)
      The private IPv4 address to assign to the network interface as the primary private IP address.
    • getPrivateIpAddresses

      @Stability(Stable) @Nullable public Object getPrivateIpAddresses()
      The private IPv4 addresses to assign to the network interface.
    • setPrivateIpAddresses

      @Stability(Stable) public void setPrivateIpAddresses(@Nullable IResolvable value)
      The private IPv4 addresses to assign to the network interface.
    • setPrivateIpAddresses

      @Stability(Stable) public void setPrivateIpAddresses(@Nullable List<Object> value)
      The private IPv4 addresses to assign to the network interface.
    • getSecondaryPrivateIpAddressCount

      @Stability(Stable) @Nullable public Number getSecondaryPrivateIpAddressCount()
      The number of secondary private IPv4 addresses to assign to a network interface.
    • setSecondaryPrivateIpAddressCount

      @Stability(Stable) public void setSecondaryPrivateIpAddressCount(@Nullable Number value)
      The number of secondary private IPv4 addresses to assign to a network interface.
    • getSourceDestCheck

      @Stability(Stable) @Nullable public Object getSourceDestCheck()
      Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives.
    • setSourceDestCheck

      @Stability(Stable) public void setSourceDestCheck(@Nullable Boolean value)
      Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives.
    • setSourceDestCheck

      @Stability(Stable) public void setSourceDestCheck(@Nullable IResolvable value)
      Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      The tags to apply to the network interface.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      The tags to apply to the network interface.