Interface FallbackTarget.Builder
- All Superinterfaces:
Buildable,CopyableBuilder<FallbackTarget.Builder,,FallbackTarget> SdkBuilder<FallbackTarget.Builder,,FallbackTarget> SdkPojo
- Enclosing class:
FallbackTarget
-
Method Summary
Modifier and TypeMethodDescriptionfirstByteTimeoutMilliseconds(Integer firstByteTimeoutMilliseconds) The maximum time, in milliseconds, from sending the request to this target until the first byte of the response body arrives.The model ID to send to this fallback target.targetName(String targetName) The name of the gateway target to fall back to.default FallbackTarget.BuildertriggerOn(Consumer<FallbackTriggers.Builder> triggerOn) The status codes and errors from this target that cause the gateway to send the request to the next fallback target.triggerOn(FallbackTriggers triggerOn) The status codes and errors from this target that cause the gateway to send the request to the next fallback target.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
targetName
The name of the gateway target to fall back to. The target must be an inference target.
- Parameters:
targetName- The name of the gateway target to fall back to. The target must be an inference target.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
model
The model ID to send to this fallback target. If you don't specify a model, the gateway sends the model from the original request.
- Parameters:
model- The model ID to send to this fallback target. If you don't specify a model, the gateway sends the model from the original request.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
triggerOn
The status codes and errors from this target that cause the gateway to send the request to the next fallback target. This setting isn't inherited from the route. If you omit it, the gateway uses the default triggers:
5XXstatus codes and theCONNECTION_ERROR,FIRST_BYTE_TIMEOUT, andUNROUTABLEerrors.- Parameters:
triggerOn- The status codes and errors from this target that cause the gateway to send the request to the next fallback target. This setting isn't inherited from the route. If you omit it, the gateway uses the default triggers:5XXstatus codes and theCONNECTION_ERROR,FIRST_BYTE_TIMEOUT, andUNROUTABLEerrors.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
triggerOn
The status codes and errors from this target that cause the gateway to send the request to the next fallback target. This setting isn't inherited from the route. If you omit it, the gateway uses the default triggers:
This is a convenience method that creates an instance of the5XXstatus codes and theCONNECTION_ERROR,FIRST_BYTE_TIMEOUT, andUNROUTABLEerrors.FallbackTriggers.Builderavoiding the need to create one manually viaFallbackTriggers.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed totriggerOn(FallbackTriggers).- Parameters:
triggerOn- a consumer that will call methods onFallbackTriggers.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
firstByteTimeoutMilliseconds
The maximum time, in milliseconds, from sending the request to this target until the first byte of the response body arrives. This setting isn't inherited from the route. If you don't specify a value, no timeout is enforced.
- Parameters:
firstByteTimeoutMilliseconds- The maximum time, in milliseconds, from sending the request to this target until the first byte of the response body arrives. This setting isn't inherited from the route. If you don't specify a value, no timeout is enforced.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-