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

com.pulumi.azurenative.app.inputs.CircuitBreakerPolicyArgs 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.app.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Integer;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Policy that defines circuit breaker conditions
 * 
 */
public final class CircuitBreakerPolicyArgs extends com.pulumi.resources.ResourceArgs {

    public static final CircuitBreakerPolicyArgs Empty = new CircuitBreakerPolicyArgs();

    /**
     * Number of consecutive errors before the circuit breaker opens
     * 
     */
    @Import(name="consecutiveErrors")
    private @Nullable Output consecutiveErrors;

    /**
     * @return Number of consecutive errors before the circuit breaker opens
     * 
     */
    public Optional> consecutiveErrors() {
        return Optional.ofNullable(this.consecutiveErrors);
    }

    /**
     * The time interval, in seconds, between endpoint checks. This can result in opening the circuit breaker if the check fails as well as closing the circuit breaker if the check succeeds. Defaults to 10s.
     * 
     */
    @Import(name="intervalInSeconds")
    private @Nullable Output intervalInSeconds;

    /**
     * @return The time interval, in seconds, between endpoint checks. This can result in opening the circuit breaker if the check fails as well as closing the circuit breaker if the check succeeds. Defaults to 10s.
     * 
     */
    public Optional> intervalInSeconds() {
        return Optional.ofNullable(this.intervalInSeconds);
    }

    /**
     * Maximum percentage of hosts that will be ejected after failure threshold has been met
     * 
     */
    @Import(name="maxEjectionPercent")
    private @Nullable Output maxEjectionPercent;

    /**
     * @return Maximum percentage of hosts that will be ejected after failure threshold has been met
     * 
     */
    public Optional> maxEjectionPercent() {
        return Optional.ofNullable(this.maxEjectionPercent);
    }

    private CircuitBreakerPolicyArgs() {}

    private CircuitBreakerPolicyArgs(CircuitBreakerPolicyArgs $) {
        this.consecutiveErrors = $.consecutiveErrors;
        this.intervalInSeconds = $.intervalInSeconds;
        this.maxEjectionPercent = $.maxEjectionPercent;
    }

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

    public static final class Builder {
        private CircuitBreakerPolicyArgs $;

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

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

        /**
         * @param consecutiveErrors Number of consecutive errors before the circuit breaker opens
         * 
         * @return builder
         * 
         */
        public Builder consecutiveErrors(@Nullable Output consecutiveErrors) {
            $.consecutiveErrors = consecutiveErrors;
            return this;
        }

        /**
         * @param consecutiveErrors Number of consecutive errors before the circuit breaker opens
         * 
         * @return builder
         * 
         */
        public Builder consecutiveErrors(Integer consecutiveErrors) {
            return consecutiveErrors(Output.of(consecutiveErrors));
        }

        /**
         * @param intervalInSeconds The time interval, in seconds, between endpoint checks. This can result in opening the circuit breaker if the check fails as well as closing the circuit breaker if the check succeeds. Defaults to 10s.
         * 
         * @return builder
         * 
         */
        public Builder intervalInSeconds(@Nullable Output intervalInSeconds) {
            $.intervalInSeconds = intervalInSeconds;
            return this;
        }

        /**
         * @param intervalInSeconds The time interval, in seconds, between endpoint checks. This can result in opening the circuit breaker if the check fails as well as closing the circuit breaker if the check succeeds. Defaults to 10s.
         * 
         * @return builder
         * 
         */
        public Builder intervalInSeconds(Integer intervalInSeconds) {
            return intervalInSeconds(Output.of(intervalInSeconds));
        }

        /**
         * @param maxEjectionPercent Maximum percentage of hosts that will be ejected after failure threshold has been met
         * 
         * @return builder
         * 
         */
        public Builder maxEjectionPercent(@Nullable Output maxEjectionPercent) {
            $.maxEjectionPercent = maxEjectionPercent;
            return this;
        }

        /**
         * @param maxEjectionPercent Maximum percentage of hosts that will be ejected after failure threshold has been met
         * 
         * @return builder
         * 
         */
        public Builder maxEjectionPercent(Integer maxEjectionPercent) {
            return maxEjectionPercent(Output.of(maxEjectionPercent));
        }

        public CircuitBreakerPolicyArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy