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

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

package com.pulumi.awsnative.cloudfront.kotlin.outputs

import kotlin.Double
import kotlin.String
import kotlin.Suppress

/**
 *
 * @property comment A comment to describe the cache policy. The comment cannot be longer than 128 characters.
 * @property defaultTtl The default amount of time, in seconds, that you want objects to stay in the CloudFront cache before CloudFront sends another request to the origin to see if the object has been updated. CloudFront uses this value as the object's time to live (TTL) only when the origin does *not* send `Cache-Control` or `Expires` headers with the object. For more information, see [Managing How Long Content Stays in an Edge Cache (Expiration)](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) in the *Amazon CloudFront Developer Guide* .
 * The default value for this field is 86400 seconds (one day). If the value of `MinTTL` is more than 86400 seconds, then the default value for this field is the same as the value of `MinTTL` .
 * @property maxTtl The maximum amount of time, in seconds, that objects stay in the CloudFront cache before CloudFront sends another request to the origin to see if the object has been updated. CloudFront uses this value only when the origin sends `Cache-Control` or `Expires` headers with the object. For more information, see [Managing How Long Content Stays in an Edge Cache (Expiration)](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) in the *Amazon CloudFront Developer Guide* .
 * The default value for this field is 31536000 seconds (one year). If the value of `MinTTL` or `DefaultTTL` is more than 31536000 seconds, then the default value for this field is the same as the value of `DefaultTTL` .
 * @property minTtl The minimum amount of time, in seconds, that you want objects to stay in the CloudFront cache before CloudFront sends another request to the origin to see if the object has been updated. For more information, see [Managing How Long Content Stays in an Edge Cache (Expiration)](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) in the *Amazon CloudFront Developer Guide* .
 * @property name A unique name to identify the cache policy.
 * @property parametersInCacheKeyAndForwardedToOrigin The HTTP headers, cookies, and URL query strings to include in the cache key. The values included in the cache key are also included in requests that CloudFront sends to the origin.
 */
public data class CachePolicyConfig(
    public val comment: String? = null,
    public val defaultTtl: Double,
    public val maxTtl: Double,
    public val minTtl: Double,
    public val name: String,
    public val parametersInCacheKeyAndForwardedToOrigin: CachePolicyParametersInCacheKeyAndForwardedToOrigin,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.awsnative.cloudfront.outputs.CachePolicyConfig): CachePolicyConfig = CachePolicyConfig(
            comment = javaType.comment().map({ args0 -> args0 }).orElse(null),
            defaultTtl = javaType.defaultTtl(),
            maxTtl = javaType.maxTtl(),
            minTtl = javaType.minTtl(),
            name = javaType.name(),
            parametersInCacheKeyAndForwardedToOrigin = javaType.parametersInCacheKeyAndForwardedToOrigin().let({ args0 ->
                com.pulumi.awsnative.cloudfront.kotlin.outputs.CachePolicyParametersInCacheKeyAndForwardedToOrigin.Companion.toKotlin(args0)
            }),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy