com.pulumi.alicloud.eventbridge.kotlin.RuleArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-alicloud-kotlin Show documentation
Show all versions of pulumi-alicloud-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.alicloud.eventbridge.kotlin
import com.pulumi.alicloud.eventbridge.RuleArgs.builder
import com.pulumi.alicloud.eventbridge.kotlin.inputs.RuleTargetArgs
import com.pulumi.alicloud.eventbridge.kotlin.inputs.RuleTargetArgsBuilder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Provides a Event Bridge Rule resource.
* For information about Event Bridge Rule and how to use it, see [What is Rule](https://www.alibabacloud.com/help/en/eventbridge/latest/createrule-6).
* > **NOTE:** Available since v1.129.0.
* ## Import
* Event Bridge Rule can be imported using the id, e.g.
* ```sh
* $ pulumi import alicloud:eventbridge/rule:Rule example :
* ```
* @property description The description of the event rule.
* @property eventBusName The name of the event bus.
* @property filterPattern The pattern to match interested events. Event mode, JSON format. The value description is as follows: `stringEqual` mode. `stringExpression` mode. Each field has up to 5 expressions (map structure).
* @property ruleName The name of the event rule.
* @property status The status of the event rule. Valid values: `ENABLE`, `DISABLE`.
* @property targets The targets of rule. See `targets` below.
*/
public data class RuleArgs(
public val description: Output? = null,
public val eventBusName: Output? = null,
public val filterPattern: Output? = null,
public val ruleName: Output? = null,
public val status: Output? = null,
public val targets: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.alicloud.eventbridge.RuleArgs =
com.pulumi.alicloud.eventbridge.RuleArgs.builder()
.description(description?.applyValue({ args0 -> args0 }))
.eventBusName(eventBusName?.applyValue({ args0 -> args0 }))
.filterPattern(filterPattern?.applyValue({ args0 -> args0 }))
.ruleName(ruleName?.applyValue({ args0 -> args0 }))
.status(status?.applyValue({ args0 -> args0 }))
.targets(
targets?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
).build()
}
/**
* Builder for [RuleArgs].
*/
@PulumiTagMarker
public class RuleArgsBuilder internal constructor() {
private var description: Output? = null
private var eventBusName: Output? = null
private var filterPattern: Output? = null
private var ruleName: Output? = null
private var status: Output? = null
private var targets: Output>? = null
/**
* @param value The description of the event rule.
*/
@JvmName("awegoneoxixmgewn")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value The name of the event bus.
*/
@JvmName("hiefssogovalokbw")
public suspend fun eventBusName(`value`: Output) {
this.eventBusName = value
}
/**
* @param value The pattern to match interested events. Event mode, JSON format. The value description is as follows: `stringEqual` mode. `stringExpression` mode. Each field has up to 5 expressions (map structure).
*/
@JvmName("gqdowxfrmonqdord")
public suspend fun filterPattern(`value`: Output) {
this.filterPattern = value
}
/**
* @param value The name of the event rule.
*/
@JvmName("edmmjotblndkubdl")
public suspend fun ruleName(`value`: Output) {
this.ruleName = value
}
/**
* @param value The status of the event rule. Valid values: `ENABLE`, `DISABLE`.
*/
@JvmName("ogejieuaipyudjgv")
public suspend fun status(`value`: Output) {
this.status = value
}
/**
* @param value The targets of rule. See `targets` below.
*/
@JvmName("hduovjobfpyilare")
public suspend fun targets(`value`: Output>) {
this.targets = value
}
@JvmName("hiotujshisrnmqen")
public suspend fun targets(vararg values: Output) {
this.targets = Output.all(values.asList())
}
/**
* @param values The targets of rule. See `targets` below.
*/
@JvmName("pdyqahfubchwjvrk")
public suspend fun targets(values: List