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.network.kotlin.SubnetArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.network.kotlin
import com.pulumi.azurenative.network.SubnetArgs.builder
import com.pulumi.azurenative.network.kotlin.enums.VirtualNetworkPrivateEndpointNetworkPolicies
import com.pulumi.azurenative.network.kotlin.enums.VirtualNetworkPrivateLinkServiceNetworkPolicies
import com.pulumi.azurenative.network.kotlin.inputs.ApplicationGatewayIPConfigurationArgs
import com.pulumi.azurenative.network.kotlin.inputs.ApplicationGatewayIPConfigurationArgsBuilder
import com.pulumi.azurenative.network.kotlin.inputs.DelegationArgs
import com.pulumi.azurenative.network.kotlin.inputs.DelegationArgsBuilder
import com.pulumi.azurenative.network.kotlin.inputs.NetworkSecurityGroupArgs
import com.pulumi.azurenative.network.kotlin.inputs.NetworkSecurityGroupArgsBuilder
import com.pulumi.azurenative.network.kotlin.inputs.RouteTableArgs
import com.pulumi.azurenative.network.kotlin.inputs.RouteTableArgsBuilder
import com.pulumi.azurenative.network.kotlin.inputs.ServiceEndpointPolicyArgs
import com.pulumi.azurenative.network.kotlin.inputs.ServiceEndpointPolicyArgsBuilder
import com.pulumi.azurenative.network.kotlin.inputs.ServiceEndpointPropertiesFormatArgs
import com.pulumi.azurenative.network.kotlin.inputs.ServiceEndpointPropertiesFormatArgsBuilder
import com.pulumi.azurenative.network.kotlin.inputs.SubResourceArgs
import com.pulumi.azurenative.network.kotlin.inputs.SubResourceArgsBuilder
import com.pulumi.core.Either
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Subnet in a virtual network resource.
* Azure REST API version: 2023-02-01. Prior API version in Azure Native 1.x: 2020-11-01.
* Other available API versions: 2015-05-01-preview, 2016-03-30, 2019-02-01, 2019-06-01, 2019-08-01, 2020-06-01, 2022-07-01, 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01.
* ## Example Usage
* ### Create subnet
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var subnet = new AzureNative.Network.Subnet("subnet", new()
* {
* AddressPrefix = "10.0.0.0/16",
* ResourceGroupName = "subnet-test",
* SubnetName = "subnet1",
* VirtualNetworkName = "vnetname",
* });
* });
* ```
* ```go
* package main
* import (
* network "github.com/pulumi/pulumi-azure-native-sdk/network/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := network.NewSubnet(ctx, "subnet", &network.SubnetArgs{
* AddressPrefix: pulumi.String("10.0.0.0/16"),
* ResourceGroupName: pulumi.String("subnet-test"),
* SubnetName: pulumi.String("subnet1"),
* VirtualNetworkName: pulumi.String("vnetname"),
* })
* 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.network.Subnet;
* import com.pulumi.azurenative.network.SubnetArgs;
* 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 subnet = new Subnet("subnet", SubnetArgs.builder()
* .addressPrefix("10.0.0.0/16")
* .resourceGroupName("subnet-test")
* .subnetName("subnet1")
* .virtualNetworkName("vnetname")
* .build());
* }
* }
* ```
* ### Create subnet with a delegation
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var subnet = new AzureNative.Network.Subnet("subnet", new()
* {
* AddressPrefix = "10.0.0.0/16",
* ResourceGroupName = "subnet-test",
* SubnetName = "subnet1",
* VirtualNetworkName = "vnetname",
* });
* });
* ```
* ```go
* package main
* import (
* network "github.com/pulumi/pulumi-azure-native-sdk/network/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := network.NewSubnet(ctx, "subnet", &network.SubnetArgs{
* AddressPrefix: pulumi.String("10.0.0.0/16"),
* ResourceGroupName: pulumi.String("subnet-test"),
* SubnetName: pulumi.String("subnet1"),
* VirtualNetworkName: pulumi.String("vnetname"),
* })
* 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.network.Subnet;
* import com.pulumi.azurenative.network.SubnetArgs;
* 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 subnet = new Subnet("subnet", SubnetArgs.builder()
* .addressPrefix("10.0.0.0/16")
* .resourceGroupName("subnet-test")
* .subnetName("subnet1")
* .virtualNetworkName("vnetname")
* .build());
* }
* }
* ```
* ### Create subnet with service endpoints
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var subnet = new AzureNative.Network.Subnet("subnet", new()
* {
* AddressPrefix = "10.0.0.0/16",
* ResourceGroupName = "subnet-test",
* ServiceEndpoints = new[]
* {
* new AzureNative.Network.Inputs.ServiceEndpointPropertiesFormatArgs
* {
* Service = "Microsoft.Storage",
* },
* },
* SubnetName = "subnet1",
* VirtualNetworkName = "vnetname",
* });
* });
* ```
* ```go
* package main
* import (
* network "github.com/pulumi/pulumi-azure-native-sdk/network/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := network.NewSubnet(ctx, "subnet", &network.SubnetArgs{
* AddressPrefix: pulumi.String("10.0.0.0/16"),
* ResourceGroupName: pulumi.String("subnet-test"),
* ServiceEndpoints: network.ServiceEndpointPropertiesFormatArray{
* &network.ServiceEndpointPropertiesFormatArgs{
* Service: pulumi.String("Microsoft.Storage"),
* },
* },
* SubnetName: pulumi.String("subnet1"),
* VirtualNetworkName: pulumi.String("vnetname"),
* })
* 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.network.Subnet;
* import com.pulumi.azurenative.network.SubnetArgs;
* import com.pulumi.azurenative.network.inputs.ServiceEndpointPropertiesFormatArgs;
* 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 subnet = new Subnet("subnet", SubnetArgs.builder()
* .addressPrefix("10.0.0.0/16")
* .resourceGroupName("subnet-test")
* .serviceEndpoints(ServiceEndpointPropertiesFormatArgs.builder()
* .service("Microsoft.Storage")
* .build())
* .subnetName("subnet1")
* .virtualNetworkName("vnetname")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:network:Subnet subnet1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}
* ```
* @property addressPrefix The address prefix for the subnet.
* @property addressPrefixes List of address prefixes for the subnet.
* @property applicationGatewayIPConfigurations Application gateway IP configurations of virtual network resource.
* @property delegations An array of references to the delegations on the subnet.
* @property id Resource ID.
* @property ipAllocations Array of IpAllocation which reference this subnet.
* @property name The name of the resource that is unique within a resource group. This name can be used to access the resource.
* @property natGateway Nat gateway associated with this subnet.
* @property networkSecurityGroup The reference to the NetworkSecurityGroup resource.
* @property privateEndpointNetworkPolicies Enable or Disable apply network policies on private end point in the subnet.
* @property privateLinkServiceNetworkPolicies Enable or Disable apply network policies on private link service in the subnet.
* @property resourceGroupName The name of the resource group.
* @property routeTable The reference to the RouteTable resource.
* @property serviceEndpointPolicies An array of service endpoint policies.
* @property serviceEndpoints An array of service endpoints.
* @property subnetName The name of the subnet.
* @property type Resource type.
* @property virtualNetworkName The name of the virtual network.
*/
public data class SubnetArgs(
public val addressPrefix: Output? = null,
public val addressPrefixes: Output>? = null,
public val applicationGatewayIPConfigurations: Output>? = null,
public val delegations: Output>? = null,
public val id: Output? = null,
public val ipAllocations: Output>? = null,
public val name: Output? = null,
public val natGateway: Output? = null,
public val networkSecurityGroup: Output? = null,
public val privateEndpointNetworkPolicies: Output>? = null,
public val privateLinkServiceNetworkPolicies: Output>? = null,
public val resourceGroupName: Output? = null,
public val routeTable: Output? = null,
public val serviceEndpointPolicies: Output>? = null,
public val serviceEndpoints: Output>? = null,
public val subnetName: Output? = null,
public val type: Output? = null,
public val virtualNetworkName: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.network.SubnetArgs =
com.pulumi.azurenative.network.SubnetArgs.builder()
.addressPrefix(addressPrefix?.applyValue({ args0 -> args0 }))
.addressPrefixes(addressPrefixes?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.applicationGatewayIPConfigurations(
applicationGatewayIPConfigurations?.applyValue({ args0 ->
args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) })
}),
)
.delegations(
delegations?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.id(id?.applyValue({ args0 -> args0 }))
.ipAllocations(
ipAllocations?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.name(name?.applyValue({ args0 -> args0 }))
.natGateway(natGateway?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.networkSecurityGroup(
networkSecurityGroup?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.privateEndpointNetworkPolicies(
privateEndpointNetworkPolicies?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 -> args0.let({ args0 -> args0.toJava() }) })
}),
)
.privateLinkServiceNetworkPolicies(
privateLinkServiceNetworkPolicies?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 -> args0.let({ args0 -> args0.toJava() }) })
}),
)
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.routeTable(routeTable?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.serviceEndpointPolicies(
serviceEndpointPolicies?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.serviceEndpoints(
serviceEndpoints?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.subnetName(subnetName?.applyValue({ args0 -> args0 }))
.type(type?.applyValue({ args0 -> args0 }))
.virtualNetworkName(virtualNetworkName?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [SubnetArgs].
*/
@PulumiTagMarker
public class SubnetArgsBuilder internal constructor() {
private var addressPrefix: Output? = null
private var addressPrefixes: Output>? = null
private var applicationGatewayIPConfigurations:
Output>? = null
private var delegations: Output>? = null
private var id: Output? = null
private var ipAllocations: Output>? = null
private var name: Output? = null
private var natGateway: Output? = null
private var networkSecurityGroup: Output? = null
private var privateEndpointNetworkPolicies:
Output>? = null
private var privateLinkServiceNetworkPolicies:
Output>? = null
private var resourceGroupName: Output? = null
private var routeTable: Output? = null
private var serviceEndpointPolicies: Output>? = null
private var serviceEndpoints: Output>? = null
private var subnetName: Output? = null
private var type: Output? = null
private var virtualNetworkName: Output? = null
/**
* @param value The address prefix for the subnet.
*/
@JvmName("xmppbtwwiviwxbmh")
public suspend fun addressPrefix(`value`: Output) {
this.addressPrefix = value
}
/**
* @param value List of address prefixes for the subnet.
*/
@JvmName("ddtshnjwigtfvbgj")
public suspend fun addressPrefixes(`value`: Output>) {
this.addressPrefixes = value
}
@JvmName("cdgcouwoksccyfsq")
public suspend fun addressPrefixes(vararg values: Output) {
this.addressPrefixes = Output.all(values.asList())
}
/**
* @param values List of address prefixes for the subnet.
*/
@JvmName("rafnsjepquvgafwc")
public suspend fun addressPrefixes(values: List>) {
this.addressPrefixes = Output.all(values)
}
/**
* @param value Application gateway IP configurations of virtual network resource.
*/
@JvmName("cemtmgqwgbixfnvk")
public suspend fun applicationGatewayIPConfigurations(`value`: Output>) {
this.applicationGatewayIPConfigurations = value
}
@JvmName("ykeqafuontuqcmfm")
public suspend fun applicationGatewayIPConfigurations(vararg values: Output) {
this.applicationGatewayIPConfigurations = Output.all(values.asList())
}
/**
* @param values Application gateway IP configurations of virtual network resource.
*/
@JvmName("mfdsgyuvwpyvfqhm")
public suspend fun applicationGatewayIPConfigurations(values: List>) {
this.applicationGatewayIPConfigurations = Output.all(values)
}
/**
* @param value An array of references to the delegations on the subnet.
*/
@JvmName("iwhvyqonpfpwmyjp")
public suspend fun delegations(`value`: Output>) {
this.delegations = value
}
@JvmName("qxadaeprkanyixyg")
public suspend fun delegations(vararg values: Output) {
this.delegations = Output.all(values.asList())
}
/**
* @param values An array of references to the delegations on the subnet.
*/
@JvmName("khpvpvsflayyumlw")
public suspend fun delegations(values: List>) {
this.delegations = Output.all(values)
}
/**
* @param value Resource ID.
*/
@JvmName("ddxmuordwlupbjhw")
public suspend fun id(`value`: Output) {
this.id = value
}
/**
* @param value Array of IpAllocation which reference this subnet.
*/
@JvmName("prtinyoftujurysl")
public suspend fun ipAllocations(`value`: Output>) {
this.ipAllocations = value
}
@JvmName("gwsdwrepegahsnhu")
public suspend fun ipAllocations(vararg values: Output) {
this.ipAllocations = Output.all(values.asList())
}
/**
* @param values Array of IpAllocation which reference this subnet.
*/
@JvmName("oywskeuybfeceukk")
public suspend fun ipAllocations(values: List>) {
this.ipAllocations = Output.all(values)
}
/**
* @param value The name of the resource that is unique within a resource group. This name can be used to access the resource.
*/
@JvmName("frctwwsylkxmqsnw")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value Nat gateway associated with this subnet.
*/
@JvmName("cskdabulmtdyhgtp")
public suspend fun natGateway(`value`: Output) {
this.natGateway = value
}
/**
* @param value The reference to the NetworkSecurityGroup resource.
*/
@JvmName("xehkjwppxxjeoxml")
public suspend fun networkSecurityGroup(`value`: Output) {
this.networkSecurityGroup = value
}
/**
* @param value Enable or Disable apply network policies on private end point in the subnet.
*/
@JvmName("cuqtnnclrrugojrr")
public suspend fun privateEndpointNetworkPolicies(`value`: Output>) {
this.privateEndpointNetworkPolicies = value
}
/**
* @param value Enable or Disable apply network policies on private link service in the subnet.
*/
@JvmName("bjbefssbhgefvcgt")
public suspend fun privateLinkServiceNetworkPolicies(`value`: Output>) {
this.privateLinkServiceNetworkPolicies = value
}
/**
* @param value The name of the resource group.
*/
@JvmName("xjyxbspyunuiwvya")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The reference to the RouteTable resource.
*/
@JvmName("gtqkucocjvptjwlw")
public suspend fun routeTable(`value`: Output) {
this.routeTable = value
}
/**
* @param value An array of service endpoint policies.
*/
@JvmName("irnsrdbvfvogavtb")
public suspend fun serviceEndpointPolicies(`value`: Output>) {
this.serviceEndpointPolicies = value
}
@JvmName("sxccuxrgnnioweoj")
public suspend fun serviceEndpointPolicies(vararg values: Output) {
this.serviceEndpointPolicies = Output.all(values.asList())
}
/**
* @param values An array of service endpoint policies.
*/
@JvmName("fgvykgvbowavioyx")
public suspend fun serviceEndpointPolicies(values: List>) {
this.serviceEndpointPolicies = Output.all(values)
}
/**
* @param value An array of service endpoints.
*/
@JvmName("setsadbcigbrsomn")
public suspend fun serviceEndpoints(`value`: Output>) {
this.serviceEndpoints = value
}
@JvmName("gdjfvlajonkpaiys")
public suspend fun serviceEndpoints(vararg values: Output) {
this.serviceEndpoints = Output.all(values.asList())
}
/**
* @param values An array of service endpoints.
*/
@JvmName("ougukbtotathstda")
public suspend fun serviceEndpoints(values: List>) {
this.serviceEndpoints = Output.all(values)
}
/**
* @param value The name of the subnet.
*/
@JvmName("bpvfefflscoraxdg")
public suspend fun subnetName(`value`: Output) {
this.subnetName = value
}
/**
* @param value Resource type.
*/
@JvmName("beanjqdqjkmfwmff")
public suspend fun type(`value`: Output) {
this.type = value
}
/**
* @param value The name of the virtual network.
*/
@JvmName("noomiwxnwvplbdew")
public suspend fun virtualNetworkName(`value`: Output) {
this.virtualNetworkName = value
}
/**
* @param value The address prefix for the subnet.
*/
@JvmName("xcwlxrsquhgdlbft")
public suspend fun addressPrefix(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.addressPrefix = mapped
}
/**
* @param value List of address prefixes for the subnet.
*/
@JvmName("twueccjagjlumvly")
public suspend fun addressPrefixes(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.addressPrefixes = mapped
}
/**
* @param values List of address prefixes for the subnet.
*/
@JvmName("mehfeffnmjgisqpl")
public suspend fun addressPrefixes(vararg values: String) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.addressPrefixes = mapped
}
/**
* @param value Application gateway IP configurations of virtual network resource.
*/
@JvmName("ekviuxymficcyqpj")
public suspend fun applicationGatewayIPConfigurations(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.applicationGatewayIPConfigurations = mapped
}
/**
* @param argument Application gateway IP configurations of virtual network resource.
*/
@JvmName("nlrqujqdkbstlxlu")
public suspend fun applicationGatewayIPConfigurations(argument: List Unit>) {
val toBeMapped = argument.toList().map {
ApplicationGatewayIPConfigurationArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.applicationGatewayIPConfigurations = mapped
}
/**
* @param argument Application gateway IP configurations of virtual network resource.
*/
@JvmName("qjyallccliqnvaty")
public suspend fun applicationGatewayIPConfigurations(vararg argument: suspend ApplicationGatewayIPConfigurationArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
ApplicationGatewayIPConfigurationArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.applicationGatewayIPConfigurations = mapped
}
/**
* @param argument Application gateway IP configurations of virtual network resource.
*/
@JvmName("hnoampqqtxyjovrj")
public suspend fun applicationGatewayIPConfigurations(argument: suspend ApplicationGatewayIPConfigurationArgsBuilder.() -> Unit) {
val toBeMapped = listOf(
ApplicationGatewayIPConfigurationArgsBuilder().applySuspend {
argument()
}.build(),
)
val mapped = of(toBeMapped)
this.applicationGatewayIPConfigurations = mapped
}
/**
* @param values Application gateway IP configurations of virtual network resource.
*/
@JvmName("nbwyxauoiewhwghx")
public suspend fun applicationGatewayIPConfigurations(vararg values: ApplicationGatewayIPConfigurationArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.applicationGatewayIPConfigurations = mapped
}
/**
* @param value An array of references to the delegations on the subnet.
*/
@JvmName("dfafnqlsugsvfmec")
public suspend fun delegations(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.delegations = mapped
}
/**
* @param argument An array of references to the delegations on the subnet.
*/
@JvmName("jogossecqrffnjsx")
public suspend fun delegations(argument: List Unit>) {
val toBeMapped = argument.toList().map { DelegationArgsBuilder().applySuspend { it() }.build() }
val mapped = of(toBeMapped)
this.delegations = mapped
}
/**
* @param argument An array of references to the delegations on the subnet.
*/
@JvmName("jjwsypoywnocbwab")
public suspend fun delegations(vararg argument: suspend DelegationArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map { DelegationArgsBuilder().applySuspend { it() }.build() }
val mapped = of(toBeMapped)
this.delegations = mapped
}
/**
* @param argument An array of references to the delegations on the subnet.
*/
@JvmName("wxaltlxjfjievodj")
public suspend fun delegations(argument: suspend DelegationArgsBuilder.() -> Unit) {
val toBeMapped = listOf(DelegationArgsBuilder().applySuspend { argument() }.build())
val mapped = of(toBeMapped)
this.delegations = mapped
}
/**
* @param values An array of references to the delegations on the subnet.
*/
@JvmName("iwbmwbrkhbbgsmvi")
public suspend fun delegations(vararg values: DelegationArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.delegations = mapped
}
/**
* @param value Resource ID.
*/
@JvmName("ulscsxruinaconwx")
public suspend fun id(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.id = mapped
}
/**
* @param value Array of IpAllocation which reference this subnet.
*/
@JvmName("ckhjeqcanidshryk")
public suspend fun ipAllocations(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.ipAllocations = mapped
}
/**
* @param argument Array of IpAllocation which reference this subnet.
*/
@JvmName("gslsjehakfvliwkg")
public suspend fun ipAllocations(argument: List Unit>) {
val toBeMapped = argument.toList().map { SubResourceArgsBuilder().applySuspend { it() }.build() }
val mapped = of(toBeMapped)
this.ipAllocations = mapped
}
/**
* @param argument Array of IpAllocation which reference this subnet.
*/
@JvmName("lytmptptljrooxbx")
public suspend fun ipAllocations(vararg argument: suspend SubResourceArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map { SubResourceArgsBuilder().applySuspend { it() }.build() }
val mapped = of(toBeMapped)
this.ipAllocations = mapped
}
/**
* @param argument Array of IpAllocation which reference this subnet.
*/
@JvmName("qxdfdngdgdmijrrd")
public suspend fun ipAllocations(argument: suspend SubResourceArgsBuilder.() -> Unit) {
val toBeMapped = listOf(SubResourceArgsBuilder().applySuspend { argument() }.build())
val mapped = of(toBeMapped)
this.ipAllocations = mapped
}
/**
* @param values Array of IpAllocation which reference this subnet.
*/
@JvmName("jytaaoxumjxgvemy")
public suspend fun ipAllocations(vararg values: SubResourceArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.ipAllocations = mapped
}
/**
* @param value The name of the resource that is unique within a resource group. This name can be used to access the resource.
*/
@JvmName("hvrhlwygmqqxecyc")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value Nat gateway associated with this subnet.
*/
@JvmName("pyivqhlschkddehp")
public suspend fun natGateway(`value`: SubResourceArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.natGateway = mapped
}
/**
* @param argument Nat gateway associated with this subnet.
*/
@JvmName("vwyhddwxstsavnqf")
public suspend fun natGateway(argument: suspend SubResourceArgsBuilder.() -> Unit) {
val toBeMapped = SubResourceArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.natGateway = mapped
}
/**
* @param value The reference to the NetworkSecurityGroup resource.
*/
@JvmName("lkthioqusunwqyqw")
public suspend fun networkSecurityGroup(`value`: NetworkSecurityGroupArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.networkSecurityGroup = mapped
}
/**
* @param argument The reference to the NetworkSecurityGroup resource.
*/
@JvmName("vqyjbcmjnnydumtf")
public suspend fun networkSecurityGroup(argument: suspend NetworkSecurityGroupArgsBuilder.() -> Unit) {
val toBeMapped = NetworkSecurityGroupArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.networkSecurityGroup = mapped
}
/**
* @param value Enable or Disable apply network policies on private end point in the subnet.
*/
@JvmName("sfeckxbmcqjxemck")
public suspend fun privateEndpointNetworkPolicies(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.privateEndpointNetworkPolicies = mapped
}
/**
* @param value Enable or Disable apply network policies on private end point in the subnet.
*/
@JvmName("fgrtrqglckmvmpwu")
public fun privateEndpointNetworkPolicies(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.privateEndpointNetworkPolicies = mapped
}
/**
* @param value Enable or Disable apply network policies on private end point in the subnet.
*/
@JvmName("kttpemgejqhhfikw")
public fun privateEndpointNetworkPolicies(`value`: VirtualNetworkPrivateEndpointNetworkPolicies) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.privateEndpointNetworkPolicies = mapped
}
/**
* @param value Enable or Disable apply network policies on private link service in the subnet.
*/
@JvmName("qxxxgchcdcemnfoa")
public suspend fun privateLinkServiceNetworkPolicies(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.privateLinkServiceNetworkPolicies = mapped
}
/**
* @param value Enable or Disable apply network policies on private link service in the subnet.
*/
@JvmName("mxugiojgykfaxiou")
public fun privateLinkServiceNetworkPolicies(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.privateLinkServiceNetworkPolicies = mapped
}
/**
* @param value Enable or Disable apply network policies on private link service in the subnet.
*/
@JvmName("oplsgiyvadyiqinu")
public fun privateLinkServiceNetworkPolicies(`value`: VirtualNetworkPrivateLinkServiceNetworkPolicies) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.privateLinkServiceNetworkPolicies = mapped
}
/**
* @param value The name of the resource group.
*/
@JvmName("hspeqtaydftykbed")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The reference to the RouteTable resource.
*/
@JvmName("xkjfoyasaxvvgygn")
public suspend fun routeTable(`value`: RouteTableArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.routeTable = mapped
}
/**
* @param argument The reference to the RouteTable resource.
*/
@JvmName("fbodylushruacvtr")
public suspend fun routeTable(argument: suspend RouteTableArgsBuilder.() -> Unit) {
val toBeMapped = RouteTableArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.routeTable = mapped
}
/**
* @param value An array of service endpoint policies.
*/
@JvmName("istgjlbyoasgjtxo")
public suspend fun serviceEndpointPolicies(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.serviceEndpointPolicies = mapped
}
/**
* @param argument An array of service endpoint policies.
*/
@JvmName("vyhjeyknbdpbvubc")
public suspend fun serviceEndpointPolicies(argument: List Unit>) {
val toBeMapped = argument.toList().map {
ServiceEndpointPolicyArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.serviceEndpointPolicies = mapped
}
/**
* @param argument An array of service endpoint policies.
*/
@JvmName("fdvkenumehqrxkre")
public suspend fun serviceEndpointPolicies(vararg argument: suspend ServiceEndpointPolicyArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
ServiceEndpointPolicyArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.serviceEndpointPolicies = mapped
}
/**
* @param argument An array of service endpoint policies.
*/
@JvmName("ygvxiaclbiajuxhv")
public suspend fun serviceEndpointPolicies(argument: suspend ServiceEndpointPolicyArgsBuilder.() -> Unit) {
val toBeMapped = listOf(ServiceEndpointPolicyArgsBuilder().applySuspend { argument() }.build())
val mapped = of(toBeMapped)
this.serviceEndpointPolicies = mapped
}
/**
* @param values An array of service endpoint policies.
*/
@JvmName("uhqbgxkfinrmekvs")
public suspend fun serviceEndpointPolicies(vararg values: ServiceEndpointPolicyArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.serviceEndpointPolicies = mapped
}
/**
* @param value An array of service endpoints.
*/
@JvmName("jlgmtfhapynpgreo")
public suspend fun serviceEndpoints(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.serviceEndpoints = mapped
}
/**
* @param argument An array of service endpoints.
*/
@JvmName("ykyuytqnemsboyaf")
public suspend fun serviceEndpoints(argument: List Unit>) {
val toBeMapped = argument.toList().map {
ServiceEndpointPropertiesFormatArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.serviceEndpoints = mapped
}
/**
* @param argument An array of service endpoints.
*/
@JvmName("dpgqtgthbsgwfweq")
public suspend fun serviceEndpoints(vararg argument: suspend ServiceEndpointPropertiesFormatArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
ServiceEndpointPropertiesFormatArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.serviceEndpoints = mapped
}
/**
* @param argument An array of service endpoints.
*/
@JvmName("hxdlyvjgptiatqya")
public suspend fun serviceEndpoints(argument: suspend ServiceEndpointPropertiesFormatArgsBuilder.() -> Unit) {
val toBeMapped = listOf(
ServiceEndpointPropertiesFormatArgsBuilder().applySuspend {
argument()
}.build(),
)
val mapped = of(toBeMapped)
this.serviceEndpoints = mapped
}
/**
* @param values An array of service endpoints.
*/
@JvmName("ypmomksnphngiebl")
public suspend fun serviceEndpoints(vararg values: ServiceEndpointPropertiesFormatArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.serviceEndpoints = mapped
}
/**
* @param value The name of the subnet.
*/
@JvmName("tgqrtvunuwabacil")
public suspend fun subnetName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.subnetName = mapped
}
/**
* @param value Resource type.
*/
@JvmName("bbyuidywwklolldj")
public suspend fun type(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.type = mapped
}
/**
* @param value The name of the virtual network.
*/
@JvmName("vriktnuvcevfiaov")
public suspend fun virtualNetworkName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.virtualNetworkName = mapped
}
internal fun build(): SubnetArgs = SubnetArgs(
addressPrefix = addressPrefix,
addressPrefixes = addressPrefixes,
applicationGatewayIPConfigurations = applicationGatewayIPConfigurations,
delegations = delegations,
id = id,
ipAllocations = ipAllocations,
name = name,
natGateway = natGateway,
networkSecurityGroup = networkSecurityGroup,
privateEndpointNetworkPolicies = privateEndpointNetworkPolicies,
privateLinkServiceNetworkPolicies = privateLinkServiceNetworkPolicies,
resourceGroupName = resourceGroupName,
routeTable = routeTable,
serviceEndpointPolicies = serviceEndpointPolicies,
serviceEndpoints = serviceEndpoints,
subnetName = subnetName,
type = type,
virtualNetworkName = virtualNetworkName,
)
}