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.

The 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("hjddtolenhrowtwq")
    public suspend fun accountId(`value`: Output) {
        this.accountId = value
    }

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

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

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

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

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

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

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

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

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

    /**
     * @param values
     */
    @JvmName("sfycaoxtvfvmuaam")
    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("ygbmukhhgebgmaqg")
    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("mlqqvofyxaqvysft")
    public suspend fun accountId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accountId = mapped
    }

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

    /**
     * @param argument
     */
    @JvmName("anafdttrjwevedyl")
    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("hthpbqvliweujvfu")
    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("ayapdfnkfnuqsupt")
    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("tchtktxrdbcxqcgm")
    public suspend fun excludes(vararg values: AccessGroupExcludeArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.excludes = mapped
    }

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

    /**
     * @param argument
     */
    @JvmName("cvngjcwnobempfeg")
    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("eaomrtcicarraonw")
    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("mgayqndnbrftdgcu")
    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("sxcrqtoqdnkfasis")
    public suspend fun includes(vararg values: AccessGroupIncludeArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.includes = mapped
    }

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

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

    /**
     * @param argument
     */
    @JvmName("ogcdnwocghomeuxl")
    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("dygpubhlvrnakewx")
    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("vhqqqgikkrgajfor")
    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("jdtkfnuiqotrknhn")
    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("hwlqmuwbftohqicy")
    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