com.pulumi.kubernetes.apiextensions.v1.kotlin.inputs.CustomResourceSubresourceScaleArgs.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.apiextensions.v1.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.kubernetes.apiextensions.v1.inputs.CustomResourceSubresourceScaleArgs.builder
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources.
* @property labelSelectorPath labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status` or `.spec`. Must be set to work with HorizontalPodAutoscaler. The field pointed by this JSON path must be a string field (not a complex selector struct) which contains a serialized label selector in string form. More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale` subresource will default to the empty string.
* @property specReplicasPath specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.spec`. If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET.
* @property statusReplicasPath statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status`. If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource will default to 0.
*/
public data class CustomResourceSubresourceScaleArgs(
public val labelSelectorPath: Output? = null,
public val specReplicasPath: Output,
public val statusReplicasPath: Output,
) :
ConvertibleToJava {
override fun toJava(): com.pulumi.kubernetes.apiextensions.v1.inputs.CustomResourceSubresourceScaleArgs =
com.pulumi.kubernetes.apiextensions.v1.inputs.CustomResourceSubresourceScaleArgs.builder()
.labelSelectorPath(labelSelectorPath?.applyValue({ args0 -> args0 }))
.specReplicasPath(specReplicasPath.applyValue({ args0 -> args0 }))
.statusReplicasPath(statusReplicasPath.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [CustomResourceSubresourceScaleArgs].
*/
@PulumiTagMarker
public class CustomResourceSubresourceScaleArgsBuilder internal constructor() {
private var labelSelectorPath: Output? = null
private var specReplicasPath: Output? = null
private var statusReplicasPath: Output? = null
/**
* @param value labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status` or `.spec`. Must be set to work with HorizontalPodAutoscaler. The field pointed by this JSON path must be a string field (not a complex selector struct) which contains a serialized label selector in string form. More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale` subresource will default to the empty string.
*/
@JvmName("popabslwlmactrxc")
public suspend fun labelSelectorPath(`value`: Output) {
this.labelSelectorPath = value
}
/**
* @param value specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.spec`. If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET.
*/
@JvmName("rfuumavdhihhutvl")
public suspend fun specReplicasPath(`value`: Output) {
this.specReplicasPath = value
}
/**
* @param value statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status`. If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource will default to 0.
*/
@JvmName("fnbequlcrmiqtngx")
public suspend fun statusReplicasPath(`value`: Output) {
this.statusReplicasPath = value
}
/**
* @param value labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status` or `.spec`. Must be set to work with HorizontalPodAutoscaler. The field pointed by this JSON path must be a string field (not a complex selector struct) which contains a serialized label selector in string form. More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale` subresource will default to the empty string.
*/
@JvmName("kpravswgdopqcuqk")
public suspend fun labelSelectorPath(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.labelSelectorPath = mapped
}
/**
* @param value specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.spec`. If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET.
*/
@JvmName("jwojturxenvoteov")
public suspend fun specReplicasPath(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.specReplicasPath = mapped
}
/**
* @param value statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status`. If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource will default to 0.
*/
@JvmName("eyygdwyjgdqsuuay")
public suspend fun statusReplicasPath(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.statusReplicasPath = mapped
}
internal fun build(): CustomResourceSubresourceScaleArgs = CustomResourceSubresourceScaleArgs(
labelSelectorPath = labelSelectorPath,
specReplicasPath = specReplicasPath ?: throw PulumiNullFieldException("specReplicasPath"),
statusReplicasPath = statusReplicasPath ?: throw PulumiNullFieldException("statusReplicasPath"),
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy