Class GrpcRouteSpecOptions.Builder
java.lang.Object
software.amazon.awscdk.services.appmesh.GrpcRouteSpecOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<GrpcRouteSpecOptions>
- Enclosing interface:
- GrpcRouteSpecOptions
@Stability(Stable)
public static final class GrpcRouteSpecOptions.Builder
extends Object
implements software.amazon.jsii.Builder<GrpcRouteSpecOptions>
A builder for
GrpcRouteSpecOptions-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.match(GrpcRouteMatch match) Sets the value ofGrpcRouteSpecOptions.getMatch()Sets the value ofRouteSpecOptionsBase.getPriority()retryPolicy(GrpcRetryPolicy retryPolicy) Sets the value ofGrpcRouteSpecOptions.getRetryPolicy()timeout(GrpcTimeout timeout) Sets the value ofGrpcRouteSpecOptions.getTimeout()weightedTargets(List<? extends WeightedTarget> weightedTargets) Sets the value ofGrpcRouteSpecOptions.getWeightedTargets()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
match
Sets the value ofGrpcRouteSpecOptions.getMatch()- Parameters:
match- The criterion for determining a request match for this Route. This parameter is required.- Returns:
this
-
weightedTargets
@Stability(Stable) public GrpcRouteSpecOptions.Builder weightedTargets(List<? extends WeightedTarget> weightedTargets) Sets the value ofGrpcRouteSpecOptions.getWeightedTargets()- Parameters:
weightedTargets- List of targets that traffic is routed to when a request matches the route. This parameter is required.- Returns:
this
-
retryPolicy
Sets the value ofGrpcRouteSpecOptions.getRetryPolicy()- Parameters:
retryPolicy- The retry policy.- Returns:
this
-
timeout
Sets the value ofGrpcRouteSpecOptions.getTimeout()- Parameters:
timeout- An object that represents a grpc timeout.- Returns:
this
-
priority
Sets the value ofRouteSpecOptionsBase.getPriority()- Parameters:
priority- The priority for the route. When a Virtual Router has multiple routes, route match is performed in the order of specified value, where 0 is the highest priority, and first matched route is selected.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<GrpcRouteSpecOptions>- Returns:
- a new instance of
GrpcRouteSpecOptions - Throws:
NullPointerException- if any required attribute was not provided
-