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

com.pulumi.azurenative.app.inputs.HttpRetryPolicyArgs 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.azurenative.app.inputs.HeaderMatchArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Double;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Policy that defines http request retry conditions
 * 
 */
public final class HttpRetryPolicyArgs extends com.pulumi.resources.ResourceArgs {

    public static final HttpRetryPolicyArgs Empty = new HttpRetryPolicyArgs();

    /**
     * Errors that can trigger a retry
     * 
     */
    @Import(name="errors")
    private @Nullable Output> errors;

    /**
     * @return Errors that can trigger a retry
     * 
     */
    public Optional>> errors() {
        return Optional.ofNullable(this.errors);
    }

    /**
     * Headers that must be present for a request to be retried
     * 
     */
    @Import(name="headers")
    private @Nullable Output> headers;

    /**
     * @return Headers that must be present for a request to be retried
     * 
     */
    public Optional>> headers() {
        return Optional.ofNullable(this.headers);
    }

    /**
     * Additional http status codes that can trigger a retry
     * 
     */
    @Import(name="httpStatusCodes")
    private @Nullable Output> httpStatusCodes;

    /**
     * @return Additional http status codes that can trigger a retry
     * 
     */
    public Optional>> httpStatusCodes() {
        return Optional.ofNullable(this.httpStatusCodes);
    }

    /**
     * Initial delay, in milliseconds, before retrying a request
     * 
     */
    @Import(name="initialDelayInMilliseconds")
    private @Nullable Output initialDelayInMilliseconds;

    /**
     * @return Initial delay, in milliseconds, before retrying a request
     * 
     */
    public Optional> initialDelayInMilliseconds() {
        return Optional.ofNullable(this.initialDelayInMilliseconds);
    }

    /**
     * Maximum interval, in milliseconds, between retries
     * 
     */
    @Import(name="maxIntervalInMilliseconds")
    private @Nullable Output maxIntervalInMilliseconds;

    /**
     * @return Maximum interval, in milliseconds, between retries
     * 
     */
    public Optional> maxIntervalInMilliseconds() {
        return Optional.ofNullable(this.maxIntervalInMilliseconds);
    }

    /**
     * Maximum number of times a request will retry
     * 
     */
    @Import(name="maxRetries")
    private @Nullable Output maxRetries;

    /**
     * @return Maximum number of times a request will retry
     * 
     */
    public Optional> maxRetries() {
        return Optional.ofNullable(this.maxRetries);
    }

    private HttpRetryPolicyArgs() {}

    private HttpRetryPolicyArgs(HttpRetryPolicyArgs $) {
        this.errors = $.errors;
        this.headers = $.headers;
        this.httpStatusCodes = $.httpStatusCodes;
        this.initialDelayInMilliseconds = $.initialDelayInMilliseconds;
        this.maxIntervalInMilliseconds = $.maxIntervalInMilliseconds;
        this.maxRetries = $.maxRetries;
    }

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

    public static final class Builder {
        private HttpRetryPolicyArgs $;

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

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

        /**
         * @param errors Errors that can trigger a retry
         * 
         * @return builder
         * 
         */
        public Builder errors(@Nullable Output> errors) {
            $.errors = errors;
            return this;
        }

        /**
         * @param errors Errors that can trigger a retry
         * 
         * @return builder
         * 
         */
        public Builder errors(List errors) {
            return errors(Output.of(errors));
        }

        /**
         * @param errors Errors that can trigger a retry
         * 
         * @return builder
         * 
         */
        public Builder errors(String... errors) {
            return errors(List.of(errors));
        }

        /**
         * @param headers Headers that must be present for a request to be retried
         * 
         * @return builder
         * 
         */
        public Builder headers(@Nullable Output> headers) {
            $.headers = headers;
            return this;
        }

        /**
         * @param headers Headers that must be present for a request to be retried
         * 
         * @return builder
         * 
         */
        public Builder headers(List headers) {
            return headers(Output.of(headers));
        }

        /**
         * @param headers Headers that must be present for a request to be retried
         * 
         * @return builder
         * 
         */
        public Builder headers(HeaderMatchArgs... headers) {
            return headers(List.of(headers));
        }

        /**
         * @param httpStatusCodes Additional http status codes that can trigger a retry
         * 
         * @return builder
         * 
         */
        public Builder httpStatusCodes(@Nullable Output> httpStatusCodes) {
            $.httpStatusCodes = httpStatusCodes;
            return this;
        }

        /**
         * @param httpStatusCodes Additional http status codes that can trigger a retry
         * 
         * @return builder
         * 
         */
        public Builder httpStatusCodes(List httpStatusCodes) {
            return httpStatusCodes(Output.of(httpStatusCodes));
        }

        /**
         * @param httpStatusCodes Additional http status codes that can trigger a retry
         * 
         * @return builder
         * 
         */
        public Builder httpStatusCodes(Integer... httpStatusCodes) {
            return httpStatusCodes(List.of(httpStatusCodes));
        }

        /**
         * @param initialDelayInMilliseconds Initial delay, in milliseconds, before retrying a request
         * 
         * @return builder
         * 
         */
        public Builder initialDelayInMilliseconds(@Nullable Output initialDelayInMilliseconds) {
            $.initialDelayInMilliseconds = initialDelayInMilliseconds;
            return this;
        }

        /**
         * @param initialDelayInMilliseconds Initial delay, in milliseconds, before retrying a request
         * 
         * @return builder
         * 
         */
        public Builder initialDelayInMilliseconds(Double initialDelayInMilliseconds) {
            return initialDelayInMilliseconds(Output.of(initialDelayInMilliseconds));
        }

        /**
         * @param maxIntervalInMilliseconds Maximum interval, in milliseconds, between retries
         * 
         * @return builder
         * 
         */
        public Builder maxIntervalInMilliseconds(@Nullable Output maxIntervalInMilliseconds) {
            $.maxIntervalInMilliseconds = maxIntervalInMilliseconds;
            return this;
        }

        /**
         * @param maxIntervalInMilliseconds Maximum interval, in milliseconds, between retries
         * 
         * @return builder
         * 
         */
        public Builder maxIntervalInMilliseconds(Double maxIntervalInMilliseconds) {
            return maxIntervalInMilliseconds(Output.of(maxIntervalInMilliseconds));
        }

        /**
         * @param maxRetries Maximum number of times a request will retry
         * 
         * @return builder
         * 
         */
        public Builder maxRetries(@Nullable Output maxRetries) {
            $.maxRetries = maxRetries;
            return this;
        }

        /**
         * @param maxRetries Maximum number of times a request will retry
         * 
         * @return builder
         * 
         */
        public Builder maxRetries(Integer maxRetries) {
            return maxRetries(Output.of(maxRetries));
        }

        public HttpRetryPolicyArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy