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.managednetwork.kotlin.ManagedNetworkGroupArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.managednetwork.kotlin
import com.pulumi.azurenative.managednetwork.ManagedNetworkGroupArgs.builder
import com.pulumi.azurenative.managednetwork.kotlin.enums.Kind
import com.pulumi.azurenative.managednetwork.kotlin.inputs.ResourceIdArgs
import com.pulumi.azurenative.managednetwork.kotlin.inputs.ResourceIdArgsBuilder
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
/**
* The Managed Network Group resource
* Azure REST API version: 2019-06-01-preview. Prior API version in Azure Native 1.x: 2019-06-01-preview.
* ## Example Usage
* ### ManagementNetworkGroupsPut
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var managedNetworkGroup = new AzureNative.ManagedNetwork.ManagedNetworkGroup("managedNetworkGroup", new()
* {
* ManagedNetworkGroupName = "myManagedNetworkGroup1",
* ManagedNetworkName = "myManagedNetwork",
* ManagementGroups = new[] {},
* ResourceGroupName = "myResourceGroup",
* Subnets = new[]
* {
* new AzureNative.ManagedNetwork.Inputs.ResourceIdArgs
* {
* Id = "/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetA/subnets/subnetA",
* },
* },
* Subscriptions = new[] {},
* VirtualNetworks = new[]
* {
* new AzureNative.ManagedNetwork.Inputs.ResourceIdArgs
* {
* Id = "/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetA",
* },
* new AzureNative.ManagedNetwork.Inputs.ResourceIdArgs
* {
* Id = "/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetB",
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* managednetwork "github.com/pulumi/pulumi-azure-native-sdk/managednetwork/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := managednetwork.NewManagedNetworkGroup(ctx, "managedNetworkGroup", &managednetwork.ManagedNetworkGroupArgs{
* ManagedNetworkGroupName: pulumi.String("myManagedNetworkGroup1"),
* ManagedNetworkName: pulumi.String("myManagedNetwork"),
* ManagementGroups: managednetwork.ResourceIdArray{},
* ResourceGroupName: pulumi.String("myResourceGroup"),
* Subnets: managednetwork.ResourceIdArray{
* &managednetwork.ResourceIdArgs{
* Id: pulumi.String("/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetA/subnets/subnetA"),
* },
* },
* Subscriptions: managednetwork.ResourceIdArray{},
* VirtualNetworks: managednetwork.ResourceIdArray{
* &managednetwork.ResourceIdArgs{
* Id: pulumi.String("/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetA"),
* },
* &managednetwork.ResourceIdArgs{
* Id: pulumi.String("/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetB"),
* },
* },
* })
* 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.managednetwork.ManagedNetworkGroup;
* import com.pulumi.azurenative.managednetwork.ManagedNetworkGroupArgs;
* import com.pulumi.azurenative.managednetwork.inputs.ResourceIdArgs;
* 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 managedNetworkGroup = new ManagedNetworkGroup("managedNetworkGroup", ManagedNetworkGroupArgs.builder()
* .managedNetworkGroupName("myManagedNetworkGroup1")
* .managedNetworkName("myManagedNetwork")
* .managementGroups()
* .resourceGroupName("myResourceGroup")
* .subnets(ResourceIdArgs.builder()
* .id("/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetA/subnets/subnetA")
* .build())
* .subscriptions()
* .virtualNetworks(
* ResourceIdArgs.builder()
* .id("/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetA")
* .build(),
* ResourceIdArgs.builder()
* .id("/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetB")
* .build())
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:managednetwork:ManagedNetworkGroup myManagedNetworkGroup1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetwork/managedNetworks/{managedNetworkName}/managedNetworkGroups/{managedNetworkGroupName}
* ```
* @property kind Responsibility role under which this Managed Network Group will be created
* @property location The geo-location where the resource lives
* @property managedNetworkGroupName The name of the Managed Network Group.
* @property managedNetworkName The name of the Managed Network.
* @property managementGroups The collection of management groups covered by the Managed Network
* @property resourceGroupName The name of the resource group.
* @property subnets The collection of subnets covered by the Managed Network
* @property subscriptions The collection of subscriptions covered by the Managed Network
* @property virtualNetworks The collection of virtual nets covered by the Managed Network
*/
public data class ManagedNetworkGroupArgs(
public val kind: Output>? = null,
public val location: Output? = null,
public val managedNetworkGroupName: Output? = null,
public val managedNetworkName: Output? = null,
public val managementGroups: Output>? = null,
public val resourceGroupName: Output? = null,
public val subnets: Output>? = null,
public val subscriptions: Output>? = null,
public val virtualNetworks: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.managednetwork.ManagedNetworkGroupArgs =
com.pulumi.azurenative.managednetwork.ManagedNetworkGroupArgs.builder()
.kind(
kind?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.location(location?.applyValue({ args0 -> args0 }))
.managedNetworkGroupName(managedNetworkGroupName?.applyValue({ args0 -> args0 }))
.managedNetworkName(managedNetworkName?.applyValue({ args0 -> args0 }))
.managementGroups(
managementGroups?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.subnets(
subnets?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.subscriptions(
subscriptions?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.virtualNetworks(
virtualNetworks?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
).build()
}
/**
* Builder for [ManagedNetworkGroupArgs].
*/
@PulumiTagMarker
public class ManagedNetworkGroupArgsBuilder internal constructor() {
private var kind: Output>? = null
private var location: Output? = null
private var managedNetworkGroupName: Output? = null
private var managedNetworkName: Output? = null
private var managementGroups: Output>? = null
private var resourceGroupName: Output? = null
private var subnets: Output>? = null
private var subscriptions: Output>? = null
private var virtualNetworks: Output>? = null
/**
* @param value Responsibility role under which this Managed Network Group will be created
*/
@JvmName("lcvktshmsusepbel")
public suspend fun kind(`value`: Output>) {
this.kind = value
}
/**
* @param value The geo-location where the resource lives
*/
@JvmName("erejplsvuydkvkmp")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value The name of the Managed Network Group.
*/
@JvmName("qfniuqnylpjorxtm")
public suspend fun managedNetworkGroupName(`value`: Output) {
this.managedNetworkGroupName = value
}
/**
* @param value The name of the Managed Network.
*/
@JvmName("morqpmieaahstmus")
public suspend fun managedNetworkName(`value`: Output) {
this.managedNetworkName = value
}
/**
* @param value The collection of management groups covered by the Managed Network
*/
@JvmName("ddlbrwlvkvlwomlr")
public suspend fun managementGroups(`value`: Output>) {
this.managementGroups = value
}
@JvmName("opdnlvlgvquonijt")
public suspend fun managementGroups(vararg values: Output) {
this.managementGroups = Output.all(values.asList())
}
/**
* @param values The collection of management groups covered by the Managed Network
*/
@JvmName("vnctbnxdidfiknnu")
public suspend fun managementGroups(values: List>) {
this.managementGroups = Output.all(values)
}
/**
* @param value The name of the resource group.
*/
@JvmName("aoswffihiiofbbce")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The collection of subnets covered by the Managed Network
*/
@JvmName("yemyafnbxmlsfoul")
public suspend fun subnets(`value`: Output>) {
this.subnets = value
}
@JvmName("csddfibpillirgen")
public suspend fun subnets(vararg values: Output) {
this.subnets = Output.all(values.asList())
}
/**
* @param values The collection of subnets covered by the Managed Network
*/
@JvmName("mwnaurvncjnvrnaa")
public suspend fun subnets(values: List>) {
this.subnets = Output.all(values)
}
/**
* @param value The collection of subscriptions covered by the Managed Network
*/
@JvmName("mdilwqpgfmsefmfi")
public suspend fun subscriptions(`value`: Output>) {
this.subscriptions = value
}
@JvmName("beowsvchsnjlqddx")
public suspend fun subscriptions(vararg values: Output) {
this.subscriptions = Output.all(values.asList())
}
/**
* @param values The collection of subscriptions covered by the Managed Network
*/
@JvmName("hlblyeqoljstsogc")
public suspend fun subscriptions(values: List>) {
this.subscriptions = Output.all(values)
}
/**
* @param value The collection of virtual nets covered by the Managed Network
*/
@JvmName("fagytsuyibisxgml")
public suspend fun virtualNetworks(`value`: Output>) {
this.virtualNetworks = value
}
@JvmName("oosceoliqcldkvdf")
public suspend fun virtualNetworks(vararg values: Output) {
this.virtualNetworks = Output.all(values.asList())
}
/**
* @param values The collection of virtual nets covered by the Managed Network
*/
@JvmName("awavpjxwgpwsbxgs")
public suspend fun virtualNetworks(values: List>) {
this.virtualNetworks = Output.all(values)
}
/**
* @param value Responsibility role under which this Managed Network Group will be created
*/
@JvmName("nlcvdhgerjmccmde")
public suspend fun kind(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.kind = mapped
}
/**
* @param value Responsibility role under which this Managed Network Group will be created
*/
@JvmName("cqyyopxttyukhlwj")
public fun kind(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.kind = mapped
}
/**
* @param value Responsibility role under which this Managed Network Group will be created
*/
@JvmName("uhpxgyocomdmdtxf")
public fun kind(`value`: Kind) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.kind = mapped
}
/**
* @param value The geo-location where the resource lives
*/
@JvmName("gpbmeeybggdtcbik")
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 Managed Network Group.
*/
@JvmName("higyymslydoegsdl")
public suspend fun managedNetworkGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.managedNetworkGroupName = mapped
}
/**
* @param value The name of the Managed Network.
*/
@JvmName("qaklmgxhcwpgnfnj")
public suspend fun managedNetworkName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.managedNetworkName = mapped
}
/**
* @param value The collection of management groups covered by the Managed Network
*/
@JvmName("vxuaaloyhbtglyve")
public suspend fun managementGroups(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.managementGroups = mapped
}
/**
* @param argument The collection of management groups covered by the Managed Network
*/
@JvmName("ceqjiqoyisbgkclf")
public suspend fun managementGroups(argument: List Unit>) {
val toBeMapped = argument.toList().map { ResourceIdArgsBuilder().applySuspend { it() }.build() }
val mapped = of(toBeMapped)
this.managementGroups = mapped
}
/**
* @param argument The collection of management groups covered by the Managed Network
*/
@JvmName("iiabqohnibrifcsg")
public suspend fun managementGroups(vararg argument: suspend ResourceIdArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map { ResourceIdArgsBuilder().applySuspend { it() }.build() }
val mapped = of(toBeMapped)
this.managementGroups = mapped
}
/**
* @param argument The collection of management groups covered by the Managed Network
*/
@JvmName("bwtqbhwpdxrufhpe")
public suspend fun managementGroups(argument: suspend ResourceIdArgsBuilder.() -> Unit) {
val toBeMapped = listOf(ResourceIdArgsBuilder().applySuspend { argument() }.build())
val mapped = of(toBeMapped)
this.managementGroups = mapped
}
/**
* @param values The collection of management groups covered by the Managed Network
*/
@JvmName("jcbhninxpcioidah")
public suspend fun managementGroups(vararg values: ResourceIdArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.managementGroups = mapped
}
/**
* @param value The name of the resource group.
*/
@JvmName("bhbwdrcndaakfubg")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The collection of subnets covered by the Managed Network
*/
@JvmName("ogdajmmxeodwglkt")
public suspend fun subnets(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.subnets = mapped
}
/**
* @param argument The collection of subnets covered by the Managed Network
*/
@JvmName("iueywggofkdbmlsx")
public suspend fun subnets(argument: List Unit>) {
val toBeMapped = argument.toList().map { ResourceIdArgsBuilder().applySuspend { it() }.build() }
val mapped = of(toBeMapped)
this.subnets = mapped
}
/**
* @param argument The collection of subnets covered by the Managed Network
*/
@JvmName("ldpkyjmxdwxjtpjn")
public suspend fun subnets(vararg argument: suspend ResourceIdArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map { ResourceIdArgsBuilder().applySuspend { it() }.build() }
val mapped = of(toBeMapped)
this.subnets = mapped
}
/**
* @param argument The collection of subnets covered by the Managed Network
*/
@JvmName("ijgchmdynscleyvw")
public suspend fun subnets(argument: suspend ResourceIdArgsBuilder.() -> Unit) {
val toBeMapped = listOf(ResourceIdArgsBuilder().applySuspend { argument() }.build())
val mapped = of(toBeMapped)
this.subnets = mapped
}
/**
* @param values The collection of subnets covered by the Managed Network
*/
@JvmName("hxynrdjvdklktvlm")
public suspend fun subnets(vararg values: ResourceIdArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.subnets = mapped
}
/**
* @param value The collection of subscriptions covered by the Managed Network
*/
@JvmName("bcmstaomqireoakm")
public suspend fun subscriptions(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.subscriptions = mapped
}
/**
* @param argument The collection of subscriptions covered by the Managed Network
*/
@JvmName("lgcngsfqihoqotfy")
public suspend fun subscriptions(argument: List Unit>) {
val toBeMapped = argument.toList().map { ResourceIdArgsBuilder().applySuspend { it() }.build() }
val mapped = of(toBeMapped)
this.subscriptions = mapped
}
/**
* @param argument The collection of subscriptions covered by the Managed Network
*/
@JvmName("cmynmuoyamxgpauc")
public suspend fun subscriptions(vararg argument: suspend ResourceIdArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map { ResourceIdArgsBuilder().applySuspend { it() }.build() }
val mapped = of(toBeMapped)
this.subscriptions = mapped
}
/**
* @param argument The collection of subscriptions covered by the Managed Network
*/
@JvmName("ekxoxwacowptdlkk")
public suspend fun subscriptions(argument: suspend ResourceIdArgsBuilder.() -> Unit) {
val toBeMapped = listOf(ResourceIdArgsBuilder().applySuspend { argument() }.build())
val mapped = of(toBeMapped)
this.subscriptions = mapped
}
/**
* @param values The collection of subscriptions covered by the Managed Network
*/
@JvmName("dqdtjuidlscsttpo")
public suspend fun subscriptions(vararg values: ResourceIdArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.subscriptions = mapped
}
/**
* @param value The collection of virtual nets covered by the Managed Network
*/
@JvmName("yoxjhblbkungtlma")
public suspend fun virtualNetworks(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.virtualNetworks = mapped
}
/**
* @param argument The collection of virtual nets covered by the Managed Network
*/
@JvmName("cpdutbgkadfraqpo")
public suspend fun virtualNetworks(argument: List Unit>) {
val toBeMapped = argument.toList().map { ResourceIdArgsBuilder().applySuspend { it() }.build() }
val mapped = of(toBeMapped)
this.virtualNetworks = mapped
}
/**
* @param argument The collection of virtual nets covered by the Managed Network
*/
@JvmName("kajkxbmijrnkmyym")
public suspend fun virtualNetworks(vararg argument: suspend ResourceIdArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map { ResourceIdArgsBuilder().applySuspend { it() }.build() }
val mapped = of(toBeMapped)
this.virtualNetworks = mapped
}
/**
* @param argument The collection of virtual nets covered by the Managed Network
*/
@JvmName("dhjxfbgbryubaixx")
public suspend fun virtualNetworks(argument: suspend ResourceIdArgsBuilder.() -> Unit) {
val toBeMapped = listOf(ResourceIdArgsBuilder().applySuspend { argument() }.build())
val mapped = of(toBeMapped)
this.virtualNetworks = mapped
}
/**
* @param values The collection of virtual nets covered by the Managed Network
*/
@JvmName("sgmmslssefyaiquf")
public suspend fun virtualNetworks(vararg values: ResourceIdArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.virtualNetworks = mapped
}
internal fun build(): ManagedNetworkGroupArgs = ManagedNetworkGroupArgs(
kind = kind,
location = location,
managedNetworkGroupName = managedNetworkGroupName,
managedNetworkName = managedNetworkName,
managementGroups = managementGroups,
resourceGroupName = resourceGroupName,
subnets = subnets,
subscriptions = subscriptions,
virtualNetworks = virtualNetworks,
)
}