All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.gcp.cloudtasks.kotlin.inputs.QueueHttpTargetArgs.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.

There is a newer version: 8.13.1.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.cloudtasks.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.cloudtasks.inputs.QueueHttpTargetArgs.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.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property headerOverrides HTTP target headers.
 * This map contains the header field names and values.
 * Headers will be set when running the CreateTask and/or BufferTask.
 * These headers represent a subset of the headers that will be configured for the task's HTTP request.
 * Some HTTP request headers will be ignored or replaced.
 * Headers which can have multiple values (according to RFC2616) can be specified using comma-separated values.
 * The size of the headers must be less than 80KB. Queue-level headers to override headers of all the tasks in the queue.
 * Structure is documented below.
 * @property httpMethod The HTTP method to use for the request.
 * When specified, it overrides HttpRequest for the task.
 * Note that if the value is set to GET the body of the task will be ignored at execution time.
 * Possible values are: `HTTP_METHOD_UNSPECIFIED`, `POST`, `GET`, `HEAD`, `PUT`, `DELETE`, `PATCH`, `OPTIONS`.
 * @property oauthToken If specified, an OAuth token is generated and attached as the Authorization header in the HTTP request.
 * This type of authorization should generally be used only when calling Google APIs hosted on *.googleapis.com.
 * Note that both the service account email and the scope MUST be specified when using the queue-level authorization override.
 * Structure is documented below.
 * @property oidcToken If specified, an OIDC token is generated and attached as an Authorization header in the HTTP request.
 * This type of authorization can be used for many scenarios, including calling Cloud Run, or endpoints where you intend to validate the token yourself.
 * Note that both the service account email and the audience MUST be specified when using the queue-level authorization override.
 * Structure is documented below.
 * @property uriOverride URI override.
 * When specified, overrides the execution URI for all the tasks in the queue.
 * Structure is documented below.
 */
public data class QueueHttpTargetArgs(
    public val headerOverrides: Output>? = null,
    public val httpMethod: Output? = null,
    public val oauthToken: Output? = null,
    public val oidcToken: Output? = null,
    public val uriOverride: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.cloudtasks.inputs.QueueHttpTargetArgs =
        com.pulumi.gcp.cloudtasks.inputs.QueueHttpTargetArgs.builder()
            .headerOverrides(
                headerOverrides?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .httpMethod(httpMethod?.applyValue({ args0 -> args0 }))
            .oauthToken(oauthToken?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .oidcToken(oidcToken?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .uriOverride(uriOverride?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [QueueHttpTargetArgs].
 */
@PulumiTagMarker
public class QueueHttpTargetArgsBuilder internal constructor() {
    private var headerOverrides: Output>? = null

    private var httpMethod: Output? = null

    private var oauthToken: Output? = null

    private var oidcToken: Output? = null

    private var uriOverride: Output? = null

    /**
     * @param value HTTP target headers.
     * This map contains the header field names and values.
     * Headers will be set when running the CreateTask and/or BufferTask.
     * These headers represent a subset of the headers that will be configured for the task's HTTP request.
     * Some HTTP request headers will be ignored or replaced.
     * Headers which can have multiple values (according to RFC2616) can be specified using comma-separated values.
     * The size of the headers must be less than 80KB. Queue-level headers to override headers of all the tasks in the queue.
     * Structure is documented below.
     */
    @JvmName("tfnebopwqyfbxnle")
    public suspend fun headerOverrides(`value`: Output>) {
        this.headerOverrides = value
    }

    @JvmName("rrbamlcrcewqmwew")
    public suspend fun headerOverrides(vararg values: Output) {
        this.headerOverrides = Output.all(values.asList())
    }

    /**
     * @param values HTTP target headers.
     * This map contains the header field names and values.
     * Headers will be set when running the CreateTask and/or BufferTask.
     * These headers represent a subset of the headers that will be configured for the task's HTTP request.
     * Some HTTP request headers will be ignored or replaced.
     * Headers which can have multiple values (according to RFC2616) can be specified using comma-separated values.
     * The size of the headers must be less than 80KB. Queue-level headers to override headers of all the tasks in the queue.
     * Structure is documented below.
     */
    @JvmName("ceomhvtwcfmyoyqo")
    public suspend fun headerOverrides(values: List>) {
        this.headerOverrides = Output.all(values)
    }

    /**
     * @param value The HTTP method to use for the request.
     * When specified, it overrides HttpRequest for the task.
     * Note that if the value is set to GET the body of the task will be ignored at execution time.
     * Possible values are: `HTTP_METHOD_UNSPECIFIED`, `POST`, `GET`, `HEAD`, `PUT`, `DELETE`, `PATCH`, `OPTIONS`.
     */
    @JvmName("ipgmsvcqyuijixvg")
    public suspend fun httpMethod(`value`: Output) {
        this.httpMethod = value
    }

    /**
     * @param value If specified, an OAuth token is generated and attached as the Authorization header in the HTTP request.
     * This type of authorization should generally be used only when calling Google APIs hosted on *.googleapis.com.
     * Note that both the service account email and the scope MUST be specified when using the queue-level authorization override.
     * Structure is documented below.
     */
    @JvmName("ejrhillcbbfsgqgg")
    public suspend fun oauthToken(`value`: Output) {
        this.oauthToken = value
    }

    /**
     * @param value If specified, an OIDC token is generated and attached as an Authorization header in the HTTP request.
     * This type of authorization can be used for many scenarios, including calling Cloud Run, or endpoints where you intend to validate the token yourself.
     * Note that both the service account email and the audience MUST be specified when using the queue-level authorization override.
     * Structure is documented below.
     */
    @JvmName("chtdwdrmpscdvaqv")
    public suspend fun oidcToken(`value`: Output) {
        this.oidcToken = value
    }

    /**
     * @param value URI override.
     * When specified, overrides the execution URI for all the tasks in the queue.
     * Structure is documented below.
     */
    @JvmName("fxkdglpsvxbfvdfv")
    public suspend fun uriOverride(`value`: Output) {
        this.uriOverride = value
    }

    /**
     * @param value HTTP target headers.
     * This map contains the header field names and values.
     * Headers will be set when running the CreateTask and/or BufferTask.
     * These headers represent a subset of the headers that will be configured for the task's HTTP request.
     * Some HTTP request headers will be ignored or replaced.
     * Headers which can have multiple values (according to RFC2616) can be specified using comma-separated values.
     * The size of the headers must be less than 80KB. Queue-level headers to override headers of all the tasks in the queue.
     * Structure is documented below.
     */
    @JvmName("nevimblwlcpxrbmr")
    public suspend fun headerOverrides(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.headerOverrides = mapped
    }

    /**
     * @param argument HTTP target headers.
     * This map contains the header field names and values.
     * Headers will be set when running the CreateTask and/or BufferTask.
     * These headers represent a subset of the headers that will be configured for the task's HTTP request.
     * Some HTTP request headers will be ignored or replaced.
     * Headers which can have multiple values (according to RFC2616) can be specified using comma-separated values.
     * The size of the headers must be less than 80KB. Queue-level headers to override headers of all the tasks in the queue.
     * Structure is documented below.
     */
    @JvmName("qclmwfgkccmjnmjh")
    public suspend fun headerOverrides(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            QueueHttpTargetHeaderOverrideArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.headerOverrides = mapped
    }

    /**
     * @param argument HTTP target headers.
     * This map contains the header field names and values.
     * Headers will be set when running the CreateTask and/or BufferTask.
     * These headers represent a subset of the headers that will be configured for the task's HTTP request.
     * Some HTTP request headers will be ignored or replaced.
     * Headers which can have multiple values (according to RFC2616) can be specified using comma-separated values.
     * The size of the headers must be less than 80KB. Queue-level headers to override headers of all the tasks in the queue.
     * Structure is documented below.
     */
    @JvmName("ymemuytrdaibkmhn")
    public suspend fun headerOverrides(vararg argument: suspend QueueHttpTargetHeaderOverrideArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            QueueHttpTargetHeaderOverrideArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.headerOverrides = mapped
    }

    /**
     * @param argument HTTP target headers.
     * This map contains the header field names and values.
     * Headers will be set when running the CreateTask and/or BufferTask.
     * These headers represent a subset of the headers that will be configured for the task's HTTP request.
     * Some HTTP request headers will be ignored or replaced.
     * Headers which can have multiple values (according to RFC2616) can be specified using comma-separated values.
     * The size of the headers must be less than 80KB. Queue-level headers to override headers of all the tasks in the queue.
     * Structure is documented below.
     */
    @JvmName("ivlrbvolggolxciv")
    public suspend fun headerOverrides(argument: suspend QueueHttpTargetHeaderOverrideArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            QueueHttpTargetHeaderOverrideArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.headerOverrides = mapped
    }

    /**
     * @param values HTTP target headers.
     * This map contains the header field names and values.
     * Headers will be set when running the CreateTask and/or BufferTask.
     * These headers represent a subset of the headers that will be configured for the task's HTTP request.
     * Some HTTP request headers will be ignored or replaced.
     * Headers which can have multiple values (according to RFC2616) can be specified using comma-separated values.
     * The size of the headers must be less than 80KB. Queue-level headers to override headers of all the tasks in the queue.
     * Structure is documented below.
     */
    @JvmName("djkttxfiujwkntep")
    public suspend fun headerOverrides(vararg values: QueueHttpTargetHeaderOverrideArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.headerOverrides = mapped
    }

    /**
     * @param value The HTTP method to use for the request.
     * When specified, it overrides HttpRequest for the task.
     * Note that if the value is set to GET the body of the task will be ignored at execution time.
     * Possible values are: `HTTP_METHOD_UNSPECIFIED`, `POST`, `GET`, `HEAD`, `PUT`, `DELETE`, `PATCH`, `OPTIONS`.
     */
    @JvmName("wmcjiiutbakkmopr")
    public suspend fun httpMethod(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.httpMethod = mapped
    }

    /**
     * @param value If specified, an OAuth token is generated and attached as the Authorization header in the HTTP request.
     * This type of authorization should generally be used only when calling Google APIs hosted on *.googleapis.com.
     * Note that both the service account email and the scope MUST be specified when using the queue-level authorization override.
     * Structure is documented below.
     */
    @JvmName("xdvqopfxdpjpsexq")
    public suspend fun oauthToken(`value`: QueueHttpTargetOauthTokenArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.oauthToken = mapped
    }

    /**
     * @param argument If specified, an OAuth token is generated and attached as the Authorization header in the HTTP request.
     * This type of authorization should generally be used only when calling Google APIs hosted on *.googleapis.com.
     * Note that both the service account email and the scope MUST be specified when using the queue-level authorization override.
     * Structure is documented below.
     */
    @JvmName("imncbaamacmydvkd")
    public suspend fun oauthToken(argument: suspend QueueHttpTargetOauthTokenArgsBuilder.() -> Unit) {
        val toBeMapped = QueueHttpTargetOauthTokenArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.oauthToken = mapped
    }

    /**
     * @param value If specified, an OIDC token is generated and attached as an Authorization header in the HTTP request.
     * This type of authorization can be used for many scenarios, including calling Cloud Run, or endpoints where you intend to validate the token yourself.
     * Note that both the service account email and the audience MUST be specified when using the queue-level authorization override.
     * Structure is documented below.
     */
    @JvmName("ijeprfdbhwosstyx")
    public suspend fun oidcToken(`value`: QueueHttpTargetOidcTokenArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.oidcToken = mapped
    }

    /**
     * @param argument If specified, an OIDC token is generated and attached as an Authorization header in the HTTP request.
     * This type of authorization can be used for many scenarios, including calling Cloud Run, or endpoints where you intend to validate the token yourself.
     * Note that both the service account email and the audience MUST be specified when using the queue-level authorization override.
     * Structure is documented below.
     */
    @JvmName("eldrkjmpmaiuotfx")
    public suspend fun oidcToken(argument: suspend QueueHttpTargetOidcTokenArgsBuilder.() -> Unit) {
        val toBeMapped = QueueHttpTargetOidcTokenArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.oidcToken = mapped
    }

    /**
     * @param value URI override.
     * When specified, overrides the execution URI for all the tasks in the queue.
     * Structure is documented below.
     */
    @JvmName("gojdfvosmyjuvkxm")
    public suspend fun uriOverride(`value`: QueueHttpTargetUriOverrideArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.uriOverride = mapped
    }

    /**
     * @param argument URI override.
     * When specified, overrides the execution URI for all the tasks in the queue.
     * Structure is documented below.
     */
    @JvmName("aewuqowqjcmuonaj")
    public suspend fun uriOverride(argument: suspend QueueHttpTargetUriOverrideArgsBuilder.() -> Unit) {
        val toBeMapped = QueueHttpTargetUriOverrideArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.uriOverride = mapped
    }

    internal fun build(): QueueHttpTargetArgs = QueueHttpTargetArgs(
        headerOverrides = headerOverrides,
        httpMethod = httpMethod,
        oauthToken = oauthToken,
        oidcToken = oidcToken,
        uriOverride = uriOverride,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy