Class CfnNetworkInterface
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.ec2.CfnNetworkInterface
- All Implemented Interfaces:
IInspectable
,ITaggable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)",
date="2024-10-11T15:55:56.666Z")
@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:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent builder forCfnNetworkInterface
.static interface
Configurable options for connection tracking on a network interface.static interface
Describes the IPv6 addresses to associate with the network interface.static interface
Describes an IPv4 prefix.static interface
Describes the IPv6 prefix.static interface
Describes a secondary private IPv4 address for a network interface.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnNetworkInterface
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnNetworkInterface
(software.amazon.jsii.JsiiObjectRef objRef) CfnNetworkInterface
(software.constructs.Construct scope, String id, CfnNetworkInterfaceProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe ID of the network interface.The primary IPv6 address of the network interface.The primary private IP address of the network interface.The secondary private IP addresses of the network interface.The ID of the VPC.A connection tracking specification for the network interface.A description for the network interface.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.The IDs of the security groups associated with this network interface.The type of network interface.The number of IPv4 prefixes to be automatically assigned to the network interface.The IPv4 delegated prefixes that are assigned to the network interface.The number of IPv6 addresses to assign to the network interface.The IPv6 addresses from the IPv6 CIDR block range of your subnet to assign to the network interface.The number of IPv6 prefixes to be automatically assigned to the network interface.The IPv6 delegated prefixes that are assigned to the network interface.The private IPv4 address to assign to the network interface as the primary private IP address.The private IPv4 addresses to assign to the network interface.The number of secondary private IPv4 addresses to assign to a network interface.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.getTags()
Tag Manager which manages the tags for this resource.The tags to apply to the network interface.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
A connection tracking specification for the network interface.void
setConnectionTrackingSpecification
(CfnNetworkInterface.ConnectionTrackingSpecificationProperty value) A connection tracking specification for the network interface.void
setDescription
(String value) A description for the network interface.void
setEnablePrimaryIpv6
(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.void
setEnablePrimaryIpv6
(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.void
setGroupSet
(List<String> value) The IDs of the security groups associated with this network interface.void
setInterfaceType
(String value) The type of network interface.void
setIpv4PrefixCount
(Number value) The number of IPv4 prefixes to be automatically assigned to the network interface.void
setIpv4Prefixes
(List<Object> value) The IPv4 delegated prefixes that are assigned to the network interface.void
setIpv4Prefixes
(IResolvable value) The IPv4 delegated prefixes that are assigned to the network interface.void
setIpv6AddressCount
(Number value) The number of IPv6 addresses to assign to the network interface.void
setIpv6Addresses
(List<Object> value) The IPv6 addresses from the IPv6 CIDR block range of your subnet to assign to the network interface.void
setIpv6Addresses
(IResolvable value) The IPv6 addresses from the IPv6 CIDR block range of your subnet to assign to the network interface.void
setIpv6PrefixCount
(Number value) The number of IPv6 prefixes to be automatically assigned to the network interface.void
setIpv6Prefixes
(List<Object> value) The IPv6 delegated prefixes that are assigned to the network interface.void
setIpv6Prefixes
(IResolvable value) The IPv6 delegated prefixes that are assigned to the network interface.void
setPrivateIpAddress
(String value) The private IPv4 address to assign to the network interface as the primary private IP address.void
setPrivateIpAddresses
(List<Object> value) The private IPv4 addresses to assign to the network interface.void
setPrivateIpAddresses
(IResolvable value) The private IPv4 addresses to assign to the network interface.void
The number of secondary private IPv4 addresses to assign to a network interface.void
setSourceDestCheck
(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.void
setSourceDestCheck
(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.void
setSubnetId
(String value) The ID of the subnet to associate with the network interface.void
setTagsRaw
(List<CfnTag> value) The tags to apply to the network interface.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- 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 classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrId
The ID of the network interface. -
getAttrPrimaryIpv6Address
The primary IPv6 address of the network interface. -
getAttrPrimaryPrivateIpAddress
The primary private IP address of the network interface.For example,
10.0.0.192
. -
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
The ID of the VPC. -
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getSubnetId
The ID of the subnet to associate with the network interface. -
setSubnetId
The ID of the subnet to associate with the network interface. -
getConnectionTrackingSpecification
A connection tracking specification for the network interface. -
setConnectionTrackingSpecification
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
A description for the network interface. -
setDescription
A description for the network interface. -
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
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
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
The IDs of the security groups associated with this network interface. -
setGroupSet
The IDs of the security groups associated with this network interface. -
getInterfaceType
The type of network interface. -
setInterfaceType
The type of network interface. -
getIpv4PrefixCount
The number of IPv4 prefixes to be automatically assigned to the network interface. -
setIpv4PrefixCount
The number of IPv4 prefixes to be automatically assigned to the network interface. -
getIpv4Prefixes
The IPv4 delegated prefixes that are assigned to the network interface. -
setIpv4Prefixes
The IPv4 delegated prefixes that are assigned to the network interface. -
setIpv4Prefixes
The IPv4 delegated prefixes that are assigned to the network interface. -
getIpv6AddressCount
The number of IPv6 addresses to assign to the network interface. -
setIpv6AddressCount
The number of IPv6 addresses to assign to the network interface. -
getIpv6Addresses
The IPv6 addresses from the IPv6 CIDR block range of your subnet to assign to the network interface. -
setIpv6Addresses
The IPv6 addresses from the IPv6 CIDR block range of your subnet to assign to the network interface. -
setIpv6Addresses
The IPv6 addresses from the IPv6 CIDR block range of your subnet to assign to the network interface. -
getIpv6PrefixCount
The number of IPv6 prefixes to be automatically assigned to the network interface. -
setIpv6PrefixCount
The number of IPv6 prefixes to be automatically assigned to the network interface. -
getIpv6Prefixes
The IPv6 delegated prefixes that are assigned to the network interface. -
setIpv6Prefixes
The IPv6 delegated prefixes that are assigned to the network interface. -
setIpv6Prefixes
The IPv6 delegated prefixes that are assigned to the network interface. -
getPrivateIpAddress
The private IPv4 address to assign to the network interface as the primary private IP address. -
setPrivateIpAddress
The private IPv4 address to assign to the network interface as the primary private IP address. -
getPrivateIpAddresses
The private IPv4 addresses to assign to the network interface. -
setPrivateIpAddresses
The private IPv4 addresses to assign to the network interface. -
setPrivateIpAddresses
The private IPv4 addresses to assign to the network interface. -
getSecondaryPrivateIpAddressCount
The number of secondary private IPv4 addresses to assign to a network interface. -
setSecondaryPrivateIpAddressCount
The number of secondary private IPv4 addresses to assign to a network interface. -
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
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
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
The tags to apply to the network interface. -
setTagsRaw
The tags to apply to the network interface.
-