
com.pulumi.awsnative.xray.kotlin.outputs.SamplingRule.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-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.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 The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.
* > Specifying a sampling rule by name is recommended, as specifying by ARN will be deprecated in future.
* @property ruleName The name of the sampling rule. Specify a rule by either name or ARN, but not both.
* @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.
* @property version The version of the sampling rule format (1)
*/
public data class SamplingRule(
public val attributes: Map? = null,
public val fixedRate: Double,
public val host: String,
public val httpMethod: String,
public val priority: Int,
public val reservoirSize: Int,
public val resourceArn: String,
public val ruleArn: String? = null,
public val ruleName: String? = null,
public val serviceName: String,
public val serviceType: String,
public val urlPath: String,
public val version: Int? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.awsnative.xray.outputs.SamplingRule): SamplingRule =
SamplingRule(
attributes = javaType.attributes().map({ args0 -> args0.key.to(args0.value) }).toMap(),
fixedRate = javaType.fixedRate(),
host = javaType.host(),
httpMethod = javaType.httpMethod(),
priority = javaType.priority(),
reservoirSize = javaType.reservoirSize(),
resourceArn = javaType.resourceArn(),
ruleArn = javaType.ruleArn().map({ args0 -> args0 }).orElse(null),
ruleName = javaType.ruleName().map({ args0 -> args0 }).orElse(null),
serviceName = javaType.serviceName(),
serviceType = javaType.serviceType(),
urlPath = javaType.urlPath(),
version = javaType.version().map({ args0 -> args0 }).orElse(null),
)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy