com.pulumi.kubernetes.autoscaling.v2beta1.kotlin.outputs.ExternalMetricSource.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-kubernetes-kotlin Show documentation
Show all versions of pulumi-kubernetes-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.
The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.kubernetes.autoscaling.v2beta1.kotlin.outputs
import com.pulumi.kubernetes.meta.v1.kotlin.outputs.LabelSelector
import kotlin.String
import kotlin.Suppress
/**
* ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster). Exactly one "target" type should be set.
* @property metricName metricName is the name of the metric in question.
* @property metricSelector metricSelector is used to identify a specific time series within a given metric.
* @property targetAverageValue targetAverageValue is the target per-pod value of global metric (as a quantity). Mutually exclusive with TargetValue.
* @property targetValue targetValue is the target value of the metric (as a quantity). Mutually exclusive with TargetAverageValue.
*/
public data class ExternalMetricSource(
public val metricName: String,
public val metricSelector: LabelSelector? = null,
public val targetAverageValue: String? = null,
public val targetValue: String? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.kubernetes.autoscaling.v2beta1.outputs.ExternalMetricSource): ExternalMetricSource = ExternalMetricSource(
metricName = javaType.metricName(),
metricSelector = javaType.metricSelector().map({ args0 ->
args0.let({ args0 ->
com.pulumi.kubernetes.meta.v1.kotlin.outputs.LabelSelector.Companion.toKotlin(args0)
})
}).orElse(null),
targetAverageValue = javaType.targetAverageValue().map({ args0 -> args0 }).orElse(null),
targetValue = javaType.targetValue().map({ args0 -> args0 }).orElse(null),
)
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy