Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.gcp.pubsub.kotlin.inputs.SubscriptionPushConfigArgs.kt Maven / Gradle / Ivy
Go to download
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.pubsub.kotlin.inputs
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.pubsub.inputs.SubscriptionPushConfigArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
*
* @property attributes Endpoint configuration attributes.
* Every endpoint has a set of API supported attributes that can
* be used to control different aspects of the message delivery.
* The currently supported attribute is x-goog-version, which you
* can use to change the format of the pushed message. This
* attribute indicates the version of the data expected by
* the endpoint. This controls the shape of the pushed message
* (i.e., its fields and metadata). The endpoint version is
* based on the version of the Pub/Sub API.
* If not present during the subscriptions.create call,
* it will default to the version of the API used to make
* such call. If not present during a subscriptions.modifyPushConfig
* call, its value will not be changed. subscriptions.get
* calls will always return a valid version, even if the
* subscription was created without this attribute.
* The possible values for this attribute are:
* - v1beta1: uses the push format defined in the v1beta1 Pub/Sub API.
* - v1 or v1beta2: uses the push format defined in the v1 Pub/Sub API.
* @property noWrapper When set, the payload to the push endpoint is not wrapped.Sets the
* `data` field as the HTTP body for delivery.
* Structure is documented below.
* @property oidcToken If specified, Pub/Sub will generate and attach an OIDC JWT token as
* an Authorization header in the HTTP request for every pushed message.
* Structure is documented below.
* @property pushEndpoint A URL locating the endpoint to which messages should be pushed.
* For example, a Webhook endpoint might use
* "https://example.com/push".
*/
public data class SubscriptionPushConfigArgs(
public val attributes: Output>? = null,
public val noWrapper: Output? = null,
public val oidcToken: Output? = null,
public val pushEndpoint: Output,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.pubsub.inputs.SubscriptionPushConfigArgs =
com.pulumi.gcp.pubsub.inputs.SubscriptionPushConfigArgs.builder()
.attributes(
attributes?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}),
)
.noWrapper(noWrapper?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.oidcToken(oidcToken?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.pushEndpoint(pushEndpoint.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [SubscriptionPushConfigArgs].
*/
@PulumiTagMarker
public class SubscriptionPushConfigArgsBuilder internal constructor() {
private var attributes: Output>? = null
private var noWrapper: Output? = null
private var oidcToken: Output? = null
private var pushEndpoint: Output? = null
/**
* @param value Endpoint configuration attributes.
* Every endpoint has a set of API supported attributes that can
* be used to control different aspects of the message delivery.
* The currently supported attribute is x-goog-version, which you
* can use to change the format of the pushed message. This
* attribute indicates the version of the data expected by
* the endpoint. This controls the shape of the pushed message
* (i.e., its fields and metadata). The endpoint version is
* based on the version of the Pub/Sub API.
* If not present during the subscriptions.create call,
* it will default to the version of the API used to make
* such call. If not present during a subscriptions.modifyPushConfig
* call, its value will not be changed. subscriptions.get
* calls will always return a valid version, even if the
* subscription was created without this attribute.
* The possible values for this attribute are:
* - v1beta1: uses the push format defined in the v1beta1 Pub/Sub API.
* - v1 or v1beta2: uses the push format defined in the v1 Pub/Sub API.
*/
@JvmName("stdohtbleynrgvcm")
public suspend fun attributes(`value`: Output>) {
this.attributes = value
}
/**
* @param value When set, the payload to the push endpoint is not wrapped.Sets the
* `data` field as the HTTP body for delivery.
* Structure is documented below.
*/
@JvmName("xxvjosljscibijcj")
public suspend fun noWrapper(`value`: Output) {
this.noWrapper = value
}
/**
* @param value If specified, Pub/Sub will generate and attach an OIDC JWT token as
* an Authorization header in the HTTP request for every pushed message.
* Structure is documented below.
*/
@JvmName("iwqvprqjpyviqssi")
public suspend fun oidcToken(`value`: Output) {
this.oidcToken = value
}
/**
* @param value A URL locating the endpoint to which messages should be pushed.
* For example, a Webhook endpoint might use
* "https://example.com/push".
*/
@JvmName("tqxjkvvhipkirlbx")
public suspend fun pushEndpoint(`value`: Output) {
this.pushEndpoint = value
}
/**
* @param value Endpoint configuration attributes.
* Every endpoint has a set of API supported attributes that can
* be used to control different aspects of the message delivery.
* The currently supported attribute is x-goog-version, which you
* can use to change the format of the pushed message. This
* attribute indicates the version of the data expected by
* the endpoint. This controls the shape of the pushed message
* (i.e., its fields and metadata). The endpoint version is
* based on the version of the Pub/Sub API.
* If not present during the subscriptions.create call,
* it will default to the version of the API used to make
* such call. If not present during a subscriptions.modifyPushConfig
* call, its value will not be changed. subscriptions.get
* calls will always return a valid version, even if the
* subscription was created without this attribute.
* The possible values for this attribute are:
* - v1beta1: uses the push format defined in the v1beta1 Pub/Sub API.
* - v1 or v1beta2: uses the push format defined in the v1 Pub/Sub API.
*/
@JvmName("iovsptjmorjguvcm")
public suspend fun attributes(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.attributes = mapped
}
/**
* @param values Endpoint configuration attributes.
* Every endpoint has a set of API supported attributes that can
* be used to control different aspects of the message delivery.
* The currently supported attribute is x-goog-version, which you
* can use to change the format of the pushed message. This
* attribute indicates the version of the data expected by
* the endpoint. This controls the shape of the pushed message
* (i.e., its fields and metadata). The endpoint version is
* based on the version of the Pub/Sub API.
* If not present during the subscriptions.create call,
* it will default to the version of the API used to make
* such call. If not present during a subscriptions.modifyPushConfig
* call, its value will not be changed. subscriptions.get
* calls will always return a valid version, even if the
* subscription was created without this attribute.
* The possible values for this attribute are:
* - v1beta1: uses the push format defined in the v1beta1 Pub/Sub API.
* - v1 or v1beta2: uses the push format defined in the v1 Pub/Sub API.
*/
@JvmName("sokbdpqbqwkokvih")
public fun attributes(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.attributes = mapped
}
/**
* @param value When set, the payload to the push endpoint is not wrapped.Sets the
* `data` field as the HTTP body for delivery.
* Structure is documented below.
*/
@JvmName("iyimubrppmygjwjp")
public suspend fun noWrapper(`value`: SubscriptionPushConfigNoWrapperArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.noWrapper = mapped
}
/**
* @param argument When set, the payload to the push endpoint is not wrapped.Sets the
* `data` field as the HTTP body for delivery.
* Structure is documented below.
*/
@JvmName("yuitpujtthdjktnk")
public suspend fun noWrapper(argument: suspend SubscriptionPushConfigNoWrapperArgsBuilder.() -> Unit) {
val toBeMapped = SubscriptionPushConfigNoWrapperArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.noWrapper = mapped
}
/**
* @param value If specified, Pub/Sub will generate and attach an OIDC JWT token as
* an Authorization header in the HTTP request for every pushed message.
* Structure is documented below.
*/
@JvmName("rpkvdtnhxwnjiktk")
public suspend fun oidcToken(`value`: SubscriptionPushConfigOidcTokenArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.oidcToken = mapped
}
/**
* @param argument If specified, Pub/Sub will generate and attach an OIDC JWT token as
* an Authorization header in the HTTP request for every pushed message.
* Structure is documented below.
*/
@JvmName("iijmddpheapqashr")
public suspend fun oidcToken(argument: suspend SubscriptionPushConfigOidcTokenArgsBuilder.() -> Unit) {
val toBeMapped = SubscriptionPushConfigOidcTokenArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.oidcToken = mapped
}
/**
* @param value A URL locating the endpoint to which messages should be pushed.
* For example, a Webhook endpoint might use
* "https://example.com/push".
*/
@JvmName("ufkuxyhybvhvdgau")
public suspend fun pushEndpoint(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.pushEndpoint = mapped
}
internal fun build(): SubscriptionPushConfigArgs = SubscriptionPushConfigArgs(
attributes = attributes,
noWrapper = noWrapper,
oidcToken = oidcToken,
pushEndpoint = pushEndpoint ?: throw PulumiNullFieldException("pushEndpoint"),
)
}