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

com.pulumi.gcp.gkehub.kotlin.inputs.FeatureMembershipPolicycontrollerPolicyControllerHubConfigArgs.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.gkehub.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.gkehub.inputs.FeatureMembershipPolicycontrollerPolicyControllerHubConfigArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property auditIntervalSeconds Sets the interval for Policy Controller Audit Scans (in seconds). When set to 0, this disables audit functionality altogether.
 * @property constraintViolationLimit The maximum number of audit violations to be stored in a constraint. If not set, the  default of 20 will be used.
 * @property deploymentConfigs Map of deployment configs to deployments ("admission", "audit", "mutation").
 * @property exemptableNamespaces The set of namespaces that are excluded from Policy Controller checks. Namespaces do not need to currently exist on the cluster.
 * @property installSpec Configures the mode of the Policy Controller installation. Must be one of `INSTALL_SPEC_NOT_INSTALLED`, `INSTALL_SPEC_ENABLED`, `INSTALL_SPEC_SUSPENDED` or `INSTALL_SPEC_DETACHED`.
 * @property logDeniesEnabled Logs all denies and dry run failures.
 * @property monitoring Specifies the backends Policy Controller should export metrics to. Structure is documented below.
 * @property mutationEnabled Enables mutation in policy controller. If true, mutation CRDs, webhook, and controller deployment will be deployed to the cluster.
 * @property policyContent Specifies the desired policy content on the cluster. Structure is documented below.
 * @property referentialRulesEnabled Enables the ability to use Constraint Templates that reference to objects other than the object currently being evaluated.
 */
public data class FeatureMembershipPolicycontrollerPolicyControllerHubConfigArgs(
    public val auditIntervalSeconds: Output? = null,
    public val constraintViolationLimit: Output? = null,
    public val deploymentConfigs: Output>? =
        null,
    public val exemptableNamespaces: Output>? = null,
    public val installSpec: Output? = null,
    public val logDeniesEnabled: Output? = null,
    public val monitoring: Output? = null,
    public val mutationEnabled: Output? = null,
    public val policyContent: Output? = null,
    public val referentialRulesEnabled: Output? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.gkehub.inputs.FeatureMembershipPolicycontrollerPolicyControllerHubConfigArgs =
        com.pulumi.gcp.gkehub.inputs.FeatureMembershipPolicycontrollerPolicyControllerHubConfigArgs.builder()
            .auditIntervalSeconds(auditIntervalSeconds?.applyValue({ args0 -> args0 }))
            .constraintViolationLimit(constraintViolationLimit?.applyValue({ args0 -> args0 }))
            .deploymentConfigs(
                deploymentConfigs?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .exemptableNamespaces(exemptableNamespaces?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .installSpec(installSpec?.applyValue({ args0 -> args0 }))
            .logDeniesEnabled(logDeniesEnabled?.applyValue({ args0 -> args0 }))
            .monitoring(monitoring?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .mutationEnabled(mutationEnabled?.applyValue({ args0 -> args0 }))
            .policyContent(policyContent?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .referentialRulesEnabled(referentialRulesEnabled?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [FeatureMembershipPolicycontrollerPolicyControllerHubConfigArgs].
 */
@PulumiTagMarker
public class FeatureMembershipPolicycontrollerPolicyControllerHubConfigArgsBuilder internal constructor() {
    private var auditIntervalSeconds: Output? = null

    private var constraintViolationLimit: Output? = null

    private var deploymentConfigs:
        Output>? =
        null

    private var exemptableNamespaces: Output>? = null

    private var installSpec: Output? = null

    private var logDeniesEnabled: Output? = null

    private var monitoring:
        Output? = null

    private var mutationEnabled: Output? = null

    private var policyContent:
        Output? = null

    private var referentialRulesEnabled: Output? = null

    /**
     * @param value Sets the interval for Policy Controller Audit Scans (in seconds). When set to 0, this disables audit functionality altogether.
     */
    @JvmName("avtgbvfnwfrpknjo")
    public suspend fun auditIntervalSeconds(`value`: Output) {
        this.auditIntervalSeconds = value
    }

    /**
     * @param value The maximum number of audit violations to be stored in a constraint. If not set, the  default of 20 will be used.
     */
    @JvmName("pwainnbqdagyuifx")
    public suspend fun constraintViolationLimit(`value`: Output) {
        this.constraintViolationLimit = value
    }

    /**
     * @param value Map of deployment configs to deployments ("admission", "audit", "mutation").
     */
    @JvmName("jgcxvdwnfbcsupui")
    public suspend fun deploymentConfigs(`value`: Output>) {
        this.deploymentConfigs = value
    }

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

    /**
     * @param values Map of deployment configs to deployments ("admission", "audit", "mutation").
     */
    @JvmName("byywgpidsdbsydsn")
    public suspend fun deploymentConfigs(values: List>) {
        this.deploymentConfigs = Output.all(values)
    }

    /**
     * @param value The set of namespaces that are excluded from Policy Controller checks. Namespaces do not need to currently exist on the cluster.
     */
    @JvmName("vtvlfcddgyygkjwl")
    public suspend fun exemptableNamespaces(`value`: Output>) {
        this.exemptableNamespaces = value
    }

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

    /**
     * @param values The set of namespaces that are excluded from Policy Controller checks. Namespaces do not need to currently exist on the cluster.
     */
    @JvmName("cxuioyiknrgfdlrn")
    public suspend fun exemptableNamespaces(values: List>) {
        this.exemptableNamespaces = Output.all(values)
    }

    /**
     * @param value Configures the mode of the Policy Controller installation. Must be one of `INSTALL_SPEC_NOT_INSTALLED`, `INSTALL_SPEC_ENABLED`, `INSTALL_SPEC_SUSPENDED` or `INSTALL_SPEC_DETACHED`.
     */
    @JvmName("mitmkyndhsiykbaf")
    public suspend fun installSpec(`value`: Output) {
        this.installSpec = value
    }

    /**
     * @param value Logs all denies and dry run failures.
     */
    @JvmName("uqbjjacykljqnxyx")
    public suspend fun logDeniesEnabled(`value`: Output) {
        this.logDeniesEnabled = value
    }

    /**
     * @param value Specifies the backends Policy Controller should export metrics to. Structure is documented below.
     */
    @JvmName("aikefriiqgdiqsmp")
    public suspend fun monitoring(`value`: Output) {
        this.monitoring = value
    }

    /**
     * @param value Enables mutation in policy controller. If true, mutation CRDs, webhook, and controller deployment will be deployed to the cluster.
     */
    @JvmName("gtryvttjxgmcgdih")
    public suspend fun mutationEnabled(`value`: Output) {
        this.mutationEnabled = value
    }

    /**
     * @param value Specifies the desired policy content on the cluster. Structure is documented below.
     */
    @JvmName("tcmlguipwphfaxns")
    public suspend fun policyContent(`value`: Output) {
        this.policyContent = value
    }

    /**
     * @param value Enables the ability to use Constraint Templates that reference to objects other than the object currently being evaluated.
     */
    @JvmName("axckpyfwruoospnj")
    public suspend fun referentialRulesEnabled(`value`: Output) {
        this.referentialRulesEnabled = value
    }

    /**
     * @param value Sets the interval for Policy Controller Audit Scans (in seconds). When set to 0, this disables audit functionality altogether.
     */
    @JvmName("plqbvxaaubviryyo")
    public suspend fun auditIntervalSeconds(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.auditIntervalSeconds = mapped
    }

    /**
     * @param value The maximum number of audit violations to be stored in a constraint. If not set, the  default of 20 will be used.
     */
    @JvmName("ymkccnhxvqmwdifj")
    public suspend fun constraintViolationLimit(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.constraintViolationLimit = mapped
    }

    /**
     * @param value Map of deployment configs to deployments ("admission", "audit", "mutation").
     */
    @JvmName("fhdrqavrhntdfdjr")
    public suspend fun deploymentConfigs(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deploymentConfigs = mapped
    }

    /**
     * @param argument Map of deployment configs to deployments ("admission", "audit", "mutation").
     */
    @JvmName("xmkkhxhnsrxqxjjb")
    public suspend fun deploymentConfigs(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.deploymentConfigs = mapped
    }

    /**
     * @param argument Map of deployment configs to deployments ("admission", "audit", "mutation").
     */
    @JvmName("mpsbpisxlkuolsry")
    public suspend fun deploymentConfigs(vararg argument: suspend FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.deploymentConfigs = mapped
    }

    /**
     * @param argument Map of deployment configs to deployments ("admission", "audit", "mutation").
     */
    @JvmName("rotlfkuustfryorb")
    public suspend fun deploymentConfigs(argument: suspend FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigArgsBuilder().applySuspend
                    { argument() }.build(),
            )
        val mapped = of(toBeMapped)
        this.deploymentConfigs = mapped
    }

    /**
     * @param values Map of deployment configs to deployments ("admission", "audit", "mutation").
     */
    @JvmName("kdscodstvadiakvc")
    public suspend fun deploymentConfigs(vararg values: FeatureMembershipPolicycontrollerPolicyControllerHubConfigDeploymentConfigArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.deploymentConfigs = mapped
    }

    /**
     * @param value The set of namespaces that are excluded from Policy Controller checks. Namespaces do not need to currently exist on the cluster.
     */
    @JvmName("diurtwtdrrvjnmgl")
    public suspend fun exemptableNamespaces(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.exemptableNamespaces = mapped
    }

    /**
     * @param values The set of namespaces that are excluded from Policy Controller checks. Namespaces do not need to currently exist on the cluster.
     */
    @JvmName("cnqsrwrhhfhgohdu")
    public suspend fun exemptableNamespaces(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.exemptableNamespaces = mapped
    }

    /**
     * @param value Configures the mode of the Policy Controller installation. Must be one of `INSTALL_SPEC_NOT_INSTALLED`, `INSTALL_SPEC_ENABLED`, `INSTALL_SPEC_SUSPENDED` or `INSTALL_SPEC_DETACHED`.
     */
    @JvmName("jywjetuqwacuagsx")
    public suspend fun installSpec(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.installSpec = mapped
    }

    /**
     * @param value Logs all denies and dry run failures.
     */
    @JvmName("xohkexcsfqtcmyth")
    public suspend fun logDeniesEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.logDeniesEnabled = mapped
    }

    /**
     * @param value Specifies the backends Policy Controller should export metrics to. Structure is documented below.
     */
    @JvmName("xewhdcnluoheeucv")
    public suspend fun monitoring(`value`: FeatureMembershipPolicycontrollerPolicyControllerHubConfigMonitoringArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.monitoring = mapped
    }

    /**
     * @param argument Specifies the backends Policy Controller should export metrics to. Structure is documented below.
     */
    @JvmName("ulfancuncpakgkoo")
    public suspend fun monitoring(argument: suspend FeatureMembershipPolicycontrollerPolicyControllerHubConfigMonitoringArgsBuilder.() -> Unit) {
        val toBeMapped =
            FeatureMembershipPolicycontrollerPolicyControllerHubConfigMonitoringArgsBuilder().applySuspend {
                argument()
            }.build()
        val mapped = of(toBeMapped)
        this.monitoring = mapped
    }

    /**
     * @param value Enables mutation in policy controller. If true, mutation CRDs, webhook, and controller deployment will be deployed to the cluster.
     */
    @JvmName("huuebtulkyxmkbgq")
    public suspend fun mutationEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mutationEnabled = mapped
    }

    /**
     * @param value Specifies the desired policy content on the cluster. Structure is documented below.
     */
    @JvmName("ypgcllhugrovfrfj")
    public suspend fun policyContent(`value`: FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.policyContent = mapped
    }

    /**
     * @param argument Specifies the desired policy content on the cluster. Structure is documented below.
     */
    @JvmName("tnalrgrrgfjhapmv")
    public suspend fun policyContent(argument: suspend FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentArgsBuilder.() -> Unit) {
        val toBeMapped =
            FeatureMembershipPolicycontrollerPolicyControllerHubConfigPolicyContentArgsBuilder().applySuspend {
                argument()
            }.build()
        val mapped = of(toBeMapped)
        this.policyContent = mapped
    }

    /**
     * @param value Enables the ability to use Constraint Templates that reference to objects other than the object currently being evaluated.
     */
    @JvmName("asutoeerxynfvfyd")
    public suspend fun referentialRulesEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.referentialRulesEnabled = mapped
    }

    internal fun build(): FeatureMembershipPolicycontrollerPolicyControllerHubConfigArgs =
        FeatureMembershipPolicycontrollerPolicyControllerHubConfigArgs(
            auditIntervalSeconds = auditIntervalSeconds,
            constraintViolationLimit = constraintViolationLimit,
            deploymentConfigs = deploymentConfigs,
            exemptableNamespaces = exemptableNamespaces,
            installSpec = installSpec,
            logDeniesEnabled = logDeniesEnabled,
            monitoring = monitoring,
            mutationEnabled = mutationEnabled,
            policyContent = policyContent,
            referentialRulesEnabled = referentialRulesEnabled,
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy