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

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

package com.pulumi.aws.cloudfront.kotlin.inputs

import com.pulumi.aws.cloudfront.inputs.DistributionDefaultCacheBehaviorArgs.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 com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property allowedMethods Controls which HTTP methods CloudFront processes and forwards to your Amazon S3 bucket or your custom origin.
 * @property cachePolicyId Unique identifier of the cache policy that is attached to the cache behavior. If configuring the `default_cache_behavior` either `cache_policy_id` or `forwarded_values` must be set.
 * @property cachedMethods Controls whether CloudFront caches the response to requests using the specified HTTP methods.
 * @property compress Whether you want CloudFront to automatically compress content for web requests that include `Accept-Encoding: gzip` in the request header (default: `false`).
 * @property defaultTtl Default amount of time (in seconds) that an object is in a CloudFront cache before CloudFront forwards another request in the absence of an `Cache-Control max-age` or `Expires` header.
 * @property fieldLevelEncryptionId Field level encryption configuration ID.
 * @property forwardedValues The forwarded values configuration that specifies how CloudFront handles query strings, cookies and headers (maximum one).
 * @property functionAssociations A config block that triggers a cloudfront function with specific actions (maximum 2).
 * @property lambdaFunctionAssociations A config block that triggers a lambda function with specific actions (maximum 4).
 * @property maxTtl Maximum amount of time (in seconds) that an object is in a CloudFront cache before CloudFront forwards another request to your origin to determine whether the object has been updated. Only effective in the presence of `Cache-Control max-age`, `Cache-Control s-maxage`, and `Expires` headers.
 * @property minTtl Minimum amount of time that you want objects to stay in CloudFront caches before CloudFront queries your origin to see whether the object has been updated. Defaults to 0 seconds.
 * @property originRequestPolicyId Unique identifier of the origin request policy that is attached to the behavior.
 * @property realtimeLogConfigArn ARN of the real-time log configuration that is attached to this cache behavior.
 * @property responseHeadersPolicyId Identifier for a response headers policy.
 * @property smoothStreaming Indicates whether you want to distribute media files in Microsoft Smooth Streaming format using the origin that is associated with this cache behavior.
 * @property targetOriginId Value of ID for the origin that you want CloudFront to route requests to when a request matches the path pattern either for a cache behavior or for the default cache behavior.
 * @property trustedKeyGroups List of nested attributes for active trusted key groups, if the distribution is set up to serve private content with signed URLs.
 * @property trustedSigners List of nested attributes for active trusted signers, if the distribution is set up to serve private content with signed URLs.
 * @property viewerProtocolPolicy Use this element to specify the protocol that users can use to access the files in the origin specified by TargetOriginId when a request matches the path pattern in PathPattern. One of `allow-all`, `https-only`, or `redirect-to-https`.
 */
public data class DistributionDefaultCacheBehaviorArgs(
    public val allowedMethods: Output>,
    public val cachePolicyId: Output? = null,
    public val cachedMethods: Output>,
    public val compress: Output? = null,
    public val defaultTtl: Output? = null,
    public val fieldLevelEncryptionId: Output? = null,
    public val forwardedValues: Output? = null,
    public val functionAssociations: Output>? = null,
    public val lambdaFunctionAssociations: Output>? = null,
    public val maxTtl: Output? = null,
    public val minTtl: Output? = null,
    public val originRequestPolicyId: Output? = null,
    public val realtimeLogConfigArn: Output? = null,
    public val responseHeadersPolicyId: Output? = null,
    public val smoothStreaming: Output? = null,
    public val targetOriginId: Output,
    public val trustedKeyGroups: Output>? = null,
    public val trustedSigners: Output>? = null,
    public val viewerProtocolPolicy: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.cloudfront.inputs.DistributionDefaultCacheBehaviorArgs =
        com.pulumi.aws.cloudfront.inputs.DistributionDefaultCacheBehaviorArgs.builder()
            .allowedMethods(allowedMethods.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .cachePolicyId(cachePolicyId?.applyValue({ args0 -> args0 }))
            .cachedMethods(cachedMethods.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .compress(compress?.applyValue({ args0 -> args0 }))
            .defaultTtl(defaultTtl?.applyValue({ args0 -> args0 }))
            .fieldLevelEncryptionId(fieldLevelEncryptionId?.applyValue({ args0 -> args0 }))
            .forwardedValues(forwardedValues?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .functionAssociations(
                functionAssociations?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .lambdaFunctionAssociations(
                lambdaFunctionAssociations?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .maxTtl(maxTtl?.applyValue({ args0 -> args0 }))
            .minTtl(minTtl?.applyValue({ args0 -> args0 }))
            .originRequestPolicyId(originRequestPolicyId?.applyValue({ args0 -> args0 }))
            .realtimeLogConfigArn(realtimeLogConfigArn?.applyValue({ args0 -> args0 }))
            .responseHeadersPolicyId(responseHeadersPolicyId?.applyValue({ args0 -> args0 }))
            .smoothStreaming(smoothStreaming?.applyValue({ args0 -> args0 }))
            .targetOriginId(targetOriginId.applyValue({ args0 -> args0 }))
            .trustedKeyGroups(trustedKeyGroups?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .trustedSigners(trustedSigners?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .viewerProtocolPolicy(viewerProtocolPolicy.applyValue({ args0 -> args0 })).build()
}

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

    private var cachePolicyId: Output? = null

    private var cachedMethods: Output>? = null

    private var compress: Output? = null

    private var defaultTtl: Output? = null

    private var fieldLevelEncryptionId: Output? = null

    private var forwardedValues: Output? = null

    private var functionAssociations:
        Output>? = null

    private var lambdaFunctionAssociations:
        Output>? = null

    private var maxTtl: Output? = null

    private var minTtl: Output? = null

    private var originRequestPolicyId: Output? = null

    private var realtimeLogConfigArn: Output? = null

    private var responseHeadersPolicyId: Output? = null

    private var smoothStreaming: Output? = null

    private var targetOriginId: Output? = null

    private var trustedKeyGroups: Output>? = null

    private var trustedSigners: Output>? = null

    private var viewerProtocolPolicy: Output? = null

    /**
     * @param value Controls which HTTP methods CloudFront processes and forwards to your Amazon S3 bucket or your custom origin.
     */
    @JvmName("gnifuogqibwmoncn")
    public suspend fun allowedMethods(`value`: Output>) {
        this.allowedMethods = value
    }

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

    /**
     * @param values Controls which HTTP methods CloudFront processes and forwards to your Amazon S3 bucket or your custom origin.
     */
    @JvmName("okayblgiallybcgt")
    public suspend fun allowedMethods(values: List>) {
        this.allowedMethods = Output.all(values)
    }

    /**
     * @param value Unique identifier of the cache policy that is attached to the cache behavior. If configuring the `default_cache_behavior` either `cache_policy_id` or `forwarded_values` must be set.
     */
    @JvmName("ecbqmhwhdrmjupik")
    public suspend fun cachePolicyId(`value`: Output) {
        this.cachePolicyId = value
    }

    /**
     * @param value Controls whether CloudFront caches the response to requests using the specified HTTP methods.
     */
    @JvmName("uwpkfmoukeleuibu")
    public suspend fun cachedMethods(`value`: Output>) {
        this.cachedMethods = value
    }

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

    /**
     * @param values Controls whether CloudFront caches the response to requests using the specified HTTP methods.
     */
    @JvmName("cuaylcvcsflrphyg")
    public suspend fun cachedMethods(values: List>) {
        this.cachedMethods = Output.all(values)
    }

    /**
     * @param value Whether you want CloudFront to automatically compress content for web requests that include `Accept-Encoding: gzip` in the request header (default: `false`).
     */
    @JvmName("bdbxqwtdcepqcxxr")
    public suspend fun compress(`value`: Output) {
        this.compress = value
    }

    /**
     * @param value Default amount of time (in seconds) that an object is in a CloudFront cache before CloudFront forwards another request in the absence of an `Cache-Control max-age` or `Expires` header.
     */
    @JvmName("bahuwrcsewcbcynb")
    public suspend fun defaultTtl(`value`: Output) {
        this.defaultTtl = value
    }

    /**
     * @param value Field level encryption configuration ID.
     */
    @JvmName("jpncmkjwyitpiipx")
    public suspend fun fieldLevelEncryptionId(`value`: Output) {
        this.fieldLevelEncryptionId = value
    }

    /**
     * @param value The forwarded values configuration that specifies how CloudFront handles query strings, cookies and headers (maximum one).
     */
    @JvmName("giqevggmvhmqlvbj")
    public suspend fun forwardedValues(`value`: Output) {
        this.forwardedValues = value
    }

    /**
     * @param value A config block that triggers a cloudfront function with specific actions (maximum 2).
     */
    @JvmName("xunwpqmjphciucqv")
    public suspend fun functionAssociations(`value`: Output>) {
        this.functionAssociations = value
    }

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

    /**
     * @param values A config block that triggers a cloudfront function with specific actions (maximum 2).
     */
    @JvmName("wrenwjtbhkhahmcq")
    public suspend fun functionAssociations(values: List>) {
        this.functionAssociations = Output.all(values)
    }

    /**
     * @param value A config block that triggers a lambda function with specific actions (maximum 4).
     */
    @JvmName("kincrsapobuevnwu")
    public suspend fun lambdaFunctionAssociations(`value`: Output>) {
        this.lambdaFunctionAssociations = value
    }

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

    /**
     * @param values A config block that triggers a lambda function with specific actions (maximum 4).
     */
    @JvmName("phkrybfvvxgewgoj")
    public suspend fun lambdaFunctionAssociations(values: List>) {
        this.lambdaFunctionAssociations = Output.all(values)
    }

    /**
     * @param value Maximum amount of time (in seconds) that an object is in a CloudFront cache before CloudFront forwards another request to your origin to determine whether the object has been updated. Only effective in the presence of `Cache-Control max-age`, `Cache-Control s-maxage`, and `Expires` headers.
     */
    @JvmName("laxebsaygfongkjh")
    public suspend fun maxTtl(`value`: Output) {
        this.maxTtl = value
    }

    /**
     * @param value Minimum amount of time that you want objects to stay in CloudFront caches before CloudFront queries your origin to see whether the object has been updated. Defaults to 0 seconds.
     */
    @JvmName("hqtheqvqtwtgwgcj")
    public suspend fun minTtl(`value`: Output) {
        this.minTtl = value
    }

    /**
     * @param value Unique identifier of the origin request policy that is attached to the behavior.
     */
    @JvmName("pvaaivabydbcnofu")
    public suspend fun originRequestPolicyId(`value`: Output) {
        this.originRequestPolicyId = value
    }

    /**
     * @param value ARN of the real-time log configuration that is attached to this cache behavior.
     */
    @JvmName("jxbxbiaqjqlgeopm")
    public suspend fun realtimeLogConfigArn(`value`: Output) {
        this.realtimeLogConfigArn = value
    }

    /**
     * @param value Identifier for a response headers policy.
     */
    @JvmName("iuhgmgfyrpwrdxpp")
    public suspend fun responseHeadersPolicyId(`value`: Output) {
        this.responseHeadersPolicyId = value
    }

    /**
     * @param value Indicates whether you want to distribute media files in Microsoft Smooth Streaming format using the origin that is associated with this cache behavior.
     */
    @JvmName("dliahnlottyrlque")
    public suspend fun smoothStreaming(`value`: Output) {
        this.smoothStreaming = value
    }

    /**
     * @param value Value of ID for the origin that you want CloudFront to route requests to when a request matches the path pattern either for a cache behavior or for the default cache behavior.
     */
    @JvmName("prvxjtdaufhxmbmj")
    public suspend fun targetOriginId(`value`: Output) {
        this.targetOriginId = value
    }

    /**
     * @param value List of nested attributes for active trusted key groups, if the distribution is set up to serve private content with signed URLs.
     */
    @JvmName("eloadmloevjcvvrs")
    public suspend fun trustedKeyGroups(`value`: Output>) {
        this.trustedKeyGroups = value
    }

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

    /**
     * @param values List of nested attributes for active trusted key groups, if the distribution is set up to serve private content with signed URLs.
     */
    @JvmName("hxlosvtaorufrkno")
    public suspend fun trustedKeyGroups(values: List>) {
        this.trustedKeyGroups = Output.all(values)
    }

    /**
     * @param value List of nested attributes for active trusted signers, if the distribution is set up to serve private content with signed URLs.
     */
    @JvmName("swmpnaccgjgvxdjp")
    public suspend fun trustedSigners(`value`: Output>) {
        this.trustedSigners = value
    }

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

    /**
     * @param values List of nested attributes for active trusted signers, if the distribution is set up to serve private content with signed URLs.
     */
    @JvmName("rcvvhtqkajagdtmq")
    public suspend fun trustedSigners(values: List>) {
        this.trustedSigners = Output.all(values)
    }

    /**
     * @param value Use this element to specify the protocol that users can use to access the files in the origin specified by TargetOriginId when a request matches the path pattern in PathPattern. One of `allow-all`, `https-only`, or `redirect-to-https`.
     */
    @JvmName("naxauijwknautelb")
    public suspend fun viewerProtocolPolicy(`value`: Output) {
        this.viewerProtocolPolicy = value
    }

    /**
     * @param value Controls which HTTP methods CloudFront processes and forwards to your Amazon S3 bucket or your custom origin.
     */
    @JvmName("trmcdpbxxfmkwvjw")
    public suspend fun allowedMethods(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.allowedMethods = mapped
    }

    /**
     * @param values Controls which HTTP methods CloudFront processes and forwards to your Amazon S3 bucket or your custom origin.
     */
    @JvmName("foauiryaniufbktn")
    public suspend fun allowedMethods(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.allowedMethods = mapped
    }

    /**
     * @param value Unique identifier of the cache policy that is attached to the cache behavior. If configuring the `default_cache_behavior` either `cache_policy_id` or `forwarded_values` must be set.
     */
    @JvmName("xojkgjghaolqyxmj")
    public suspend fun cachePolicyId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cachePolicyId = mapped
    }

    /**
     * @param value Controls whether CloudFront caches the response to requests using the specified HTTP methods.
     */
    @JvmName("tpekpvruamyidtnw")
    public suspend fun cachedMethods(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.cachedMethods = mapped
    }

    /**
     * @param values Controls whether CloudFront caches the response to requests using the specified HTTP methods.
     */
    @JvmName("xixqsrjsgyyhhwrp")
    public suspend fun cachedMethods(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.cachedMethods = mapped
    }

    /**
     * @param value Whether you want CloudFront to automatically compress content for web requests that include `Accept-Encoding: gzip` in the request header (default: `false`).
     */
    @JvmName("tuyyfsnxpwsakpmw")
    public suspend fun compress(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.compress = mapped
    }

    /**
     * @param value Default amount of time (in seconds) that an object is in a CloudFront cache before CloudFront forwards another request in the absence of an `Cache-Control max-age` or `Expires` header.
     */
    @JvmName("ynottuxmwnsmyoki")
    public suspend fun defaultTtl(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.defaultTtl = mapped
    }

    /**
     * @param value Field level encryption configuration ID.
     */
    @JvmName("xphlfdunhyyxcxwt")
    public suspend fun fieldLevelEncryptionId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.fieldLevelEncryptionId = mapped
    }

    /**
     * @param value The forwarded values configuration that specifies how CloudFront handles query strings, cookies and headers (maximum one).
     */
    @JvmName("nmyysjdjogixbnwp")
    public suspend fun forwardedValues(`value`: DistributionDefaultCacheBehaviorForwardedValuesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.forwardedValues = mapped
    }

    /**
     * @param argument The forwarded values configuration that specifies how CloudFront handles query strings, cookies and headers (maximum one).
     */
    @JvmName("uexgeicxecdqlewd")
    public suspend fun forwardedValues(argument: suspend DistributionDefaultCacheBehaviorForwardedValuesArgsBuilder.() -> Unit) {
        val toBeMapped = DistributionDefaultCacheBehaviorForwardedValuesArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.forwardedValues = mapped
    }

    /**
     * @param value A config block that triggers a cloudfront function with specific actions (maximum 2).
     */
    @JvmName("grjxfafsjbonypmb")
    public suspend fun functionAssociations(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.functionAssociations = mapped
    }

    /**
     * @param argument A config block that triggers a cloudfront function with specific actions (maximum 2).
     */
    @JvmName("ekwlguhlkpyqbwhh")
    public suspend fun functionAssociations(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            DistributionDefaultCacheBehaviorFunctionAssociationArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.functionAssociations = mapped
    }

    /**
     * @param argument A config block that triggers a cloudfront function with specific actions (maximum 2).
     */
    @JvmName("buisvbndekdtdkjm")
    public suspend fun functionAssociations(vararg argument: suspend DistributionDefaultCacheBehaviorFunctionAssociationArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            DistributionDefaultCacheBehaviorFunctionAssociationArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.functionAssociations = mapped
    }

    /**
     * @param argument A config block that triggers a cloudfront function with specific actions (maximum 2).
     */
    @JvmName("dcndyepnrwrqhmum")
    public suspend fun functionAssociations(argument: suspend DistributionDefaultCacheBehaviorFunctionAssociationArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                DistributionDefaultCacheBehaviorFunctionAssociationArgsBuilder().applySuspend {
                    argument()
                }.build(),
            )
        val mapped = of(toBeMapped)
        this.functionAssociations = mapped
    }

    /**
     * @param values A config block that triggers a cloudfront function with specific actions (maximum 2).
     */
    @JvmName("qqlgkuxmqrngioyk")
    public suspend fun functionAssociations(vararg values: DistributionDefaultCacheBehaviorFunctionAssociationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.functionAssociations = mapped
    }

    /**
     * @param value A config block that triggers a lambda function with specific actions (maximum 4).
     */
    @JvmName("thvddevxqyrgoujd")
    public suspend fun lambdaFunctionAssociations(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.lambdaFunctionAssociations = mapped
    }

    /**
     * @param argument A config block that triggers a lambda function with specific actions (maximum 4).
     */
    @JvmName("uisuqeuattvrchqs")
    public suspend fun lambdaFunctionAssociations(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            DistributionDefaultCacheBehaviorLambdaFunctionAssociationArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.lambdaFunctionAssociations = mapped
    }

    /**
     * @param argument A config block that triggers a lambda function with specific actions (maximum 4).
     */
    @JvmName("ftosoebxmcutfcff")
    public suspend fun lambdaFunctionAssociations(vararg argument: suspend DistributionDefaultCacheBehaviorLambdaFunctionAssociationArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            DistributionDefaultCacheBehaviorLambdaFunctionAssociationArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.lambdaFunctionAssociations = mapped
    }

    /**
     * @param argument A config block that triggers a lambda function with specific actions (maximum 4).
     */
    @JvmName("vptncqndgudbwntg")
    public suspend fun lambdaFunctionAssociations(argument: suspend DistributionDefaultCacheBehaviorLambdaFunctionAssociationArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                DistributionDefaultCacheBehaviorLambdaFunctionAssociationArgsBuilder().applySuspend {
                    argument()
                }.build(),
            )
        val mapped = of(toBeMapped)
        this.lambdaFunctionAssociations = mapped
    }

    /**
     * @param values A config block that triggers a lambda function with specific actions (maximum 4).
     */
    @JvmName("nxiwcpetkqotqlyp")
    public suspend fun lambdaFunctionAssociations(vararg values: DistributionDefaultCacheBehaviorLambdaFunctionAssociationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.lambdaFunctionAssociations = mapped
    }

    /**
     * @param value Maximum amount of time (in seconds) that an object is in a CloudFront cache before CloudFront forwards another request to your origin to determine whether the object has been updated. Only effective in the presence of `Cache-Control max-age`, `Cache-Control s-maxage`, and `Expires` headers.
     */
    @JvmName("gbrtjixilnkbvnjx")
    public suspend fun maxTtl(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxTtl = mapped
    }

    /**
     * @param value Minimum amount of time that you want objects to stay in CloudFront caches before CloudFront queries your origin to see whether the object has been updated. Defaults to 0 seconds.
     */
    @JvmName("aiycljbotdaetujf")
    public suspend fun minTtl(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.minTtl = mapped
    }

    /**
     * @param value Unique identifier of the origin request policy that is attached to the behavior.
     */
    @JvmName("huqlxrvxmtmjqkfw")
    public suspend fun originRequestPolicyId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.originRequestPolicyId = mapped
    }

    /**
     * @param value ARN of the real-time log configuration that is attached to this cache behavior.
     */
    @JvmName("riycurkaomjhahpa")
    public suspend fun realtimeLogConfigArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.realtimeLogConfigArn = mapped
    }

    /**
     * @param value Identifier for a response headers policy.
     */
    @JvmName("kvcddqphnoxcncnw")
    public suspend fun responseHeadersPolicyId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.responseHeadersPolicyId = mapped
    }

    /**
     * @param value Indicates whether you want to distribute media files in Microsoft Smooth Streaming format using the origin that is associated with this cache behavior.
     */
    @JvmName("etejgjpshewjvwvk")
    public suspend fun smoothStreaming(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.smoothStreaming = mapped
    }

    /**
     * @param value Value of ID for the origin that you want CloudFront to route requests to when a request matches the path pattern either for a cache behavior or for the default cache behavior.
     */
    @JvmName("hurpyuspenxpabie")
    public suspend fun targetOriginId(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.targetOriginId = mapped
    }

    /**
     * @param value List of nested attributes for active trusted key groups, if the distribution is set up to serve private content with signed URLs.
     */
    @JvmName("qkxadcwtmyaykpem")
    public suspend fun trustedKeyGroups(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.trustedKeyGroups = mapped
    }

    /**
     * @param values List of nested attributes for active trusted key groups, if the distribution is set up to serve private content with signed URLs.
     */
    @JvmName("newwnapgjdycftfg")
    public suspend fun trustedKeyGroups(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.trustedKeyGroups = mapped
    }

    /**
     * @param value List of nested attributes for active trusted signers, if the distribution is set up to serve private content with signed URLs.
     */
    @JvmName("kikucnjqhlhjjoke")
    public suspend fun trustedSigners(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.trustedSigners = mapped
    }

    /**
     * @param values List of nested attributes for active trusted signers, if the distribution is set up to serve private content with signed URLs.
     */
    @JvmName("dbqycjylsvpnghjj")
    public suspend fun trustedSigners(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.trustedSigners = mapped
    }

    /**
     * @param value Use this element to specify the protocol that users can use to access the files in the origin specified by TargetOriginId when a request matches the path pattern in PathPattern. One of `allow-all`, `https-only`, or `redirect-to-https`.
     */
    @JvmName("ihphskbxlfhdytlt")
    public suspend fun viewerProtocolPolicy(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.viewerProtocolPolicy = mapped
    }

    internal fun build(): DistributionDefaultCacheBehaviorArgs = DistributionDefaultCacheBehaviorArgs(
        allowedMethods = allowedMethods ?: throw PulumiNullFieldException("allowedMethods"),
        cachePolicyId = cachePolicyId,
        cachedMethods = cachedMethods ?: throw PulumiNullFieldException("cachedMethods"),
        compress = compress,
        defaultTtl = defaultTtl,
        fieldLevelEncryptionId = fieldLevelEncryptionId,
        forwardedValues = forwardedValues,
        functionAssociations = functionAssociations,
        lambdaFunctionAssociations = lambdaFunctionAssociations,
        maxTtl = maxTtl,
        minTtl = minTtl,
        originRequestPolicyId = originRequestPolicyId,
        realtimeLogConfigArn = realtimeLogConfigArn,
        responseHeadersPolicyId = responseHeadersPolicyId,
        smoothStreaming = smoothStreaming,
        targetOriginId = targetOriginId ?: throw PulumiNullFieldException("targetOriginId"),
        trustedKeyGroups = trustedKeyGroups,
        trustedSigners = trustedSigners,
        viewerProtocolPolicy = viewerProtocolPolicy ?: throw
            PulumiNullFieldException("viewerProtocolPolicy"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy