Show / Hide Table of Contents

Class NetworkInterface

Provides an Elastic network interface (ENI) resource.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var test = new Aws.Ec2.NetworkInterface("test", new Aws.Ec2.NetworkInterfaceArgs
    {
        Attachments = 
        {
            new Aws.Ec2.Inputs.NetworkInterfaceAttachmentArgs
            {
                DeviceIndex = 1,
                Instance = aws_instance.Test.Id,
            },
        },
        PrivateIps = 
        {
            "10.0.0.50",
        },
        SecurityGroups = 
        {
            aws_security_group.Web.Id,
        },
        SubnetId = aws_subnet.Public_a.Id,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
NetworkInterface
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.Ec2
Assembly: Pulumi.Aws.dll
Syntax
public class NetworkInterface : CustomResource

Constructors

View Source

NetworkInterface(String, NetworkInterfaceArgs, CustomResourceOptions)

Create a NetworkInterface resource with the given unique name, arguments, and options.

Declaration
public NetworkInterface(string name, NetworkInterfaceArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

NetworkInterfaceArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Attachments

Block to define the attachment of the ENI. Documented below.

Declaration
public Output<ImmutableArray<NetworkInterfaceAttachment>> Attachments { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<NetworkInterfaceAttachment>>
View Source

Description

A description for the network interface.

Declaration
public Output<string> Description { get; }
Property Value
Type Description
Output<System.String>
View Source

MacAddress

The MAC address of the network interface.

Declaration
public Output<string> MacAddress { get; }
Property Value
Type Description
Output<System.String>
View Source

OutpostArn

Declaration
public Output<string> OutpostArn { get; }
Property Value
Type Description
Output<System.String>
View Source

PrivateDnsName

The private DNS name of the network interface (IPv4).

Declaration
public Output<string> PrivateDnsName { get; }
Property Value
Type Description
Output<System.String>
View Source

PrivateIp

Declaration
public Output<string> PrivateIp { get; }
Property Value
Type Description
Output<System.String>
View Source

PrivateIps

List of private IPs to assign to the ENI.

Declaration
public Output<ImmutableArray<string>> PrivateIps { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

PrivateIpsCount

Number of secondary private IPs to assign to the ENI. The total number of private IPs will be 1 + private_ips_count, as a primary private IP will be assiged to an ENI by default.

Declaration
public Output<int> PrivateIpsCount { get; }
Property Value
Type Description
Output<System.Int32>
View Source

SecurityGroups

List of security group IDs to assign to the ENI.

Declaration
public Output<ImmutableArray<string>> SecurityGroups { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

SourceDestCheck

Whether to enable source destination checking for the ENI. Default true.

Declaration
public Output<bool?> SourceDestCheck { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

SubnetId

Subnet ID to create the ENI in.

Declaration
public Output<string> SubnetId { get; }
Property Value
Type Description
Output<System.String>
View Source

Tags

A map of tags to assign to the resource.

Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>

Methods

View Source

Get(String, Input<String>, NetworkInterfaceState, CustomResourceOptions)

Get an existing NetworkInterface resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static NetworkInterface Get(string name, Input<string> id, NetworkInterfaceState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

NetworkInterfaceState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
NetworkInterface
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.