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

com.pulumi.azurenative.network.kotlin.VirtualNetworkLinkArgs.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.VirtualNetworkLinkArgs.builder
import com.pulumi.azurenative.network.kotlin.inputs.SubResourceArgs
import com.pulumi.azurenative.network.kotlin.inputs.SubResourceArgsBuilder
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.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Describes a link to virtual network for a Private DNS zone.
 * Azure REST API version: 2020-06-01. Prior API version in Azure Native 1.x: 2020-06-01.
 * Other available API versions: 2024-06-01.
 * ## Example Usage
 * ### PUT Private DNS Zone Virtual Network Link
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var virtualNetworkLink = new AzureNative.Network.VirtualNetworkLink("virtualNetworkLink", new()
 *     {
 *         Location = "Global",
 *         PrivateZoneName = "privatezone1.com",
 *         RegistrationEnabled = false,
 *         ResourceGroupName = "resourceGroup1",
 *         Tags =
 *         {
 *             { "key1", "value1" },
 *         },
 *         VirtualNetwork = new AzureNative.Network.Inputs.SubResourceArgs
 *         {
 *             Id = "/subscriptions/virtualNetworkSubscriptionId/resourceGroups/virtualNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/virtualNetworkName",
 *         },
 *         VirtualNetworkLinkName = "virtualNetworkLink1",
 *     });
 * });
 * ```
 * ```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.NewVirtualNetworkLink(ctx, "virtualNetworkLink", &network.VirtualNetworkLinkArgs{
 * 			Location:            pulumi.String("Global"),
 * 			PrivateZoneName:     pulumi.String("privatezone1.com"),
 * 			RegistrationEnabled: pulumi.Bool(false),
 * 			ResourceGroupName:   pulumi.String("resourceGroup1"),
 * 			Tags: pulumi.StringMap{
 * 				"key1": pulumi.String("value1"),
 * 			},
 * 			VirtualNetwork: &network.SubResourceArgs{
 * 				Id: pulumi.String("/subscriptions/virtualNetworkSubscriptionId/resourceGroups/virtualNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/virtualNetworkName"),
 * 			},
 * 			VirtualNetworkLinkName: pulumi.String("virtualNetworkLink1"),
 * 		})
 * 		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.VirtualNetworkLink;
 * import com.pulumi.azurenative.network.VirtualNetworkLinkArgs;
 * import com.pulumi.azurenative.network.inputs.SubResourceArgs;
 * 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 virtualNetworkLink = new VirtualNetworkLink("virtualNetworkLink", VirtualNetworkLinkArgs.builder()
 *             .location("Global")
 *             .privateZoneName("privatezone1.com")
 *             .registrationEnabled(false)
 *             .resourceGroupName("resourceGroup1")
 *             .tags(Map.of("key1", "value1"))
 *             .virtualNetwork(SubResourceArgs.builder()
 *                 .id("/subscriptions/virtualNetworkSubscriptionId/resourceGroups/virtualNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/virtualNetworkName")
 *                 .build())
 *             .virtualNetworkLinkName("virtualNetworkLink1")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:network:VirtualNetworkLink virtualNetworkLink1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}/virtualNetworkLinks/{virtualNetworkLinkName}
 * ```
 * @property location The Azure Region where the resource lives
 * @property privateZoneName The name of the Private DNS zone (without a terminating dot).
 * @property registrationEnabled Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled?
 * @property resourceGroupName The name of the resource group.
 * @property tags Resource tags.
 * @property virtualNetwork The reference of the virtual network.
 * @property virtualNetworkLinkName The name of the virtual network link.
 */
public data class VirtualNetworkLinkArgs(
    public val location: Output? = null,
    public val privateZoneName: Output? = null,
    public val registrationEnabled: Output? = null,
    public val resourceGroupName: Output? = null,
    public val tags: Output>? = null,
    public val virtualNetwork: Output? = null,
    public val virtualNetworkLinkName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.network.VirtualNetworkLinkArgs =
        com.pulumi.azurenative.network.VirtualNetworkLinkArgs.builder()
            .location(location?.applyValue({ args0 -> args0 }))
            .privateZoneName(privateZoneName?.applyValue({ args0 -> args0 }))
            .registrationEnabled(registrationEnabled?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .virtualNetwork(virtualNetwork?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .virtualNetworkLinkName(virtualNetworkLinkName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [VirtualNetworkLinkArgs].
 */
@PulumiTagMarker
public class VirtualNetworkLinkArgsBuilder internal constructor() {
    private var location: Output? = null

    private var privateZoneName: Output? = null

    private var registrationEnabled: Output? = null

    private var resourceGroupName: Output? = null

    private var tags: Output>? = null

    private var virtualNetwork: Output? = null

    private var virtualNetworkLinkName: Output? = null

    /**
     * @param value The Azure Region where the resource lives
     */
    @JvmName("howeneytiskmgehk")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value The name of the Private DNS zone (without a terminating dot).
     */
    @JvmName("jvgemlkefesygnxt")
    public suspend fun privateZoneName(`value`: Output) {
        this.privateZoneName = value
    }

    /**
     * @param value Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled?
     */
    @JvmName("wxrnnrsrmmgahfvl")
    public suspend fun registrationEnabled(`value`: Output) {
        this.registrationEnabled = value
    }

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

    /**
     * @param value Resource tags.
     */
    @JvmName("mwnxdkgtuvtpxxdf")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The reference of the virtual network.
     */
    @JvmName("xpkpgebxuhnmhwlh")
    public suspend fun virtualNetwork(`value`: Output) {
        this.virtualNetwork = value
    }

    /**
     * @param value The name of the virtual network link.
     */
    @JvmName("fhsnhvidvtsvvkle")
    public suspend fun virtualNetworkLinkName(`value`: Output) {
        this.virtualNetworkLinkName = value
    }

    /**
     * @param value The Azure Region where the resource lives
     */
    @JvmName("yxbacfvcwkktefla")
    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 Private DNS zone (without a terminating dot).
     */
    @JvmName("imrxlsdmsqsovimd")
    public suspend fun privateZoneName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.privateZoneName = mapped
    }

    /**
     * @param value Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled?
     */
    @JvmName("cakrucbsbwexdefp")
    public suspend fun registrationEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.registrationEnabled = mapped
    }

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

    /**
     * @param value Resource tags.
     */
    @JvmName("mfgxowajmfudojnq")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Resource tags.
     */
    @JvmName("rcvcbgrsxsvnujdq")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value The reference of the virtual network.
     */
    @JvmName("emgtaviejiwavxpr")
    public suspend fun virtualNetwork(`value`: SubResourceArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.virtualNetwork = mapped
    }

    /**
     * @param argument The reference of the virtual network.
     */
    @JvmName("asuybcxcybihmceb")
    public suspend fun virtualNetwork(argument: suspend SubResourceArgsBuilder.() -> Unit) {
        val toBeMapped = SubResourceArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.virtualNetwork = mapped
    }

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

    internal fun build(): VirtualNetworkLinkArgs = VirtualNetworkLinkArgs(
        location = location,
        privateZoneName = privateZoneName,
        registrationEnabled = registrationEnabled,
        resourceGroupName = resourceGroupName,
        tags = tags,
        virtualNetwork = virtualNetwork,
        virtualNetworkLinkName = virtualNetworkLinkName,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy