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

com.pulumi.awsnative.configuration.kotlin.inputs.ConfigRuleScopeArgs.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: 1.24.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.configuration.kotlin.inputs

import com.pulumi.awsnative.configuration.inputs.ConfigRuleScopeArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Defines which resources trigger an evaluation for an CC rule. The scope can include one or more resource types, a combination of a tag key and value, or a combination of one resource type and one resource ID. Specify a scope to constrain which resources trigger an evaluation for a rule. Otherwise, evaluations for the rule are triggered when any resource in your recording group changes in configuration.
 * @property complianceResourceId The ID of the only AWS resource that you want to trigger an evaluation for the rule. If you specify a resource ID, you must specify one resource type for ``ComplianceResourceTypes``.
 * @property complianceResourceTypes The resource types of only those AWS resources that you want to trigger an evaluation for the rule. You can only specify one type if you also specify a resource ID for ``ComplianceResourceId``.
 * @property tagKey The tag key that is applied to only those AWS resources that you want to trigger an evaluation for the rule.
 * @property tagValue The tag value applied to only those AWS resources that you want to trigger an evaluation for the rule. If you specify a value for ``TagValue``, you must also specify a value for ``TagKey``.
 */
public data class ConfigRuleScopeArgs(
    public val complianceResourceId: Output? = null,
    public val complianceResourceTypes: Output>? = null,
    public val tagKey: Output? = null,
    public val tagValue: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.configuration.inputs.ConfigRuleScopeArgs =
        com.pulumi.awsnative.configuration.inputs.ConfigRuleScopeArgs.builder()
            .complianceResourceId(complianceResourceId?.applyValue({ args0 -> args0 }))
            .complianceResourceTypes(
                complianceResourceTypes?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0
                    })
                }),
            )
            .tagKey(tagKey?.applyValue({ args0 -> args0 }))
            .tagValue(tagValue?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ConfigRuleScopeArgs].
 */
@PulumiTagMarker
public class ConfigRuleScopeArgsBuilder internal constructor() {
    private var complianceResourceId: Output? = null

    private var complianceResourceTypes: Output>? = null

    private var tagKey: Output? = null

    private var tagValue: Output? = null

    /**
     * @param value The ID of the only AWS resource that you want to trigger an evaluation for the rule. If you specify a resource ID, you must specify one resource type for ``ComplianceResourceTypes``.
     */
    @JvmName("fmurndlnqiyorcgs")
    public suspend fun complianceResourceId(`value`: Output) {
        this.complianceResourceId = value
    }

    /**
     * @param value The resource types of only those AWS resources that you want to trigger an evaluation for the rule. You can only specify one type if you also specify a resource ID for ``ComplianceResourceId``.
     */
    @JvmName("olsogdfyiawhvjdm")
    public suspend fun complianceResourceTypes(`value`: Output>) {
        this.complianceResourceTypes = value
    }

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

    /**
     * @param values The resource types of only those AWS resources that you want to trigger an evaluation for the rule. You can only specify one type if you also specify a resource ID for ``ComplianceResourceId``.
     */
    @JvmName("emwbnpnjpnlfnucp")
    public suspend fun complianceResourceTypes(values: List>) {
        this.complianceResourceTypes = Output.all(values)
    }

    /**
     * @param value The tag key that is applied to only those AWS resources that you want to trigger an evaluation for the rule.
     */
    @JvmName("wdtbkwgrqcibvppc")
    public suspend fun tagKey(`value`: Output) {
        this.tagKey = value
    }

    /**
     * @param value The tag value applied to only those AWS resources that you want to trigger an evaluation for the rule. If you specify a value for ``TagValue``, you must also specify a value for ``TagKey``.
     */
    @JvmName("wscnxajgxoqdgltc")
    public suspend fun tagValue(`value`: Output) {
        this.tagValue = value
    }

    /**
     * @param value The ID of the only AWS resource that you want to trigger an evaluation for the rule. If you specify a resource ID, you must specify one resource type for ``ComplianceResourceTypes``.
     */
    @JvmName("jqftmoanfsqaxkiv")
    public suspend fun complianceResourceId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.complianceResourceId = mapped
    }

    /**
     * @param value The resource types of only those AWS resources that you want to trigger an evaluation for the rule. You can only specify one type if you also specify a resource ID for ``ComplianceResourceId``.
     */
    @JvmName("xqcrsslkiviawdqg")
    public suspend fun complianceResourceTypes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.complianceResourceTypes = mapped
    }

    /**
     * @param values The resource types of only those AWS resources that you want to trigger an evaluation for the rule. You can only specify one type if you also specify a resource ID for ``ComplianceResourceId``.
     */
    @JvmName("edtqwcbedduwafry")
    public suspend fun complianceResourceTypes(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.complianceResourceTypes = mapped
    }

    /**
     * @param value The tag key that is applied to only those AWS resources that you want to trigger an evaluation for the rule.
     */
    @JvmName("mivcimrhmwkriaue")
    public suspend fun tagKey(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tagKey = mapped
    }

    /**
     * @param value The tag value applied to only those AWS resources that you want to trigger an evaluation for the rule. If you specify a value for ``TagValue``, you must also specify a value for ``TagKey``.
     */
    @JvmName("ovwulnhfymyyemfx")
    public suspend fun tagValue(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tagValue = mapped
    }

    internal fun build(): ConfigRuleScopeArgs = ConfigRuleScopeArgs(
        complianceResourceId = complianceResourceId,
        complianceResourceTypes = complianceResourceTypes,
        tagKey = tagKey,
        tagValue = tagValue,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy