com.pulumi.awsnative.events.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-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-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.awsnative.events.kotlin
import com.pulumi.awsnative.events.RuleArgs.builder
import com.pulumi.awsnative.events.kotlin.enums.RuleState
import com.pulumi.awsnative.events.kotlin.inputs.RuleTargetArgs
import com.pulumi.awsnative.events.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.Any
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Resource Type definition for AWS::Events::Rule
* ## Example Usage
* ### Example
* No Java example available.
* @property description The description of the rule.
* @property eventBusName The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.
* @property eventPattern The event pattern of the rule. For more information, see Events and Event Patterns in the Amazon EventBridge User Guide.
* Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::Events::Rule` for more information about the expected schema for this property.
* @property name The name of the rule.
* @property roleArn The Amazon Resource Name (ARN) of the role that is used for target invocation.
* @property scheduleExpression The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)". For more information, see Creating an Amazon EventBridge rule that runs on a schedule.
* @property state The state of the rule.
* @property targets Adds the specified targets to the specified rule, or updates the targets if they are already associated with the rule.
* Targets are the resources that are invoked when a rule is triggered.
*/
public data class RuleArgs(
public val description: Output? = null,
public val eventBusName: Output? = null,
public val eventPattern: Output? = null,
public val name: Output? = null,
public val roleArn: Output? = null,
public val scheduleExpression: Output? = null,
public val state: Output? = null,
public val targets: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.awsnative.events.RuleArgs =
com.pulumi.awsnative.events.RuleArgs.builder()
.description(description?.applyValue({ args0 -> args0 }))
.eventBusName(eventBusName?.applyValue({ args0 -> args0 }))
.eventPattern(eventPattern?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.roleArn(roleArn?.applyValue({ args0 -> args0 }))
.scheduleExpression(scheduleExpression?.applyValue({ args0 -> args0 }))
.state(state?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.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 eventPattern: Output? = null
private var name: Output? = null
private var roleArn: Output? = null
private var scheduleExpression: Output? = null
private var state: Output? = null
private var targets: Output>? = null
/**
* @param value The description of the rule.
*/
@JvmName("yitrgtxagemhxewr")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.
*/
@JvmName("qtfwisvfjcxasoyx")
public suspend fun eventBusName(`value`: Output) {
this.eventBusName = value
}
/**
* @param value The event pattern of the rule. For more information, see Events and Event Patterns in the Amazon EventBridge User Guide.
* Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::Events::Rule` for more information about the expected schema for this property.
*/
@JvmName("sfhmsecuumhgfcip")
public suspend fun eventPattern(`value`: Output) {
this.eventPattern = value
}
/**
* @param value The name of the rule.
*/
@JvmName("aallgnntitglgnfj")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The Amazon Resource Name (ARN) of the role that is used for target invocation.
*/
@JvmName("oceerqqlhnbtinal")
public suspend fun roleArn(`value`: Output) {
this.roleArn = value
}
/**
* @param value The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)". For more information, see Creating an Amazon EventBridge rule that runs on a schedule.
*/
@JvmName("ruikhxakcqiqxmlw")
public suspend fun scheduleExpression(`value`: Output) {
this.scheduleExpression = value
}
/**
* @param value The state of the rule.
*/
@JvmName("donjybqrarjndpyk")
public suspend fun state(`value`: Output) {
this.state = value
}
/**
* @param value Adds the specified targets to the specified rule, or updates the targets if they are already associated with the rule.
* Targets are the resources that are invoked when a rule is triggered.
*/
@JvmName("fsrxbscgkwyuwwhu")
public suspend fun targets(`value`: Output>) {
this.targets = value
}
@JvmName("ffywrlaujqtpmngh")
public suspend fun targets(vararg values: Output) {
this.targets = Output.all(values.asList())
}
/**
* @param values Adds the specified targets to the specified rule, or updates the targets if they are already associated with the rule.
* Targets are the resources that are invoked when a rule is triggered.
*/
@JvmName("iffwjyxfphujxxnq")
public suspend fun targets(values: List