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

com.pulumi.azure.network.kotlin.NetworkManagerArgs.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: 6.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.network.kotlin

import com.pulumi.azure.network.NetworkManagerArgs.builder
import com.pulumi.azure.network.kotlin.inputs.NetworkManagerScopeArgs
import com.pulumi.azure.network.kotlin.inputs.NetworkManagerScopeArgsBuilder
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

/**
 * Manages a Network Managers.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const current = azure.core.getSubscription({});
 * const exampleNetworkManager = new azure.network.NetworkManager("example", {
 *     name: "example-network-manager",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     scope: {
 *         subscriptionIds: [current.then(current => current.id)],
 *     },
 *     scopeAccesses: [
 *         "Connectivity",
 *         "SecurityAdmin",
 *     ],
 *     description: "example network manager",
 *     tags: {
 *         foo: "bar",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * current = azure.core.get_subscription()
 * example_network_manager = azure.network.NetworkManager("example",
 *     name="example-network-manager",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     scope={
 *         "subscription_ids": [current.id],
 *     },
 *     scope_accesses=[
 *         "Connectivity",
 *         "SecurityAdmin",
 *     ],
 *     description="example network manager",
 *     tags={
 *         "foo": "bar",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "example-resources",
 *         Location = "West Europe",
 *     });
 *     var current = Azure.Core.GetSubscription.Invoke();
 *     var exampleNetworkManager = new Azure.Network.NetworkManager("example", new()
 *     {
 *         Name = "example-network-manager",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         Scope = new Azure.Network.Inputs.NetworkManagerScopeArgs
 *         {
 *             SubscriptionIds = new[]
 *             {
 *                 current.Apply(getSubscriptionResult => getSubscriptionResult.Id),
 *             },
 *         },
 *         ScopeAccesses = new[]
 *         {
 *             "Connectivity",
 *             "SecurityAdmin",
 *         },
 *         Description = "example network manager",
 *         Tags =
 *         {
 *             { "foo", "bar" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("example-resources"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		current, err := core.LookupSubscription(ctx, nil, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = network.NewNetworkManager(ctx, "example", &network.NetworkManagerArgs{
 * 			Name:              pulumi.String("example-network-manager"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			Scope: &network.NetworkManagerScopeArgs{
 * 				SubscriptionIds: pulumi.StringArray{
 * 					pulumi.String(current.Id),
 * 				},
 * 			},
 * 			ScopeAccesses: pulumi.StringArray{
 * 				pulumi.String("Connectivity"),
 * 				pulumi.String("SecurityAdmin"),
 * 			},
 * 			Description: pulumi.String("example network manager"),
 * 			Tags: pulumi.StringMap{
 * 				"foo": pulumi.String("bar"),
 * 			},
 * 		})
 * 		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.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.core.CoreFunctions;
 * import com.pulumi.azure.core.inputs.GetSubscriptionArgs;
 * import com.pulumi.azure.network.NetworkManager;
 * import com.pulumi.azure.network.NetworkManagerArgs;
 * import com.pulumi.azure.network.inputs.NetworkManagerScopeArgs;
 * 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("example-resources")
 *             .location("West Europe")
 *             .build());
 *         final var current = CoreFunctions.getSubscription();
 *         var exampleNetworkManager = new NetworkManager("exampleNetworkManager", NetworkManagerArgs.builder()
 *             .name("example-network-manager")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .scope(NetworkManagerScopeArgs.builder()
 *                 .subscriptionIds(current.applyValue(getSubscriptionResult -> getSubscriptionResult.id()))
 *                 .build())
 *             .scopeAccesses(
 *                 "Connectivity",
 *                 "SecurityAdmin")
 *             .description("example network manager")
 *             .tags(Map.of("foo", "bar"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleNetworkManager:
 *     type: azure:network:NetworkManager
 *     name: example
 *     properties:
 *       name: example-network-manager
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       scope:
 *         subscriptionIds:
 *           - ${current.id}
 *       scopeAccesses:
 *         - Connectivity
 *         - SecurityAdmin
 *       description: example network manager
 *       tags:
 *         foo: bar
 * variables:
 *   current:
 *     fn::invoke:
 *       Function: azure:core:getSubscription
 *       Arguments: {}
 * ```
 * 
 * ## Import
 * Network Managers can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:network/networkManager:NetworkManager example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Network/networkManagers/networkManager1
 * ```
 * @property description A description of the network manager.
 * @property location Specifies the Azure Region where the Network Managers should exist. Changing this forces a new resource to be created.
 * @property name Specifies the name which should be used for this Network Managers. Changing this forces a new Network Managers to be created.
 * @property resourceGroupName Specifies the name of the Resource Group where the Network Managers should exist. Changing this forces a new Network Managers to be created.
 * @property scope A `scope` block as defined below.
 * @property scopeAccesses A list of configuration deployment type. Possible values are `Connectivity` and `SecurityAdmin`, corresponds to if Connectivity Configuration and Security Admin Configuration is allowed for the Network Manager.
 * @property tags A mapping of tags which should be assigned to the Network Managers.
 */
public data class NetworkManagerArgs(
    public val description: Output? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val resourceGroupName: Output? = null,
    public val scope: Output? = null,
    public val scopeAccesses: Output>? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.network.NetworkManagerArgs =
        com.pulumi.azure.network.NetworkManagerArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .scope(scope?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .scopeAccesses(scopeAccesses?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [NetworkManagerArgs].
 */
@PulumiTagMarker
public class NetworkManagerArgsBuilder internal constructor() {
    private var description: Output? = null

    private var location: Output? = null

    private var name: Output? = null

    private var resourceGroupName: Output? = null

    private var scope: Output? = null

    private var scopeAccesses: Output>? = null

    private var tags: Output>? = null

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

    /**
     * @param value Specifies the Azure Region where the Network Managers should exist. Changing this forces a new resource to be created.
     */
    @JvmName("dgngfwmnhbhrvykx")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value Specifies the name which should be used for this Network Managers. Changing this forces a new Network Managers to be created.
     */
    @JvmName("uwajxkwtfbqcxgkq")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Specifies the name of the Resource Group where the Network Managers should exist. Changing this forces a new Network Managers to be created.
     */
    @JvmName("doydbkbdqpumuaam")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value A `scope` block as defined below.
     */
    @JvmName("oihwsmyxibtflvmc")
    public suspend fun scope(`value`: Output) {
        this.scope = value
    }

    /**
     * @param value A list of configuration deployment type. Possible values are `Connectivity` and `SecurityAdmin`, corresponds to if Connectivity Configuration and Security Admin Configuration is allowed for the Network Manager.
     */
    @JvmName("ywqxrarsvpygwdvg")
    public suspend fun scopeAccesses(`value`: Output>) {
        this.scopeAccesses = value
    }

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

    /**
     * @param values A list of configuration deployment type. Possible values are `Connectivity` and `SecurityAdmin`, corresponds to if Connectivity Configuration and Security Admin Configuration is allowed for the Network Manager.
     */
    @JvmName("qfnbyikdugkcsndw")
    public suspend fun scopeAccesses(values: List>) {
        this.scopeAccesses = Output.all(values)
    }

    /**
     * @param value A mapping of tags which should be assigned to the Network Managers.
     */
    @JvmName("urwgshxjstncwhqi")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param value Specifies the Azure Region where the Network Managers should exist. Changing this forces a new resource to be created.
     */
    @JvmName("gulqxvrsikfrpxon")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value Specifies the name which should be used for this Network Managers. Changing this forces a new Network Managers to be created.
     */
    @JvmName("vscpgfagycupgnrt")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Specifies the name of the Resource Group where the Network Managers should exist. Changing this forces a new Network Managers to be created.
     */
    @JvmName("taxmpgbginsltjhl")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value A `scope` block as defined below.
     */
    @JvmName("cpuudxcjrbyhefqv")
    public suspend fun scope(`value`: NetworkManagerScopeArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scope = mapped
    }

    /**
     * @param argument A `scope` block as defined below.
     */
    @JvmName("mxckkpborotlfimj")
    public suspend fun scope(argument: suspend NetworkManagerScopeArgsBuilder.() -> Unit) {
        val toBeMapped = NetworkManagerScopeArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.scope = mapped
    }

    /**
     * @param value A list of configuration deployment type. Possible values are `Connectivity` and `SecurityAdmin`, corresponds to if Connectivity Configuration and Security Admin Configuration is allowed for the Network Manager.
     */
    @JvmName("yujesiljoxtcuyqo")
    public suspend fun scopeAccesses(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scopeAccesses = mapped
    }

    /**
     * @param values A list of configuration deployment type. Possible values are `Connectivity` and `SecurityAdmin`, corresponds to if Connectivity Configuration and Security Admin Configuration is allowed for the Network Manager.
     */
    @JvmName("phdkyjmnspedhprt")
    public suspend fun scopeAccesses(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.scopeAccesses = mapped
    }

    /**
     * @param value A mapping of tags which should be assigned to the Network Managers.
     */
    @JvmName("oxsyvfsrnjorvyyl")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A mapping of tags which should be assigned to the Network Managers.
     */
    @JvmName("clgsuntyeffnbkjs")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): NetworkManagerArgs = NetworkManagerArgs(
        description = description,
        location = location,
        name = name,
        resourceGroupName = resourceGroupName,
        scope = scope,
        scopeAccesses = scopeAccesses,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy