Class CfnRoute.GrpcRetryPolicyProperty.Builder
java.lang.Object
software.amazon.awscdk.services.appmesh.CfnRoute.GrpcRetryPolicyProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnRoute.GrpcRetryPolicyProperty>
- Enclosing interface:
- CfnRoute.GrpcRetryPolicyProperty
@Stability(Stable)
public static final class CfnRoute.GrpcRetryPolicyProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnRoute.GrpcRetryPolicyProperty>
A builder for
CfnRoute.GrpcRetryPolicyProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.grpcRetryEvents(List<String> grpcRetryEvents) Sets the value ofCfnRoute.GrpcRetryPolicyProperty.getGrpcRetryEvents()httpRetryEvents(List<String> httpRetryEvents) Sets the value ofCfnRoute.GrpcRetryPolicyProperty.getHttpRetryEvents()maxRetries(Number maxRetries) Sets the value ofCfnRoute.GrpcRetryPolicyProperty.getMaxRetries()perRetryTimeout(IResolvable perRetryTimeout) Sets the value ofCfnRoute.GrpcRetryPolicyProperty.getPerRetryTimeout()perRetryTimeout(CfnRoute.DurationProperty perRetryTimeout) Sets the value ofCfnRoute.GrpcRetryPolicyProperty.getPerRetryTimeout()tcpRetryEvents(List<String> tcpRetryEvents) Sets the value ofCfnRoute.GrpcRetryPolicyProperty.getTcpRetryEvents()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
maxRetries
Sets the value ofCfnRoute.GrpcRetryPolicyProperty.getMaxRetries()- Parameters:
maxRetries- The maximum number of retry attempts. This parameter is required.- Returns:
this
-
perRetryTimeout
@Stability(Stable) public CfnRoute.GrpcRetryPolicyProperty.Builder perRetryTimeout(IResolvable perRetryTimeout) Sets the value ofCfnRoute.GrpcRetryPolicyProperty.getPerRetryTimeout()- Parameters:
perRetryTimeout- The timeout for each retry attempt. This parameter is required.- Returns:
this
-
perRetryTimeout
@Stability(Stable) public CfnRoute.GrpcRetryPolicyProperty.Builder perRetryTimeout(CfnRoute.DurationProperty perRetryTimeout) Sets the value ofCfnRoute.GrpcRetryPolicyProperty.getPerRetryTimeout()- Parameters:
perRetryTimeout- The timeout for each retry attempt. This parameter is required.- Returns:
this
-
grpcRetryEvents
@Stability(Stable) public CfnRoute.GrpcRetryPolicyProperty.Builder grpcRetryEvents(List<String> grpcRetryEvents) Sets the value ofCfnRoute.GrpcRetryPolicyProperty.getGrpcRetryEvents()- Parameters:
grpcRetryEvents- Specify at least one of the valid values.- Returns:
this
-
httpRetryEvents
@Stability(Stable) public CfnRoute.GrpcRetryPolicyProperty.Builder httpRetryEvents(List<String> httpRetryEvents) Sets the value ofCfnRoute.GrpcRetryPolicyProperty.getHttpRetryEvents()- Parameters:
httpRetryEvents- Specify at least one of the following values.- server-error – HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511
- gateway-error – HTTP status codes 502, 503, and 504
- client-error – HTTP status code 409
- stream-error – Retry on refused stream
- Returns:
this
-
tcpRetryEvents
@Stability(Stable) public CfnRoute.GrpcRetryPolicyProperty.Builder tcpRetryEvents(List<String> tcpRetryEvents) Sets the value ofCfnRoute.GrpcRetryPolicyProperty.getTcpRetryEvents()- Parameters:
tcpRetryEvents- Specify a valid value. The event occurs before any processing of a request has started and is encountered when the upstream is temporarily or permanently unavailable.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnRoute.GrpcRetryPolicyProperty>- Returns:
- a new instance of
CfnRoute.GrpcRetryPolicyProperty - Throws:
NullPointerException- if any required attribute was not provided
-