Class CfnNetworkInterface
A CloudFormation AWS::EC2::NetworkInterface
.
Inherited Members
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.AWS.EC2.dll
Syntax (csharp)
public class CfnNetworkInterface : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnNetworkInterface
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
Describes a network interface in an Amazon EC2 instance for AWS CloudFormation .
CloudformationResource: AWS::EC2::NetworkInterface
Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html
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
Description = "description",
GroupSet = new [] { "groupSet" },
InterfaceType = "interfaceType",
Ipv6AddressCount = 123,
Ipv6Addresses = new [] { new InstanceIpv6AddressProperty {
Ipv6Address = "ipv6Address"
} },
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(Construct, String, ICfnNetworkInterfaceProps) | Create a new |
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 |
Properties
AttrId | The ID of the network interface. |
AttrPrimaryPrivateIpAddress | The primary private IP address of the network interface. |
AttrSecondaryPrivateIpAddresses | The secondary private IP addresses of the network interface. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
Description | A description for the network interface. |
GroupSet | The security group IDs associated with this network interface. |
InterfaceType | The type of network interface. |
Ipv6AddressCount | The number of IPv6 addresses to assign to a network interface. |
Ipv6Addresses | One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet to associate with the network interface. |
PrivateIpAddress | Assigns a single private IP address to the network interface, which is used as the primary private IP address. |
PrivateIpAddresses | Assigns private IP addresses 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 | An arbitrary set of tags (key-value pairs) for this network interface. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnNetworkInterface(Construct, String, ICfnNetworkInterfaceProps)
Create a new AWS::EC2::NetworkInterface
.
public CfnNetworkInterface(Construct scope, string id, ICfnNetworkInterfaceProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnNetworkInterfaceProps
- resource properties.
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
Properties
AttrId
The ID of the network interface.
public virtual string AttrId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Id
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
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
Description
A description for the network interface.
public virtual string Description { get; set; }
Property Value
System.String
Remarks
GroupSet
The security group IDs associated with this network interface.
public virtual string[] GroupSet { get; set; }
Property Value
System.String[]
Remarks
InterfaceType
The type of network interface.
public virtual string InterfaceType { get; set; }
Property Value
System.String
Remarks
The default is interface
. The supported values are efa
and trunk
.
Ipv6AddressCount
The number of IPv6 addresses to assign to a network interface.
public virtual Nullable<double> Ipv6AddressCount { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Amazon EC2 automatically selects the IPv6 addresses from the subnet range. To specify specific IPv6 addresses, use the Ipv6Addresses
property and don't specify this property.
Ipv6Addresses
One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet to associate with the network interface.
public virtual object Ipv6Addresses { get; set; }
Property Value
System.Object
Remarks
If you're specifying a number of IPv6 addresses, use the Ipv6AddressCount
property and don't specify this property.
PrivateIpAddress
Assigns a single private IP address to the network interface, which is used as the primary private IP address.
public virtual string PrivateIpAddress { get; set; }
Property Value
System.String
Remarks
If you want to specify multiple private IP address, use the PrivateIpAddresses
property.
PrivateIpAddresses
Assigns private IP addresses to the network interface.
public virtual object PrivateIpAddresses { get; set; }
Property Value
System.Object
Remarks
You can specify a primary private IP address by setting the value of the Primary
property to true
in the PrivateIpAddressSpecification
property. If you want EC2 to automatically assign private IP addresses, use the SecondaryPrivateIpAddressCount
property and do not specify this property.
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>
Remarks
When you specify a number of secondary IPv4 addresses, Amazon EC2 selects these IP addresses within the subnet's IPv4 CIDR range. You can't specify this option and specify more than one private IP address using privateIpAddresses
.
You can't specify a count of private IPv4 addresses if you've specified one of the following: specific private IPv4 addresses, specific IPv4 prefixes, or a count of IPv4 prefixes.
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
Remarks
If the value is true
, source/destination checks are enabled; otherwise, they are disabled. The default value is true
. You must disable source/destination checks if the instance runs services such as network address translation, routing, or firewalls.
SubnetId
The ID of the subnet to associate with the network interface.
public virtual string SubnetId { get; set; }
Property Value
System.String
Remarks
Tags
An arbitrary set of tags (key-value pairs) for this network interface.
public virtual TagManager Tags { get; }
Property Value
Remarks
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>