VirtualNetworkArgs

data class VirtualNetworkArgs(val allowedSubnets: Output<List<SubnetArgs>>? = null, val description: Output<String>? = null, val externalProviderResourceId: Output<String>? = null, val labName: Output<String>? = null, val location: Output<String>? = null, val name: Output<String>? = null, val resourceGroupName: Output<String>? = null, val subnetOverrides: Output<List<SubnetOverrideArgs>>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<VirtualNetworkArgs>

A virtual network. Uses Azure REST API version 2018-09-15. In version 1.x of the Azure Native provider, it used API version 2018-09-15.

Example Usage

VirtualNetworks_CreateOrUpdate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualNetwork = new AzureNative.DevTestLab.VirtualNetwork("virtualNetwork", new()
{
LabName = "{labName}",
Location = "{location}",
Name = "{virtualNetworkName}",
ResourceGroupName = "resourceGroupName",
Tags =
{
{ "tagName1", "tagValue1" },
},
});
});
package main
import (
devtestlab "github.com/pulumi/pulumi-azure-native-sdk/devtestlab/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := devtestlab.NewVirtualNetwork(ctx, "virtualNetwork", &devtestlab.VirtualNetworkArgs{
LabName: pulumi.String("{labName}"),
Location: pulumi.String("{location}"),
Name: pulumi.String("{virtualNetworkName}"),
ResourceGroupName: pulumi.String("resourceGroupName"),
Tags: pulumi.StringMap{
"tagName1": pulumi.String("tagValue1"),
},
})
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.devtestlab.VirtualNetwork;
import com.pulumi.azurenative.devtestlab.VirtualNetworkArgs;
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 virtualNetwork = new VirtualNetwork("virtualNetwork", VirtualNetworkArgs.builder()
.labName("{labName}")
.location("{location}")
.name("{virtualNetworkName}")
.resourceGroupName("resourceGroupName")
.tags(Map.of("tagName1", "tagValue1"))
.build());
}
}

Import

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

$ pulumi import azure-native:devtestlab:VirtualNetwork {virtualNetworkName} /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks/{name}

Constructors

Link copied to clipboard
constructor(allowedSubnets: Output<List<SubnetArgs>>? = null, description: Output<String>? = null, externalProviderResourceId: Output<String>? = null, labName: Output<String>? = null, location: Output<String>? = null, name: Output<String>? = null, resourceGroupName: Output<String>? = null, subnetOverrides: Output<List<SubnetOverrideArgs>>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val allowedSubnets: Output<List<SubnetArgs>>? = null

The allowed subnets of the virtual network.

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

The description of the virtual network.

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

The Microsoft.Network resource identifier of the virtual network.

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

The name of the lab.

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

The location of the resource.

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

The name of the virtual network.

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

The name of the resource group.

Link copied to clipboard

The subnet overrides of the virtual network.

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

The tags of the resource.

Functions

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