![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.glue.kotlin.Trigger.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.glue.kotlin
import com.pulumi.awsnative.glue.kotlin.outputs.TriggerAction
import com.pulumi.awsnative.glue.kotlin.outputs.TriggerEventBatchingCondition
import com.pulumi.awsnative.glue.kotlin.outputs.TriggerPredicate
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.Any
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.glue.kotlin.outputs.TriggerAction.Companion.toKotlin as triggerActionToKotlin
import com.pulumi.awsnative.glue.kotlin.outputs.TriggerEventBatchingCondition.Companion.toKotlin as triggerEventBatchingConditionToKotlin
import com.pulumi.awsnative.glue.kotlin.outputs.TriggerPredicate.Companion.toKotlin as triggerPredicateToKotlin
/**
* Builder for [Trigger].
*/
@PulumiTagMarker
public class TriggerResourceBuilder internal constructor() {
public var name: String? = null
public var args: TriggerArgs = TriggerArgs()
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 TriggerArgsBuilder.() -> Unit) {
val builder = TriggerArgsBuilder()
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(): Trigger {
val builtJavaResource = com.pulumi.awsnative.glue.Trigger(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Trigger(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::Glue::Trigger
* ## Example Usage
* ### Example
* No Java example available.
* ### Example
* No Java example available.
* ### Example
* No Java example available.
* ### Example
* No Java example available.
*/
public class Trigger internal constructor(
override val javaResource: com.pulumi.awsnative.glue.Trigger,
) : KotlinCustomResource(javaResource, TriggerMapper) {
/**
* The actions initiated by this trigger.
*/
public val actions: Output>
get() = javaResource.actions().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
triggerActionToKotlin(args0)
})
})
})
/**
* A description of this trigger.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Batch condition that must be met (specified number of events received or batch time window expired) before EventBridge event trigger fires.
*/
public val eventBatchingCondition: Output?
get() = javaResource.eventBatchingCondition().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> triggerEventBatchingConditionToKotlin(args0) })
}).orElse(null)
})
/**
* The name of the trigger.
*/
public val name: Output?
get() = javaResource.name().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The predicate of this trigger, which defines when it will fire.
*/
public val predicate: Output?
get() = javaResource.predicate().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
triggerPredicateToKotlin(args0)
})
}).orElse(null)
})
/**
* A cron expression used to specify the schedule.
*/
public val schedule: Output?
get() = javaResource.schedule().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Set to true to start SCHEDULED and CONDITIONAL triggers when created. True is not supported for ON_DEMAND triggers.
*/
public val startOnCreation: Output?
get() = javaResource.startOnCreation().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The tags to use with this trigger.
* Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::Glue::Trigger` for more information about the expected schema for this property.
*/
public val tags: Output?
get() = javaResource.tags().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The type of trigger that this is.
*/
public val type: Output
get() = javaResource.type().applyValue({ args0 -> args0 })
/**
* The name of the workflow associated with the trigger.
*/
public val workflowName: Output?
get() = javaResource.workflowName().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
}
public object TriggerMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.glue.Trigger::class == javaResource::class
override fun map(javaResource: Resource): Trigger = Trigger(
javaResource as
com.pulumi.awsnative.glue.Trigger,
)
}
/**
* @see [Trigger].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Trigger].
*/
public suspend fun trigger(name: String, block: suspend TriggerResourceBuilder.() -> Unit): Trigger {
val builder = TriggerResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Trigger].
* @param name The _unique_ name of the resulting resource.
*/
public fun trigger(name: String): Trigger {
val builder = TriggerResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy