Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azurenative.devtestlab.kotlin.VirtualNetworkArgs.kt Maven / Gradle / Ivy
Go to download
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.devtestlab.kotlin
import com.pulumi.azurenative.devtestlab.VirtualNetworkArgs.builder
import com.pulumi.azurenative.devtestlab.kotlin.inputs.SubnetArgs
import com.pulumi.azurenative.devtestlab.kotlin.inputs.SubnetArgsBuilder
import com.pulumi.azurenative.devtestlab.kotlin.inputs.SubnetOverrideArgs
import com.pulumi.azurenative.devtestlab.kotlin.inputs.SubnetOverrideArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* A virtual network.
* Azure REST API version: 2018-09-15. Prior API version in Azure Native 1.x: 2018-09-15.
* Other available API versions: 2016-05-15.
* ## Example Usage
* ### VirtualNetworks_CreateOrUpdate
* ```csharp
* 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" },
* },
* });
* });
* ```
* ```go
* 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
* })
* }
* ```
* ```java
* 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.
* ```sh
* $ pulumi import azure-native:devtestlab:VirtualNetwork {virtualNetworkName} /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualnetworks/{name}
* ```
* @property allowedSubnets The allowed subnets of the virtual network.
* @property description The description of the virtual network.
* @property externalProviderResourceId The Microsoft.Network resource identifier of the virtual network.
* @property labName The name of the lab.
* @property location The location of the resource.
* @property name The name of the virtual network.
* @property resourceGroupName The name of the resource group.
* @property subnetOverrides The subnet overrides of the virtual network.
* @property tags The tags of the resource.
*/
public data class VirtualNetworkArgs(
public val allowedSubnets: Output>? = null,
public val description: Output? = null,
public val externalProviderResourceId: Output? = null,
public val labName: Output? = null,
public val location: Output? = null,
public val name: Output? = null,
public val resourceGroupName: Output? = null,
public val subnetOverrides: Output>? = null,
public val tags: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.devtestlab.VirtualNetworkArgs =
com.pulumi.azurenative.devtestlab.VirtualNetworkArgs.builder()
.allowedSubnets(
allowedSubnets?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.description(description?.applyValue({ args0 -> args0 }))
.externalProviderResourceId(externalProviderResourceId?.applyValue({ args0 -> args0 }))
.labName(labName?.applyValue({ args0 -> args0 }))
.location(location?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.subnetOverrides(
subnetOverrides?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.tags(
tags?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}),
).build()
}
/**
* Builder for [VirtualNetworkArgs].
*/
@PulumiTagMarker
public class VirtualNetworkArgsBuilder internal constructor() {
private var allowedSubnets: Output>? = null
private var description: Output? = null
private var externalProviderResourceId: Output? = null
private var labName: Output? = null
private var location: Output? = null
private var name: Output? = null
private var resourceGroupName: Output? = null
private var subnetOverrides: Output>? = null
private var tags: Output>? = null
/**
* @param value The allowed subnets of the virtual network.
*/
@JvmName("wdngfblashrdsesr")
public suspend fun allowedSubnets(`value`: Output>) {
this.allowedSubnets = value
}
@JvmName("xglbmbrlltlhqvik")
public suspend fun allowedSubnets(vararg values: Output) {
this.allowedSubnets = Output.all(values.asList())
}
/**
* @param values The allowed subnets of the virtual network.
*/
@JvmName("taxqxoifuieptnly")
public suspend fun allowedSubnets(values: List>) {
this.allowedSubnets = Output.all(values)
}
/**
* @param value The description of the virtual network.
*/
@JvmName("stpcuiyfgymxnhym")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value The Microsoft.Network resource identifier of the virtual network.
*/
@JvmName("ncxywqidejpnweoo")
public suspend fun externalProviderResourceId(`value`: Output) {
this.externalProviderResourceId = value
}
/**
* @param value The name of the lab.
*/
@JvmName("hetquxhxfjqresas")
public suspend fun labName(`value`: Output) {
this.labName = value
}
/**
* @param value The location of the resource.
*/
@JvmName("tnmvjxanijlmrjpx")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value The name of the virtual network.
*/
@JvmName("pgunqiqargnankxg")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The name of the resource group.
*/
@JvmName("gvaioysnxmhchvic")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The subnet overrides of the virtual network.
*/
@JvmName("ghcwbvkyjuvkedht")
public suspend fun subnetOverrides(`value`: Output>) {
this.subnetOverrides = value
}
@JvmName("indscmhpuxvyhcuv")
public suspend fun subnetOverrides(vararg values: Output) {
this.subnetOverrides = Output.all(values.asList())
}
/**
* @param values The subnet overrides of the virtual network.
*/
@JvmName("wsgreoqyursbjqty")
public suspend fun subnetOverrides(values: List>) {
this.subnetOverrides = Output.all(values)
}
/**
* @param value The tags of the resource.
*/
@JvmName("pkxlcrltupfpkxvl")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value The allowed subnets of the virtual network.
*/
@JvmName("xitjyadiknaadlnr")
public suspend fun allowedSubnets(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.allowedSubnets = mapped
}
/**
* @param argument The allowed subnets of the virtual network.
*/
@JvmName("nqsoauuvrowwtmkc")
public suspend fun allowedSubnets(argument: List Unit>) {
val toBeMapped = argument.toList().map { SubnetArgsBuilder().applySuspend { it() }.build() }
val mapped = of(toBeMapped)
this.allowedSubnets = mapped
}
/**
* @param argument The allowed subnets of the virtual network.
*/
@JvmName("viwiwgywpanxjefr")
public suspend fun allowedSubnets(vararg argument: suspend SubnetArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map { SubnetArgsBuilder().applySuspend { it() }.build() }
val mapped = of(toBeMapped)
this.allowedSubnets = mapped
}
/**
* @param argument The allowed subnets of the virtual network.
*/
@JvmName("ugkcupufyohupatw")
public suspend fun allowedSubnets(argument: suspend SubnetArgsBuilder.() -> Unit) {
val toBeMapped = listOf(SubnetArgsBuilder().applySuspend { argument() }.build())
val mapped = of(toBeMapped)
this.allowedSubnets = mapped
}
/**
* @param values The allowed subnets of the virtual network.
*/
@JvmName("qjlasfacrxijtuvr")
public suspend fun allowedSubnets(vararg values: SubnetArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.allowedSubnets = mapped
}
/**
* @param value The description of the virtual network.
*/
@JvmName("flnbninmomjewklr")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value The Microsoft.Network resource identifier of the virtual network.
*/
@JvmName("hbngstmhmjilrvix")
public suspend fun externalProviderResourceId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.externalProviderResourceId = mapped
}
/**
* @param value The name of the lab.
*/
@JvmName("gghhfyajihelofjp")
public suspend fun labName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.labName = mapped
}
/**
* @param value The location of the resource.
*/
@JvmName("wsnhdwinusoleyjr")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value The name of the virtual network.
*/
@JvmName("oqurgfrtvffipkqs")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The name of the resource group.
*/
@JvmName("iyhwctvrmhohwqma")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The subnet overrides of the virtual network.
*/
@JvmName("qrychlipfettjdnd")
public suspend fun subnetOverrides(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.subnetOverrides = mapped
}
/**
* @param argument The subnet overrides of the virtual network.
*/
@JvmName("djvkijwlsagdkfiu")
public suspend fun subnetOverrides(argument: List Unit>) {
val toBeMapped = argument.toList().map {
SubnetOverrideArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.subnetOverrides = mapped
}
/**
* @param argument The subnet overrides of the virtual network.
*/
@JvmName("apmlfikkwcnfadih")
public suspend fun subnetOverrides(vararg argument: suspend SubnetOverrideArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
SubnetOverrideArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.subnetOverrides = mapped
}
/**
* @param argument The subnet overrides of the virtual network.
*/
@JvmName("ucqrudwweajidmap")
public suspend fun subnetOverrides(argument: suspend SubnetOverrideArgsBuilder.() -> Unit) {
val toBeMapped = listOf(SubnetOverrideArgsBuilder().applySuspend { argument() }.build())
val mapped = of(toBeMapped)
this.subnetOverrides = mapped
}
/**
* @param values The subnet overrides of the virtual network.
*/
@JvmName("bfwlrsysemkhveap")
public suspend fun subnetOverrides(vararg values: SubnetOverrideArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.subnetOverrides = mapped
}
/**
* @param value The tags of the resource.
*/
@JvmName("xykmhhqcjjwcaeen")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values The tags of the resource.
*/
@JvmName("qoenuuoofhvybwlw")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
internal fun build(): VirtualNetworkArgs = VirtualNetworkArgs(
allowedSubnets = allowedSubnets,
description = description,
externalProviderResourceId = externalProviderResourceId,
labName = labName,
location = location,
name = name,
resourceGroupName = resourceGroupName,
subnetOverrides = subnetOverrides,
tags = tags,
)
}