
com.pulumi.awsnative.scheduler.kotlin.Schedule.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.kotlin.enums.ScheduleState
import com.pulumi.awsnative.scheduler.kotlin.outputs.ScheduleFlexibleTimeWindow
import com.pulumi.awsnative.scheduler.kotlin.outputs.ScheduleTarget
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import com.pulumi.awsnative.scheduler.kotlin.enums.ScheduleState.Companion.toKotlin as scheduleStateToKotlin
import com.pulumi.awsnative.scheduler.kotlin.outputs.ScheduleFlexibleTimeWindow.Companion.toKotlin as scheduleFlexibleTimeWindowToKotlin
import com.pulumi.awsnative.scheduler.kotlin.outputs.ScheduleTarget.Companion.toKotlin as scheduleTargetToKotlin
/**
* Builder for [Schedule].
*/
@PulumiTagMarker
public class ScheduleResourceBuilder internal constructor() {
public var name: String? = null
public var args: ScheduleArgs = ScheduleArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend ScheduleArgsBuilder.() -> Unit) {
val builder = ScheduleArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): Schedule {
val builtJavaResource = com.pulumi.awsnative.scheduler.Schedule(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Schedule(builtJavaResource)
}
}
/**
* Definition of AWS::Scheduler::Schedule Resource Type
*/
public class Schedule internal constructor(
override val javaResource: com.pulumi.awsnative.scheduler.Schedule,
) : KotlinCustomResource(javaResource, ScheduleMapper) {
/**
* The Amazon Resource Name (ARN) of the schedule.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The description of the schedule.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* 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.
*/
public val endDate: Output?
get() = javaResource.endDate().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Allows you to configure a time window during which EventBridge Scheduler invokes the schedule.
*/
public val flexibleTimeWindow: Output
get() = javaResource.flexibleTimeWindow().applyValue({ args0 ->
args0.let({ args0 ->
scheduleFlexibleTimeWindowToKotlin(args0)
})
})
/**
* The name of the schedule group to associate with this schedule. If you omit this, the default schedule group is used.
*/
public val groupName: Output?
get() = javaResource.groupName().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The ARN for a KMS Key that will be used to encrypt customer data.
*/
public val kmsKeyArn: Output?
get() = javaResource.kmsKeyArn().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The name of the schedule.
*/
public val name: Output?
get() = javaResource.name().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The scheduling expression.
*/
public val scheduleExpression: Output
get() = javaResource.scheduleExpression().applyValue({ args0 -> args0 })
/**
* The timezone in which the scheduling expression is evaluated.
*/
public val scheduleExpressionTimezone: Output?
get() = javaResource.scheduleExpressionTimezone().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* 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.
*/
public val startDate: Output?
get() = javaResource.startDate().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Specifies whether the schedule is enabled or disabled.
* *Allowed Values* : `ENABLED` | `DISABLED`
*/
public val state: Output?
get() = javaResource.state().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
scheduleStateToKotlin(args0)
})
}).orElse(null)
})
/**
* The schedule's target details.
*/
public val target: Output
get() = javaResource.target().applyValue({ args0 ->
args0.let({ args0 ->
scheduleTargetToKotlin(args0)
})
})
}
public object ScheduleMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.scheduler.Schedule::class == javaResource::class
override fun map(javaResource: Resource): Schedule = Schedule(
javaResource as
com.pulumi.awsnative.scheduler.Schedule,
)
}
/**
* @see [Schedule].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Schedule].
*/
public suspend fun schedule(name: String, block: suspend ScheduleResourceBuilder.() -> Unit): Schedule {
val builder = ScheduleResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Schedule].
* @param name The _unique_ name of the resulting resource.
*/
public fun schedule(name: String): Schedule {
val builder = ScheduleResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy