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

com.pulumi.azure.compute.outputs.OrchestratedVirtualMachineScaleSetAutomaticInstanceRepair 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.outputs;

import com.pulumi.core.annotations.CustomType;
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;

@CustomType
public final class OrchestratedVirtualMachineScaleSetAutomaticInstanceRepair {
    /**
     * @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.
     * 
     */
    private @Nullable String action;
    /**
     * @return Should the automatic instance repair be enabled on this Virtual Machine Scale Set? Possible values are `true` and `false`.
     * 
     */
    private Boolean enabled;
    /**
     * @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.
     * 
     */
    private @Nullable String gracePeriod;

    private OrchestratedVirtualMachineScaleSetAutomaticInstanceRepair() {}
    /**
     * @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);
    }
    /**
     * @return Should the automatic instance repair be enabled on this Virtual Machine Scale Set? Possible values are `true` and `false`.
     * 
     */
    public Boolean enabled() {
        return this.enabled;
    }
    /**
     * @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);
    }

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

    public static Builder builder(OrchestratedVirtualMachineScaleSetAutomaticInstanceRepair defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String action;
        private Boolean enabled;
        private @Nullable String gracePeriod;
        public Builder() {}
        public Builder(OrchestratedVirtualMachineScaleSetAutomaticInstanceRepair defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.action = defaults.action;
    	      this.enabled = defaults.enabled;
    	      this.gracePeriod = defaults.gracePeriod;
        }

        @CustomType.Setter
        public Builder action(@Nullable String action) {

            this.action = action;
            return this;
        }
        @CustomType.Setter
        public Builder enabled(Boolean enabled) {
            if (enabled == null) {
              throw new MissingRequiredPropertyException("OrchestratedVirtualMachineScaleSetAutomaticInstanceRepair", "enabled");
            }
            this.enabled = enabled;
            return this;
        }
        @CustomType.Setter
        public Builder gracePeriod(@Nullable String gracePeriod) {

            this.gracePeriod = gracePeriod;
            return this;
        }
        public OrchestratedVirtualMachineScaleSetAutomaticInstanceRepair build() {
            final var _resultValue = new OrchestratedVirtualMachineScaleSetAutomaticInstanceRepair();
            _resultValue.action = action;
            _resultValue.enabled = enabled;
            _resultValue.gracePeriod = gracePeriod;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy