com.pulumi.gcp.compute.kotlin.inputs.RegionBackendServiceCdnPolicyArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
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.compute.kotlin.inputs
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.compute.inputs.RegionBackendServiceCdnPolicyArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
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 cacheKeyPolicy The CacheKeyPolicy for this CdnPolicy.
* Structure is documented below.
* @property cacheMode Specifies the cache setting for all responses from this backend.
* The possible values are: USE_ORIGIN_HEADERS, FORCE_CACHE_ALL and CACHE_ALL_STATIC
* Possible values are: `USE_ORIGIN_HEADERS`, `FORCE_CACHE_ALL`, `CACHE_ALL_STATIC`.
* @property clientTtl Specifies the maximum allowed TTL for cached content served by this origin.
* @property defaultTtl Specifies the default TTL for cached content served by this origin for responses
* that do not have an existing valid TTL (max-age or s-max-age).
* @property maxTtl Specifies the maximum allowed TTL for cached content served by this origin.
* @property negativeCaching Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects.
* @property negativeCachingPolicies Sets a cache TTL for the specified HTTP status code. negativeCaching must be enabled to configure negativeCachingPolicy.
* Omitting the policy and leaving negativeCaching enabled will use Cloud CDN's default cache TTLs.
* Structure is documented below.
* @property serveWhileStale Serve existing content from the cache (if available) when revalidating content with the origin, or when an error is encountered when refreshing the cache.
* @property signedUrlCacheMaxAgeSec Maximum number of seconds the response to a signed URL request
* will be considered fresh, defaults to 1hr (3600s). After this
* time period, the response will be revalidated before
* being served.
* When serving responses to signed URL requests, Cloud CDN will
* internally behave as though all responses from this backend had a
* "Cache-Control: public, max-age=[TTL]" header, regardless of any
* existing Cache-Control header. The actual headers served in
* responses will not be altered.
*/
public data class RegionBackendServiceCdnPolicyArgs(
public val cacheKeyPolicy: Output? = null,
public val cacheMode: Output? = null,
public val clientTtl: Output? = null,
public val defaultTtl: Output? = null,
public val maxTtl: Output? = null,
public val negativeCaching: Output? = null,
public val negativeCachingPolicies: Output>? = null,
public val serveWhileStale: Output? = null,
public val signedUrlCacheMaxAgeSec: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.compute.inputs.RegionBackendServiceCdnPolicyArgs =
com.pulumi.gcp.compute.inputs.RegionBackendServiceCdnPolicyArgs.builder()
.cacheKeyPolicy(cacheKeyPolicy?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.cacheMode(cacheMode?.applyValue({ args0 -> args0 }))
.clientTtl(clientTtl?.applyValue({ args0 -> args0 }))
.defaultTtl(defaultTtl?.applyValue({ args0 -> args0 }))
.maxTtl(maxTtl?.applyValue({ args0 -> args0 }))
.negativeCaching(negativeCaching?.applyValue({ args0 -> args0 }))
.negativeCachingPolicies(
negativeCachingPolicies?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.serveWhileStale(serveWhileStale?.applyValue({ args0 -> args0 }))
.signedUrlCacheMaxAgeSec(signedUrlCacheMaxAgeSec?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [RegionBackendServiceCdnPolicyArgs].
*/
@PulumiTagMarker
public class RegionBackendServiceCdnPolicyArgsBuilder internal constructor() {
private var cacheKeyPolicy: Output? = null
private var cacheMode: Output? = null
private var clientTtl: Output? = null
private var defaultTtl: Output? = null
private var maxTtl: Output? = null
private var negativeCaching: Output? = null
private var negativeCachingPolicies:
Output>? = null
private var serveWhileStale: Output? = null
private var signedUrlCacheMaxAgeSec: Output? = null
/**
* @param value The CacheKeyPolicy for this CdnPolicy.
* Structure is documented below.
*/
@JvmName("hkadpiivuicmhgau")
public suspend fun cacheKeyPolicy(`value`: Output) {
this.cacheKeyPolicy = value
}
/**
* @param value Specifies the cache setting for all responses from this backend.
* The possible values are: USE_ORIGIN_HEADERS, FORCE_CACHE_ALL and CACHE_ALL_STATIC
* Possible values are: `USE_ORIGIN_HEADERS`, `FORCE_CACHE_ALL`, `CACHE_ALL_STATIC`.
*/
@JvmName("ujdmreppngnbqpkn")
public suspend fun cacheMode(`value`: Output) {
this.cacheMode = value
}
/**
* @param value Specifies the maximum allowed TTL for cached content served by this origin.
*/
@JvmName("cojksjssslqbvfyy")
public suspend fun clientTtl(`value`: Output) {
this.clientTtl = value
}
/**
* @param value Specifies the default TTL for cached content served by this origin for responses
* that do not have an existing valid TTL (max-age or s-max-age).
*/
@JvmName("ibnquyfjqhovwpye")
public suspend fun defaultTtl(`value`: Output) {
this.defaultTtl = value
}
/**
* @param value Specifies the maximum allowed TTL for cached content served by this origin.
*/
@JvmName("ellmufyhypwkvnoj")
public suspend fun maxTtl(`value`: Output) {
this.maxTtl = value
}
/**
* @param value Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects.
*/
@JvmName("bpnouggahgjwhyoj")
public suspend fun negativeCaching(`value`: Output) {
this.negativeCaching = value
}
/**
* @param value Sets a cache TTL for the specified HTTP status code. negativeCaching must be enabled to configure negativeCachingPolicy.
* Omitting the policy and leaving negativeCaching enabled will use Cloud CDN's default cache TTLs.
* Structure is documented below.
*/
@JvmName("wtabsdnmluejtekl")
public suspend fun negativeCachingPolicies(`value`: Output>) {
this.negativeCachingPolicies = value
}
@JvmName("mroowmgjkejsdxjf")
public suspend fun negativeCachingPolicies(vararg values: Output) {
this.negativeCachingPolicies = Output.all(values.asList())
}
/**
* @param values Sets a cache TTL for the specified HTTP status code. negativeCaching must be enabled to configure negativeCachingPolicy.
* Omitting the policy and leaving negativeCaching enabled will use Cloud CDN's default cache TTLs.
* Structure is documented below.
*/
@JvmName("pmsgeyxxdknldfph")
public suspend fun negativeCachingPolicies(values: List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy