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

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

Go to download

A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.

There is a newer version: 6.10.0-alpha.1731737215
Show newest version
// *** 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 WindowsVirtualMachineScaleSetAutomaticInstanceRepairArgs extends com.pulumi.resources.ResourceArgs {

    public static final WindowsVirtualMachineScaleSetAutomaticInstanceRepairArgs Empty = new WindowsVirtualMachineScaleSetAutomaticInstanceRepairArgs();

    /**
     * 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 WindowsVirtualMachineScaleSetAutomaticInstanceRepairArgs() {}

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

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

    public static final class Builder {
        private WindowsVirtualMachineScaleSetAutomaticInstanceRepairArgs $;

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

        public Builder(WindowsVirtualMachineScaleSetAutomaticInstanceRepairArgs defaults) {
            $ = new WindowsVirtualMachineScaleSetAutomaticInstanceRepairArgs(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 WindowsVirtualMachineScaleSetAutomaticInstanceRepairArgs build() {
            if ($.enabled == null) {
                throw new MissingRequiredPropertyException("WindowsVirtualMachineScaleSetAutomaticInstanceRepairArgs", "enabled");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy