Class CfnNetworkInterface
- All Implemented Interfaces:
IInspectable,ITaggable,INetworkInterfaceRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
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
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnNetworkInterface.static interfaceConfigurable options for connection tracking on a network interface.static interfaceDescribes the IPv6 addresses to associate with the network interface.static interfaceDescribes an IPv4 prefix.static interfaceDescribes the IPv6 prefix.static interfaceDescribes a secondary private IPv4 address for a network interface.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.services.ec2.INetworkInterfaceRef
INetworkInterfaceRef.Jsii$Default, INetworkInterfaceRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnNetworkInterface(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnNetworkInterface(software.amazon.jsii.JsiiObjectRef objRef) CfnNetworkInterface(software.constructs.Construct scope, String id, CfnNetworkInterfaceProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic INetworkInterfaceReffromNetworkInterfaceId(software.constructs.Construct scope, String id, String networkInterfaceId) Creates a new INetworkInterfaceRef from a networkInterfaceId.The 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.A reference to a NetworkInterface resource.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.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidA connection tracking specification for the network interface.voidsetConnectionTrackingSpecification(CfnNetworkInterface.ConnectionTrackingSpecificationProperty value) A connection tracking specification for the network interface.voidsetDescription(String value) A description for the network interface.voidsetEnablePrimaryIpv6(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.voidsetEnablePrimaryIpv6(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.voidsetGroupSet(List<String> value) The IDs of the security groups associated with this network interface.voidsetInterfaceType(String value) The type of network interface.voidsetIpv4PrefixCount(Number value) The number of IPv4 prefixes to be automatically assigned to the network interface.voidsetIpv4Prefixes(List<Object> value) The IPv4 delegated prefixes that are assigned to the network interface.voidsetIpv4Prefixes(IResolvable value) The IPv4 delegated prefixes that are assigned to the network interface.voidsetIpv6AddressCount(Number value) The number of IPv6 addresses to assign to the network interface.voidsetIpv6Addresses(List<Object> value) The IPv6 addresses from the IPv6 CIDR block range of your subnet to assign to the network interface.voidsetIpv6Addresses(IResolvable value) The IPv6 addresses from the IPv6 CIDR block range of your subnet to assign to the network interface.voidsetIpv6PrefixCount(Number value) The number of IPv6 prefixes to be automatically assigned to the network interface.voidsetIpv6Prefixes(List<Object> value) The IPv6 delegated prefixes that are assigned to the network interface.voidsetIpv6Prefixes(IResolvable value) The IPv6 delegated prefixes that are assigned to the network interface.voidsetPrivateIpAddress(String value) The private IPv4 address to assign to the network interface as the primary private IP address.voidsetPrivateIpAddresses(List<Object> value) The private IPv4 addresses to assign to the network interface.voidsetPrivateIpAddresses(IResolvable value) The private IPv4 addresses to assign to the network interface.voidThe number of secondary private IPv4 addresses to assign to a network interface.voidsetSourceDestCheck(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.voidsetSourceDestCheck(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.voidsetSubnetId(String value) The ID of the subnet to associate with the network interface.voidsetTagsRaw(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, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods 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
-
fromNetworkInterfaceId
@Stability(Stable) @NotNull public static INetworkInterfaceRef fromNetworkInterfaceId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String networkInterfaceId) Creates a new INetworkInterfaceRef from a networkInterfaceId.- Parameters:
scope- This parameter is required.id- This parameter is required.networkInterfaceId- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin 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:
renderPropertiesin 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:
getCfnPropertiesin classCfnResource
-
getNetworkInterfaceRef
A reference to a NetworkInterface resource.- Specified by:
getNetworkInterfaceRefin interfaceINetworkInterfaceRef
-
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.Returns union: either
IResolvableorCfnNetworkInterface.ConnectionTrackingSpecificationProperty -
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.Returns union: either
BooleanorIResolvable -
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.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnNetworkInterface.Ipv4PrefixSpecificationProperty> -
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.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnNetworkInterface.InstanceIpv6AddressProperty> -
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.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnNetworkInterface.Ipv6PrefixSpecificationProperty> -
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.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnNetworkInterface.PrivateIpAddressSpecificationProperty> -
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.Returns union: either
BooleanorIResolvable -
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.
-