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,
});
}
}
Inherited Members
Namespace: Pulumi.Aws.Ec2
Assembly: Pulumi.Aws.dll
Syntax
public class NetworkInterface : CustomResource
Constructors
View SourceNetworkInterface(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 SourceAttachments
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>> |
Description
A description for the network interface.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
MacAddress
The MAC address of the network interface.
Declaration
public Output<string> MacAddress { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
OutpostArn
Declaration
public Output<string> OutpostArn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PrivateDnsName
The private DNS name of the network interface (IPv4).
Declaration
public Output<string> PrivateDnsName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PrivateIp
Declaration
public Output<string> PrivateIp { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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>> |
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> |
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>> |
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>> |
SubnetId
Subnet ID to create the ENI in.
Declaration
public Output<string> SubnetId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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 SourceGet(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 |