Class FallbackTarget
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<FallbackTarget.Builder,FallbackTarget>
Specifies a target to send the request to when the previous target in the fallback chain fails. Includes the target name, the model to send, and the conditions that trigger a fallback from this target to the next one.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic FallbackTarget.Builderbuilder()final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final IntegerThe maximum time, in milliseconds, from sending the request to this target until the first byte of the response body arrives.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) final inthashCode()final Stringmodel()The model ID to send to this fallback target.static Class<? extends FallbackTarget.Builder> final StringThe name of the gateway target to fall back to.Take this object and create a builder that contains all of the current property values of this object.final StringtoString()Returns a string representation of this object.final FallbackTriggersThe 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.ToCopyableBuilder
copy
-
Method Details
-
targetName
The name of the gateway target to fall back to. The target must be an inference target.
- Returns:
- The name of the gateway target to fall back to. The target must be an inference target.
-
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:
- 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.
-
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:
- 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.
-
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:
- 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.
-
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<FallbackTarget.Builder,FallbackTarget> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin interfaceSdkPojo- Parameters:
obj- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo- Returns:
- The mapping between the field name and its corresponding field.
-