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

com.pulumi.awsnative.cloudfront.kotlin.outputs.ResponseHeadersPolicyServerTimingHeadersConfig.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.outputs

import kotlin.Boolean
import kotlin.Double
import kotlin.Suppress

/**
 *
 * @property enabled A Boolean that determines whether CloudFront adds the `Server-Timing` header to HTTP responses that it sends in response to requests that match a cache behavior that's associated with this response headers policy.
 * @property samplingRate A number 0–100 (inclusive) that specifies the percentage of responses that you want CloudFront to add the `Server-Timing` header to. When you set the sampling rate to 100, CloudFront adds the `Server-Timing` header to the HTTP response for every request that matches the cache behavior that this response headers policy is attached to. When you set it to 50, CloudFront adds the header to 50% of the responses for requests that match the cache behavior. You can set the sampling rate to any number 0–100 with up to four decimal places.
 */
public data class ResponseHeadersPolicyServerTimingHeadersConfig(
    public val enabled: Boolean,
    public val samplingRate: Double? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.awsnative.cloudfront.outputs.ResponseHeadersPolicyServerTimingHeadersConfig): ResponseHeadersPolicyServerTimingHeadersConfig =
            ResponseHeadersPolicyServerTimingHeadersConfig(
                enabled = javaType.enabled(),
                samplingRate = javaType.samplingRate().map({ args0 -> args0 }).orElse(null),
            )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy