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

com.pulumi.aws.appmesh.inputs.RouteSpecHttpRouteRetryPolicyArgs Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

There is a newer version: 6.60.0-alpha.1731982519
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.aws.appmesh.inputs;

import com.pulumi.aws.appmesh.inputs.RouteSpecHttpRouteRetryPolicyPerRetryTimeoutArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class RouteSpecHttpRouteRetryPolicyArgs extends com.pulumi.resources.ResourceArgs {

    public static final RouteSpecHttpRouteRetryPolicyArgs Empty = new RouteSpecHttpRouteRetryPolicyArgs();

    /**
     * List of HTTP retry events.
     * Valid values: `client-error` (HTTP status code 409), `gateway-error` (HTTP status codes 502, 503, and 504), `server-error` (HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511), `stream-error` (retry on refused stream).
     * 
     */
    @Import(name="httpRetryEvents")
    private @Nullable Output> httpRetryEvents;

    /**
     * @return List of HTTP retry events.
     * Valid values: `client-error` (HTTP status code 409), `gateway-error` (HTTP status codes 502, 503, and 504), `server-error` (HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511), `stream-error` (retry on refused stream).
     * 
     */
    public Optional>> httpRetryEvents() {
        return Optional.ofNullable(this.httpRetryEvents);
    }

    /**
     * Maximum number of retries.
     * 
     */
    @Import(name="maxRetries", required=true)
    private Output maxRetries;

    /**
     * @return Maximum number of retries.
     * 
     */
    public Output maxRetries() {
        return this.maxRetries;
    }

    /**
     * Per-retry timeout.
     * 
     */
    @Import(name="perRetryTimeout", required=true)
    private Output perRetryTimeout;

    /**
     * @return Per-retry timeout.
     * 
     */
    public Output perRetryTimeout() {
        return this.perRetryTimeout;
    }

    /**
     * List of TCP retry events. The only valid value is `connection-error`.
     * 
     * You must specify at least one value for `http_retry_events`, or at least one value for `tcp_retry_events`.
     * 
     */
    @Import(name="tcpRetryEvents")
    private @Nullable Output> tcpRetryEvents;

    /**
     * @return List of TCP retry events. The only valid value is `connection-error`.
     * 
     * You must specify at least one value for `http_retry_events`, or at least one value for `tcp_retry_events`.
     * 
     */
    public Optional>> tcpRetryEvents() {
        return Optional.ofNullable(this.tcpRetryEvents);
    }

    private RouteSpecHttpRouteRetryPolicyArgs() {}

    private RouteSpecHttpRouteRetryPolicyArgs(RouteSpecHttpRouteRetryPolicyArgs $) {
        this.httpRetryEvents = $.httpRetryEvents;
        this.maxRetries = $.maxRetries;
        this.perRetryTimeout = $.perRetryTimeout;
        this.tcpRetryEvents = $.tcpRetryEvents;
    }

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

    public static final class Builder {
        private RouteSpecHttpRouteRetryPolicyArgs $;

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

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

        /**
         * @param httpRetryEvents List of HTTP retry events.
         * Valid values: `client-error` (HTTP status code 409), `gateway-error` (HTTP status codes 502, 503, and 504), `server-error` (HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511), `stream-error` (retry on refused stream).
         * 
         * @return builder
         * 
         */
        public Builder httpRetryEvents(@Nullable Output> httpRetryEvents) {
            $.httpRetryEvents = httpRetryEvents;
            return this;
        }

        /**
         * @param httpRetryEvents List of HTTP retry events.
         * Valid values: `client-error` (HTTP status code 409), `gateway-error` (HTTP status codes 502, 503, and 504), `server-error` (HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511), `stream-error` (retry on refused stream).
         * 
         * @return builder
         * 
         */
        public Builder httpRetryEvents(List httpRetryEvents) {
            return httpRetryEvents(Output.of(httpRetryEvents));
        }

        /**
         * @param httpRetryEvents List of HTTP retry events.
         * Valid values: `client-error` (HTTP status code 409), `gateway-error` (HTTP status codes 502, 503, and 504), `server-error` (HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511), `stream-error` (retry on refused stream).
         * 
         * @return builder
         * 
         */
        public Builder httpRetryEvents(String... httpRetryEvents) {
            return httpRetryEvents(List.of(httpRetryEvents));
        }

        /**
         * @param maxRetries Maximum number of retries.
         * 
         * @return builder
         * 
         */
        public Builder maxRetries(Output maxRetries) {
            $.maxRetries = maxRetries;
            return this;
        }

        /**
         * @param maxRetries Maximum number of retries.
         * 
         * @return builder
         * 
         */
        public Builder maxRetries(Integer maxRetries) {
            return maxRetries(Output.of(maxRetries));
        }

        /**
         * @param perRetryTimeout Per-retry timeout.
         * 
         * @return builder
         * 
         */
        public Builder perRetryTimeout(Output perRetryTimeout) {
            $.perRetryTimeout = perRetryTimeout;
            return this;
        }

        /**
         * @param perRetryTimeout Per-retry timeout.
         * 
         * @return builder
         * 
         */
        public Builder perRetryTimeout(RouteSpecHttpRouteRetryPolicyPerRetryTimeoutArgs perRetryTimeout) {
            return perRetryTimeout(Output.of(perRetryTimeout));
        }

        /**
         * @param tcpRetryEvents List of TCP retry events. The only valid value is `connection-error`.
         * 
         * You must specify at least one value for `http_retry_events`, or at least one value for `tcp_retry_events`.
         * 
         * @return builder
         * 
         */
        public Builder tcpRetryEvents(@Nullable Output> tcpRetryEvents) {
            $.tcpRetryEvents = tcpRetryEvents;
            return this;
        }

        /**
         * @param tcpRetryEvents List of TCP retry events. The only valid value is `connection-error`.
         * 
         * You must specify at least one value for `http_retry_events`, or at least one value for `tcp_retry_events`.
         * 
         * @return builder
         * 
         */
        public Builder tcpRetryEvents(List tcpRetryEvents) {
            return tcpRetryEvents(Output.of(tcpRetryEvents));
        }

        /**
         * @param tcpRetryEvents List of TCP retry events. The only valid value is `connection-error`.
         * 
         * You must specify at least one value for `http_retry_events`, or at least one value for `tcp_retry_events`.
         * 
         * @return builder
         * 
         */
        public Builder tcpRetryEvents(String... tcpRetryEvents) {
            return tcpRetryEvents(List.of(tcpRetryEvents));
        }

        public RouteSpecHttpRouteRetryPolicyArgs build() {
            if ($.maxRetries == null) {
                throw new MissingRequiredPropertyException("RouteSpecHttpRouteRetryPolicyArgs", "maxRetries");
            }
            if ($.perRetryTimeout == null) {
                throw new MissingRequiredPropertyException("RouteSpecHttpRouteRetryPolicyArgs", "perRetryTimeout");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy