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

com.pulumi.cloudflare.kotlin.AccessGroupArgs.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: 5.40.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.cloudflare.kotlin

import com.pulumi.cloudflare.AccessGroupArgs.builder
import com.pulumi.cloudflare.kotlin.inputs.AccessGroupExcludeArgs
import com.pulumi.cloudflare.kotlin.inputs.AccessGroupExcludeArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.AccessGroupIncludeArgs
import com.pulumi.cloudflare.kotlin.inputs.AccessGroupIncludeArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.AccessGroupRequireArgs
import com.pulumi.cloudflare.kotlin.inputs.AccessGroupRequireArgsBuilder
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

/**
 * Provides a Cloudflare Access Group resource. Access Groups are used
 * in conjunction with Access Policies to restrict access to a
 * particular resource based on group membership.
 * > It's required that an `account_id` or `zone_id` is provided and in
 *    most cases using either is fine. However, if you're using a scoped
 *    access token, you must provide the argument that matches the token's
 *    scope. For example, an access token that is scoped to the "example.com"
 *    zone needs to use the `zone_id` argument.
 * ## Import
 * ```sh
 * $ pulumi import cloudflare:index/accessGroup:AccessGroup example /
 * ```
 * @property accountId The account identifier to target for the resource. Conflicts with `zone_id`. **Modifying this attribute will force creation of a new resource.**
 * @property excludes
 * @property includes
 * @property name
 * @property requires
 * @property zoneId The zone identifier to target for the resource. Conflicts with `account_id`.
 */
public data class AccessGroupArgs(
    public val accountId: Output? = null,
    public val excludes: Output>? = null,
    public val includes: Output>? = null,
    public val name: Output? = null,
    public val requires: Output>? = null,
    public val zoneId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.cloudflare.AccessGroupArgs =
        com.pulumi.cloudflare.AccessGroupArgs.builder()
            .accountId(accountId?.applyValue({ args0 -> args0 }))
            .excludes(
                excludes?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .includes(
                includes?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .name(name?.applyValue({ args0 -> args0 }))
            .requires(
                requires?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .zoneId(zoneId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [AccessGroupArgs].
 */
@PulumiTagMarker
public class AccessGroupArgsBuilder internal constructor() {
    private var accountId: Output? = null

    private var excludes: Output>? = null

    private var includes: Output>? = null

    private var name: Output? = null

    private var requires: Output>? = null

    private var zoneId: Output? = null

    /**
     * @param value The account identifier to target for the resource. Conflicts with `zone_id`. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("lepphghgfwabnxdq")
    public suspend fun accountId(`value`: Output) {
        this.accountId = value
    }

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

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

    /**
     * @param values
     */
    @JvmName("ceecnpfufmournmu")
    public suspend fun excludes(values: List>) {
        this.excludes = Output.all(values)
    }

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

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

    /**
     * @param values
     */
    @JvmName("kucdsywdnuvbngej")
    public suspend fun includes(values: List>) {
        this.includes = Output.all(values)
    }

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

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

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

    /**
     * @param values
     */
    @JvmName("xridxkdfpjqikajx")
    public suspend fun requires(values: List>) {
        this.requires = Output.all(values)
    }

    /**
     * @param value The zone identifier to target for the resource. Conflicts with `account_id`.
     */
    @JvmName("txpfspndsrmfnidh")
    public suspend fun zoneId(`value`: Output) {
        this.zoneId = value
    }

    /**
     * @param value The account identifier to target for the resource. Conflicts with `zone_id`. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("jpnlgybjdjswnfgo")
    public suspend fun accountId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accountId = mapped
    }

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

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

    /**
     * @param argument
     */
    @JvmName("lbrflyydgfpulfah")
    public suspend fun excludes(vararg argument: suspend AccessGroupExcludeArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AccessGroupExcludeArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.excludes = mapped
    }

    /**
     * @param argument
     */
    @JvmName("jwvwigfdeiyvpnvt")
    public suspend fun excludes(argument: suspend AccessGroupExcludeArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(AccessGroupExcludeArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.excludes = mapped
    }

    /**
     * @param values
     */
    @JvmName("qttdrynjtemtnwpv")
    public suspend fun excludes(vararg values: AccessGroupExcludeArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.excludes = mapped
    }

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

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

    /**
     * @param argument
     */
    @JvmName("uvuwpsgdirdkrqnf")
    public suspend fun includes(vararg argument: suspend AccessGroupIncludeArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AccessGroupIncludeArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.includes = mapped
    }

    /**
     * @param argument
     */
    @JvmName("ydkgiedsadngyfyg")
    public suspend fun includes(argument: suspend AccessGroupIncludeArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(AccessGroupIncludeArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.includes = mapped
    }

    /**
     * @param values
     */
    @JvmName("xdkcpcspxtakqfvs")
    public suspend fun includes(vararg values: AccessGroupIncludeArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.includes = mapped
    }

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

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

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

    /**
     * @param argument
     */
    @JvmName("wpnqlijutvuncckh")
    public suspend fun requires(vararg argument: suspend AccessGroupRequireArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AccessGroupRequireArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.requires = mapped
    }

    /**
     * @param argument
     */
    @JvmName("bfoygawyaqstosdi")
    public suspend fun requires(argument: suspend AccessGroupRequireArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(AccessGroupRequireArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.requires = mapped
    }

    /**
     * @param values
     */
    @JvmName("ltkjicgajshvoedo")
    public suspend fun requires(vararg values: AccessGroupRequireArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.requires = mapped
    }

    /**
     * @param value The zone identifier to target for the resource. Conflicts with `account_id`.
     */
    @JvmName("uumlqonimwqgseav")
    public suspend fun zoneId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.zoneId = mapped
    }

    internal fun build(): AccessGroupArgs = AccessGroupArgs(
        accountId = accountId,
        excludes = excludes,
        includes = includes,
        name = name,
        requires = requires,
        zoneId = zoneId,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy