com.pulumi.gcp.orgpolicy.kotlin.inputs.PolicyDryRunSpecRuleArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@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')".
* Structure is documented below.
* @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 parameters Optional. Required for Managed Constraints if parameters defined in constraints. Pass parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: { \"allowedLocations\" : [\"us-east1\", \"us-west1\"], \"allowAll\" : true }
* @property values List of values to be used for this policy rule. This field can be set only in policies for list constraints.
* Structure is documented below.
*/
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 parameters: 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 }))
.parameters(parameters?.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 parameters: 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("aephxfsuqmlhdklt")
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')".
* Structure is documented below.
*/
@JvmName("gqdhnxnnmfskfosx")
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("difctohfmunftghb")
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("dyofbbmaeuioosmj")
public suspend fun enforce(`value`: Output) {
this.enforce = value
}
/**
* @param value Optional. Required for Managed Constraints if parameters defined in constraints. Pass parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: { \"allowedLocations\" : [\"us-east1\", \"us-west1\"], \"allowAll\" : true }
*/
@JvmName("ohjtmqhonchsufxx")
public suspend fun parameters(`value`: Output) {
this.parameters = value
}
/**
* @param value List of values to be used for this policy rule. This field can be set only in policies for list constraints.
* Structure is documented below.
*/
@JvmName("mruapencyfwbfwqj")
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("yrnakelrktnrxdpd")
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')".
* Structure is documented below.
*/
@JvmName("qohvsdrwfpobaeql")
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')".
* Structure is documented below.
*/
@JvmName("qocjdhsjjhicqvmo")
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("akijqetjeptqvbyd")
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("xjjqbophciakdgpi")
public suspend fun enforce(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.enforce = mapped
}
/**
* @param value Optional. Required for Managed Constraints if parameters defined in constraints. Pass parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: { \"allowedLocations\" : [\"us-east1\", \"us-west1\"], \"allowAll\" : true }
*/
@JvmName("ykdyglllaqphmnsx")
public suspend fun parameters(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.parameters = mapped
}
/**
* @param value List of values to be used for this policy rule. This field can be set only in policies for list constraints.
* Structure is documented below.
*/
@JvmName("qibamajjhjflaeej")
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 policy rule. This field can be set only in policies for list constraints.
* Structure is documented below.
*/
@JvmName("sytkfxuofauowdhw")
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,
parameters = parameters,
values = values,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy