com.pulumi.kubernetes.autoscaling.v2.kotlin.inputs.MetricIdentifierArgs.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.v2.kotlin.inputs
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import com.pulumi.kubernetes.autoscaling.v2.inputs.MetricIdentifierArgs.builder
import com.pulumi.kubernetes.meta.v1.kotlin.inputs.LabelSelectorArgs
import com.pulumi.kubernetes.meta.v1.kotlin.inputs.LabelSelectorArgsBuilder
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* MetricIdentifier defines the name and optionally selector for a metric
* @property name name is the name of the given metric
* @property selector selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.
*/
public data class MetricIdentifierArgs(
public val name: Output,
public val selector: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.kubernetes.autoscaling.v2.inputs.MetricIdentifierArgs =
com.pulumi.kubernetes.autoscaling.v2.inputs.MetricIdentifierArgs.builder()
.name(name.applyValue({ args0 -> args0 }))
.selector(selector?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}
/**
* Builder for [MetricIdentifierArgs].
*/
@PulumiTagMarker
public class MetricIdentifierArgsBuilder internal constructor() {
private var name: Output? = null
private var selector: Output? = null
/**
* @param value name is the name of the given metric
*/
@JvmName("oxsqpkdhuuyepluo")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.
*/
@JvmName("cvlqmtjmrbwobeve")
public suspend fun selector(`value`: Output) {
this.selector = value
}
/**
* @param value name is the name of the given metric
*/
@JvmName("oihafvugsdopbwor")
public suspend fun name(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.
*/
@JvmName("nnqjulnjvangrsun")
public suspend fun selector(`value`: LabelSelectorArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.selector = mapped
}
/**
* @param argument selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.
*/
@JvmName("aygwxuqhraitgfow")
public suspend fun selector(argument: suspend LabelSelectorArgsBuilder.() -> Unit) {
val toBeMapped = LabelSelectorArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.selector = mapped
}
internal fun build(): MetricIdentifierArgs = MetricIdentifierArgs(
name = name ?: throw PulumiNullFieldException("name"),
selector = selector,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy