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

com.pulumi.awsnative.vpclattice.kotlin.RuleArgs.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.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.vpclattice.kotlin

import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
import com.pulumi.awsnative.vpclattice.RuleArgs.builder
import com.pulumi.awsnative.vpclattice.kotlin.inputs.RuleActionArgs
import com.pulumi.awsnative.vpclattice.kotlin.inputs.RuleActionArgsBuilder
import com.pulumi.awsnative.vpclattice.kotlin.inputs.RuleMatchArgs
import com.pulumi.awsnative.vpclattice.kotlin.inputs.RuleMatchArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Creates a listener rule. Each listener has a default rule for checking connection requests, but you can define additional rules. Each rule consists of a priority, one or more actions, and one or more conditions.
 * @property action Describes the action for a rule.
 * @property listenerIdentifier The ID or Amazon Resource Name (ARN) of the listener.
 * @property match The rule match.
 * @property name The name of the rule. The name must be unique within the listener. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.
 * If you don't specify a name, CloudFormation generates one. However, if you specify a name, and later want to replace the resource, you must specify a new name.
 * @property priority The priority assigned to the rule. Each rule for a specific listener must have a unique priority. The lower the priority number the higher the priority.
 * @property serviceIdentifier The ID or Amazon Resource Name (ARN) of the service.
 * @property tags The tags for the rule.
 */
public data class RuleArgs(
    public val action: Output? = null,
    public val listenerIdentifier: Output? = null,
    public val match: Output? = null,
    public val name: Output? = null,
    public val priority: Output? = null,
    public val serviceIdentifier: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.vpclattice.RuleArgs =
        com.pulumi.awsnative.vpclattice.RuleArgs.builder()
            .action(action?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .listenerIdentifier(listenerIdentifier?.applyValue({ args0 -> args0 }))
            .match(match?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .name(name?.applyValue({ args0 -> args0 }))
            .priority(priority?.applyValue({ args0 -> args0 }))
            .serviceIdentifier(serviceIdentifier?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [RuleArgs].
 */
@PulumiTagMarker
public class RuleArgsBuilder internal constructor() {
    private var action: Output? = null

    private var listenerIdentifier: Output? = null

    private var match: Output? = null

    private var name: Output? = null

    private var priority: Output? = null

    private var serviceIdentifier: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Describes the action for a rule.
     */
    @JvmName("spxibfossyebynup")
    public suspend fun action(`value`: Output) {
        this.action = value
    }

    /**
     * @param value The ID or Amazon Resource Name (ARN) of the listener.
     */
    @JvmName("tgnntvmaasrnsmys")
    public suspend fun listenerIdentifier(`value`: Output) {
        this.listenerIdentifier = value
    }

    /**
     * @param value The rule match.
     */
    @JvmName("jvkdrlryjtqaiyaj")
    public suspend fun match(`value`: Output) {
        this.match = value
    }

    /**
     * @param value The name of the rule. The name must be unique within the listener. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.
     * If you don't specify a name, CloudFormation generates one. However, if you specify a name, and later want to replace the resource, you must specify a new name.
     */
    @JvmName("uocjypdxligtmspx")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The priority assigned to the rule. Each rule for a specific listener must have a unique priority. The lower the priority number the higher the priority.
     */
    @JvmName("srlbkjvvvomyjgdr")
    public suspend fun priority(`value`: Output) {
        this.priority = value
    }

    /**
     * @param value The ID or Amazon Resource Name (ARN) of the service.
     */
    @JvmName("lwksjtxqgbfeonxc")
    public suspend fun serviceIdentifier(`value`: Output) {
        this.serviceIdentifier = value
    }

    /**
     * @param value The tags for the rule.
     */
    @JvmName("ncnnggmvhniwomyj")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values The tags for the rule.
     */
    @JvmName("lehsqvqoarjxgajd")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value Describes the action for a rule.
     */
    @JvmName("avjemotuouaxlxme")
    public suspend fun action(`value`: RuleActionArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.action = mapped
    }

    /**
     * @param argument Describes the action for a rule.
     */
    @JvmName("syxfvafqrwjqymku")
    public suspend fun action(argument: suspend RuleActionArgsBuilder.() -> Unit) {
        val toBeMapped = RuleActionArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.action = mapped
    }

    /**
     * @param value The ID or Amazon Resource Name (ARN) of the listener.
     */
    @JvmName("rqscsaylgpagpats")
    public suspend fun listenerIdentifier(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.listenerIdentifier = mapped
    }

    /**
     * @param value The rule match.
     */
    @JvmName("resrekgogjftxaob")
    public suspend fun match(`value`: RuleMatchArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.match = mapped
    }

    /**
     * @param argument The rule match.
     */
    @JvmName("cejotwjinirnwpsu")
    public suspend fun match(argument: suspend RuleMatchArgsBuilder.() -> Unit) {
        val toBeMapped = RuleMatchArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.match = mapped
    }

    /**
     * @param value The name of the rule. The name must be unique within the listener. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.
     * If you don't specify a name, CloudFormation generates one. However, if you specify a name, and later want to replace the resource, you must specify a new name.
     */
    @JvmName("eincvaeoomjecnkv")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The priority assigned to the rule. Each rule for a specific listener must have a unique priority. The lower the priority number the higher the priority.
     */
    @JvmName("yyjpunewyfkdjekh")
    public suspend fun priority(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.priority = mapped
    }

    /**
     * @param value The ID or Amazon Resource Name (ARN) of the service.
     */
    @JvmName("pysdoidwuhujutui")
    public suspend fun serviceIdentifier(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceIdentifier = mapped
    }

    /**
     * @param value The tags for the rule.
     */
    @JvmName("iweesserwhfwgdsk")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument The tags for the rule.
     */
    @JvmName("bumolrfqkbwqisju")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument The tags for the rule.
     */
    @JvmName("teiyjrqsseurtadv")
    public suspend fun tags(vararg argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument The tags for the rule.
     */
    @JvmName("voccfrkyldcpecbl")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values The tags for the rule.
     */
    @JvmName("kvstdncqgmvfhewr")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): RuleArgs = RuleArgs(
        action = action,
        listenerIdentifier = listenerIdentifier,
        match = match,
        name = name,
        priority = priority,
        serviceIdentifier = serviceIdentifier,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy