Class HttpRetryPolicy.Builder
java.lang.Object
software.amazon.awscdk.services.appmesh.HttpRetryPolicy.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<HttpRetryPolicy>
- Enclosing interface:
- HttpRetryPolicy
@Stability(Stable)
public static final class HttpRetryPolicy.Builder
extends Object
implements software.amazon.jsii.Builder<HttpRetryPolicy>
A builder for
HttpRetryPolicy
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.httpRetryEvents
(List<? extends HttpRetryEvent> httpRetryEvents) Sets the value ofHttpRetryPolicy.getHttpRetryEvents()
retryAttempts
(Number retryAttempts) Sets the value ofHttpRetryPolicy.getRetryAttempts()
retryTimeout
(Duration retryTimeout) Sets the value ofHttpRetryPolicy.getRetryTimeout()
tcpRetryEvents
(List<? extends TcpRetryEvent> tcpRetryEvents) Sets the value ofHttpRetryPolicy.getTcpRetryEvents()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
retryAttempts
Sets the value ofHttpRetryPolicy.getRetryAttempts()
- Parameters:
retryAttempts
- The maximum number of retry attempts. This parameter is required.- Returns:
this
-
retryTimeout
Sets the value ofHttpRetryPolicy.getRetryTimeout()
- Parameters:
retryTimeout
- The timeout for each retry attempt. This parameter is required.- Returns:
this
-
httpRetryEvents
@Stability(Stable) public HttpRetryPolicy.Builder httpRetryEvents(List<? extends HttpRetryEvent> httpRetryEvents) Sets the value ofHttpRetryPolicy.getHttpRetryEvents()
- Parameters:
httpRetryEvents
- Specify HTTP events on which to retry. You must specify at least one value for at least one types of retry events.- Returns:
this
-
tcpRetryEvents
@Stability(Stable) public HttpRetryPolicy.Builder tcpRetryEvents(List<? extends TcpRetryEvent> tcpRetryEvents) Sets the value ofHttpRetryPolicy.getTcpRetryEvents()
- Parameters:
tcpRetryEvents
- TCP events on which to retry. The event occurs before any processing of a request has started and is encountered when the upstream is temporarily or permanently unavailable. You must specify at least one value for at least one types of retry events.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<HttpRetryPolicy>
- Returns:
- a new instance of
HttpRetryPolicy
- Throws:
NullPointerException
- if any required attribute was not provided
-