Class GrpcRetryPolicy.Builder
java.lang.Object
software.amazon.awscdk.services.appmesh.GrpcRetryPolicy.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<GrpcRetryPolicy>
- Enclosing interface:
- GrpcRetryPolicy
@Stability(Stable)
public static final class GrpcRetryPolicy.Builder
extends Object
implements software.amazon.jsii.Builder<GrpcRetryPolicy>
A builder for
GrpcRetryPolicy
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.grpcRetryEvents
(List<? extends GrpcRetryEvent> grpcRetryEvents) Sets the value ofGrpcRetryPolicy.getGrpcRetryEvents()
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
-
grpcRetryEvents
@Stability(Stable) public GrpcRetryPolicy.Builder grpcRetryEvents(List<? extends GrpcRetryEvent> grpcRetryEvents) Sets the value ofGrpcRetryPolicy.getGrpcRetryEvents()
- Parameters:
grpcRetryEvents
- gRPC events on which to retry. You must specify at least one value for at least one types of retry events.- Returns:
this
-
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 GrpcRetryPolicy.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 GrpcRetryPolicy.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<GrpcRetryPolicy>
- Returns:
- a new instance of
GrpcRetryPolicy
- Throws:
NullPointerException
- if any required attribute was not provided
-