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

com.pulumi.awsnative.xray.kotlin.outputs.SamplingRuleUpdate.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.xray.kotlin.outputs

import kotlin.Double
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map

/**
 *
 * @property attributes Matches attributes derived from the request.
 * @property fixedRate The percentage of matching requests to instrument, after the reservoir is exhausted.
 * @property host Matches the hostname from a request URL.
 * @property httpMethod Matches the HTTP method from a request URL.
 * @property priority The priority of the sampling rule.
 * @property reservoirSize A fixed number of matching requests to instrument per second, prior to applying the fixed rate. The reservoir is not used directly by services, but applies to all services using the rule collectively.
 * @property resourceArn Matches the ARN of the AWS resource on which the service runs.
 * @property ruleArn
 * @property ruleName
 * @property serviceName Matches the name that the service uses to identify itself in segments.
 * @property serviceType Matches the origin that the service uses to identify its type in segments.
 * @property urlPath Matches the path from a request URL.
 */
public data class SamplingRuleUpdate(
    public val attributes: Map? = null,
    public val fixedRate: Double? = null,
    public val host: String? = null,
    public val httpMethod: String? = null,
    public val priority: Int? = null,
    public val reservoirSize: Int? = null,
    public val resourceArn: String? = null,
    public val ruleArn: String? = null,
    public val ruleName: String? = null,
    public val serviceName: String? = null,
    public val serviceType: String? = null,
    public val urlPath: String? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.awsnative.xray.outputs.SamplingRuleUpdate): SamplingRuleUpdate = SamplingRuleUpdate(
            attributes = javaType.attributes().map({ args0 -> args0.key.to(args0.value) }).toMap(),
            fixedRate = javaType.fixedRate().map({ args0 -> args0 }).orElse(null),
            host = javaType.host().map({ args0 -> args0 }).orElse(null),
            httpMethod = javaType.httpMethod().map({ args0 -> args0 }).orElse(null),
            priority = javaType.priority().map({ args0 -> args0 }).orElse(null),
            reservoirSize = javaType.reservoirSize().map({ args0 -> args0 }).orElse(null),
            resourceArn = javaType.resourceArn().map({ args0 -> args0 }).orElse(null),
            ruleArn = javaType.ruleArn().map({ args0 -> args0 }).orElse(null),
            ruleName = javaType.ruleName().map({ args0 -> args0 }).orElse(null),
            serviceName = javaType.serviceName().map({ args0 -> args0 }).orElse(null),
            serviceType = javaType.serviceType().map({ args0 -> args0 }).orElse(null),
            urlPath = javaType.urlPath().map({ args0 -> args0 }).orElse(null),
        )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy