com.pulumi.kubernetes.autoscaling.v2.kotlin.outputs.MetricStatusPatch.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.outputs
import kotlin.String
import kotlin.Suppress
/**
* MetricStatus describes the last-read state of a single metric.
* @property containerResource container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the "pods" source.
* @property external external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).
* @property object object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).
* @property pods pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.
* @property resource resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the "pods" source.
* @property type type is the type of metric source. It will be one of "ContainerResource", "External", "Object", "Pods" or "Resource", each corresponds to a matching field in the object. Note: "ContainerResource" type is available on when the feature-gate HPAContainerMetrics is enabled
*/
public data class MetricStatusPatch(
public val containerResource: ContainerResourceMetricStatusPatch? = null,
public val `external`: ExternalMetricStatusPatch? = null,
public val `object`: ObjectMetricStatusPatch? = null,
public val pods: PodsMetricStatusPatch? = null,
public val resource: ResourceMetricStatusPatch? = null,
public val type: String? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.kubernetes.autoscaling.v2.outputs.MetricStatusPatch): MetricStatusPatch = MetricStatusPatch(
containerResource = javaType.containerResource().map({ args0 ->
args0.let({ args0 ->
com.pulumi.kubernetes.autoscaling.v2.kotlin.outputs.ContainerResourceMetricStatusPatch.Companion.toKotlin(args0)
})
}).orElse(null),
`external` = javaType.`external`().map({ args0 ->
args0.let({ args0 ->
com.pulumi.kubernetes.autoscaling.v2.kotlin.outputs.ExternalMetricStatusPatch.Companion.toKotlin(args0)
})
}).orElse(null),
`object` = javaType.`object`().map({ args0 ->
args0.let({ args0 ->
com.pulumi.kubernetes.autoscaling.v2.kotlin.outputs.ObjectMetricStatusPatch.Companion.toKotlin(args0)
})
}).orElse(null),
pods = javaType.pods().map({ args0 ->
args0.let({ args0 ->
com.pulumi.kubernetes.autoscaling.v2.kotlin.outputs.PodsMetricStatusPatch.Companion.toKotlin(args0)
})
}).orElse(null),
resource = javaType.resource().map({ args0 ->
args0.let({ args0 ->
com.pulumi.kubernetes.autoscaling.v2.kotlin.outputs.ResourceMetricStatusPatch.Companion.toKotlin(args0)
})
}).orElse(null),
type = javaType.type().map({ args0 -> args0 }).orElse(null),
)
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy