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

com.pulumi.azurenative.virtualmachineimages.kotlin.inputs.ImageTemplateRestartCustomizerArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.virtualmachineimages.kotlin.inputs

import com.pulumi.azurenative.virtualmachineimages.inputs.ImageTemplateRestartCustomizerArgs.builder
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 kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Reboots a VM and waits for it to come back online (Windows). Corresponds to Packer windows-restart provisioner
 * @property name Friendly Name to provide context on what this customization step does
 * @property restartCheckCommand Command to check if restart succeeded [Default: '']
 * @property restartCommand Command to execute the restart [Default: 'shutdown /r /f /t 0 /c "packer restart"']
 * @property restartTimeout Restart timeout specified as a string of magnitude and unit, e.g. '5m' (5 minutes) or '2h' (2 hours) [Default: '5m']
 * @property type The type of customization tool you want to use on the Image. For example, "Shell" can be shell customizer
 * Expected value is 'WindowsRestart'.
 */
public data class ImageTemplateRestartCustomizerArgs(
    public val name: Output? = null,
    public val restartCheckCommand: Output? = null,
    public val restartCommand: Output? = null,
    public val restartTimeout: Output? = null,
    public val type: Output,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.virtualmachineimages.inputs.ImageTemplateRestartCustomizerArgs =
        com.pulumi.azurenative.virtualmachineimages.inputs.ImageTemplateRestartCustomizerArgs.builder()
            .name(name?.applyValue({ args0 -> args0 }))
            .restartCheckCommand(restartCheckCommand?.applyValue({ args0 -> args0 }))
            .restartCommand(restartCommand?.applyValue({ args0 -> args0 }))
            .restartTimeout(restartTimeout?.applyValue({ args0 -> args0 }))
            .type(type.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ImageTemplateRestartCustomizerArgs].
 */
@PulumiTagMarker
public class ImageTemplateRestartCustomizerArgsBuilder internal constructor() {
    private var name: Output? = null

    private var restartCheckCommand: Output? = null

    private var restartCommand: Output? = null

    private var restartTimeout: Output? = null

    private var type: Output? = null

    /**
     * @param value Friendly Name to provide context on what this customization step does
     */
    @JvmName("doqfhhlrmaederbr")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Command to check if restart succeeded [Default: '']
     */
    @JvmName("apeuwejtodrinvyw")
    public suspend fun restartCheckCommand(`value`: Output) {
        this.restartCheckCommand = value
    }

    /**
     * @param value Command to execute the restart [Default: 'shutdown /r /f /t 0 /c "packer restart"']
     */
    @JvmName("dudglbstuwaoeqfg")
    public suspend fun restartCommand(`value`: Output) {
        this.restartCommand = value
    }

    /**
     * @param value Restart timeout specified as a string of magnitude and unit, e.g. '5m' (5 minutes) or '2h' (2 hours) [Default: '5m']
     */
    @JvmName("ygptlsvnxcdxudkg")
    public suspend fun restartTimeout(`value`: Output) {
        this.restartTimeout = value
    }

    /**
     * @param value The type of customization tool you want to use on the Image. For example, "Shell" can be shell customizer
     * Expected value is 'WindowsRestart'.
     */
    @JvmName("rksagvsfethxvugv")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value Friendly Name to provide context on what this customization step does
     */
    @JvmName("xuuplcbcggtdcdkc")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Command to check if restart succeeded [Default: '']
     */
    @JvmName("uebkpkilphxybaxh")
    public suspend fun restartCheckCommand(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.restartCheckCommand = mapped
    }

    /**
     * @param value Command to execute the restart [Default: 'shutdown /r /f /t 0 /c "packer restart"']
     */
    @JvmName("cncwlpdooyofefuv")
    public suspend fun restartCommand(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.restartCommand = mapped
    }

    /**
     * @param value Restart timeout specified as a string of magnitude and unit, e.g. '5m' (5 minutes) or '2h' (2 hours) [Default: '5m']
     */
    @JvmName("wmgpwdrupurcdvsg")
    public suspend fun restartTimeout(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.restartTimeout = mapped
    }

    /**
     * @param value The type of customization tool you want to use on the Image. For example, "Shell" can be shell customizer
     * Expected value is 'WindowsRestart'.
     */
    @JvmName("xhxxbdhevnuliijn")
    public suspend fun type(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): ImageTemplateRestartCustomizerArgs = ImageTemplateRestartCustomizerArgs(
        name = name,
        restartCheckCommand = restartCheckCommand,
        restartCommand = restartCommand,
        restartTimeout = restartTimeout,
        type = type ?: throw PulumiNullFieldException("type"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy