LogicalNetworkArgs

data class LogicalNetworkArgs(val dhcpOptions: Output<LogicalNetworkPropertiesDhcpOptionsArgs>? = null, val extendedLocation: Output<ExtendedLocationArgs>? = null, val location: Output<String>? = null, val logicalNetworkName: Output<String>? = null, val resourceGroupName: Output<String>? = null, val subnets: Output<List<SubnetArgs>>? = null, val tags: Output<Map<String, String>>? = null, val vmSwitchName: Output<String>? = null) : ConvertibleToJava<LogicalNetworkArgs>

The logical network resource definition. Uses Azure REST API version 2025-02-01-preview. In version 2.x of the Azure Native provider, it used API version 2023-09-01-preview. Other available API versions: 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

PutLogicalNetwork

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var logicalNetwork = new AzureNative.AzureStackHCI.LogicalNetwork("logicalNetwork", new()
{
ExtendedLocation = new AzureNative.AzureStackHCI.Inputs.ExtendedLocationArgs
{
Name = "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location",
Type = AzureNative.AzureStackHCI.ExtendedLocationTypes.CustomLocation,
},
Location = "West US2",
LogicalNetworkName = "test-lnet",
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.NewLogicalNetwork(ctx, "logicalNetwork", &azurestackhci.LogicalNetworkArgs{
ExtendedLocation: &azurestackhci.ExtendedLocationArgs{
Name: pulumi.String("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"),
Type: pulumi.String(azurestackhci.ExtendedLocationTypesCustomLocation),
},
Location: pulumi.String("West US2"),
LogicalNetworkName: pulumi.String("test-lnet"),
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.LogicalNetwork;
import com.pulumi.azurenative.azurestackhci.LogicalNetworkArgs;
import com.pulumi.azurenative.azurestackhci.inputs.ExtendedLocationArgs;
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 logicalNetwork = new LogicalNetwork("logicalNetwork", LogicalNetworkArgs.builder()
.extendedLocation(ExtendedLocationArgs.builder()
.name("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location")
.type("CustomLocation")
.build())
.location("West US2")
.logicalNetworkName("test-lnet")
.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:LogicalNetwork test-lnet /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/logicalNetworks/{logicalNetworkName}

Constructors

Link copied to clipboard
constructor(dhcpOptions: Output<LogicalNetworkPropertiesDhcpOptionsArgs>? = null, extendedLocation: Output<ExtendedLocationArgs>? = null, location: Output<String>? = null, logicalNetworkName: Output<String>? = null, resourceGroupName: Output<String>? = null, subnets: Output<List<SubnetArgs>>? = null, tags: Output<Map<String, String>>? = null, vmSwitchName: Output<String>? = null)

Properties

Link copied to clipboard

DhcpOptions contains an array of DNS servers available to VMs deployed in the logical network. Standard DHCP option for a subnet overrides logical network DHCP options.

Link copied to clipboard

The extendedLocation of the resource.

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

The geo-location where the resource lives

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

Name of the logical network

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 subnets: Output<List<SubnetArgs>>? = null

Subnet - list of subnets under the logical network

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

Resource tags.

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

name of the network switch to be used for VMs

Functions

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