Skip to main content

aws_sdk_sagemakergatewayruntime/client/
invoke_global_inference_gateway_with_response_stream.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`InvokeGlobalInferenceGatewayWithResponseStream`](crate::operation::invoke_global_inference_gateway_with_response_stream::builders::InvokeGlobalInferenceGatewayWithResponseStreamFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`gateway_id(impl Into<String>)`](crate::operation::invoke_global_inference_gateway_with_response_stream::builders::InvokeGlobalInferenceGatewayWithResponseStreamFluentBuilder::gateway_id) / [`set_gateway_id(Option<String>)`](crate::operation::invoke_global_inference_gateway_with_response_stream::builders::InvokeGlobalInferenceGatewayWithResponseStreamFluentBuilder::set_gateway_id):<br>required: **true**<br>The ID of the Global Inference Gateway to invoke, as for InvokeGlobalInferenceGateway.<br>
7    ///   - [`accept(impl Into<String>)`](crate::operation::invoke_global_inference_gateway_with_response_stream::builders::InvokeGlobalInferenceGatewayWithResponseStreamFluentBuilder::accept) / [`set_accept(Option<String>)`](crate::operation::invoke_global_inference_gateway_with_response_stream::builders::InvokeGlobalInferenceGatewayWithResponseStreamFluentBuilder::set_accept):<br>required: **false**<br>The MIME type you want for the response. It is passed to the model server.<br>
8    ///   - [`content_type(impl Into<String>)`](crate::operation::invoke_global_inference_gateway_with_response_stream::builders::InvokeGlobalInferenceGatewayWithResponseStreamFluentBuilder::content_type) / [`set_content_type(Option<String>)`](crate::operation::invoke_global_inference_gateway_with_response_stream::builders::InvokeGlobalInferenceGatewayWithResponseStreamFluentBuilder::set_content_type):<br>required: **true**<br>The MIME type of the request body, as for InvokeGlobalInferenceGateway. Pass `application/json`.<br>
9    ///   - [`customer_identity_token(impl Into<String>)`](crate::operation::invoke_global_inference_gateway_with_response_stream::builders::InvokeGlobalInferenceGatewayWithResponseStreamFluentBuilder::customer_identity_token) / [`set_customer_identity_token(Option<String>)`](crate::operation::invoke_global_inference_gateway_with_response_stream::builders::InvokeGlobalInferenceGatewayWithResponseStreamFluentBuilder::set_customer_identity_token):<br>required: **false**<br>The customer identity token (a JWT), as for InvokeGlobalInferenceGateway. It is passed unchanged to the inference gateway, which validates it.<br>
10    ///   - [`body(Blob)`](crate::operation::invoke_global_inference_gateway_with_response_stream::builders::InvokeGlobalInferenceGatewayWithResponseStreamFluentBuilder::body) / [`set_body(Option<Blob>)`](crate::operation::invoke_global_inference_gateway_with_response_stream::builders::InvokeGlobalInferenceGatewayWithResponseStreamFluentBuilder::set_body):<br>required: **true**<br>The inference request body, as for InvokeGlobalInferenceGateway, except that the request is always sent with `"stream": true`: this operation returns an event stream, so a `"stream": false` in the body (or no `stream` key) is overridden. A body larger than 10 MiB is rejected with PayloadTooLargeException (413).<br>
11    /// - On success, responds with [`InvokeGlobalInferenceGatewayWithResponseStreamOutput`](crate::operation::invoke_global_inference_gateway_with_response_stream::InvokeGlobalInferenceGatewayWithResponseStreamOutput) with field(s):
12    ///   - [`body(EventReceiver<ResponseStream, ResponseStreamError>)`](crate::operation::invoke_global_inference_gateway_with_response_stream::InvokeGlobalInferenceGatewayWithResponseStreamOutput::body): The response as an AWS event stream (application/vnd.amazon.eventstream).
13    /// - On failure, responds with [`SdkError<InvokeGlobalInferenceGatewayWithResponseStreamError>`](crate::operation::invoke_global_inference_gateway_with_response_stream::InvokeGlobalInferenceGatewayWithResponseStreamError)
14    pub fn invoke_global_inference_gateway_with_response_stream(
15        &self,
16    ) -> crate::operation::invoke_global_inference_gateway_with_response_stream::builders::InvokeGlobalInferenceGatewayWithResponseStreamFluentBuilder
17    {
18        crate::operation::invoke_global_inference_gateway_with_response_stream::builders::InvokeGlobalInferenceGatewayWithResponseStreamFluentBuilder::new(self.handle.clone())
19    }
20}