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

com.pulumi.aws.autoscaling.outputs.GroupInstanceRefreshPreferences 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.aws.autoscaling.outputs;

import com.pulumi.aws.autoscaling.outputs.GroupInstanceRefreshPreferencesAlarmSpecification;
import com.pulumi.core.annotations.CustomType;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class GroupInstanceRefreshPreferences {
    /**
     * @return Alarm Specification for Instance Refresh.
     * 
     */
    private @Nullable GroupInstanceRefreshPreferencesAlarmSpecification alarmSpecification;
    /**
     * @return Automatically rollback if instance refresh fails. Defaults to `false`. This option may only be set to `true` when specifying a `launch_template` or `mixed_instances_policy`.
     * 
     */
    private @Nullable Boolean autoRollback;
    /**
     * @return Number of seconds to wait after a checkpoint. Defaults to `3600`.
     * 
     */
    private @Nullable String checkpointDelay;
    /**
     * @return List of percentages for each checkpoint. Values must be unique and in ascending order. To replace all instances, the final number must be `100`.
     * 
     */
    private @Nullable List checkpointPercentages;
    /**
     * @return Number of seconds until a newly launched instance is configured and ready to use. Default behavior is to use the Auto Scaling Group's health check grace period.
     * 
     */
    private @Nullable String instanceWarmup;
    /**
     * @return Amount of capacity in the Auto Scaling group that can be in service and healthy, or pending, to support your workload when an instance refresh is in place, as a percentage of the desired capacity of the Auto Scaling group. Values must be between `100` and `200`, defaults to `100`.
     * 
     */
    private @Nullable Integer maxHealthyPercentage;
    /**
     * @return Amount of capacity in the Auto Scaling group that must remain healthy during an instance refresh to allow the operation to continue, as a percentage of the desired capacity of the Auto Scaling group. Defaults to `90`.
     * 
     */
    private @Nullable Integer minHealthyPercentage;
    /**
     * @return Behavior when encountering instances protected from scale in are found. Available behaviors are `Refresh`, `Ignore`, and `Wait`. Default is `Ignore`.
     * 
     */
    private @Nullable String scaleInProtectedInstances;
    /**
     * @return Replace instances that already have your desired configuration. Defaults to `false`.
     * 
     */
    private @Nullable Boolean skipMatching;
    /**
     * @return Behavior when encountering instances in the `Standby` state in are found. Available behaviors are `Terminate`, `Ignore`, and `Wait`. Default is `Ignore`.
     * 
     */
    private @Nullable String standbyInstances;

    private GroupInstanceRefreshPreferences() {}
    /**
     * @return Alarm Specification for Instance Refresh.
     * 
     */
    public Optional alarmSpecification() {
        return Optional.ofNullable(this.alarmSpecification);
    }
    /**
     * @return Automatically rollback if instance refresh fails. Defaults to `false`. This option may only be set to `true` when specifying a `launch_template` or `mixed_instances_policy`.
     * 
     */
    public Optional autoRollback() {
        return Optional.ofNullable(this.autoRollback);
    }
    /**
     * @return Number of seconds to wait after a checkpoint. Defaults to `3600`.
     * 
     */
    public Optional checkpointDelay() {
        return Optional.ofNullable(this.checkpointDelay);
    }
    /**
     * @return List of percentages for each checkpoint. Values must be unique and in ascending order. To replace all instances, the final number must be `100`.
     * 
     */
    public List checkpointPercentages() {
        return this.checkpointPercentages == null ? List.of() : this.checkpointPercentages;
    }
    /**
     * @return Number of seconds until a newly launched instance is configured and ready to use. Default behavior is to use the Auto Scaling Group's health check grace period.
     * 
     */
    public Optional instanceWarmup() {
        return Optional.ofNullable(this.instanceWarmup);
    }
    /**
     * @return Amount of capacity in the Auto Scaling group that can be in service and healthy, or pending, to support your workload when an instance refresh is in place, as a percentage of the desired capacity of the Auto Scaling group. Values must be between `100` and `200`, defaults to `100`.
     * 
     */
    public Optional maxHealthyPercentage() {
        return Optional.ofNullable(this.maxHealthyPercentage);
    }
    /**
     * @return Amount of capacity in the Auto Scaling group that must remain healthy during an instance refresh to allow the operation to continue, as a percentage of the desired capacity of the Auto Scaling group. Defaults to `90`.
     * 
     */
    public Optional minHealthyPercentage() {
        return Optional.ofNullable(this.minHealthyPercentage);
    }
    /**
     * @return Behavior when encountering instances protected from scale in are found. Available behaviors are `Refresh`, `Ignore`, and `Wait`. Default is `Ignore`.
     * 
     */
    public Optional scaleInProtectedInstances() {
        return Optional.ofNullable(this.scaleInProtectedInstances);
    }
    /**
     * @return Replace instances that already have your desired configuration. Defaults to `false`.
     * 
     */
    public Optional skipMatching() {
        return Optional.ofNullable(this.skipMatching);
    }
    /**
     * @return Behavior when encountering instances in the `Standby` state in are found. Available behaviors are `Terminate`, `Ignore`, and `Wait`. Default is `Ignore`.
     * 
     */
    public Optional standbyInstances() {
        return Optional.ofNullable(this.standbyInstances);
    }

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

    public static Builder builder(GroupInstanceRefreshPreferences defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable GroupInstanceRefreshPreferencesAlarmSpecification alarmSpecification;
        private @Nullable Boolean autoRollback;
        private @Nullable String checkpointDelay;
        private @Nullable List checkpointPercentages;
        private @Nullable String instanceWarmup;
        private @Nullable Integer maxHealthyPercentage;
        private @Nullable Integer minHealthyPercentage;
        private @Nullable String scaleInProtectedInstances;
        private @Nullable Boolean skipMatching;
        private @Nullable String standbyInstances;
        public Builder() {}
        public Builder(GroupInstanceRefreshPreferences defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.alarmSpecification = defaults.alarmSpecification;
    	      this.autoRollback = defaults.autoRollback;
    	      this.checkpointDelay = defaults.checkpointDelay;
    	      this.checkpointPercentages = defaults.checkpointPercentages;
    	      this.instanceWarmup = defaults.instanceWarmup;
    	      this.maxHealthyPercentage = defaults.maxHealthyPercentage;
    	      this.minHealthyPercentage = defaults.minHealthyPercentage;
    	      this.scaleInProtectedInstances = defaults.scaleInProtectedInstances;
    	      this.skipMatching = defaults.skipMatching;
    	      this.standbyInstances = defaults.standbyInstances;
        }

        @CustomType.Setter
        public Builder alarmSpecification(@Nullable GroupInstanceRefreshPreferencesAlarmSpecification alarmSpecification) {

            this.alarmSpecification = alarmSpecification;
            return this;
        }
        @CustomType.Setter
        public Builder autoRollback(@Nullable Boolean autoRollback) {

            this.autoRollback = autoRollback;
            return this;
        }
        @CustomType.Setter
        public Builder checkpointDelay(@Nullable String checkpointDelay) {

            this.checkpointDelay = checkpointDelay;
            return this;
        }
        @CustomType.Setter
        public Builder checkpointPercentages(@Nullable List checkpointPercentages) {

            this.checkpointPercentages = checkpointPercentages;
            return this;
        }
        public Builder checkpointPercentages(Integer... checkpointPercentages) {
            return checkpointPercentages(List.of(checkpointPercentages));
        }
        @CustomType.Setter
        public Builder instanceWarmup(@Nullable String instanceWarmup) {

            this.instanceWarmup = instanceWarmup;
            return this;
        }
        @CustomType.Setter
        public Builder maxHealthyPercentage(@Nullable Integer maxHealthyPercentage) {

            this.maxHealthyPercentage = maxHealthyPercentage;
            return this;
        }
        @CustomType.Setter
        public Builder minHealthyPercentage(@Nullable Integer minHealthyPercentage) {

            this.minHealthyPercentage = minHealthyPercentage;
            return this;
        }
        @CustomType.Setter
        public Builder scaleInProtectedInstances(@Nullable String scaleInProtectedInstances) {

            this.scaleInProtectedInstances = scaleInProtectedInstances;
            return this;
        }
        @CustomType.Setter
        public Builder skipMatching(@Nullable Boolean skipMatching) {

            this.skipMatching = skipMatching;
            return this;
        }
        @CustomType.Setter
        public Builder standbyInstances(@Nullable String standbyInstances) {

            this.standbyInstances = standbyInstances;
            return this;
        }
        public GroupInstanceRefreshPreferences build() {
            final var _resultValue = new GroupInstanceRefreshPreferences();
            _resultValue.alarmSpecification = alarmSpecification;
            _resultValue.autoRollback = autoRollback;
            _resultValue.checkpointDelay = checkpointDelay;
            _resultValue.checkpointPercentages = checkpointPercentages;
            _resultValue.instanceWarmup = instanceWarmup;
            _resultValue.maxHealthyPercentage = maxHealthyPercentage;
            _resultValue.minHealthyPercentage = minHealthyPercentage;
            _resultValue.scaleInProtectedInstances = scaleInProtectedInstances;
            _resultValue.skipMatching = skipMatching;
            _resultValue.standbyInstances = standbyInstances;
            return _resultValue;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy