NetworkInterfaceArgs

data class NetworkInterfaceArgs(val description: Output<String>? = null, val ipv6AddressCount: Output<Int>? = null, val ipv6Addresses: Output<List<String>>? = null, val name: Output<String>? = null, val networkInterfaceName: Output<String>? = null, val primaryIpAddress: Output<String>? = null, val privateIp: Output<String>? = null, val privateIpAddresses: Output<List<String>>? = null, val privateIps: Output<List<String>>? = null, val privateIpsCount: Output<Int>? = null, val queueNumber: Output<Int>? = null, val resourceGroupId: Output<String>? = null, val secondaryPrivateIpAddressCount: Output<Int>? = null, val securityGroupIds: Output<List<String>>? = null, val securityGroups: Output<List<String>>? = null, val tags: Output<Map<String, Any>>? = null, val vswitchId: Output<String>? = null) : ConvertibleToJava<NetworkInterfaceArgs>

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.inputs.GetZonesArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.alicloud.ecs.SecurityGroup;
import com.pulumi.alicloud.ecs.SecurityGroupArgs;
import com.pulumi.alicloud.vpc.NetworkInterface;
import com.pulumi.alicloud.vpc.NetworkInterfaceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var name = config.get("name").orElse("networkInterfaceName");
var vpc = new Network("vpc", NetworkArgs.builder()
.vpcName(name)
.cidrBlock("192.168.0.0/24")
.build());
final var defaultZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
.availableResourceCreation("VSwitch")
.build());
var vswitch = new Switch("vswitch", SwitchArgs.builder()
.cidrBlock("192.168.0.0/24")
.zoneId(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
.vpcId(vpc.id())
.build());
var group = new SecurityGroup("group", SecurityGroupArgs.builder()
.vpcId(vpc.id())
.build());
var defaultNetworkInterface = new NetworkInterface("defaultNetworkInterface", NetworkInterfaceArgs.builder()
.networkInterfaceName(name)
.vswitchId(vswitch.id())
.securityGroupIds(group.id())
.privateIp("192.168.0.2")
.privateIpsCount(3)
.build());
}
}

Import

ENI can be imported using the id, e.g.

$ pulumi import alicloud:vpc/networkInterface:NetworkInterface eni eni-abc1234567890000

Constructors

Link copied to clipboard
fun NetworkInterfaceArgs(description: Output<String>? = null, ipv6AddressCount: Output<Int>? = null, ipv6Addresses: Output<List<String>>? = null, name: Output<String>? = null, networkInterfaceName: Output<String>? = null, primaryIpAddress: Output<String>? = null, privateIp: Output<String>? = null, privateIpAddresses: Output<List<String>>? = null, privateIps: Output<List<String>>? = null, privateIpsCount: Output<Int>? = null, queueNumber: Output<Int>? = null, resourceGroupId: Output<String>? = null, secondaryPrivateIpAddressCount: Output<Int>? = null, securityGroupIds: Output<List<String>>? = null, securityGroups: Output<List<String>>? = null, tags: Output<Map<String, Any>>? = null, vswitchId: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): NetworkInterfaceArgs

Properties

Link copied to clipboard
val description: Output<String>? = null

Description of the ENI. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.

Link copied to clipboard
val ipv6AddressCount: Output<Int>? = null
Link copied to clipboard
val ipv6Addresses: Output<List<String>>? = null
Link copied to clipboard
val name: Output<String>? = null

Name of the ENI. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-", ".", "_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.

Link copied to clipboard
val networkInterfaceName: Output<String>? = null
Link copied to clipboard
val primaryIpAddress: Output<String>? = null
Link copied to clipboard
val privateIp: Output<String>? = null

The primary private IP of the ENI.

Link copied to clipboard
val privateIpAddresses: Output<List<String>>? = null
Link copied to clipboard
val privateIps: Output<List<String>>? = null

List of secondary private IPs to assign to the ENI. Don't use both private_ips and private_ips_count in the same ENI resource block.

Link copied to clipboard
val privateIpsCount: Output<Int>? = null

Number of secondary private IPs to assign to the ENI. Don't use both private_ips and private_ips_count in the same ENI resource block.

Link copied to clipboard
val queueNumber: Output<Int>? = null
Link copied to clipboard
val resourceGroupId: Output<String>? = null

The Id of resource group which the network interface belongs.

Link copied to clipboard
val secondaryPrivateIpAddressCount: Output<Int>? = null
Link copied to clipboard
val securityGroupIds: Output<List<String>>? = null
Link copied to clipboard
val securityGroups: Output<List<String>>? = null

A list of security group ids to associate with.

Link copied to clipboard
val tags: Output<Map<String, Any>>? = null

A mapping of tags to assign to the resource.

Link copied to clipboard
val vswitchId: Output<String>? = null

The VSwitch to create the ENI in.