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

com.pulumi.azurenative.network.kotlin.CustomIPPrefixArgs.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.CustomIPPrefixArgs.builder
import com.pulumi.azurenative.network.kotlin.enums.CommissionedState
import com.pulumi.azurenative.network.kotlin.enums.CustomIpPrefixType
import com.pulumi.azurenative.network.kotlin.enums.Geo
import com.pulumi.azurenative.network.kotlin.inputs.ExtendedLocationArgs
import com.pulumi.azurenative.network.kotlin.inputs.ExtendedLocationArgsBuilder
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.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Custom IP prefix resource.
 * Azure REST API version: 2023-02-01. Prior API version in Azure Native 1.x: 2020-11-01.
 * Other available API versions: 2021-03-01, 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01.
 * ## Example Usage
 * ### Create custom IP prefix allocation method
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var customIPPrefix = new AzureNative.Network.CustomIPPrefix("customIPPrefix", new()
 *     {
 *         Cidr = "0.0.0.0/24",
 *         CustomIpPrefixName = "test-customipprefix",
 *         Location = "westus",
 *         ResourceGroupName = "rg1",
 *     });
 * });
 * ```
 * ```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.NewCustomIPPrefix(ctx, "customIPPrefix", &network.CustomIPPrefixArgs{
 * 			Cidr:               pulumi.String("0.0.0.0/24"),
 * 			CustomIpPrefixName: pulumi.String("test-customipprefix"),
 * 			Location:           pulumi.String("westus"),
 * 			ResourceGroupName:  pulumi.String("rg1"),
 * 		})
 * 		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.CustomIPPrefix;
 * import com.pulumi.azurenative.network.CustomIPPrefixArgs;
 * 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 customIPPrefix = new CustomIPPrefix("customIPPrefix", CustomIPPrefixArgs.builder()
 *             .cidr("0.0.0.0/24")
 *             .customIpPrefixName("test-customipprefix")
 *             .location("westus")
 *             .resourceGroupName("rg1")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:network:CustomIPPrefix test-customipprefix /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}
 * ```
 * @property asn The ASN for CIDR advertising. Should be an integer as string.
 * @property authorizationMessage Authorization message for WAN validation.
 * @property cidr The prefix range in CIDR notation. Should include the start address and the prefix length.
 * @property commissionedState The commissioned state of the Custom IP Prefix.
 * @property customIpPrefixName The name of the custom IP prefix.
 * @property customIpPrefixParent The Parent CustomIpPrefix for IPv6 /64 CustomIpPrefix.
 * @property expressRouteAdvertise Whether to do express route advertise.
 * @property extendedLocation The extended location of the custom IP prefix.
 * @property geo The Geo for CIDR advertising. Should be an Geo code.
 * @property id Resource ID.
 * @property location Resource location.
 * @property noInternetAdvertise Whether to Advertise the range to Internet.
 * @property prefixType Type of custom IP prefix. Should be Singular, Parent, or Child.
 * @property resourceGroupName The name of the resource group.
 * @property signedMessage Signed message for WAN validation.
 * @property tags Resource tags.
 * @property zones A list of availability zones denoting the IP allocated for the resource needs to come from.
 */
public data class CustomIPPrefixArgs(
    public val asn: Output? = null,
    public val authorizationMessage: Output? = null,
    public val cidr: Output? = null,
    public val commissionedState: Output>? = null,
    public val customIpPrefixName: Output? = null,
    public val customIpPrefixParent: Output? = null,
    public val expressRouteAdvertise: Output? = null,
    public val extendedLocation: Output? = null,
    public val geo: Output>? = null,
    public val id: Output? = null,
    public val location: Output? = null,
    public val noInternetAdvertise: Output? = null,
    public val prefixType: Output>? = null,
    public val resourceGroupName: Output? = null,
    public val signedMessage: Output? = null,
    public val tags: Output>? = null,
    public val zones: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.network.CustomIPPrefixArgs =
        com.pulumi.azurenative.network.CustomIPPrefixArgs.builder()
            .asn(asn?.applyValue({ args0 -> args0 }))
            .authorizationMessage(authorizationMessage?.applyValue({ args0 -> args0 }))
            .cidr(cidr?.applyValue({ args0 -> args0 }))
            .commissionedState(
                commissionedState?.applyValue({ args0 ->
                    args0.transform(
                        { args0 -> args0 },
                        { args0 -> args0.let({ args0 -> args0.toJava() }) },
                    )
                }),
            )
            .customIpPrefixName(customIpPrefixName?.applyValue({ args0 -> args0 }))
            .customIpPrefixParent(
                customIpPrefixParent?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .expressRouteAdvertise(expressRouteAdvertise?.applyValue({ args0 -> args0 }))
            .extendedLocation(extendedLocation?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .geo(
                geo?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .id(id?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .noInternetAdvertise(noInternetAdvertise?.applyValue({ args0 -> args0 }))
            .prefixType(
                prefixType?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .signedMessage(signedMessage?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .zones(zones?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [CustomIPPrefixArgs].
 */
@PulumiTagMarker
public class CustomIPPrefixArgsBuilder internal constructor() {
    private var asn: Output? = null

    private var authorizationMessage: Output? = null

    private var cidr: Output? = null

    private var commissionedState: Output>? = null

    private var customIpPrefixName: Output? = null

    private var customIpPrefixParent: Output? = null

    private var expressRouteAdvertise: Output? = null

    private var extendedLocation: Output? = null

    private var geo: Output>? = null

    private var id: Output? = null

    private var location: Output? = null

    private var noInternetAdvertise: Output? = null

    private var prefixType: Output>? = null

    private var resourceGroupName: Output? = null

    private var signedMessage: Output? = null

    private var tags: Output>? = null

    private var zones: Output>? = null

    /**
     * @param value The ASN for CIDR advertising. Should be an integer as string.
     */
    @JvmName("osuojeegcyqouask")
    public suspend fun asn(`value`: Output) {
        this.asn = value
    }

    /**
     * @param value Authorization message for WAN validation.
     */
    @JvmName("qobcnkrorcbkwucr")
    public suspend fun authorizationMessage(`value`: Output) {
        this.authorizationMessage = value
    }

    /**
     * @param value The prefix range in CIDR notation. Should include the start address and the prefix length.
     */
    @JvmName("pbypmniyujlsbxlx")
    public suspend fun cidr(`value`: Output) {
        this.cidr = value
    }

    /**
     * @param value The commissioned state of the Custom IP Prefix.
     */
    @JvmName("akafjrylfdhnnkik")
    public suspend fun commissionedState(`value`: Output>) {
        this.commissionedState = value
    }

    /**
     * @param value The name of the custom IP prefix.
     */
    @JvmName("gffhdmofklejtfvk")
    public suspend fun customIpPrefixName(`value`: Output) {
        this.customIpPrefixName = value
    }

    /**
     * @param value The Parent CustomIpPrefix for IPv6 /64 CustomIpPrefix.
     */
    @JvmName("jqpdtvassmkfumpp")
    public suspend fun customIpPrefixParent(`value`: Output) {
        this.customIpPrefixParent = value
    }

    /**
     * @param value Whether to do express route advertise.
     */
    @JvmName("eeqadcnqnkempffs")
    public suspend fun expressRouteAdvertise(`value`: Output) {
        this.expressRouteAdvertise = value
    }

    /**
     * @param value The extended location of the custom IP prefix.
     */
    @JvmName("cpkmmjkwnqxuoqln")
    public suspend fun extendedLocation(`value`: Output) {
        this.extendedLocation = value
    }

    /**
     * @param value The Geo for CIDR advertising. Should be an Geo code.
     */
    @JvmName("uvbnrynfnbttmonp")
    public suspend fun geo(`value`: Output>) {
        this.geo = value
    }

    /**
     * @param value Resource ID.
     */
    @JvmName("celuynuidvkybamq")
    public suspend fun id(`value`: Output) {
        this.id = value
    }

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

    /**
     * @param value Whether to Advertise the range to Internet.
     */
    @JvmName("joxsfgjvujuiqaol")
    public suspend fun noInternetAdvertise(`value`: Output) {
        this.noInternetAdvertise = value
    }

    /**
     * @param value Type of custom IP prefix. Should be Singular, Parent, or Child.
     */
    @JvmName("nyxqnajqmmscmhrp")
    public suspend fun prefixType(`value`: Output>) {
        this.prefixType = value
    }

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

    /**
     * @param value Signed message for WAN validation.
     */
    @JvmName("twmkihjumnomnbhr")
    public suspend fun signedMessage(`value`: Output) {
        this.signedMessage = value
    }

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

    /**
     * @param value A list of availability zones denoting the IP allocated for the resource needs to come from.
     */
    @JvmName("urtnxmvygwlibdpn")
    public suspend fun zones(`value`: Output>) {
        this.zones = value
    }

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

    /**
     * @param values A list of availability zones denoting the IP allocated for the resource needs to come from.
     */
    @JvmName("bmnrsymlqhkdkxlc")
    public suspend fun zones(values: List>) {
        this.zones = Output.all(values)
    }

    /**
     * @param value The ASN for CIDR advertising. Should be an integer as string.
     */
    @JvmName("qqaawjwkhxfuubrc")
    public suspend fun asn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.asn = mapped
    }

    /**
     * @param value Authorization message for WAN validation.
     */
    @JvmName("sliylxgyiyijvwwr")
    public suspend fun authorizationMessage(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.authorizationMessage = mapped
    }

    /**
     * @param value The prefix range in CIDR notation. Should include the start address and the prefix length.
     */
    @JvmName("ivlfbjbskxyovyvk")
    public suspend fun cidr(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cidr = mapped
    }

    /**
     * @param value The commissioned state of the Custom IP Prefix.
     */
    @JvmName("bqnlpmugfdlnvlrq")
    public suspend fun commissionedState(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.commissionedState = mapped
    }

    /**
     * @param value The commissioned state of the Custom IP Prefix.
     */
    @JvmName("puodbctvryvdualm")
    public fun commissionedState(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.commissionedState = mapped
    }

    /**
     * @param value The commissioned state of the Custom IP Prefix.
     */
    @JvmName("mwifpfdakefbcrhd")
    public fun commissionedState(`value`: CommissionedState) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.commissionedState = mapped
    }

    /**
     * @param value The name of the custom IP prefix.
     */
    @JvmName("vghlnoimxmpeqpxp")
    public suspend fun customIpPrefixName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customIpPrefixName = mapped
    }

    /**
     * @param value The Parent CustomIpPrefix for IPv6 /64 CustomIpPrefix.
     */
    @JvmName("stnpfgqrlvwujqxy")
    public suspend fun customIpPrefixParent(`value`: SubResourceArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customIpPrefixParent = mapped
    }

    /**
     * @param argument The Parent CustomIpPrefix for IPv6 /64 CustomIpPrefix.
     */
    @JvmName("xwnrmawbsdgwwomk")
    public suspend fun customIpPrefixParent(argument: suspend SubResourceArgsBuilder.() -> Unit) {
        val toBeMapped = SubResourceArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.customIpPrefixParent = mapped
    }

    /**
     * @param value Whether to do express route advertise.
     */
    @JvmName("afigjoejyydcshto")
    public suspend fun expressRouteAdvertise(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.expressRouteAdvertise = mapped
    }

    /**
     * @param value The extended location of the custom IP prefix.
     */
    @JvmName("fnymrrkutwjhcjyh")
    public suspend fun extendedLocation(`value`: ExtendedLocationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.extendedLocation = mapped
    }

    /**
     * @param argument The extended location of the custom IP prefix.
     */
    @JvmName("riawqwbqvkylcwgp")
    public suspend fun extendedLocation(argument: suspend ExtendedLocationArgsBuilder.() -> Unit) {
        val toBeMapped = ExtendedLocationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.extendedLocation = mapped
    }

    /**
     * @param value The Geo for CIDR advertising. Should be an Geo code.
     */
    @JvmName("efqycsdtwhekqrta")
    public suspend fun geo(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.geo = mapped
    }

    /**
     * @param value The Geo for CIDR advertising. Should be an Geo code.
     */
    @JvmName("rdqxjxavrddimllr")
    public fun geo(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.geo = mapped
    }

    /**
     * @param value The Geo for CIDR advertising. Should be an Geo code.
     */
    @JvmName("ovsabldgbcqhsphs")
    public fun geo(`value`: Geo) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.geo = mapped
    }

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

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

    /**
     * @param value Whether to Advertise the range to Internet.
     */
    @JvmName("rjbikcnpeeirpcqg")
    public suspend fun noInternetAdvertise(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.noInternetAdvertise = mapped
    }

    /**
     * @param value Type of custom IP prefix. Should be Singular, Parent, or Child.
     */
    @JvmName("dfqmpbhkufhhdtma")
    public suspend fun prefixType(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.prefixType = mapped
    }

    /**
     * @param value Type of custom IP prefix. Should be Singular, Parent, or Child.
     */
    @JvmName("rnmfkvrnuvivftcs")
    public fun prefixType(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.prefixType = mapped
    }

    /**
     * @param value Type of custom IP prefix. Should be Singular, Parent, or Child.
     */
    @JvmName("xxgufpkcnynktmee")
    public fun prefixType(`value`: CustomIpPrefixType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.prefixType = mapped
    }

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

    /**
     * @param value Signed message for WAN validation.
     */
    @JvmName("pttdypjtaaejmbgr")
    public suspend fun signedMessage(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.signedMessage = mapped
    }

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

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

    /**
     * @param value A list of availability zones denoting the IP allocated for the resource needs to come from.
     */
    @JvmName("nkutvuxqgptoycug")
    public suspend fun zones(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.zones = mapped
    }

    /**
     * @param values A list of availability zones denoting the IP allocated for the resource needs to come from.
     */
    @JvmName("xsjujlxsiqlkklcq")
    public suspend fun zones(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.zones = mapped
    }

    internal fun build(): CustomIPPrefixArgs = CustomIPPrefixArgs(
        asn = asn,
        authorizationMessage = authorizationMessage,
        cidr = cidr,
        commissionedState = commissionedState,
        customIpPrefixName = customIpPrefixName,
        customIpPrefixParent = customIpPrefixParent,
        expressRouteAdvertise = expressRouteAdvertise,
        extendedLocation = extendedLocation,
        geo = geo,
        id = id,
        location = location,
        noInternetAdvertise = noInternetAdvertise,
        prefixType = prefixType,
        resourceGroupName = resourceGroupName,
        signedMessage = signedMessage,
        tags = tags,
        zones = zones,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy