All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.kubernetes.apiextensions.v1beta1.kotlin.inputs.CustomResourceSubresourceScalePatchArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 4.18.2.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.kubernetes.apiextensions.v1beta1.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kubernetes.apiextensions.v1beta1.inputs.CustomResourceSubresourceScalePatchArgs.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 CustomResourceSubresourceScalePatchArgs(
    public val labelSelectorPath: Output? = null,
    public val specReplicasPath: Output? = null,
    public val statusReplicasPath: Output? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.apiextensions.v1beta1.inputs.CustomResourceSubresourceScalePatchArgs =
        com.pulumi.kubernetes.apiextensions.v1beta1.inputs.CustomResourceSubresourceScalePatchArgs.builder()
            .labelSelectorPath(labelSelectorPath?.applyValue({ args0 -> args0 }))
            .specReplicasPath(specReplicasPath?.applyValue({ args0 -> args0 }))
            .statusReplicasPath(statusReplicasPath?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [CustomResourceSubresourceScalePatchArgs].
 */
@PulumiTagMarker
public class CustomResourceSubresourceScalePatchArgsBuilder 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("tobdwxyawyfpfxcy")
    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("mmdmridvcrbffqix")
    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("uqcxhmpkurldculu")
    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("vyprxxhqupxcgxgt")
    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("pvghxsrvoyhwytjp")
    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("msrfppcnkybertkx")
    public suspend fun statusReplicasPath(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.statusReplicasPath = mapped
    }

    internal fun build(): CustomResourceSubresourceScalePatchArgs =
        CustomResourceSubresourceScalePatchArgs(
            labelSelectorPath = labelSelectorPath,
            specReplicasPath = specReplicasPath,
            statusReplicasPath = statusReplicasPath,
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy