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

com.pulumi.azurenative.compute.inputs.AutomaticRepairsPolicyArgs Maven / Gradle / Ivy

There is a newer version: 2.78.0
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.azurenative.compute.inputs;

import com.pulumi.azurenative.compute.enums.RepairAction;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Specifies the configuration parameters for automatic repairs on the virtual machine scale set.
 * 
 */
public final class AutomaticRepairsPolicyArgs extends com.pulumi.resources.ResourceArgs {

    public static final AutomaticRepairsPolicyArgs Empty = new AutomaticRepairsPolicyArgs();

    /**
     * Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false.
     * 
     */
    @Import(name="enabled")
    private @Nullable Output enabled;

    /**
     * @return Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false.
     * 
     */
    public Optional> enabled() {
        return Optional.ofNullable(this.enabled);
    }

    /**
     * The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 10 minutes (PT10M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M).
     * 
     */
    @Import(name="gracePeriod")
    private @Nullable Output gracePeriod;

    /**
     * @return The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 10 minutes (PT10M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M).
     * 
     */
    public Optional> gracePeriod() {
        return Optional.ofNullable(this.gracePeriod);
    }

    /**
     * Type of repair action (replace, restart, reimage) that will be used for repairing unhealthy virtual machines in the scale set. Default value is replace.
     * 
     */
    @Import(name="repairAction")
    private @Nullable Output> repairAction;

    /**
     * @return Type of repair action (replace, restart, reimage) that will be used for repairing unhealthy virtual machines in the scale set. Default value is replace.
     * 
     */
    public Optional>> repairAction() {
        return Optional.ofNullable(this.repairAction);
    }

    private AutomaticRepairsPolicyArgs() {}

    private AutomaticRepairsPolicyArgs(AutomaticRepairsPolicyArgs $) {
        this.enabled = $.enabled;
        this.gracePeriod = $.gracePeriod;
        this.repairAction = $.repairAction;
    }

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

    public static final class Builder {
        private AutomaticRepairsPolicyArgs $;

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

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

        /**
         * @param enabled Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false.
         * 
         * @return builder
         * 
         */
        public Builder enabled(@Nullable Output enabled) {
            $.enabled = enabled;
            return this;
        }

        /**
         * @param enabled Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false.
         * 
         * @return builder
         * 
         */
        public Builder enabled(Boolean enabled) {
            return enabled(Output.of(enabled));
        }

        /**
         * @param gracePeriod The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 10 minutes (PT10M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M).
         * 
         * @return builder
         * 
         */
        public Builder gracePeriod(@Nullable Output gracePeriod) {
            $.gracePeriod = gracePeriod;
            return this;
        }

        /**
         * @param gracePeriod The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 10 minutes (PT10M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M).
         * 
         * @return builder
         * 
         */
        public Builder gracePeriod(String gracePeriod) {
            return gracePeriod(Output.of(gracePeriod));
        }

        /**
         * @param repairAction Type of repair action (replace, restart, reimage) that will be used for repairing unhealthy virtual machines in the scale set. Default value is replace.
         * 
         * @return builder
         * 
         */
        public Builder repairAction(@Nullable Output> repairAction) {
            $.repairAction = repairAction;
            return this;
        }

        /**
         * @param repairAction Type of repair action (replace, restart, reimage) that will be used for repairing unhealthy virtual machines in the scale set. Default value is replace.
         * 
         * @return builder
         * 
         */
        public Builder repairAction(Either repairAction) {
            return repairAction(Output.of(repairAction));
        }

        /**
         * @param repairAction Type of repair action (replace, restart, reimage) that will be used for repairing unhealthy virtual machines in the scale set. Default value is replace.
         * 
         * @return builder
         * 
         */
        public Builder repairAction(String repairAction) {
            return repairAction(Either.ofLeft(repairAction));
        }

        /**
         * @param repairAction Type of repair action (replace, restart, reimage) that will be used for repairing unhealthy virtual machines in the scale set. Default value is replace.
         * 
         * @return builder
         * 
         */
        public Builder repairAction(RepairAction repairAction) {
            return repairAction(Either.ofRight(repairAction));
        }

        public AutomaticRepairsPolicyArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy