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

com.pulumi.gcp.orgpolicy.kotlin.inputs.PolicyDryRunSpecRuleArgs.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: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.orgpolicy.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.orgpolicy.inputs.PolicyDryRunSpecRuleArgs.builder
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.jvm.JvmName

/**
 *
 * @property allowAll Setting this to `"TRUE"` means that all values are allowed. This field can be set only in Policies for list constraints.
 * @property condition A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr' must include from 1 to 10 subexpressions, joined by the "||" or "&&" operators. Each subexpression must be of the form "resource.matchTag('/tag_key_short_name, 'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id', 'tagValues/value_id')". where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: "resource.matchTag('123456789/environment, 'prod')". or "resource.matchTagId('tagKeys/123', 'tagValues/456')".
 * @property denyAll Setting this to `"TRUE"` means that all values are denied. This field can be set only in Policies for list constraints.
 * @property enforce If `"TRUE"`, then the `Policy` is enforced. If `"FALSE"`, then any configuration is acceptable. This field can be set only in Policies for boolean constraints.
 * @property values List of values to be used for this PolicyRule. This field can be set only in Policies for list constraints.
 */
public data class PolicyDryRunSpecRuleArgs(
    public val allowAll: Output? = null,
    public val condition: Output? = null,
    public val denyAll: Output? = null,
    public val enforce: Output? = null,
    public val values: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.orgpolicy.inputs.PolicyDryRunSpecRuleArgs =
        com.pulumi.gcp.orgpolicy.inputs.PolicyDryRunSpecRuleArgs.builder()
            .allowAll(allowAll?.applyValue({ args0 -> args0 }))
            .condition(condition?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .denyAll(denyAll?.applyValue({ args0 -> args0 }))
            .enforce(enforce?.applyValue({ args0 -> args0 }))
            .values(values?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [PolicyDryRunSpecRuleArgs].
 */
@PulumiTagMarker
public class PolicyDryRunSpecRuleArgsBuilder internal constructor() {
    private var allowAll: Output? = null

    private var condition: Output? = null

    private var denyAll: Output? = null

    private var enforce: Output? = null

    private var values: Output? = null

    /**
     * @param value Setting this to `"TRUE"` means that all values are allowed. This field can be set only in Policies for list constraints.
     */
    @JvmName("fdmogtcwyvjpight")
    public suspend fun allowAll(`value`: Output) {
        this.allowAll = value
    }

    /**
     * @param value A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr' must include from 1 to 10 subexpressions, joined by the "||" or "&&" operators. Each subexpression must be of the form "resource.matchTag('/tag_key_short_name, 'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id', 'tagValues/value_id')". where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: "resource.matchTag('123456789/environment, 'prod')". or "resource.matchTagId('tagKeys/123', 'tagValues/456')".
     */
    @JvmName("dvrmdkmtucekedhw")
    public suspend fun condition(`value`: Output) {
        this.condition = value
    }

    /**
     * @param value Setting this to `"TRUE"` means that all values are denied. This field can be set only in Policies for list constraints.
     */
    @JvmName("obkbooauaqbvlmfc")
    public suspend fun denyAll(`value`: Output) {
        this.denyAll = value
    }

    /**
     * @param value If `"TRUE"`, then the `Policy` is enforced. If `"FALSE"`, then any configuration is acceptable. This field can be set only in Policies for boolean constraints.
     */
    @JvmName("gfswufnrusoqhbqg")
    public suspend fun enforce(`value`: Output) {
        this.enforce = value
    }

    /**
     * @param value List of values to be used for this PolicyRule. This field can be set only in Policies for list constraints.
     */
    @JvmName("bsayvdqgjqofsvlj")
    public suspend fun values(`value`: Output) {
        this.values = value
    }

    /**
     * @param value Setting this to `"TRUE"` means that all values are allowed. This field can be set only in Policies for list constraints.
     */
    @JvmName("ppmtcdgeirfgichr")
    public suspend fun allowAll(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allowAll = mapped
    }

    /**
     * @param value A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr' must include from 1 to 10 subexpressions, joined by the "||" or "&&" operators. Each subexpression must be of the form "resource.matchTag('/tag_key_short_name, 'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id', 'tagValues/value_id')". where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: "resource.matchTag('123456789/environment, 'prod')". or "resource.matchTagId('tagKeys/123', 'tagValues/456')".
     */
    @JvmName("icqygyjresghlacs")
    public suspend fun condition(`value`: PolicyDryRunSpecRuleConditionArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.condition = mapped
    }

    /**
     * @param argument A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr' must include from 1 to 10 subexpressions, joined by the "||" or "&&" operators. Each subexpression must be of the form "resource.matchTag('/tag_key_short_name, 'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id', 'tagValues/value_id')". where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: "resource.matchTag('123456789/environment, 'prod')". or "resource.matchTagId('tagKeys/123', 'tagValues/456')".
     */
    @JvmName("stkhkgbiolthrrag")
    public suspend fun condition(argument: suspend PolicyDryRunSpecRuleConditionArgsBuilder.() -> Unit) {
        val toBeMapped = PolicyDryRunSpecRuleConditionArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.condition = mapped
    }

    /**
     * @param value Setting this to `"TRUE"` means that all values are denied. This field can be set only in Policies for list constraints.
     */
    @JvmName("pswfkhyfupwvcjjg")
    public suspend fun denyAll(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.denyAll = mapped
    }

    /**
     * @param value If `"TRUE"`, then the `Policy` is enforced. If `"FALSE"`, then any configuration is acceptable. This field can be set only in Policies for boolean constraints.
     */
    @JvmName("rxvsyuijvyveyrwx")
    public suspend fun enforce(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enforce = mapped
    }

    /**
     * @param value List of values to be used for this PolicyRule. This field can be set only in Policies for list constraints.
     */
    @JvmName("umfheaydmbdqiuym")
    public suspend fun values(`value`: PolicyDryRunSpecRuleValuesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.values = mapped
    }

    /**
     * @param argument List of values to be used for this PolicyRule. This field can be set only in Policies for list constraints.
     */
    @JvmName("axyfockiilstyows")
    public suspend fun values(argument: suspend PolicyDryRunSpecRuleValuesArgsBuilder.() -> Unit) {
        val toBeMapped = PolicyDryRunSpecRuleValuesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.values = mapped
    }

    internal fun build(): PolicyDryRunSpecRuleArgs = PolicyDryRunSpecRuleArgs(
        allowAll = allowAll,
        condition = condition,
        denyAll = denyAll,
        enforce = enforce,
        values = values,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy