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

com.pulumi.azurenative.compute.outputs.RollingUpgradePolicyResponse 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.azurenative.compute.outputs;

import com.pulumi.core.annotations.CustomType;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class RollingUpgradePolicyResponse {
    /**
     * @return Allow VMSS to ignore AZ boundaries when constructing upgrade batches. Take into consideration the Update Domain and maxBatchInstancePercent to determine the batch size.
     * 
     */
    private @Nullable Boolean enableCrossZoneUpgrade;
    /**
     * @return The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. The default value for this parameter is 20%.
     * 
     */
    private @Nullable Integer maxBatchInstancePercent;
    /**
     * @return Create new virtual machines to upgrade the scale set, rather than updating the existing virtual machines. Existing virtual machines will be deleted once the new virtual machines are created for each batch.
     * 
     */
    private @Nullable Boolean maxSurge;
    /**
     * @return The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. The default value for this parameter is 20%.
     * 
     */
    private @Nullable Integer maxUnhealthyInstancePercent;
    /**
     * @return The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. The default value for this parameter is 20%.
     * 
     */
    private @Nullable Integer maxUnhealthyUpgradedInstancePercent;
    /**
     * @return The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format. The default value is 0 seconds (PT0S).
     * 
     */
    private @Nullable String pauseTimeBetweenBatches;
    /**
     * @return Upgrade all unhealthy instances in a scale set before any healthy instances.
     * 
     */
    private @Nullable Boolean prioritizeUnhealthyInstances;
    /**
     * @return Rollback failed instances to previous model if the Rolling Upgrade policy is violated.
     * 
     */
    private @Nullable Boolean rollbackFailedInstancesOnPolicyBreach;

    private RollingUpgradePolicyResponse() {}
    /**
     * @return Allow VMSS to ignore AZ boundaries when constructing upgrade batches. Take into consideration the Update Domain and maxBatchInstancePercent to determine the batch size.
     * 
     */
    public Optional enableCrossZoneUpgrade() {
        return Optional.ofNullable(this.enableCrossZoneUpgrade);
    }
    /**
     * @return The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. The default value for this parameter is 20%.
     * 
     */
    public Optional maxBatchInstancePercent() {
        return Optional.ofNullable(this.maxBatchInstancePercent);
    }
    /**
     * @return Create new virtual machines to upgrade the scale set, rather than updating the existing virtual machines. Existing virtual machines will be deleted once the new virtual machines are created for each batch.
     * 
     */
    public Optional maxSurge() {
        return Optional.ofNullable(this.maxSurge);
    }
    /**
     * @return The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. The default value for this parameter is 20%.
     * 
     */
    public Optional maxUnhealthyInstancePercent() {
        return Optional.ofNullable(this.maxUnhealthyInstancePercent);
    }
    /**
     * @return The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. The default value for this parameter is 20%.
     * 
     */
    public Optional maxUnhealthyUpgradedInstancePercent() {
        return Optional.ofNullable(this.maxUnhealthyUpgradedInstancePercent);
    }
    /**
     * @return The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format. The default value is 0 seconds (PT0S).
     * 
     */
    public Optional pauseTimeBetweenBatches() {
        return Optional.ofNullable(this.pauseTimeBetweenBatches);
    }
    /**
     * @return Upgrade all unhealthy instances in a scale set before any healthy instances.
     * 
     */
    public Optional prioritizeUnhealthyInstances() {
        return Optional.ofNullable(this.prioritizeUnhealthyInstances);
    }
    /**
     * @return Rollback failed instances to previous model if the Rolling Upgrade policy is violated.
     * 
     */
    public Optional rollbackFailedInstancesOnPolicyBreach() {
        return Optional.ofNullable(this.rollbackFailedInstancesOnPolicyBreach);
    }

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

    public static Builder builder(RollingUpgradePolicyResponse defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable Boolean enableCrossZoneUpgrade;
        private @Nullable Integer maxBatchInstancePercent;
        private @Nullable Boolean maxSurge;
        private @Nullable Integer maxUnhealthyInstancePercent;
        private @Nullable Integer maxUnhealthyUpgradedInstancePercent;
        private @Nullable String pauseTimeBetweenBatches;
        private @Nullable Boolean prioritizeUnhealthyInstances;
        private @Nullable Boolean rollbackFailedInstancesOnPolicyBreach;
        public Builder() {}
        public Builder(RollingUpgradePolicyResponse defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.enableCrossZoneUpgrade = defaults.enableCrossZoneUpgrade;
    	      this.maxBatchInstancePercent = defaults.maxBatchInstancePercent;
    	      this.maxSurge = defaults.maxSurge;
    	      this.maxUnhealthyInstancePercent = defaults.maxUnhealthyInstancePercent;
    	      this.maxUnhealthyUpgradedInstancePercent = defaults.maxUnhealthyUpgradedInstancePercent;
    	      this.pauseTimeBetweenBatches = defaults.pauseTimeBetweenBatches;
    	      this.prioritizeUnhealthyInstances = defaults.prioritizeUnhealthyInstances;
    	      this.rollbackFailedInstancesOnPolicyBreach = defaults.rollbackFailedInstancesOnPolicyBreach;
        }

        @CustomType.Setter
        public Builder enableCrossZoneUpgrade(@Nullable Boolean enableCrossZoneUpgrade) {

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

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

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

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

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

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

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

            this.rollbackFailedInstancesOnPolicyBreach = rollbackFailedInstancesOnPolicyBreach;
            return this;
        }
        public RollingUpgradePolicyResponse build() {
            final var _resultValue = new RollingUpgradePolicyResponse();
            _resultValue.enableCrossZoneUpgrade = enableCrossZoneUpgrade;
            _resultValue.maxBatchInstancePercent = maxBatchInstancePercent;
            _resultValue.maxSurge = maxSurge;
            _resultValue.maxUnhealthyInstancePercent = maxUnhealthyInstancePercent;
            _resultValue.maxUnhealthyUpgradedInstancePercent = maxUnhealthyUpgradedInstancePercent;
            _resultValue.pauseTimeBetweenBatches = pauseTimeBetweenBatches;
            _resultValue.prioritizeUnhealthyInstances = prioritizeUnhealthyInstances;
            _resultValue.rollbackFailedInstancesOnPolicyBreach = rollbackFailedInstancesOnPolicyBreach;
            return _resultValue;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy