com.pulumi.awsnative.events.kotlin.outputs.GetRuleResult.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.events.kotlin.outputs
import com.pulumi.awsnative.events.kotlin.enums.RuleState
import kotlin.Any
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
/**
*
* @property arn The ARN of the rule, such as arn:aws:events:us-east-2:123456789012:rule/example.
* @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 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 GetRuleResult(
public val arn: String? = null,
public val description: String? = null,
public val eventBusName: String? = null,
public val eventPattern: Any? = null,
public val roleArn: String? = null,
public val scheduleExpression: String? = null,
public val state: RuleState? = null,
public val targets: List? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.awsnative.events.outputs.GetRuleResult): GetRuleResult = GetRuleResult(
arn = javaType.arn().map({ args0 -> args0 }).orElse(null),
description = javaType.description().map({ args0 -> args0 }).orElse(null),
eventBusName = javaType.eventBusName().map({ args0 -> args0 }).orElse(null),
eventPattern = javaType.eventPattern().map({ args0 -> args0 }).orElse(null),
roleArn = javaType.roleArn().map({ args0 -> args0 }).orElse(null),
scheduleExpression = javaType.scheduleExpression().map({ args0 -> args0 }).orElse(null),
state = javaType.state().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.events.kotlin.enums.RuleState.Companion.toKotlin(args0)
})
}).orElse(null),
targets = javaType.targets().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.events.kotlin.outputs.RuleTarget.Companion.toKotlin(args0)
})
}),
)
}
}