Class CfnNetworkInterface
Describes a network interface in an Amazon EC2 instance for AWS CloudFormation .
Inherited Members
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnNetworkInterface : CfnResource, IInspectable, ITaggable
Syntax (vb)
Public Class CfnNetworkInterface
Inherits CfnResource
Implements IInspectable, ITaggable
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html
CloudformationResource: AWS::EC2::NetworkInterface
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;
var cfnNetworkInterface = new CfnNetworkInterface(this, "MyCfnNetworkInterface", new CfnNetworkInterfaceProps {
SubnetId = "subnetId",
// the properties below are optional
ConnectionTrackingSpecification = new ConnectionTrackingSpecificationProperty {
TcpEstablishedTimeout = 123,
UdpStreamTimeout = 123,
UdpTimeout = 123
},
Description = "description",
EnablePrimaryIpv6 = false,
GroupSet = new [] { "groupSet" },
InterfaceType = "interfaceType",
Ipv4PrefixCount = 123,
Ipv4Prefixes = new [] { new Ipv4PrefixSpecificationProperty {
Ipv4Prefix = "ipv4Prefix"
} },
Ipv6AddressCount = 123,
Ipv6Addresses = new [] { new InstanceIpv6AddressProperty {
Ipv6Address = "ipv6Address"
} },
Ipv6PrefixCount = 123,
Ipv6Prefixes = new [] { new Ipv6PrefixSpecificationProperty {
Ipv6Prefix = "ipv6Prefix"
} },
PrivateIpAddress = "privateIpAddress",
PrivateIpAddresses = new [] { new PrivateIpAddressSpecificationProperty {
Primary = false,
PrivateIpAddress = "privateIpAddress"
} },
SecondaryPrivateIpAddressCount = 123,
SourceDestCheck = false,
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
});
Synopsis
Constructors
CfnNetworkInterface(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnNetworkInterface(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnNetworkInterface(Construct, String, ICfnNetworkInterfaceProps) |
Properties
AttrId | The ID of the network interface. |
AttrPrimaryIpv6Address | The primary IPv6 address of the network interface. |
AttrPrimaryPrivateIpAddress | The primary private IP address of the network interface. |
AttrSecondaryPrivateIpAddresses | The secondary private IP addresses of the network interface. |
AttrVpcId | The ID of the VPC. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
ConnectionTrackingSpecification | A connection tracking specification for the network interface. |
Description | A description for the network interface. |
EnablePrimaryIpv6 | 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. |
GroupSet | The IDs of the security groups associated with this network interface. |
InterfaceType | The type of network interface. |
Ipv4PrefixCount | The number of IPv4 prefixes to be automatically assigned to the network interface. |
Ipv4Prefixes | The IPv4 delegated prefixes that are assigned to the network interface. |
Ipv6AddressCount | The number of IPv6 addresses to assign to the network interface. |
Ipv6Addresses | The IPv6 addresses from the IPv6 CIDR block range of your subnet to assign to the network interface. |
Ipv6PrefixCount | The number of IPv6 prefixes to be automatically assigned to the network interface. |
Ipv6Prefixes | The IPv6 delegated prefixes that are assigned to the network interface. |
PrivateIpAddress | The private IPv4 address to assign to the network interface as the primary private IP address. |
PrivateIpAddresses | The private IPv4 addresses to assign to the network interface. |
SecondaryPrivateIpAddressCount | The number of secondary private IPv4 addresses to assign to a network interface. |
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. |
SubnetId | The ID of the subnet to associate with the network interface. |
Tags | Tag Manager which manages the tags for this resource. |
TagsRaw | The tags to apply to the network interface. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnNetworkInterface(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnNetworkInterface(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnNetworkInterface(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnNetworkInterface(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnNetworkInterface(Construct, String, ICfnNetworkInterfaceProps)
public CfnNetworkInterface(Construct scope, string id, ICfnNetworkInterfaceProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnNetworkInterfaceProps
Resource properties.
Properties
AttrId
The ID of the network interface.
public virtual string AttrId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Id
AttrPrimaryIpv6Address
The primary IPv6 address of the network interface.
public virtual string AttrPrimaryIpv6Address { get; }
Property Value
System.String
Remarks
CloudformationAttribute: PrimaryIpv6Address
AttrPrimaryPrivateIpAddress
The primary private IP address of the network interface.
public virtual string AttrPrimaryPrivateIpAddress { get; }
Property Value
System.String
Remarks
For example, 10.0.0.192
.
CloudformationAttribute: PrimaryPrivateIpAddress
AttrSecondaryPrivateIpAddresses
The secondary private IP addresses of the network interface.
public virtual string[] AttrSecondaryPrivateIpAddresses { get; }
Property Value
System.String[]
Remarks
For example, ["10.0.0.161", "10.0.0.162", "10.0.0.163"]
.
CloudformationAttribute: SecondaryPrivateIpAddresses
AttrVpcId
The ID of the VPC.
public virtual string AttrVpcId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: VpcId
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
ConnectionTrackingSpecification
A connection tracking specification for the network interface.
public virtual object ConnectionTrackingSpecification { get; set; }
Property Value
System.Object
Description
A description for the network interface.
public virtual string Description { get; set; }
Property Value
System.String
EnablePrimaryIpv6
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.
public virtual object EnablePrimaryIpv6 { get; set; }
Property Value
System.Object
GroupSet
The IDs of the security groups associated with this network interface.
public virtual string[] GroupSet { get; set; }
Property Value
System.String[]
InterfaceType
The type of network interface.
public virtual string InterfaceType { get; set; }
Property Value
System.String
Ipv4PrefixCount
The number of IPv4 prefixes to be automatically assigned to the network interface.
public virtual Nullable<double> Ipv4PrefixCount { get; set; }
Property Value
System.Nullable<System.Double>
Ipv4Prefixes
The IPv4 delegated prefixes that are assigned to the network interface.
public virtual object Ipv4Prefixes { get; set; }
Property Value
System.Object
Ipv6AddressCount
The number of IPv6 addresses to assign to the network interface.
public virtual Nullable<double> Ipv6AddressCount { get; set; }
Property Value
System.Nullable<System.Double>
Ipv6Addresses
The IPv6 addresses from the IPv6 CIDR block range of your subnet to assign to the network interface.
public virtual object Ipv6Addresses { get; set; }
Property Value
System.Object
Ipv6PrefixCount
The number of IPv6 prefixes to be automatically assigned to the network interface.
public virtual Nullable<double> Ipv6PrefixCount { get; set; }
Property Value
System.Nullable<System.Double>
Ipv6Prefixes
The IPv6 delegated prefixes that are assigned to the network interface.
public virtual object Ipv6Prefixes { get; set; }
Property Value
System.Object
PrivateIpAddress
The private IPv4 address to assign to the network interface as the primary private IP address.
public virtual string PrivateIpAddress { get; set; }
Property Value
System.String
PrivateIpAddresses
The private IPv4 addresses to assign to the network interface.
public virtual object PrivateIpAddresses { get; set; }
Property Value
System.Object
SecondaryPrivateIpAddressCount
The number of secondary private IPv4 addresses to assign to a network interface.
public virtual Nullable<double> SecondaryPrivateIpAddressCount { get; set; }
Property Value
System.Nullable<System.Double>
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.
public virtual object SourceDestCheck { get; set; }
Property Value
System.Object
SubnetId
The ID of the subnet to associate with the network interface.
public virtual string SubnetId { get; set; }
Property Value
System.String
Tags
Tag Manager which manages the tags for this resource.
public virtual TagManager Tags { get; }
Property Value
TagsRaw
The tags to apply to the network interface.
public virtual ICfnTag[] TagsRaw { get; set; }
Property Value
ICfnTag[]
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>