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

com.pulumi.azurenative.resources.kotlin.inputs.DenySettingsArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.resources.kotlin.inputs

import com.pulumi.azurenative.resources.inputs.DenySettingsArgs.builder
import com.pulumi.azurenative.resources.kotlin.enums.DenySettingsMode
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.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Defines how resources deployed by the deployment stack are locked.
 * @property applyToChildScopes DenySettings will be applied to child scopes.
 * @property excludedActions List of role-based management operations that are excluded from the denySettings. Up to 200 actions are permitted. If the denySetting mode is set to 'denyWriteAndDelete', then the following actions are automatically appended to 'excludedActions': '*\/read' and 'Microsoft.Authorization/locks/delete'. If the denySetting mode is set to 'denyDelete', then the following actions are automatically appended to 'excludedActions': 'Microsoft.Authorization/locks/delete'. Duplicate actions will be removed.
 * @property excludedPrincipals List of AAD principal IDs excluded from the lock. Up to 5 principals are permitted.
 * @property mode denySettings Mode.
 */
public data class DenySettingsArgs(
    public val applyToChildScopes: Output? = null,
    public val excludedActions: Output>? = null,
    public val excludedPrincipals: Output>? = null,
    public val mode: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.resources.inputs.DenySettingsArgs =
        com.pulumi.azurenative.resources.inputs.DenySettingsArgs.builder()
            .applyToChildScopes(applyToChildScopes?.applyValue({ args0 -> args0 }))
            .excludedActions(excludedActions?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .excludedPrincipals(excludedPrincipals?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .mode(
                mode.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [DenySettingsArgs].
 */
@PulumiTagMarker
public class DenySettingsArgsBuilder internal constructor() {
    private var applyToChildScopes: Output? = null

    private var excludedActions: Output>? = null

    private var excludedPrincipals: Output>? = null

    private var mode: Output>? = null

    /**
     * @param value DenySettings will be applied to child scopes.
     */
    @JvmName("tlqyomakxgbvdndr")
    public suspend fun applyToChildScopes(`value`: Output) {
        this.applyToChildScopes = value
    }

    /**
     * @param value List of role-based management operations that are excluded from the denySettings. Up to 200 actions are permitted. If the denySetting mode is set to 'denyWriteAndDelete', then the following actions are automatically appended to 'excludedActions': '*\/read' and 'Microsoft.Authorization/locks/delete'. If the denySetting mode is set to 'denyDelete', then the following actions are automatically appended to 'excludedActions': 'Microsoft.Authorization/locks/delete'. Duplicate actions will be removed.
     */
    @JvmName("ftjbqthrxwlbxbhj")
    public suspend fun excludedActions(`value`: Output>) {
        this.excludedActions = value
    }

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

    /**
     * @param values List of role-based management operations that are excluded from the denySettings. Up to 200 actions are permitted. If the denySetting mode is set to 'denyWriteAndDelete', then the following actions are automatically appended to 'excludedActions': '*\/read' and 'Microsoft.Authorization/locks/delete'. If the denySetting mode is set to 'denyDelete', then the following actions are automatically appended to 'excludedActions': 'Microsoft.Authorization/locks/delete'. Duplicate actions will be removed.
     */
    @JvmName("vklhspwdxqbjxvtf")
    public suspend fun excludedActions(values: List>) {
        this.excludedActions = Output.all(values)
    }

    /**
     * @param value List of AAD principal IDs excluded from the lock. Up to 5 principals are permitted.
     */
    @JvmName("ootbnfhhvdwfmeyq")
    public suspend fun excludedPrincipals(`value`: Output>) {
        this.excludedPrincipals = value
    }

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

    /**
     * @param values List of AAD principal IDs excluded from the lock. Up to 5 principals are permitted.
     */
    @JvmName("eswuwihekicrotlv")
    public suspend fun excludedPrincipals(values: List>) {
        this.excludedPrincipals = Output.all(values)
    }

    /**
     * @param value denySettings Mode.
     */
    @JvmName("oatgqbedccoftbya")
    public suspend fun mode(`value`: Output>) {
        this.mode = value
    }

    /**
     * @param value DenySettings will be applied to child scopes.
     */
    @JvmName("obdmdsccmywailal")
    public suspend fun applyToChildScopes(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.applyToChildScopes = mapped
    }

    /**
     * @param value List of role-based management operations that are excluded from the denySettings. Up to 200 actions are permitted. If the denySetting mode is set to 'denyWriteAndDelete', then the following actions are automatically appended to 'excludedActions': '*\/read' and 'Microsoft.Authorization/locks/delete'. If the denySetting mode is set to 'denyDelete', then the following actions are automatically appended to 'excludedActions': 'Microsoft.Authorization/locks/delete'. Duplicate actions will be removed.
     */
    @JvmName("fumfcjqeukxdxwub")
    public suspend fun excludedActions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.excludedActions = mapped
    }

    /**
     * @param values List of role-based management operations that are excluded from the denySettings. Up to 200 actions are permitted. If the denySetting mode is set to 'denyWriteAndDelete', then the following actions are automatically appended to 'excludedActions': '*\/read' and 'Microsoft.Authorization/locks/delete'. If the denySetting mode is set to 'denyDelete', then the following actions are automatically appended to 'excludedActions': 'Microsoft.Authorization/locks/delete'. Duplicate actions will be removed.
     */
    @JvmName("wximvkxmnrbmbpge")
    public suspend fun excludedActions(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.excludedActions = mapped
    }

    /**
     * @param value List of AAD principal IDs excluded from the lock. Up to 5 principals are permitted.
     */
    @JvmName("ppnyrewrvjjnupwe")
    public suspend fun excludedPrincipals(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.excludedPrincipals = mapped
    }

    /**
     * @param values List of AAD principal IDs excluded from the lock. Up to 5 principals are permitted.
     */
    @JvmName("efhgjlmmssxxwlvk")
    public suspend fun excludedPrincipals(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.excludedPrincipals = mapped
    }

    /**
     * @param value denySettings Mode.
     */
    @JvmName("jcjwnrqsgeofibgs")
    public suspend fun mode(`value`: Either) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.mode = mapped
    }

    /**
     * @param value denySettings Mode.
     */
    @JvmName("ajxxgdwbomhlwblp")
    public fun mode(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.mode = mapped
    }

    /**
     * @param value denySettings Mode.
     */
    @JvmName("egvnmoxenpryopgt")
    public fun mode(`value`: DenySettingsMode) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.mode = mapped
    }

    internal fun build(): DenySettingsArgs = DenySettingsArgs(
        applyToChildScopes = applyToChildScopes,
        excludedActions = excludedActions,
        excludedPrincipals = excludedPrincipals,
        mode = mode ?: throw PulumiNullFieldException("mode"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy