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

com.pulumi.awsnative.ec2.kotlin.IpamPoolArgs.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: 0.122.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.ec2.kotlin

import com.pulumi.awsnative.ec2.IpamPoolArgs.builder
import com.pulumi.awsnative.ec2.kotlin.enums.IpamPoolAwsService
import com.pulumi.awsnative.ec2.kotlin.enums.IpamPoolPublicIpSource
import com.pulumi.awsnative.ec2.kotlin.inputs.IpamPoolProvisionedCidrArgs
import com.pulumi.awsnative.ec2.kotlin.inputs.IpamPoolProvisionedCidrArgsBuilder
import com.pulumi.awsnative.ec2.kotlin.inputs.IpamPoolSourceResourceArgs
import com.pulumi.awsnative.ec2.kotlin.inputs.IpamPoolSourceResourceArgsBuilder
import com.pulumi.awsnative.ec2.kotlin.inputs.IpamPoolTagArgs
import com.pulumi.awsnative.ec2.kotlin.inputs.IpamPoolTagArgsBuilder
import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Resource Schema of AWS::EC2::IPAMPool Type
 * @property addressFamily The address family of the address space in this pool. Either IPv4 or IPv6.
 * @property allocationDefaultNetmaskLength The default netmask length for allocations made from this pool. This value is used when the netmask length of an allocation isn't specified.
 * @property allocationMaxNetmaskLength The maximum allowed netmask length for allocations made from this pool.
 * @property allocationMinNetmaskLength The minimum allowed netmask length for allocations made from this pool.
 * @property allocationResourceTags When specified, an allocation will not be allowed unless a resource has a matching set of tags.
 * @property autoImport Determines what to do if IPAM discovers resources that haven't been assigned an allocation. If set to true, an allocation will be made automatically.
 * @property awsService Limits which service in Amazon Web Services that the pool can be used in.
 * @property description The description of the IPAM pool.
 * @property ipamScopeId The Id of the scope this pool is a part of.
 * @property locale The region of this pool. If not set, this will default to "None" which will disable non-custom allocations. If the locale has been specified for the source pool, this value must match.
 * @property provisionedCidrs A list of cidrs representing the address space available for allocation in this pool.
 * @property publicIpSource The IP address source for pools in the public scope. Only used for provisioning IP address CIDRs to pools in the public scope. Default is `byoip`.
 * @property publiclyAdvertisable Determines whether or not address space from this pool is publicly advertised. Must be set if and only if the pool is IPv6.
 * @property sourceIpamPoolId The Id of this pool's source. If set, all space provisioned in this pool must be free space provisioned in the parent pool.
 * @property sourceResource The resource used to provision CIDRs to a resource planning pool.
 * @property tags An array of key-value pairs to apply to this resource.
 */
public data class IpamPoolArgs(
    public val addressFamily: Output? = null,
    public val allocationDefaultNetmaskLength: Output? = null,
    public val allocationMaxNetmaskLength: Output? = null,
    public val allocationMinNetmaskLength: Output? = null,
    public val allocationResourceTags: Output>? = null,
    public val autoImport: Output? = null,
    public val awsService: Output? = null,
    public val description: Output? = null,
    public val ipamScopeId: Output? = null,
    public val locale: Output? = null,
    public val provisionedCidrs: Output>? = null,
    public val publicIpSource: Output? = null,
    public val publiclyAdvertisable: Output? = null,
    public val sourceIpamPoolId: Output? = null,
    public val sourceResource: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.ec2.IpamPoolArgs =
        com.pulumi.awsnative.ec2.IpamPoolArgs.builder()
            .addressFamily(addressFamily?.applyValue({ args0 -> args0 }))
            .allocationDefaultNetmaskLength(allocationDefaultNetmaskLength?.applyValue({ args0 -> args0 }))
            .allocationMaxNetmaskLength(allocationMaxNetmaskLength?.applyValue({ args0 -> args0 }))
            .allocationMinNetmaskLength(allocationMinNetmaskLength?.applyValue({ args0 -> args0 }))
            .allocationResourceTags(
                allocationResourceTags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .autoImport(autoImport?.applyValue({ args0 -> args0 }))
            .awsService(awsService?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .description(description?.applyValue({ args0 -> args0 }))
            .ipamScopeId(ipamScopeId?.applyValue({ args0 -> args0 }))
            .locale(locale?.applyValue({ args0 -> args0 }))
            .provisionedCidrs(
                provisionedCidrs?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .publicIpSource(publicIpSource?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .publiclyAdvertisable(publiclyAdvertisable?.applyValue({ args0 -> args0 }))
            .sourceIpamPoolId(sourceIpamPoolId?.applyValue({ args0 -> args0 }))
            .sourceResource(sourceResource?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [IpamPoolArgs].
 */
@PulumiTagMarker
public class IpamPoolArgsBuilder internal constructor() {
    private var addressFamily: Output? = null

    private var allocationDefaultNetmaskLength: Output? = null

    private var allocationMaxNetmaskLength: Output? = null

    private var allocationMinNetmaskLength: Output? = null

    private var allocationResourceTags: Output>? = null

    private var autoImport: Output? = null

    private var awsService: Output? = null

    private var description: Output? = null

    private var ipamScopeId: Output? = null

    private var locale: Output? = null

    private var provisionedCidrs: Output>? = null

    private var publicIpSource: Output? = null

    private var publiclyAdvertisable: Output? = null

    private var sourceIpamPoolId: Output? = null

    private var sourceResource: Output? = null

    private var tags: Output>? = null

    /**
     * @param value The address family of the address space in this pool. Either IPv4 or IPv6.
     */
    @JvmName("ahlnfdknmuwbcmoy")
    public suspend fun addressFamily(`value`: Output) {
        this.addressFamily = value
    }

    /**
     * @param value The default netmask length for allocations made from this pool. This value is used when the netmask length of an allocation isn't specified.
     */
    @JvmName("gcrehbovnefpbgfm")
    public suspend fun allocationDefaultNetmaskLength(`value`: Output) {
        this.allocationDefaultNetmaskLength = value
    }

    /**
     * @param value The maximum allowed netmask length for allocations made from this pool.
     */
    @JvmName("mieuyphiekajlkml")
    public suspend fun allocationMaxNetmaskLength(`value`: Output) {
        this.allocationMaxNetmaskLength = value
    }

    /**
     * @param value The minimum allowed netmask length for allocations made from this pool.
     */
    @JvmName("sdblsicfepxaurjv")
    public suspend fun allocationMinNetmaskLength(`value`: Output) {
        this.allocationMinNetmaskLength = value
    }

    /**
     * @param value When specified, an allocation will not be allowed unless a resource has a matching set of tags.
     */
    @JvmName("ntjeshasgpuydftk")
    public suspend fun allocationResourceTags(`value`: Output>) {
        this.allocationResourceTags = value
    }

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

    /**
     * @param values When specified, an allocation will not be allowed unless a resource has a matching set of tags.
     */
    @JvmName("hsrrvjbjpejisbor")
    public suspend fun allocationResourceTags(values: List>) {
        this.allocationResourceTags = Output.all(values)
    }

    /**
     * @param value Determines what to do if IPAM discovers resources that haven't been assigned an allocation. If set to true, an allocation will be made automatically.
     */
    @JvmName("uhruvpojesolapsu")
    public suspend fun autoImport(`value`: Output) {
        this.autoImport = value
    }

    /**
     * @param value Limits which service in Amazon Web Services that the pool can be used in.
     */
    @JvmName("noeqtgucvseteevl")
    public suspend fun awsService(`value`: Output) {
        this.awsService = value
    }

    /**
     * @param value The description of the IPAM pool.
     */
    @JvmName("fupxqciwxgqrmggm")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value The Id of the scope this pool is a part of.
     */
    @JvmName("cryvtulylciwdeep")
    public suspend fun ipamScopeId(`value`: Output) {
        this.ipamScopeId = value
    }

    /**
     * @param value The region of this pool. If not set, this will default to "None" which will disable non-custom allocations. If the locale has been specified for the source pool, this value must match.
     */
    @JvmName("lrllojiefcxnigen")
    public suspend fun locale(`value`: Output) {
        this.locale = value
    }

    /**
     * @param value A list of cidrs representing the address space available for allocation in this pool.
     */
    @JvmName("yfrdukqgpvmgqsih")
    public suspend fun provisionedCidrs(`value`: Output>) {
        this.provisionedCidrs = value
    }

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

    /**
     * @param values A list of cidrs representing the address space available for allocation in this pool.
     */
    @JvmName("nloxifiwwflvirsm")
    public suspend fun provisionedCidrs(values: List>) {
        this.provisionedCidrs = Output.all(values)
    }

    /**
     * @param value The IP address source for pools in the public scope. Only used for provisioning IP address CIDRs to pools in the public scope. Default is `byoip`.
     */
    @JvmName("sxkmvquqvejvtnyw")
    public suspend fun publicIpSource(`value`: Output) {
        this.publicIpSource = value
    }

    /**
     * @param value Determines whether or not address space from this pool is publicly advertised. Must be set if and only if the pool is IPv6.
     */
    @JvmName("kqxyesumetsuyfil")
    public suspend fun publiclyAdvertisable(`value`: Output) {
        this.publiclyAdvertisable = value
    }

    /**
     * @param value The Id of this pool's source. If set, all space provisioned in this pool must be free space provisioned in the parent pool.
     */
    @JvmName("ygkcrowhgptqjgqp")
    public suspend fun sourceIpamPoolId(`value`: Output) {
        this.sourceIpamPoolId = value
    }

    /**
     * @param value The resource used to provision CIDRs to a resource planning pool.
     */
    @JvmName("soobtuauejiieboh")
    public suspend fun sourceResource(`value`: Output) {
        this.sourceResource = value
    }

    /**
     * @param value An array of key-value pairs to apply to this resource.
     */
    @JvmName("rimacmptsphvjxkl")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values An array of key-value pairs to apply to this resource.
     */
    @JvmName("lfhesnrpqiyrhdnl")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value The address family of the address space in this pool. Either IPv4 or IPv6.
     */
    @JvmName("maqlnawhsjyjtbuu")
    public suspend fun addressFamily(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.addressFamily = mapped
    }

    /**
     * @param value The default netmask length for allocations made from this pool. This value is used when the netmask length of an allocation isn't specified.
     */
    @JvmName("qyljbilymlfltskx")
    public suspend fun allocationDefaultNetmaskLength(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allocationDefaultNetmaskLength = mapped
    }

    /**
     * @param value The maximum allowed netmask length for allocations made from this pool.
     */
    @JvmName("ejcsybqpcssprxqf")
    public suspend fun allocationMaxNetmaskLength(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allocationMaxNetmaskLength = mapped
    }

    /**
     * @param value The minimum allowed netmask length for allocations made from this pool.
     */
    @JvmName("tpcuqhcbdcpqaswu")
    public suspend fun allocationMinNetmaskLength(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allocationMinNetmaskLength = mapped
    }

    /**
     * @param value When specified, an allocation will not be allowed unless a resource has a matching set of tags.
     */
    @JvmName("nojgrcqondtsoxyb")
    public suspend fun allocationResourceTags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allocationResourceTags = mapped
    }

    /**
     * @param argument When specified, an allocation will not be allowed unless a resource has a matching set of tags.
     */
    @JvmName("ykibjkuqfenvovcj")
    public suspend fun allocationResourceTags(argument: List Unit>) {
        val toBeMapped = argument.toList().map { IpamPoolTagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.allocationResourceTags = mapped
    }

    /**
     * @param argument When specified, an allocation will not be allowed unless a resource has a matching set of tags.
     */
    @JvmName("aagtbvgnuchrwrvi")
    public suspend fun allocationResourceTags(vararg argument: suspend IpamPoolTagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { IpamPoolTagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.allocationResourceTags = mapped
    }

    /**
     * @param argument When specified, an allocation will not be allowed unless a resource has a matching set of tags.
     */
    @JvmName("uybdgaxagsitcwbd")
    public suspend fun allocationResourceTags(argument: suspend IpamPoolTagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(IpamPoolTagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.allocationResourceTags = mapped
    }

    /**
     * @param values When specified, an allocation will not be allowed unless a resource has a matching set of tags.
     */
    @JvmName("klwlrxxsnkhlldhs")
    public suspend fun allocationResourceTags(vararg values: IpamPoolTagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.allocationResourceTags = mapped
    }

    /**
     * @param value Determines what to do if IPAM discovers resources that haven't been assigned an allocation. If set to true, an allocation will be made automatically.
     */
    @JvmName("ttreodcmuhopmauv")
    public suspend fun autoImport(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoImport = mapped
    }

    /**
     * @param value Limits which service in Amazon Web Services that the pool can be used in.
     */
    @JvmName("wpmhcxwtqmxcfodq")
    public suspend fun awsService(`value`: IpamPoolAwsService?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.awsService = mapped
    }

    /**
     * @param value The description of the IPAM pool.
     */
    @JvmName("wqgvrlyvwafnxsrl")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value The Id of the scope this pool is a part of.
     */
    @JvmName("asoeilqmsgyekrnd")
    public suspend fun ipamScopeId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipamScopeId = mapped
    }

    /**
     * @param value The region of this pool. If not set, this will default to "None" which will disable non-custom allocations. If the locale has been specified for the source pool, this value must match.
     */
    @JvmName("ifjqcwrhsakgieuh")
    public suspend fun locale(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.locale = mapped
    }

    /**
     * @param value A list of cidrs representing the address space available for allocation in this pool.
     */
    @JvmName("jdkwuidepxolifce")
    public suspend fun provisionedCidrs(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.provisionedCidrs = mapped
    }

    /**
     * @param argument A list of cidrs representing the address space available for allocation in this pool.
     */
    @JvmName("dujivgvosbbocmrt")
    public suspend fun provisionedCidrs(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            IpamPoolProvisionedCidrArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.provisionedCidrs = mapped
    }

    /**
     * @param argument A list of cidrs representing the address space available for allocation in this pool.
     */
    @JvmName("yepscxqpytxnjldp")
    public suspend fun provisionedCidrs(vararg argument: suspend IpamPoolProvisionedCidrArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            IpamPoolProvisionedCidrArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.provisionedCidrs = mapped
    }

    /**
     * @param argument A list of cidrs representing the address space available for allocation in this pool.
     */
    @JvmName("gujqcgshgknlkcac")
    public suspend fun provisionedCidrs(argument: suspend IpamPoolProvisionedCidrArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            IpamPoolProvisionedCidrArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.provisionedCidrs = mapped
    }

    /**
     * @param values A list of cidrs representing the address space available for allocation in this pool.
     */
    @JvmName("rgtaehnbnjvgyncp")
    public suspend fun provisionedCidrs(vararg values: IpamPoolProvisionedCidrArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.provisionedCidrs = mapped
    }

    /**
     * @param value The IP address source for pools in the public scope. Only used for provisioning IP address CIDRs to pools in the public scope. Default is `byoip`.
     */
    @JvmName("uyflpsvegyvyfamo")
    public suspend fun publicIpSource(`value`: IpamPoolPublicIpSource?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.publicIpSource = mapped
    }

    /**
     * @param value Determines whether or not address space from this pool is publicly advertised. Must be set if and only if the pool is IPv6.
     */
    @JvmName("hycvvlpyhnevisks")
    public suspend fun publiclyAdvertisable(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.publiclyAdvertisable = mapped
    }

    /**
     * @param value The Id of this pool's source. If set, all space provisioned in this pool must be free space provisioned in the parent pool.
     */
    @JvmName("mbvhyhwvjbntfttj")
    public suspend fun sourceIpamPoolId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceIpamPoolId = mapped
    }

    /**
     * @param value The resource used to provision CIDRs to a resource planning pool.
     */
    @JvmName("vjjihgghvudfcjkb")
    public suspend fun sourceResource(`value`: IpamPoolSourceResourceArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceResource = mapped
    }

    /**
     * @param argument The resource used to provision CIDRs to a resource planning pool.
     */
    @JvmName("wfqawnsdqrxgwvaj")
    public suspend fun sourceResource(argument: suspend IpamPoolSourceResourceArgsBuilder.() -> Unit) {
        val toBeMapped = IpamPoolSourceResourceArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.sourceResource = mapped
    }

    /**
     * @param value An array of key-value pairs to apply to this resource.
     */
    @JvmName("yhttgbxbocskreoj")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     */
    @JvmName("jgwfhsfefebmgfrw")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     */
    @JvmName("wiuyytkvidmtigsk")
    public suspend fun tags(vararg argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     */
    @JvmName("qtonduwsrxclpdnx")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values An array of key-value pairs to apply to this resource.
     */
    @JvmName("qrsrvoatitnioyjt")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): IpamPoolArgs = IpamPoolArgs(
        addressFamily = addressFamily,
        allocationDefaultNetmaskLength = allocationDefaultNetmaskLength,
        allocationMaxNetmaskLength = allocationMaxNetmaskLength,
        allocationMinNetmaskLength = allocationMinNetmaskLength,
        allocationResourceTags = allocationResourceTags,
        autoImport = autoImport,
        awsService = awsService,
        description = description,
        ipamScopeId = ipamScopeId,
        locale = locale,
        provisionedCidrs = provisionedCidrs,
        publicIpSource = publicIpSource,
        publiclyAdvertisable = publiclyAdvertisable,
        sourceIpamPoolId = sourceIpamPoolId,
        sourceResource = sourceResource,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy