commonMain.aws.sdk.kotlin.services.applicationsignals.model.BurnRateConfiguration.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of applicationsignals-jvm Show documentation
Show all versions of applicationsignals-jvm Show documentation
The AWS SDK for Kotlin client for Application Signals
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.applicationsignals.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* This object defines the length of the look-back window used to calculate one burn rate metric for this SLO. The burn rate measures how fast the service is consuming the error budget, relative to the attainment goal of the SLO. A burn rate of exactly 1 indicates that the SLO goal will be met exactly.
*
* For example, if you specify 60 as the number of minutes in the look-back window, the burn rate is calculated as the following:
*
* *burn rate = error rate over the look-back window / (1 - attainment goal percentage)*
*
* For more information about burn rates, see [Calculate burn rates](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-ServiceLevelObjectives.html#CloudWatch-ServiceLevelObjectives-burn).
*/
public class BurnRateConfiguration private constructor(builder: Builder) {
/**
* The number of minutes to use as the look-back window.
*/
public val lookBackWindowMinutes: kotlin.Int = requireNotNull(builder.lookBackWindowMinutes) { "A non-null value must be provided for lookBackWindowMinutes" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.applicationsignals.model.BurnRateConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("BurnRateConfiguration(")
append("lookBackWindowMinutes=$lookBackWindowMinutes")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = lookBackWindowMinutes
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (other == null || this::class != other::class) return false
other as BurnRateConfiguration
if (lookBackWindowMinutes != other.lookBackWindowMinutes) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.applicationsignals.model.BurnRateConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The number of minutes to use as the look-back window.
*/
public var lookBackWindowMinutes: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.applicationsignals.model.BurnRateConfiguration) : this() {
this.lookBackWindowMinutes = x.lookBackWindowMinutes
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.applicationsignals.model.BurnRateConfiguration = BurnRateConfiguration(this)
internal fun correctErrors(): Builder {
if (lookBackWindowMinutes == null) lookBackWindowMinutes = 0
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy