Interface InvokeGlobalInferenceGatewayRequest.Builder
- All Superinterfaces:
AwsRequest.Builder,Buildable,CopyableBuilder<InvokeGlobalInferenceGatewayRequest.Builder,,InvokeGlobalInferenceGatewayRequest> SageMakerGatewayRuntimeRequest.Builder,SdkBuilder<InvokeGlobalInferenceGatewayRequest.Builder,,InvokeGlobalInferenceGatewayRequest> SdkPojo,SdkRequest.Builder
- Enclosing class:
InvokeGlobalInferenceGatewayRequest
-
Method Summary
Modifier and TypeMethodDescriptionThe MIME type you want for the response.The inference request body: one OpenAI JSON object, at most 10 MiB.contentType(String contentType) The MIME type of the request body.customerIdentityToken(String customerIdentityToken) Per-caller customer identity token (a JWT), forwarded unchanged to the inference gateway, which validates it.The ID of the Global Inference Gateway to invoke.overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Add an optional request override configuration.overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Add an optional request override configuration.Methods inherited from interface software.amazon.awssdk.awscore.AwsRequest.Builder
overrideConfigurationMethods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.services.sagemakergatewayruntime.model.SageMakerGatewayRuntimeRequest.Builder
buildMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
gatewayId
The ID of the Global Inference Gateway to invoke. IAM policies refer to the gateway by its ARN,
arn:<partition>:sagemaker:<region>:<account>:global-inference-gateway/<id>.- Parameters:
gatewayId- The ID of the Global Inference Gateway to invoke. IAM policies refer to the gateway by its ARN,arn:<partition>:sagemaker:<region>:<account>:global-inference-gateway/<id>.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
accept
The MIME type you want for the response. It is passed to the model server.
- Parameters:
accept- The MIME type you want for the response. It is passed to the model server.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
contentType
The MIME type of the request body. Pass
application/json(parameters such ascharset=utf-8are allowed): the body is one OpenAI JSON object. The Global Inference Gateway rejects other content types with a 415 error.- Parameters:
contentType- The MIME type of the request body. Passapplication/json(parameters such ascharset=utf-8are allowed): the body is one OpenAI JSON object. The Global Inference Gateway rejects other content types with a 415 error.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
customerIdentityToken
Per-caller customer identity token (a JWT), forwarded unchanged to the inference gateway, which validates it. The gateway does not use it to authorize the request. Include it in the SigV4 signed headers so it cannot be altered in transit. Redacted from logs, metrics and traces.
- Parameters:
customerIdentityToken- Per-caller customer identity token (a JWT), forwarded unchanged to the inference gateway, which validates it. The gateway does not use it to authorize the request. Include it in the SigV4 signed headers so it cannot be altered in transit. Redacted from logs, metrics and traces.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
body
The inference request body: one OpenAI JSON object, at most 10 MiB. Its content is passed to the model server unchanged, except that the request is always sent with
"stream": false: this operation returns one JSON document, so a"stream": truein the body is overridden (use InvokeGlobalInferenceGatewayWithResponseStream to stream). A body that is not one JSON object, or that repeats the top-levelmodelkey with different values, is rejected with a 400 validation error. A body larger than 10 MiB is rejected with PayloadTooLargeException (413). The gateway reads onlymodelandstream, and does not store the body.- Parameters:
body- The inference request body: one OpenAI JSON object, at most 10 MiB. Its content is passed to the model server unchanged, except that the request is always sent with"stream": false: this operation returns one JSON document, so a"stream": truein the body is overridden (use InvokeGlobalInferenceGatewayWithResponseStream to stream). A body that is not one JSON object, or that repeats the top-levelmodelkey with different values, is rejected with a 400 validation error. A body larger than 10 MiB is rejected with PayloadTooLargeException (413). The gateway reads onlymodelandstream, and does not store the body.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
overrideConfiguration
InvokeGlobalInferenceGatewayRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Description copied from interface:AwsRequest.BuilderAdd an optional request override configuration.- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder- Parameters:
overrideConfiguration- The override configuration.- Returns:
- This object for method chaining.
-
overrideConfiguration
InvokeGlobalInferenceGatewayRequest.Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Description copied from interface:AwsRequest.BuilderAdd an optional request override configuration.- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder- Parameters:
builderConsumer- AConsumerto which an emptyAwsRequestOverrideConfiguration.Builderwill be given.- Returns:
- This object for method chaining.
-