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

com.pulumi.gcp.compute.kotlin.outputs.InstanceFromTemplateScheduling.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: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.compute.kotlin.outputs

import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List

/**
 *
 * @property automaticRestart Specifies if the instance should be restarted if it was terminated by Compute Engine (not a user).
 * @property instanceTerminationAction Specifies the action GCE should take when SPOT VM is preempted.
 * @property localSsdRecoveryTimeout Specifies the maximum amount of time a Local Ssd Vm should wait while
 *   recovery of the Local Ssd state is attempted. Its value should be in
 *   between 0 and 168 hours with hour granularity and the default value being 1
 *   hour.
 * @property maintenanceInterval Specifies the frequency of planned maintenance events. The accepted values are: PERIODIC
 * @property maxRunDuration The timeout for new network connections to hosts.
 * @property minNodeCpus
 * @property nodeAffinities Specifies node affinities or anti-affinities to determine which sole-tenant nodes your instances and managed instance groups will use as host systems.
 * @property onHostMaintenance Describes maintenance behavior for the instance. One of MIGRATE or TERMINATE,
 * @property preemptible Whether the instance is preemptible.
 * @property provisioningModel Whether the instance is spot. If this is set as SPOT.
 */
public data class InstanceFromTemplateScheduling(
    public val automaticRestart: Boolean? = null,
    public val instanceTerminationAction: String? = null,
    public val localSsdRecoveryTimeout: InstanceFromTemplateSchedulingLocalSsdRecoveryTimeout? = null,
    public val maintenanceInterval: String? = null,
    public val maxRunDuration: InstanceFromTemplateSchedulingMaxRunDuration? = null,
    public val minNodeCpus: Int? = null,
    public val nodeAffinities: List? = null,
    public val onHostMaintenance: String? = null,
    public val preemptible: Boolean? = null,
    public val provisioningModel: String? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.gcp.compute.outputs.InstanceFromTemplateScheduling): InstanceFromTemplateScheduling = InstanceFromTemplateScheduling(
            automaticRestart = javaType.automaticRestart().map({ args0 -> args0 }).orElse(null),
            instanceTerminationAction = javaType.instanceTerminationAction().map({ args0 ->
                args0
            }).orElse(null),
            localSsdRecoveryTimeout = javaType.localSsdRecoveryTimeout().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.compute.kotlin.outputs.InstanceFromTemplateSchedulingLocalSsdRecoveryTimeout.Companion.toKotlin(args0)
                })
            }).orElse(null),
            maintenanceInterval = javaType.maintenanceInterval().map({ args0 -> args0 }).orElse(null),
            maxRunDuration = javaType.maxRunDuration().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.compute.kotlin.outputs.InstanceFromTemplateSchedulingMaxRunDuration.Companion.toKotlin(args0)
                })
            }).orElse(null),
            minNodeCpus = javaType.minNodeCpus().map({ args0 -> args0 }).orElse(null),
            nodeAffinities = javaType.nodeAffinities().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.compute.kotlin.outputs.InstanceFromTemplateSchedulingNodeAffinity.Companion.toKotlin(args0)
                })
            }),
            onHostMaintenance = javaType.onHostMaintenance().map({ args0 -> args0 }).orElse(null),
            preemptible = javaType.preemptible().map({ args0 -> args0 }).orElse(null),
            provisioningModel = javaType.provisioningModel().map({ args0 -> args0 }).orElse(null),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy