Class CfnRoute.HttpRetryPolicyProperty.Builder
java.lang.Object
software.amazon.awscdk.services.appmesh.CfnRoute.HttpRetryPolicyProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnRoute.HttpRetryPolicyProperty>
- Enclosing interface:
CfnRoute.HttpRetryPolicyProperty
@Stability(Stable)
public static final class CfnRoute.HttpRetryPolicyProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnRoute.HttpRetryPolicyProperty>
A builder for
CfnRoute.HttpRetryPolicyProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.httpRetryEvents(List<String> httpRetryEvents) Sets the value ofCfnRoute.HttpRetryPolicyProperty.getHttpRetryEvents()maxRetries(Number maxRetries) Sets the value ofCfnRoute.HttpRetryPolicyProperty.getMaxRetries()perRetryTimeout(IResolvable perRetryTimeout) Sets the value ofCfnRoute.HttpRetryPolicyProperty.getPerRetryTimeout()perRetryTimeout(CfnRoute.DurationProperty perRetryTimeout) Sets the value ofCfnRoute.HttpRetryPolicyProperty.getPerRetryTimeout()tcpRetryEvents(List<String> tcpRetryEvents) Sets the value ofCfnRoute.HttpRetryPolicyProperty.getTcpRetryEvents()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
maxRetries
Sets the value ofCfnRoute.HttpRetryPolicyProperty.getMaxRetries()- Parameters:
maxRetries- The maximum number of retry attempts. This parameter is required.- Returns:
this
-
perRetryTimeout
@Stability(Stable) public CfnRoute.HttpRetryPolicyProperty.Builder perRetryTimeout(IResolvable perRetryTimeout) Sets the value ofCfnRoute.HttpRetryPolicyProperty.getPerRetryTimeout()- Parameters:
perRetryTimeout- The timeout for each retry attempt. This parameter is required.- Returns:
this
-
perRetryTimeout
@Stability(Stable) public CfnRoute.HttpRetryPolicyProperty.Builder perRetryTimeout(CfnRoute.DurationProperty perRetryTimeout) Sets the value ofCfnRoute.HttpRetryPolicyProperty.getPerRetryTimeout()- Parameters:
perRetryTimeout- The timeout for each retry attempt. This parameter is required.- Returns:
this
-
httpRetryEvents
@Stability(Stable) public CfnRoute.HttpRetryPolicyProperty.Builder httpRetryEvents(List<String> httpRetryEvents) Sets the value ofCfnRoute.HttpRetryPolicyProperty.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.HttpRetryPolicyProperty.Builder tcpRetryEvents(List<String> tcpRetryEvents) Sets the value ofCfnRoute.HttpRetryPolicyProperty.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.HttpRetryPolicyProperty>- Returns:
- a new instance of
CfnRoute.HttpRetryPolicyProperty - Throws:
NullPointerException- if any required attribute was not provided
-