Logical Network Args
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 2023-09-01-preview. Other available API versions: 2024-01-01, 2024-02-01-preview, 2024-05-01-preview, 2024-07-15-preview, 2024-08-01-preview, 2024-10-01-preview, 2025-02-01-preview, 2025-04-01-preview.
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",
});
});
Content copied to clipboard
package main
import (
azurestackhci "github.com/pulumi/pulumi-azure-native-sdk/azurestackhci/v2"
"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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
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}
Content copied to clipboard
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
Name of the logical network
Link copied to clipboard
The name of the resource group. The name is case insensitive.
Link copied to clipboard
Subnet - list of subnets under the logical network
Link copied to clipboard
name of the network switch to be used for VMs