NetworkInterfaceArgs

data class NetworkInterfaceArgs(val createFromLocal: Output<Boolean>? = null, val dnsSettings: Output<InterfaceDNSSettingsArgs>? = null, val extendedLocation: Output<ExtendedLocationArgs>? = null, val ipConfigurations: Output<List<IPConfigurationArgs>>? = null, val location: Output<String>? = null, val macAddress: Output<String>? = null, val networkInterfaceName: Output<String>? = null, val networkSecurityGroup: Output<NetworkSecurityGroupArmReferenceArgs>? = null, val resourceGroupName: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<NetworkInterfaceArgs>

The network interface resource definition. Uses Azure REST API version 2025-02-01-preview. In version 2.x of the Azure Native provider, it used API version 2022-12-15-preview. Other available API versions: 2022-12-15-preview, 2023-07-01-preview, 2023-09-01-preview, 2024-01-01, 2024-02-01-preview, 2024-05-01-preview, 2024-07-15-preview, 2024-08-01-preview, 2024-10-01-preview, 2025-04-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native azurestackhci [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

CreateNetworkInterfaceFromLocal

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var networkInterface = new AzureNative.AzureStackHCI.NetworkInterface("networkInterface", new()
{
CreateFromLocal = true,
ExtendedLocation = new AzureNative.AzureStackHCI.Inputs.ExtendedLocationArgs
{
Name = "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location",
Type = AzureNative.AzureStackHCI.ExtendedLocationTypes.CustomLocation,
},
IpConfigurations = new[]
{
new AzureNative.AzureStackHCI.Inputs.IPConfigurationArgs
{
Name = "ipconfig-sample",
Properties = new AzureNative.AzureStackHCI.Inputs.IPConfigurationPropertiesArgs
{
Subnet = new AzureNative.AzureStackHCI.Inputs.LogicalNetworkArmReferenceArgs
{
Id = "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/logicalNetworks/test-lnet",
},
},
},
},
Location = "eastus",
NetworkInterfaceName = "test-nic",
ResourceGroupName = "test-rg",
});
});
package main
import (
azurestackhci "github.com/pulumi/pulumi-azure-native-sdk/azurestackhci/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := azurestackhci.NewNetworkInterface(ctx, "networkInterface", &azurestackhci.NetworkInterfaceArgs{
CreateFromLocal: pulumi.Bool(true),
ExtendedLocation: &azurestackhci.ExtendedLocationArgs{
Name: pulumi.String("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"),
Type: pulumi.String(azurestackhci.ExtendedLocationTypesCustomLocation),
},
IpConfigurations: azurestackhci.IPConfigurationArray{
&azurestackhci.IPConfigurationArgs{
Name: pulumi.String("ipconfig-sample"),
Properties: &azurestackhci.IPConfigurationPropertiesArgs{
Subnet: &azurestackhci.LogicalNetworkArmReferenceArgs{
Id: pulumi.String("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/logicalNetworks/test-lnet"),
},
},
},
},
Location: pulumi.String("eastus"),
NetworkInterfaceName: pulumi.String("test-nic"),
ResourceGroupName: pulumi.String("test-rg"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.azurestackhci.NetworkInterface;
import com.pulumi.azurenative.azurestackhci.NetworkInterfaceArgs;
import com.pulumi.azurenative.azurestackhci.inputs.ExtendedLocationArgs;
import com.pulumi.azurenative.azurestackhci.inputs.IPConfigurationArgs;
import com.pulumi.azurenative.azurestackhci.inputs.IPConfigurationPropertiesArgs;
import com.pulumi.azurenative.azurestackhci.inputs.LogicalNetworkArmReferenceArgs;
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()
.createFromLocal(true)
.extendedLocation(ExtendedLocationArgs.builder()
.name("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location")
.type("CustomLocation")
.build())
.ipConfigurations(IPConfigurationArgs.builder()
.name("ipconfig-sample")
.properties(IPConfigurationPropertiesArgs.builder()
.subnet(LogicalNetworkArmReferenceArgs.builder()
.id("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/logicalNetworks/test-lnet")
.build())
.build())
.build())
.location("eastus")
.networkInterfaceName("test-nic")
.resourceGroupName("test-rg")
.build());
}
}

PutNetworkInterface

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var networkInterface = new AzureNative.AzureStackHCI.NetworkInterface("networkInterface", new()
{
ExtendedLocation = new AzureNative.AzureStackHCI.Inputs.ExtendedLocationArgs
{
Name = "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location",
Type = AzureNative.AzureStackHCI.ExtendedLocationTypes.CustomLocation,
},
IpConfigurations = new[]
{
new AzureNative.AzureStackHCI.Inputs.IPConfigurationArgs
{
Name = "ipconfig-sample",
Properties = new AzureNative.AzureStackHCI.Inputs.IPConfigurationPropertiesArgs
{
Subnet = new AzureNative.AzureStackHCI.Inputs.LogicalNetworkArmReferenceArgs
{
Id = "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/logicalNetworks/test-lnet",
},
},
},
},
Location = "eastus",
NetworkInterfaceName = "test-nic",
ResourceGroupName = "test-rg",
});
});
package main
import (
azurestackhci "github.com/pulumi/pulumi-azure-native-sdk/azurestackhci/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := azurestackhci.NewNetworkInterface(ctx, "networkInterface", &azurestackhci.NetworkInterfaceArgs{
ExtendedLocation: &azurestackhci.ExtendedLocationArgs{
Name: pulumi.String("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"),
Type: pulumi.String(azurestackhci.ExtendedLocationTypesCustomLocation),
},
IpConfigurations: azurestackhci.IPConfigurationArray{
&azurestackhci.IPConfigurationArgs{
Name: pulumi.String("ipconfig-sample"),
Properties: &azurestackhci.IPConfigurationPropertiesArgs{
Subnet: &azurestackhci.LogicalNetworkArmReferenceArgs{
Id: pulumi.String("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/logicalNetworks/test-lnet"),
},
},
},
},
Location: pulumi.String("eastus"),
NetworkInterfaceName: pulumi.String("test-nic"),
ResourceGroupName: pulumi.String("test-rg"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.azurestackhci.NetworkInterface;
import com.pulumi.azurenative.azurestackhci.NetworkInterfaceArgs;
import com.pulumi.azurenative.azurestackhci.inputs.ExtendedLocationArgs;
import com.pulumi.azurenative.azurestackhci.inputs.IPConfigurationArgs;
import com.pulumi.azurenative.azurestackhci.inputs.IPConfigurationPropertiesArgs;
import com.pulumi.azurenative.azurestackhci.inputs.LogicalNetworkArmReferenceArgs;
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()
.extendedLocation(ExtendedLocationArgs.builder()
.name("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location")
.type("CustomLocation")
.build())
.ipConfigurations(IPConfigurationArgs.builder()
.name("ipconfig-sample")
.properties(IPConfigurationPropertiesArgs.builder()
.subnet(LogicalNetworkArmReferenceArgs.builder()
.id("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/logicalNetworks/test-lnet")
.build())
.build())
.build())
.location("eastus")
.networkInterfaceName("test-nic")
.resourceGroupName("test-rg")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:azurestackhci:NetworkInterface test-nic /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/networkInterfaces/{networkInterfaceName}

Constructors

Link copied to clipboard
constructor(createFromLocal: Output<Boolean>? = null, dnsSettings: Output<InterfaceDNSSettingsArgs>? = null, extendedLocation: Output<ExtendedLocationArgs>? = null, ipConfigurations: Output<List<IPConfigurationArgs>>? = null, location: Output<String>? = null, macAddress: Output<String>? = null, networkInterfaceName: Output<String>? = null, networkSecurityGroup: Output<NetworkSecurityGroupArmReferenceArgs>? = null, resourceGroupName: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val createFromLocal: Output<Boolean>? = null

Boolean indicating whether this is a existing local network interface or if one should be created.

Link copied to clipboard

DNS Settings for the interface

Link copied to clipboard

The extendedLocation of the resource.

Link copied to clipboard

IPConfigurations - A list of IPConfigurations of the network interface.

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

The geo-location where the resource lives

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

MacAddress - The MAC address of the network interface.

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

Name of the network interface

Link copied to clipboard

NetworkSecurityGroup - Network Security Group attached to the network interface.

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

The name of the resource group. The name is case insensitive.

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

Resource tags.

Functions

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