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

com.pulumi.azure.compute.inputs.LinuxVirtualMachineScaleSetAutomaticInstanceRepairArgs Maven / Gradle / Ivy

// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azure.compute.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class LinuxVirtualMachineScaleSetAutomaticInstanceRepairArgs extends com.pulumi.resources.ResourceArgs {

    public static final LinuxVirtualMachineScaleSetAutomaticInstanceRepairArgs Empty = new LinuxVirtualMachineScaleSetAutomaticInstanceRepairArgs();

    /**
     * The repair action that will be used for repairing unhealthy virtual machines in the scale set. Possible values include `Replace`, `Restart`, `Reimage`.
     * 
     * > **Note:**  Once the `action` field has been set it will always return the last value it was assigned if it is removed from the configuration file.
     * 
     * > **Note:**  If you wish to update the repair `action` of an existing `automatic_instance_repair` policy, you must first `disable` the `automatic_instance_repair` policy before you can re-enable the `automatic_instance_repair` policy with the new repair `action` defined.
     * 
     */
    @Import(name="action")
    private @Nullable Output action;

    /**
     * @return The repair action that will be used for repairing unhealthy virtual machines in the scale set. Possible values include `Replace`, `Restart`, `Reimage`.
     * 
     * > **Note:**  Once the `action` field has been set it will always return the last value it was assigned if it is removed from the configuration file.
     * 
     * > **Note:**  If you wish to update the repair `action` of an existing `automatic_instance_repair` policy, you must first `disable` the `automatic_instance_repair` policy before you can re-enable the `automatic_instance_repair` policy with the new repair `action` defined.
     * 
     */
    public Optional> action() {
        return Optional.ofNullable(this.action);
    }

    /**
     * Should the automatic instance repair be enabled on this Virtual Machine Scale Set?
     * 
     */
    @Import(name="enabled", required=true)
    private Output enabled;

    /**
     * @return Should the automatic instance repair be enabled on this Virtual Machine Scale Set?
     * 
     */
    public Output enabled() {
        return this.enabled;
    }

    /**
     * Amount of time for which automatic repairs will be delayed. The grace period starts right after the VM is found unhealthy. Possible values are between `10` and `90` minutes. The time duration should be specified in `ISO 8601` format (e.g. `PT10M` to `PT90M`).
     * 
     * > **Note:**  Once the `grace_period` field has been set it will always return the last value it was assigned if it is removed from the configuration file.
     * 
     */
    @Import(name="gracePeriod")
    private @Nullable Output gracePeriod;

    /**
     * @return Amount of time for which automatic repairs will be delayed. The grace period starts right after the VM is found unhealthy. Possible values are between `10` and `90` minutes. The time duration should be specified in `ISO 8601` format (e.g. `PT10M` to `PT90M`).
     * 
     * > **Note:**  Once the `grace_period` field has been set it will always return the last value it was assigned if it is removed from the configuration file.
     * 
     */
    public Optional> gracePeriod() {
        return Optional.ofNullable(this.gracePeriod);
    }

    private LinuxVirtualMachineScaleSetAutomaticInstanceRepairArgs() {}

    private LinuxVirtualMachineScaleSetAutomaticInstanceRepairArgs(LinuxVirtualMachineScaleSetAutomaticInstanceRepairArgs $) {
        this.action = $.action;
        this.enabled = $.enabled;
        this.gracePeriod = $.gracePeriod;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(LinuxVirtualMachineScaleSetAutomaticInstanceRepairArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private LinuxVirtualMachineScaleSetAutomaticInstanceRepairArgs $;

        public Builder() {
            $ = new LinuxVirtualMachineScaleSetAutomaticInstanceRepairArgs();
        }

        public Builder(LinuxVirtualMachineScaleSetAutomaticInstanceRepairArgs defaults) {
            $ = new LinuxVirtualMachineScaleSetAutomaticInstanceRepairArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param action The repair action that will be used for repairing unhealthy virtual machines in the scale set. Possible values include `Replace`, `Restart`, `Reimage`.
         * 
         * > **Note:**  Once the `action` field has been set it will always return the last value it was assigned if it is removed from the configuration file.
         * 
         * > **Note:**  If you wish to update the repair `action` of an existing `automatic_instance_repair` policy, you must first `disable` the `automatic_instance_repair` policy before you can re-enable the `automatic_instance_repair` policy with the new repair `action` defined.
         * 
         * @return builder
         * 
         */
        public Builder action(@Nullable Output action) {
            $.action = action;
            return this;
        }

        /**
         * @param action The repair action that will be used for repairing unhealthy virtual machines in the scale set. Possible values include `Replace`, `Restart`, `Reimage`.
         * 
         * > **Note:**  Once the `action` field has been set it will always return the last value it was assigned if it is removed from the configuration file.
         * 
         * > **Note:**  If you wish to update the repair `action` of an existing `automatic_instance_repair` policy, you must first `disable` the `automatic_instance_repair` policy before you can re-enable the `automatic_instance_repair` policy with the new repair `action` defined.
         * 
         * @return builder
         * 
         */
        public Builder action(String action) {
            return action(Output.of(action));
        }

        /**
         * @param enabled Should the automatic instance repair be enabled on this Virtual Machine Scale Set?
         * 
         * @return builder
         * 
         */
        public Builder enabled(Output enabled) {
            $.enabled = enabled;
            return this;
        }

        /**
         * @param enabled Should the automatic instance repair be enabled on this Virtual Machine Scale Set?
         * 
         * @return builder
         * 
         */
        public Builder enabled(Boolean enabled) {
            return enabled(Output.of(enabled));
        }

        /**
         * @param gracePeriod Amount of time for which automatic repairs will be delayed. The grace period starts right after the VM is found unhealthy. Possible values are between `10` and `90` minutes. The time duration should be specified in `ISO 8601` format (e.g. `PT10M` to `PT90M`).
         * 
         * > **Note:**  Once the `grace_period` field has been set it will always return the last value it was assigned if it is removed from the configuration file.
         * 
         * @return builder
         * 
         */
        public Builder gracePeriod(@Nullable Output gracePeriod) {
            $.gracePeriod = gracePeriod;
            return this;
        }

        /**
         * @param gracePeriod Amount of time for which automatic repairs will be delayed. The grace period starts right after the VM is found unhealthy. Possible values are between `10` and `90` minutes. The time duration should be specified in `ISO 8601` format (e.g. `PT10M` to `PT90M`).
         * 
         * > **Note:**  Once the `grace_period` field has been set it will always return the last value it was assigned if it is removed from the configuration file.
         * 
         * @return builder
         * 
         */
        public Builder gracePeriod(String gracePeriod) {
            return gracePeriod(Output.of(gracePeriod));
        }

        public LinuxVirtualMachineScaleSetAutomaticInstanceRepairArgs build() {
            if ($.enabled == null) {
                throw new MissingRequiredPropertyException("LinuxVirtualMachineScaleSetAutomaticInstanceRepairArgs", "enabled");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy