Network Interface Args
data class NetworkInterfaceArgs(val dnsSettings: Output<NetworkInterfaceDnsSettingsArgs>? = null, val enableAcceleratedNetworking: Output<Boolean>? = null, val enableIPForwarding: Output<Boolean>? = null, val extendedLocation: Output<ExtendedLocationArgs>? = null, val id: Output<String>? = null, val ipConfigurations: Output<List<NetworkInterfaceIPConfigurationArgs>>? = null, val location: Output<String>? = null, val migrationPhase: Output<Either<String, NetworkInterfaceMigrationPhase>>? = null, val networkInterfaceName: Output<String>? = null, val networkSecurityGroup: Output<NetworkSecurityGroupArgs>? = null, val nicType: Output<Either<String, NetworkInterfaceNicType>>? = null, val privateLinkService: Output<PrivateLinkServiceArgs>? = null, val resourceGroupName: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<NetworkInterfaceArgs>
A network interface in a resource group. API Version: 2020-11-01.
Example Usage
Create network interface
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var networkInterface = new AzureNative.Network.NetworkInterface("networkInterface", new()
{
EnableAcceleratedNetworking = true,
IpConfigurations = new[]
{
new AzureNative.Network.Inputs.NetworkInterfaceIPConfigurationArgs
{
Name = "ipconfig1",
PublicIPAddress = new AzureNative.Network.Inputs.PublicIPAddressArgs
{
Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-ip",
},
Subnet = new AzureNative.Network.Inputs.SubnetArgs
{
Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/rg1-vnet/subnets/default",
},
},
},
Location = "eastus",
NetworkInterfaceName = "test-nic",
ResourceGroupName = "rg1",
});
});
Content copied to clipboard
package main
import (
network "github.com/pulumi/pulumi-azure-native-sdk/network"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := network.NewNetworkInterface(ctx, "networkInterface", &network.NetworkInterfaceArgs{
EnableAcceleratedNetworking: pulumi.Bool(true),
IpConfigurations: []network.NetworkInterfaceIPConfigurationArgs{
{
Name: pulumi.String("ipconfig1"),
PublicIPAddress: {
Id: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-ip"),
},
Subnet: {
Id: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/rg1-vnet/subnets/default"),
},
},
},
Location: pulumi.String("eastus"),
NetworkInterfaceName: pulumi.String("test-nic"),
ResourceGroupName: pulumi.String("rg1"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.network.NetworkInterface;
import com.pulumi.azurenative.network.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) {
var networkInterface = new NetworkInterface("networkInterface", NetworkInterfaceArgs.builder()
.enableAcceleratedNetworking(true)
.ipConfigurations(Map.ofEntries(
Map.entry("name", "ipconfig1"),
Map.entry("publicIPAddress", Map.of("id", "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-ip")),
Map.entry("subnet", Map.of("id", "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/rg1-vnet/subnets/default"))
))
.location("eastus")
.networkInterfaceName("test-nic")
.resourceGroupName("rg1")
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:network:NetworkInterface test-nic /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/test-nic
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(dnsSettings: Output<NetworkInterfaceDnsSettingsArgs>? = null, enableAcceleratedNetworking: Output<Boolean>? = null, enableIPForwarding: Output<Boolean>? = null, extendedLocation: Output<ExtendedLocationArgs>? = null, id: Output<String>? = null, ipConfigurations: Output<List<NetworkInterfaceIPConfigurationArgs>>? = null, location: Output<String>? = null, migrationPhase: Output<Either<String, NetworkInterfaceMigrationPhase>>? = null, networkInterfaceName: Output<String>? = null, networkSecurityGroup: Output<NetworkSecurityGroupArgs>? = null, nicType: Output<Either<String, NetworkInterfaceNicType>>? = null, privateLinkService: Output<PrivateLinkServiceArgs>? = null, resourceGroupName: Output<String>? = null, tags: Output<Map<String, String>>? = null)
Properties
Link copied to clipboard
The DNS settings in network interface.
Link copied to clipboard
If the network interface is accelerated networking enabled.
Link copied to clipboard
Indicates whether IP forwarding is enabled on this network interface.
Link copied to clipboard
The extended location of the network interface.
Link copied to clipboard
A list of IPConfigurations of the network interface.
Link copied to clipboard
Migration phase of Network Interface resource.
Link copied to clipboard
The name of the network interface.
Link copied to clipboard
The reference to the NetworkSecurityGroup resource.
Link copied to clipboard
Type of Network Interface resource.
Link copied to clipboard
Privatelinkservice of the network interface resource.
Link copied to clipboard
The name of the resource group.