All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.network.kotlin.ConnectivityConfigurationArgs.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.

There is a newer version: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.network.kotlin

import com.pulumi.azurenative.network.ConnectivityConfigurationArgs.builder
import com.pulumi.azurenative.network.kotlin.enums.ConnectivityTopology
import com.pulumi.azurenative.network.kotlin.enums.DeleteExistingPeering
import com.pulumi.azurenative.network.kotlin.enums.IsGlobal
import com.pulumi.azurenative.network.kotlin.inputs.ConnectivityGroupItemArgs
import com.pulumi.azurenative.network.kotlin.inputs.ConnectivityGroupItemArgsBuilder
import com.pulumi.azurenative.network.kotlin.inputs.HubArgs
import com.pulumi.azurenative.network.kotlin.inputs.HubArgsBuilder
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 network manager connectivity configuration resource
 * Azure REST API version: 2023-02-01. Prior API version in Azure Native 1.x: 2021-02-01-preview.
 * Other available API versions: 2021-02-01-preview, 2021-05-01-preview, 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01.
 * ## Example Usage
 * ### ConnectivityConfigurationsPut
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var connectivityConfiguration = new AzureNative.Network.ConnectivityConfiguration("connectivityConfiguration", new()
 *     {
 *         AppliesToGroups = new[]
 *         {
 *             new AzureNative.Network.Inputs.ConnectivityGroupItemArgs
 *             {
 *                 GroupConnectivity = AzureNative.Network.GroupConnectivity.None,
 *                 IsGlobal = AzureNative.Network.IsGlobal.False,
 *                 NetworkGroupId = "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/group1",
 *                 UseHubGateway = AzureNative.Network.UseHubGateway.True,
 *             },
 *         },
 *         ConfigurationName = "myTestConnectivityConfig",
 *         ConnectivityTopology = AzureNative.Network.ConnectivityTopology.HubAndSpoke,
 *         DeleteExistingPeering = AzureNative.Network.DeleteExistingPeering.True,
 *         Description = "Sample Configuration",
 *         Hubs = new[]
 *         {
 *             new AzureNative.Network.Inputs.HubArgs
 *             {
 *                 ResourceId = "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myTestConnectivityConfig",
 *                 ResourceType = "Microsoft.Network/virtualNetworks",
 *             },
 *         },
 *         IsGlobal = AzureNative.Network.IsGlobal.True,
 *         NetworkManagerName = "testNetworkManager",
 *         ResourceGroupName = "myResourceGroup",
 *     });
 * });
 * ```
 * ```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.NewConnectivityConfiguration(ctx, "connectivityConfiguration", &network.ConnectivityConfigurationArgs{
 * 			AppliesToGroups: network.ConnectivityGroupItemArray{
 * 				&network.ConnectivityGroupItemArgs{
 * 					GroupConnectivity: pulumi.String(network.GroupConnectivityNone),
 * 					IsGlobal:          pulumi.String(network.IsGlobalFalse),
 * 					NetworkGroupId:    pulumi.String("subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/group1"),
 * 					UseHubGateway:     pulumi.String(network.UseHubGatewayTrue),
 * 				},
 * 			},
 * 			ConfigurationName:     pulumi.String("myTestConnectivityConfig"),
 * 			ConnectivityTopology:  pulumi.String(network.ConnectivityTopologyHubAndSpoke),
 * 			DeleteExistingPeering: pulumi.String(network.DeleteExistingPeeringTrue),
 * 			Description:           pulumi.String("Sample Configuration"),
 * 			Hubs: network.HubArray{
 * 				&network.HubArgs{
 * 					ResourceId:   pulumi.String("subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myTestConnectivityConfig"),
 * 					ResourceType: pulumi.String("Microsoft.Network/virtualNetworks"),
 * 				},
 * 			},
 * 			IsGlobal:           pulumi.String(network.IsGlobalTrue),
 * 			NetworkManagerName: pulumi.String("testNetworkManager"),
 * 			ResourceGroupName:  pulumi.String("myResourceGroup"),
 * 		})
 * 		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.ConnectivityConfiguration;
 * import com.pulumi.azurenative.network.ConnectivityConfigurationArgs;
 * import com.pulumi.azurenative.network.inputs.ConnectivityGroupItemArgs;
 * import com.pulumi.azurenative.network.inputs.HubArgs;
 * 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 connectivityConfiguration = new ConnectivityConfiguration("connectivityConfiguration", ConnectivityConfigurationArgs.builder()
 *             .appliesToGroups(ConnectivityGroupItemArgs.builder()
 *                 .groupConnectivity("None")
 *                 .isGlobal("False")
 *                 .networkGroupId("subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/group1")
 *                 .useHubGateway("True")
 *                 .build())
 *             .configurationName("myTestConnectivityConfig")
 *             .connectivityTopology("HubAndSpoke")
 *             .deleteExistingPeering("True")
 *             .description("Sample Configuration")
 *             .hubs(HubArgs.builder()
 *                 .resourceId("subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myTestConnectivityConfig")
 *                 .resourceType("Microsoft.Network/virtualNetworks")
 *                 .build())
 *             .isGlobal("True")
 *             .networkManagerName("testNetworkManager")
 *             .resourceGroupName("myResourceGroup")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:network:ConnectivityConfiguration myTestConnectivityConfig /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations/{configurationName}
 * ```
 * @property appliesToGroups Groups for configuration
 * @property configurationName The name of the network manager connectivity configuration.
 * @property connectivityTopology Connectivity topology type.
 * @property deleteExistingPeering Flag if need to remove current existing peerings.
 * @property description A description of the connectivity configuration.
 * @property hubs List of hubItems
 * @property isGlobal Flag if global mesh is supported.
 * @property networkManagerName The name of the network manager.
 * @property resourceGroupName The name of the resource group.
 */
public data class ConnectivityConfigurationArgs(
    public val appliesToGroups: Output>? = null,
    public val configurationName: Output? = null,
    public val connectivityTopology: Output>? = null,
    public val deleteExistingPeering: Output>? = null,
    public val description: Output? = null,
    public val hubs: Output>? = null,
    public val isGlobal: Output>? = null,
    public val networkManagerName: Output? = null,
    public val resourceGroupName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.network.ConnectivityConfigurationArgs =
        com.pulumi.azurenative.network.ConnectivityConfigurationArgs.builder()
            .appliesToGroups(
                appliesToGroups?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .configurationName(configurationName?.applyValue({ args0 -> args0 }))
            .connectivityTopology(
                connectivityTopology?.applyValue({ args0 ->
                    args0.transform(
                        { args0 -> args0 },
                        { args0 -> args0.let({ args0 -> args0.toJava() }) },
                    )
                }),
            )
            .deleteExistingPeering(
                deleteExistingPeering?.applyValue({ args0 ->
                    args0.transform({ args0 ->
                        args0
                    }, { args0 -> args0.let({ args0 -> args0.toJava() }) })
                }),
            )
            .description(description?.applyValue({ args0 -> args0 }))
            .hubs(hubs?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .isGlobal(
                isGlobal?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .networkManagerName(networkManagerName?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ConnectivityConfigurationArgs].
 */
@PulumiTagMarker
public class ConnectivityConfigurationArgsBuilder internal constructor() {
    private var appliesToGroups: Output>? = null

    private var configurationName: Output? = null

    private var connectivityTopology: Output>? = null

    private var deleteExistingPeering: Output>? = null

    private var description: Output? = null

    private var hubs: Output>? = null

    private var isGlobal: Output>? = null

    private var networkManagerName: Output? = null

    private var resourceGroupName: Output? = null

    /**
     * @param value Groups for configuration
     */
    @JvmName("hswvgjsyfhunypdf")
    public suspend fun appliesToGroups(`value`: Output>) {
        this.appliesToGroups = value
    }

    @JvmName("cugkenwifaibwwbi")
    public suspend fun appliesToGroups(vararg values: Output) {
        this.appliesToGroups = Output.all(values.asList())
    }

    /**
     * @param values Groups for configuration
     */
    @JvmName("lvsliordonumrpxk")
    public suspend fun appliesToGroups(values: List>) {
        this.appliesToGroups = Output.all(values)
    }

    /**
     * @param value The name of the network manager connectivity configuration.
     */
    @JvmName("pycmsbburmatnnrp")
    public suspend fun configurationName(`value`: Output) {
        this.configurationName = value
    }

    /**
     * @param value Connectivity topology type.
     */
    @JvmName("hriaqhlnmypkhkkb")
    public suspend fun connectivityTopology(`value`: Output>) {
        this.connectivityTopology = value
    }

    /**
     * @param value Flag if need to remove current existing peerings.
     */
    @JvmName("uejxyxoasrqicdpq")
    public suspend fun deleteExistingPeering(`value`: Output>) {
        this.deleteExistingPeering = value
    }

    /**
     * @param value A description of the connectivity configuration.
     */
    @JvmName("xhniipmwguousxdx")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value List of hubItems
     */
    @JvmName("muoygfpbftuknhrb")
    public suspend fun hubs(`value`: Output>) {
        this.hubs = value
    }

    @JvmName("qngrrrnumannmpsq")
    public suspend fun hubs(vararg values: Output) {
        this.hubs = Output.all(values.asList())
    }

    /**
     * @param values List of hubItems
     */
    @JvmName("odpheynxrdgafsoy")
    public suspend fun hubs(values: List>) {
        this.hubs = Output.all(values)
    }

    /**
     * @param value Flag if global mesh is supported.
     */
    @JvmName("wbaepiytrkulbxos")
    public suspend fun isGlobal(`value`: Output>) {
        this.isGlobal = value
    }

    /**
     * @param value The name of the network manager.
     */
    @JvmName("rcygshewhmaoxbsw")
    public suspend fun networkManagerName(`value`: Output) {
        this.networkManagerName = value
    }

    /**
     * @param value The name of the resource group.
     */
    @JvmName("ekeqshgwgnmxaofd")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value Groups for configuration
     */
    @JvmName("jfxovbxbdyuhkniw")
    public suspend fun appliesToGroups(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.appliesToGroups = mapped
    }

    /**
     * @param argument Groups for configuration
     */
    @JvmName("pxdqhqeqftfguwht")
    public suspend fun appliesToGroups(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ConnectivityGroupItemArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.appliesToGroups = mapped
    }

    /**
     * @param argument Groups for configuration
     */
    @JvmName("hyxporowwsfsvqcw")
    public suspend fun appliesToGroups(vararg argument: suspend ConnectivityGroupItemArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ConnectivityGroupItemArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.appliesToGroups = mapped
    }

    /**
     * @param argument Groups for configuration
     */
    @JvmName("qxuoqaiunphxswgt")
    public suspend fun appliesToGroups(argument: suspend ConnectivityGroupItemArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(ConnectivityGroupItemArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.appliesToGroups = mapped
    }

    /**
     * @param values Groups for configuration
     */
    @JvmName("rtioyaxvvkjjkmby")
    public suspend fun appliesToGroups(vararg values: ConnectivityGroupItemArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.appliesToGroups = mapped
    }

    /**
     * @param value The name of the network manager connectivity configuration.
     */
    @JvmName("fhmuswpfutyvhsoc")
    public suspend fun configurationName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.configurationName = mapped
    }

    /**
     * @param value Connectivity topology type.
     */
    @JvmName("cqreobgrgtdlxnhf")
    public suspend fun connectivityTopology(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.connectivityTopology = mapped
    }

    /**
     * @param value Connectivity topology type.
     */
    @JvmName("hovboplkrxcttnbj")
    public fun connectivityTopology(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.connectivityTopology = mapped
    }

    /**
     * @param value Connectivity topology type.
     */
    @JvmName("wwknjyjmbyosaxlw")
    public fun connectivityTopology(`value`: ConnectivityTopology) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.connectivityTopology = mapped
    }

    /**
     * @param value Flag if need to remove current existing peerings.
     */
    @JvmName("gxnqoskwgkovlsls")
    public suspend fun deleteExistingPeering(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deleteExistingPeering = mapped
    }

    /**
     * @param value Flag if need to remove current existing peerings.
     */
    @JvmName("atclojmcpnjpymrr")
    public fun deleteExistingPeering(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.deleteExistingPeering = mapped
    }

    /**
     * @param value Flag if need to remove current existing peerings.
     */
    @JvmName("unvlthkuvuoreoxn")
    public fun deleteExistingPeering(`value`: DeleteExistingPeering) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.deleteExistingPeering = mapped
    }

    /**
     * @param value A description of the connectivity configuration.
     */
    @JvmName("drxlftycrxmonbps")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value List of hubItems
     */
    @JvmName("mobfedcirbbpaswy")
    public suspend fun hubs(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.hubs = mapped
    }

    /**
     * @param argument List of hubItems
     */
    @JvmName("rrvlsdfxhjojbhye")
    public suspend fun hubs(argument: List Unit>) {
        val toBeMapped = argument.toList().map { HubArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.hubs = mapped
    }

    /**
     * @param argument List of hubItems
     */
    @JvmName("mqfgosjucwmkqcwt")
    public suspend fun hubs(vararg argument: suspend HubArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { HubArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.hubs = mapped
    }

    /**
     * @param argument List of hubItems
     */
    @JvmName("tjgngtkqxypbditv")
    public suspend fun hubs(argument: suspend HubArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(HubArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.hubs = mapped
    }

    /**
     * @param values List of hubItems
     */
    @JvmName("jqdmpkgfdsfsrcih")
    public suspend fun hubs(vararg values: HubArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.hubs = mapped
    }

    /**
     * @param value Flag if global mesh is supported.
     */
    @JvmName("ovaitjiweanqbkvx")
    public suspend fun isGlobal(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.isGlobal = mapped
    }

    /**
     * @param value Flag if global mesh is supported.
     */
    @JvmName("nwsytnbitskqsudl")
    public fun isGlobal(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.isGlobal = mapped
    }

    /**
     * @param value Flag if global mesh is supported.
     */
    @JvmName("vfvlkjxjwdmsijqd")
    public fun isGlobal(`value`: IsGlobal) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.isGlobal = mapped
    }

    /**
     * @param value The name of the network manager.
     */
    @JvmName("cgiadhkhlnthefob")
    public suspend fun networkManagerName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkManagerName = mapped
    }

    /**
     * @param value The name of the resource group.
     */
    @JvmName("lubtqkfyhdwfibju")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    internal fun build(): ConnectivityConfigurationArgs = ConnectivityConfigurationArgs(
        appliesToGroups = appliesToGroups,
        configurationName = configurationName,
        connectivityTopology = connectivityTopology,
        deleteExistingPeering = deleteExistingPeering,
        description = description,
        hubs = hubs,
        isGlobal = isGlobal,
        networkManagerName = networkManagerName,
        resourceGroupName = resourceGroupName,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy