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

com.pulumi.azure.compute.outputs.ScaleSetRollingUpgradePolicy 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 java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class ScaleSetRollingUpgradePolicy {
    /**
     * @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. Defaults to `20`.
     * 
     */
    private @Nullable Integer maxBatchInstancePercent;
    /**
     * @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. Defaults to `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. Defaults to `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 for duration (<https://en.wikipedia.org/wiki/ISO_8601#Durations>). Defaults to `PT0S` seconds represented as `PT0S`.
     * 
     */
    private @Nullable String pauseTimeBetweenBatches;

    private ScaleSetRollingUpgradePolicy() {}
    /**
     * @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. Defaults to `20`.
     * 
     */
    public Optional maxBatchInstancePercent() {
        return Optional.ofNullable(this.maxBatchInstancePercent);
    }
    /**
     * @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. Defaults to `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. Defaults to `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 for duration (<https://en.wikipedia.org/wiki/ISO_8601#Durations>). Defaults to `PT0S` seconds represented as `PT0S`.
     * 
     */
    public Optional pauseTimeBetweenBatches() {
        return Optional.ofNullable(this.pauseTimeBetweenBatches);
    }

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

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

        @CustomType.Setter
        public Builder maxBatchInstancePercent(@Nullable Integer maxBatchInstancePercent) {

            this.maxBatchInstancePercent = maxBatchInstancePercent;
            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;
        }
        public ScaleSetRollingUpgradePolicy build() {
            final var _resultValue = new ScaleSetRollingUpgradePolicy();
            _resultValue.maxBatchInstancePercent = maxBatchInstancePercent;
            _resultValue.maxUnhealthyInstancePercent = maxUnhealthyInstancePercent;
            _resultValue.maxUnhealthyUpgradedInstancePercent = maxUnhealthyUpgradedInstancePercent;
            _resultValue.pauseTimeBetweenBatches = pauseTimeBetweenBatches;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy