com.pulumi.gcp.cloudrunv2.kotlin.outputs.ServiceTemplateContainerResources.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-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.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.cloudrunv2.kotlin.outputs
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
/**
*
* @property cpuIdle Determines whether CPU is only allocated during requests. True by default if the parent `resources` field is not set. However, if
* `resources` is set, this field must be explicitly set to true to preserve the default behavior.
* @property limits Only memory and CPU are supported. Use key `cpu` for CPU limit and `memory` for memory limit. Note: The only supported values for CPU are '1', '2', '4', and '8'. Setting 4 CPU requires at least 2Gi of memory. The values of the map is string form of the 'quantity' k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go
* @property startupCpuBoost Determines whether CPU should be boosted on startup of a new container instance above the requested CPU threshold, this can help reduce cold-start latency.
*/
public data class ServiceTemplateContainerResources(
public val cpuIdle: Boolean? = null,
public val limits: Map? = null,
public val startupCpuBoost: Boolean? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.gcp.cloudrunv2.outputs.ServiceTemplateContainerResources): ServiceTemplateContainerResources = ServiceTemplateContainerResources(
cpuIdle = javaType.cpuIdle().map({ args0 -> args0 }).orElse(null),
limits = javaType.limits().map({ args0 -> args0.key.to(args0.value) }).toMap(),
startupCpuBoost = javaType.startupCpuBoost().map({ args0 -> args0 }).orElse(null),
)
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy