com.pulumi.awsnative.scheduler.kotlin.ScheduleArgs.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.scheduler.kotlin
import com.pulumi.awsnative.scheduler.ScheduleArgs.builder
import com.pulumi.awsnative.scheduler.kotlin.enums.ScheduleState
import com.pulumi.awsnative.scheduler.kotlin.inputs.ScheduleFlexibleTimeWindowArgs
import com.pulumi.awsnative.scheduler.kotlin.inputs.ScheduleFlexibleTimeWindowArgsBuilder
import com.pulumi.awsnative.scheduler.kotlin.inputs.ScheduleTargetArgs
import com.pulumi.awsnative.scheduler.kotlin.inputs.ScheduleTargetArgsBuilder
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.jvm.JvmName
/**
* Definition of AWS::Scheduler::Schedule Resource Type
* @property description The description of the schedule.
* @property endDate The date, in UTC, before which the schedule can invoke its target. Depending on the schedule's recurrence expression, invocations might stop on, or before, the EndDate you specify.
* @property flexibleTimeWindow Allows you to configure a time window during which EventBridge Scheduler invokes the schedule.
* @property groupName The name of the schedule group to associate with this schedule. If you omit this, the default schedule group is used.
* @property kmsKeyArn The ARN for a KMS Key that will be used to encrypt customer data.
* @property name The name of the schedule.
* @property scheduleExpression The scheduling expression.
* @property scheduleExpressionTimezone The timezone in which the scheduling expression is evaluated.
* @property startDate The date, in UTC, after which the schedule can begin invoking its target. Depending on the schedule's recurrence expression, invocations might occur on, or after, the StartDate you specify.
* @property state Specifies whether the schedule is enabled or disabled.
* *Allowed Values* : `ENABLED` | `DISABLED`
* @property target The schedule's target details.
*/
public data class ScheduleArgs(
public val description: Output? = null,
public val endDate: Output? = null,
public val flexibleTimeWindow: Output? = null,
public val groupName: Output? = null,
public val kmsKeyArn: Output? = null,
public val name: Output? = null,
public val scheduleExpression: Output? = null,
public val scheduleExpressionTimezone: Output? = null,
public val startDate: Output? = null,
public val state: Output? = null,
public val target: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.awsnative.scheduler.ScheduleArgs =
com.pulumi.awsnative.scheduler.ScheduleArgs.builder()
.description(description?.applyValue({ args0 -> args0 }))
.endDate(endDate?.applyValue({ args0 -> args0 }))
.flexibleTimeWindow(
flexibleTimeWindow?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.groupName(groupName?.applyValue({ args0 -> args0 }))
.kmsKeyArn(kmsKeyArn?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.scheduleExpression(scheduleExpression?.applyValue({ args0 -> args0 }))
.scheduleExpressionTimezone(scheduleExpressionTimezone?.applyValue({ args0 -> args0 }))
.startDate(startDate?.applyValue({ args0 -> args0 }))
.state(state?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.target(target?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}
/**
* Builder for [ScheduleArgs].
*/
@PulumiTagMarker
public class ScheduleArgsBuilder internal constructor() {
private var description: Output? = null
private var endDate: Output? = null
private var flexibleTimeWindow: Output? = null
private var groupName: Output? = null
private var kmsKeyArn: Output? = null
private var name: Output? = null
private var scheduleExpression: Output? = null
private var scheduleExpressionTimezone: Output? = null
private var startDate: Output? = null
private var state: Output? = null
private var target: Output? = null
/**
* @param value The description of the schedule.
*/
@JvmName("sfgqadpuyoxypusk")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value The date, in UTC, before which the schedule can invoke its target. Depending on the schedule's recurrence expression, invocations might stop on, or before, the EndDate you specify.
*/
@JvmName("xrqnlldrfsmigkcr")
public suspend fun endDate(`value`: Output) {
this.endDate = value
}
/**
* @param value Allows you to configure a time window during which EventBridge Scheduler invokes the schedule.
*/
@JvmName("xxqfeddivfwviqms")
public suspend fun flexibleTimeWindow(`value`: Output) {
this.flexibleTimeWindow = value
}
/**
* @param value The name of the schedule group to associate with this schedule. If you omit this, the default schedule group is used.
*/
@JvmName("xhpdofejccdcfxmr")
public suspend fun groupName(`value`: Output) {
this.groupName = value
}
/**
* @param value The ARN for a KMS Key that will be used to encrypt customer data.
*/
@JvmName("gwipbgylgijmcawl")
public suspend fun kmsKeyArn(`value`: Output) {
this.kmsKeyArn = value
}
/**
* @param value The name of the schedule.
*/
@JvmName("ewfbahkyacnjxrse")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The scheduling expression.
*/
@JvmName("pnpdnnudnaaxnftd")
public suspend fun scheduleExpression(`value`: Output) {
this.scheduleExpression = value
}
/**
* @param value The timezone in which the scheduling expression is evaluated.
*/
@JvmName("pdwucgxpoxgrpooq")
public suspend fun scheduleExpressionTimezone(`value`: Output) {
this.scheduleExpressionTimezone = value
}
/**
* @param value The date, in UTC, after which the schedule can begin invoking its target. Depending on the schedule's recurrence expression, invocations might occur on, or after, the StartDate you specify.
*/
@JvmName("mkpawmqdnlkubuun")
public suspend fun startDate(`value`: Output) {
this.startDate = value
}
/**
* @param value Specifies whether the schedule is enabled or disabled.
* *Allowed Values* : `ENABLED` | `DISABLED`
*/
@JvmName("mwhrwjjjkbahjfgp")
public suspend fun state(`value`: Output) {
this.state = value
}
/**
* @param value The schedule's target details.
*/
@JvmName("snbiwtvpulcrotpq")
public suspend fun target(`value`: Output) {
this.target = value
}
/**
* @param value The description of the schedule.
*/
@JvmName("stahhniacokevttc")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value The date, in UTC, before which the schedule can invoke its target. Depending on the schedule's recurrence expression, invocations might stop on, or before, the EndDate you specify.
*/
@JvmName("mrydbsbhkmdgmapk")
public suspend fun endDate(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.endDate = mapped
}
/**
* @param value Allows you to configure a time window during which EventBridge Scheduler invokes the schedule.
*/
@JvmName("piwndtkhxntqhewp")
public suspend fun flexibleTimeWindow(`value`: ScheduleFlexibleTimeWindowArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.flexibleTimeWindow = mapped
}
/**
* @param argument Allows you to configure a time window during which EventBridge Scheduler invokes the schedule.
*/
@JvmName("kyfptbpywyupiooo")
public suspend fun flexibleTimeWindow(argument: suspend ScheduleFlexibleTimeWindowArgsBuilder.() -> Unit) {
val toBeMapped = ScheduleFlexibleTimeWindowArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.flexibleTimeWindow = mapped
}
/**
* @param value The name of the schedule group to associate with this schedule. If you omit this, the default schedule group is used.
*/
@JvmName("egiudgtpdetrxgdy")
public suspend fun groupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.groupName = mapped
}
/**
* @param value The ARN for a KMS Key that will be used to encrypt customer data.
*/
@JvmName("hyjnyibindmkmjpm")
public suspend fun kmsKeyArn(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.kmsKeyArn = mapped
}
/**
* @param value The name of the schedule.
*/
@JvmName("oswlquwtdtakkadx")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The scheduling expression.
*/
@JvmName("jqynuofjeisjgkxi")
public suspend fun scheduleExpression(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.scheduleExpression = mapped
}
/**
* @param value The timezone in which the scheduling expression is evaluated.
*/
@JvmName("qrpvwwnaylvqfljx")
public suspend fun scheduleExpressionTimezone(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.scheduleExpressionTimezone = mapped
}
/**
* @param value The date, in UTC, after which the schedule can begin invoking its target. Depending on the schedule's recurrence expression, invocations might occur on, or after, the StartDate you specify.
*/
@JvmName("sxrtshqxqbfkkbev")
public suspend fun startDate(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.startDate = mapped
}
/**
* @param value Specifies whether the schedule is enabled or disabled.
* *Allowed Values* : `ENABLED` | `DISABLED`
*/
@JvmName("dubsfqaoikanpavr")
public suspend fun state(`value`: ScheduleState?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.state = mapped
}
/**
* @param value The schedule's target details.
*/
@JvmName("wxjsuykvrxbwkkut")
public suspend fun target(`value`: ScheduleTargetArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.target = mapped
}
/**
* @param argument The schedule's target details.
*/
@JvmName("yqgdttmlgxuvphoy")
public suspend fun target(argument: suspend ScheduleTargetArgsBuilder.() -> Unit) {
val toBeMapped = ScheduleTargetArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.target = mapped
}
internal fun build(): ScheduleArgs = ScheduleArgs(
description = description,
endDate = endDate,
flexibleTimeWindow = flexibleTimeWindow,
groupName = groupName,
kmsKeyArn = kmsKeyArn,
name = name,
scheduleExpression = scheduleExpression,
scheduleExpressionTimezone = scheduleExpressionTimezone,
startDate = startDate,
state = state,
target = target,
)
}