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

com.pulumi.awsnative.cloudfront.kotlin.inputs.OriginRequestPolicyHeadersConfigArgs.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: 1.24.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.cloudfront.kotlin.inputs

import com.pulumi.awsnative.cloudfront.inputs.OriginRequestPolicyHeadersConfigArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property headerBehavior Determines whether any HTTP headers are included in requests that CloudFront sends to the origin. Valid values are:
 * - `none` – No HTTP headers in viewer requests are included in requests that CloudFront sends to the origin. Even when this field is set to `none` , any headers that are listed in a `CachePolicy` *are* included in origin requests.
 * - `whitelist` – Only the HTTP headers that are listed in the `Headers` type are included in requests that CloudFront sends to the origin.
 * - `allViewer` – All HTTP headers in viewer requests are included in requests that CloudFront sends to the origin.
 * - `allViewerAndWhitelistCloudFront` – All HTTP headers in viewer requests and the additional CloudFront headers that are listed in the `Headers` type are included in requests that CloudFront sends to the origin. The additional headers are added by CloudFront.
 * - `allExcept` – All HTTP headers in viewer requests are included in requests that CloudFront sends to the origin, **except** for those listed in the `Headers` type, which are not included.
 * @property headers Contains a list of HTTP header names.
 */
public data class OriginRequestPolicyHeadersConfigArgs(
    public val headerBehavior: Output,
    public val headers: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.cloudfront.inputs.OriginRequestPolicyHeadersConfigArgs = com.pulumi.awsnative.cloudfront.inputs.OriginRequestPolicyHeadersConfigArgs.builder()
        .headerBehavior(headerBehavior.applyValue({ args0 -> args0 }))
        .headers(headers?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [OriginRequestPolicyHeadersConfigArgs].
 */
@PulumiTagMarker
public class OriginRequestPolicyHeadersConfigArgsBuilder internal constructor() {
    private var headerBehavior: Output? = null

    private var headers: Output>? = null

    /**
     * @param value Determines whether any HTTP headers are included in requests that CloudFront sends to the origin. Valid values are:
     * - `none` – No HTTP headers in viewer requests are included in requests that CloudFront sends to the origin. Even when this field is set to `none` , any headers that are listed in a `CachePolicy` *are* included in origin requests.
     * - `whitelist` – Only the HTTP headers that are listed in the `Headers` type are included in requests that CloudFront sends to the origin.
     * - `allViewer` – All HTTP headers in viewer requests are included in requests that CloudFront sends to the origin.
     * - `allViewerAndWhitelistCloudFront` – All HTTP headers in viewer requests and the additional CloudFront headers that are listed in the `Headers` type are included in requests that CloudFront sends to the origin. The additional headers are added by CloudFront.
     * - `allExcept` – All HTTP headers in viewer requests are included in requests that CloudFront sends to the origin, **except** for those listed in the `Headers` type, which are not included.
     */
    @JvmName("esolgihnsvaiumpm")
    public suspend fun headerBehavior(`value`: Output) {
        this.headerBehavior = value
    }

    /**
     * @param value Contains a list of HTTP header names.
     */
    @JvmName("aheebnfkcbxffgkt")
    public suspend fun headers(`value`: Output>) {
        this.headers = value
    }

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

    /**
     * @param values Contains a list of HTTP header names.
     */
    @JvmName("pfrdkpsklfhmdelj")
    public suspend fun headers(values: List>) {
        this.headers = Output.all(values)
    }

    /**
     * @param value Determines whether any HTTP headers are included in requests that CloudFront sends to the origin. Valid values are:
     * - `none` – No HTTP headers in viewer requests are included in requests that CloudFront sends to the origin. Even when this field is set to `none` , any headers that are listed in a `CachePolicy` *are* included in origin requests.
     * - `whitelist` – Only the HTTP headers that are listed in the `Headers` type are included in requests that CloudFront sends to the origin.
     * - `allViewer` – All HTTP headers in viewer requests are included in requests that CloudFront sends to the origin.
     * - `allViewerAndWhitelistCloudFront` – All HTTP headers in viewer requests and the additional CloudFront headers that are listed in the `Headers` type are included in requests that CloudFront sends to the origin. The additional headers are added by CloudFront.
     * - `allExcept` – All HTTP headers in viewer requests are included in requests that CloudFront sends to the origin, **except** for those listed in the `Headers` type, which are not included.
     */
    @JvmName("issjwlgykurnaqef")
    public suspend fun headerBehavior(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.headerBehavior = mapped
    }

    /**
     * @param value Contains a list of HTTP header names.
     */
    @JvmName("ihhbxyfrbrkjvrvn")
    public suspend fun headers(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.headers = mapped
    }

    /**
     * @param values Contains a list of HTTP header names.
     */
    @JvmName("pjtewvcudrrsfirs")
    public suspend fun headers(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.headers = mapped
    }

    internal fun build(): OriginRequestPolicyHeadersConfigArgs = OriginRequestPolicyHeadersConfigArgs(
        headerBehavior = headerBehavior ?: throw PulumiNullFieldException("headerBehavior"),
        headers = headers,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy