com.pulumi.gcp.eventarc.kotlin.inputs.TriggerDestinationArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-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.gcp.eventarc.kotlin.inputs
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.eventarc.inputs.TriggerDestinationArgs.builder
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
/**
*
* @property cloudFunction The Cloud Function resource name. Only Cloud Functions V2 is supported. Format projects/{project}/locations/{location}/functions/{function} This is a read-only field. [WARNING] Creating Cloud Functions V2 triggers is only supported via the Cloud Functions product. An error will be returned if the user sets this value.
* @property cloudRunService Cloud Run fully-managed service that receives the events. The service should be running in the same project of the trigger.
* @property gke A GKE service capable of receiving events. The service should be running in the same project as the trigger.
* @property httpEndpoint An HTTP endpoint destination described by an URI.
* @property networkConfig Optional. Network config is used to configure how Eventarc resolves and connect to a destination. This should only be used with HttpEndpoint destination type.
* @property workflow The resource name of the Workflow whose Executions are triggered by the events. The Workflow resource should be deployed in the same project as the trigger. Format: `projects/{project}/locations/{location}/workflows/{workflow}`
*/
public data class TriggerDestinationArgs(
public val cloudFunction: Output? = null,
public val cloudRunService: Output? = null,
public val gke: Output? = null,
public val httpEndpoint: Output? = null,
public val networkConfig: Output? = null,
public val workflow: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.eventarc.inputs.TriggerDestinationArgs =
com.pulumi.gcp.eventarc.inputs.TriggerDestinationArgs.builder()
.cloudFunction(cloudFunction?.applyValue({ args0 -> args0 }))
.cloudRunService(cloudRunService?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.gke(gke?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.httpEndpoint(httpEndpoint?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.networkConfig(networkConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.workflow(workflow?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [TriggerDestinationArgs].
*/
@PulumiTagMarker
public class TriggerDestinationArgsBuilder internal constructor() {
private var cloudFunction: Output? = null
private var cloudRunService: Output? = null
private var gke: Output? = null
private var httpEndpoint: Output? = null
private var networkConfig: Output? = null
private var workflow: Output? = null
/**
* @param value The Cloud Function resource name. Only Cloud Functions V2 is supported. Format projects/{project}/locations/{location}/functions/{function} This is a read-only field. [WARNING] Creating Cloud Functions V2 triggers is only supported via the Cloud Functions product. An error will be returned if the user sets this value.
*/
@JvmName("qhmrbukdncelmnsy")
public suspend fun cloudFunction(`value`: Output) {
this.cloudFunction = value
}
/**
* @param value Cloud Run fully-managed service that receives the events. The service should be running in the same project of the trigger.
*/
@JvmName("xypfeyjlkykhwqtd")
public suspend fun cloudRunService(`value`: Output) {
this.cloudRunService = value
}
/**
* @param value A GKE service capable of receiving events. The service should be running in the same project as the trigger.
*/
@JvmName("brqfwxkyxyeqaawt")
public suspend fun gke(`value`: Output) {
this.gke = value
}
/**
* @param value An HTTP endpoint destination described by an URI.
*/
@JvmName("faohstvljgxmnxhl")
public suspend fun httpEndpoint(`value`: Output) {
this.httpEndpoint = value
}
/**
* @param value Optional. Network config is used to configure how Eventarc resolves and connect to a destination. This should only be used with HttpEndpoint destination type.
*/
@JvmName("kjyixrfkqcykiwyc")
public suspend fun networkConfig(`value`: Output) {
this.networkConfig = value
}
/**
* @param value The resource name of the Workflow whose Executions are triggered by the events. The Workflow resource should be deployed in the same project as the trigger. Format: `projects/{project}/locations/{location}/workflows/{workflow}`
*/
@JvmName("mbwrhpnmobovoqke")
public suspend fun workflow(`value`: Output) {
this.workflow = value
}
/**
* @param value The Cloud Function resource name. Only Cloud Functions V2 is supported. Format projects/{project}/locations/{location}/functions/{function} This is a read-only field. [WARNING] Creating Cloud Functions V2 triggers is only supported via the Cloud Functions product. An error will be returned if the user sets this value.
*/
@JvmName("bswvmrrjfivdtoln")
public suspend fun cloudFunction(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.cloudFunction = mapped
}
/**
* @param value Cloud Run fully-managed service that receives the events. The service should be running in the same project of the trigger.
*/
@JvmName("gumaccksfdibslqy")
public suspend fun cloudRunService(`value`: TriggerDestinationCloudRunServiceArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.cloudRunService = mapped
}
/**
* @param argument Cloud Run fully-managed service that receives the events. The service should be running in the same project of the trigger.
*/
@JvmName("vkobilpbrnhcytta")
public suspend fun cloudRunService(argument: suspend TriggerDestinationCloudRunServiceArgsBuilder.() -> Unit) {
val toBeMapped = TriggerDestinationCloudRunServiceArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.cloudRunService = mapped
}
/**
* @param value A GKE service capable of receiving events. The service should be running in the same project as the trigger.
*/
@JvmName("hhqbelyikrjhgpvh")
public suspend fun gke(`value`: TriggerDestinationGkeArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.gke = mapped
}
/**
* @param argument A GKE service capable of receiving events. The service should be running in the same project as the trigger.
*/
@JvmName("lpgacfibvjbdgmwd")
public suspend fun gke(argument: suspend TriggerDestinationGkeArgsBuilder.() -> Unit) {
val toBeMapped = TriggerDestinationGkeArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.gke = mapped
}
/**
* @param value An HTTP endpoint destination described by an URI.
*/
@JvmName("hxqefysyqiehttld")
public suspend fun httpEndpoint(`value`: TriggerDestinationHttpEndpointArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.httpEndpoint = mapped
}
/**
* @param argument An HTTP endpoint destination described by an URI.
*/
@JvmName("isifthkuthcqjrxg")
public suspend fun httpEndpoint(argument: suspend TriggerDestinationHttpEndpointArgsBuilder.() -> Unit) {
val toBeMapped = TriggerDestinationHttpEndpointArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.httpEndpoint = mapped
}
/**
* @param value Optional. Network config is used to configure how Eventarc resolves and connect to a destination. This should only be used with HttpEndpoint destination type.
*/
@JvmName("oivihykuyvfbetck")
public suspend fun networkConfig(`value`: TriggerDestinationNetworkConfigArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.networkConfig = mapped
}
/**
* @param argument Optional. Network config is used to configure how Eventarc resolves and connect to a destination. This should only be used with HttpEndpoint destination type.
*/
@JvmName("nufjeknrragdiomh")
public suspend fun networkConfig(argument: suspend TriggerDestinationNetworkConfigArgsBuilder.() -> Unit) {
val toBeMapped = TriggerDestinationNetworkConfigArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.networkConfig = mapped
}
/**
* @param value The resource name of the Workflow whose Executions are triggered by the events. The Workflow resource should be deployed in the same project as the trigger. Format: `projects/{project}/locations/{location}/workflows/{workflow}`
*/
@JvmName("sgbifqnoeotarpbc")
public suspend fun workflow(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.workflow = mapped
}
internal fun build(): TriggerDestinationArgs = TriggerDestinationArgs(
cloudFunction = cloudFunction,
cloudRunService = cloudRunService,
gke = gke,
httpEndpoint = httpEndpoint,
networkConfig = networkConfig,
workflow = workflow,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy