Class PrefixAwareRoutingConfig
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<PrefixAwareRoutingConfig.Builder,PrefixAwareRoutingConfig>
The configuration for prefix-aware routing on a SageMaker real-time inference endpoint. Specify
PrefixLength and ConcurrencyThreshold to control routing behavior.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()final IntegerThe maximum number of in-flight requests on the target instance before the endpoint routes to another instance.final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) final inthashCode()final IntegerThe maximum length of the prefix used for routing decisions.static Class<? extends PrefixAwareRoutingConfig.Builder> 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.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
prefixLength
The maximum length of the prefix used for routing decisions. Required when
RoutingStrategyisPREFIX_AWARE.-
For the SageMaker Runtime
InvokeEndpointandInvokeEndpointWithResponseStreamAPIs, this value specifies the number of bytes from the beginning of the request body. -
For OpenAI-compatible API, this value specifies the number of characters from the text content of the messages array.
The endpoint routes requests that share the same prefix to the same instance. Set this value to cover shared content (such as system prompts) plus enough unique content to distribute workloads across instances.
- Returns:
- The maximum length of the prefix used for routing decisions. Required when
RoutingStrategyisPREFIX_AWARE.-
For the SageMaker Runtime
InvokeEndpointandInvokeEndpointWithResponseStreamAPIs, this value specifies the number of bytes from the beginning of the request body. -
For OpenAI-compatible API, this value specifies the number of characters from the text content of the messages array.
The endpoint routes requests that share the same prefix to the same instance. Set this value to cover shared content (such as system prompts) plus enough unique content to distribute workloads across instances.
-
-
-
concurrencyThreshold
The maximum number of in-flight requests on the target instance before the endpoint routes to another instance. Required when
RoutingStrategyisPREFIX_AWARE. When in-flight requests on the prefix-selected instance reach this threshold, the endpoint routes the request to an instance with more available capacity.- Returns:
- The maximum number of in-flight requests on the target instance before the endpoint routes to another
instance. Required when
RoutingStrategyisPREFIX_AWARE. When in-flight requests on the prefix-selected instance reach this threshold, the endpoint routes the request to an instance with more available capacity.
-
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<PrefixAwareRoutingConfig.Builder,PrefixAwareRoutingConfig> - 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.
-