![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.scheduler.kotlin.ScheduleGroup.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.scheduler.kotlin
import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.scheduler.kotlin.enums.ScheduleGroupState
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 kotlin.collections.List
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
import com.pulumi.awsnative.scheduler.kotlin.enums.ScheduleGroupState.Companion.toKotlin as scheduleGroupStateToKotlin
/**
* Builder for [ScheduleGroup].
*/
@PulumiTagMarker
public class ScheduleGroupResourceBuilder internal constructor() {
public var name: String? = null
public var args: ScheduleGroupArgs = ScheduleGroupArgs()
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 ScheduleGroupArgsBuilder.() -> Unit) {
val builder = ScheduleGroupArgsBuilder()
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(): ScheduleGroup {
val builtJavaResource = com.pulumi.awsnative.scheduler.ScheduleGroup(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return ScheduleGroup(builtJavaResource)
}
}
/**
* Definition of AWS::Scheduler::ScheduleGroup Resource Type
*/
public class ScheduleGroup internal constructor(
override val javaResource: com.pulumi.awsnative.scheduler.ScheduleGroup,
) : KotlinCustomResource(javaResource, ScheduleGroupMapper) {
/**
* The Amazon Resource Name (ARN) of the schedule group.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The time at which the schedule group was created.
*/
public val creationDate: Output
get() = javaResource.creationDate().applyValue({ args0 -> args0 })
/**
* The time at which the schedule group was last modified.
*/
public val lastModificationDate: Output
get() = javaResource.lastModificationDate().applyValue({ args0 -> args0 })
/**
* The name of the schedule group.
*/
public val name: Output?
get() = javaResource.name().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Specifies the state of the schedule group.
* *Allowed Values* : `ACTIVE` | `DELETING`
*/
public val state: Output
get() = javaResource.state().applyValue({ args0 ->
args0.let({ args0 ->
scheduleGroupStateToKotlin(args0)
})
})
/**
* The list of tags to associate with the schedule group.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
}
public object ScheduleGroupMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.scheduler.ScheduleGroup::class == javaResource::class
override fun map(javaResource: Resource): ScheduleGroup = ScheduleGroup(
javaResource as
com.pulumi.awsnative.scheduler.ScheduleGroup,
)
}
/**
* @see [ScheduleGroup].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [ScheduleGroup].
*/
public suspend fun scheduleGroup(
name: String,
block: suspend ScheduleGroupResourceBuilder.() -> Unit,
): ScheduleGroup {
val builder = ScheduleGroupResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [ScheduleGroup].
* @param name The _unique_ name of the resulting resource.
*/
public fun scheduleGroup(name: String): ScheduleGroup {
val builder = ScheduleGroupResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy